pulsatrix 1.1.0
Loading...
Searching...
No Matches
pulsatrix::AttnLrpSequenceResult Struct Reference

One reference sequence's comparison. More...

#include <attnlrp_parity.hpp>

Public Attributes

int64_t num_tokens = 0
 
int64_t target = 0
 The explained token at the last position (the reference's argmax).
 
float token_correlation = 0.0f
 Pearson correlation of the per-token input relevance with LXT's.
 
float key_correlation = 0.0f
 The lowest, over layers, Pearson correlation of the per-(KV head, token) relevance at k_proj's output with LXT's; value_correlation is the same at v_proj.
 
float value_correlation = 0.0f
 
float max_relative_diff = 0.0f
 max |pulsatrix - LXT| over the tokens, divided by the largest |LXT| token relevance: catches a scale difference, which correlation can't see.
 
float relevance_sum = 0.0f
 Total input relevance, pulsatrix's and LXT's (both seeded with the logit).
 
float reference_sum = 0.0f
 

Detailed Description

One reference sequence's comparison.

Member Data Documentation

◆ key_correlation

float pulsatrix::AttnLrpSequenceResult::key_correlation = 0.0f

The lowest, over layers, Pearson correlation of the per-(KV head, token) relevance at k_proj's output with LXT's; value_correlation is the same at v_proj.

◆ max_relative_diff

float pulsatrix::AttnLrpSequenceResult::max_relative_diff = 0.0f

max |pulsatrix - LXT| over the tokens, divided by the largest |LXT| token relevance: catches a scale difference, which correlation can't see.

◆ num_tokens

int64_t pulsatrix::AttnLrpSequenceResult::num_tokens = 0

◆ reference_sum

float pulsatrix::AttnLrpSequenceResult::reference_sum = 0.0f

◆ relevance_sum

float pulsatrix::AttnLrpSequenceResult::relevance_sum = 0.0f

Total input relevance, pulsatrix's and LXT's (both seeded with the logit).

◆ target

int64_t pulsatrix::AttnLrpSequenceResult::target = 0

The explained token at the last position (the reference's argmax).

◆ token_correlation

float pulsatrix::AttnLrpSequenceResult::token_correlation = 0.0f

Pearson correlation of the per-token input relevance with LXT's.

◆ value_correlation

float pulsatrix::AttnLrpSequenceResult::value_correlation = 0.0f

The documentation for this struct was generated from the following file: