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

Where the relevance of the explained tokens went. Every vector has one value per position. The ledger balances exactly: value = prompt + mask + leak (+ relayed in CommitmentMode::StepLocal, where it is an endpoint). More...

#include <masked_diffusion_lrp.hpp>

Public Member Functions

double prompt_total () const
 
double relayed_total () const
 
double mask_total () const
 
double leak_total () const
 

Public Attributes

CommitmentMode mode = CommitmentMode::Graph
 
double value = 0
 The explained value: the targets' logits, each at the step that wrote it, summed. The relevance seeded, as LXT seeds a logit.
 
std::vector< float > prompt
 Relevance on the prompt (positions not masked in the input), from every step. Zero elsewhere.
 
std::vector< float > relayed
 Relevance that reached each generated position from later steps. Graph: relayed onward from the step that wrote it. StepLocal: stopped there.
 
std::vector< float > mask
 Relevance each position absorbed while it was masked, summed over steps: the mask sink.
 
std::vector< CommitmentHop > hops
 One entry per step explained, in the order explained (the last step first). Steps nothing was seeded at aren't run.
 
std::vector< std::vector< float > > step_relevance
 For each of the trajectory's steps, the relevance on its input (L values), or empty for a step that wasn't run.
 

Detailed Description

Where the relevance of the explained tokens went. Every vector has one value per position. The ledger balances exactly: value = prompt + mask + leak (+ relayed in CommitmentMode::StepLocal, where it is an endpoint).

Member Function Documentation

◆ leak_total()

double pulsatrix::CommitmentRelevance::leak_total ( ) const

◆ mask_total()

double pulsatrix::CommitmentRelevance::mask_total ( ) const

◆ prompt_total()

double pulsatrix::CommitmentRelevance::prompt_total ( ) const

◆ relayed_total()

double pulsatrix::CommitmentRelevance::relayed_total ( ) const

Member Data Documentation

◆ hops

std::vector<CommitmentHop> pulsatrix::CommitmentRelevance::hops

One entry per step explained, in the order explained (the last step first). Steps nothing was seeded at aren't run.

◆ mask

std::vector<float> pulsatrix::CommitmentRelevance::mask

Relevance each position absorbed while it was masked, summed over steps: the mask sink.

◆ mode

CommitmentMode pulsatrix::CommitmentRelevance::mode = CommitmentMode::Graph

◆ prompt

std::vector<float> pulsatrix::CommitmentRelevance::prompt

Relevance on the prompt (positions not masked in the input), from every step. Zero elsewhere.

◆ relayed

std::vector<float> pulsatrix::CommitmentRelevance::relayed

Relevance that reached each generated position from later steps. Graph: relayed onward from the step that wrote it. StepLocal: stopped there.

◆ step_relevance

std::vector<std::vector<float> > pulsatrix::CommitmentRelevance::step_relevance

For each of the trajectory's steps, the relevance on its input (L values), or empty for a step that wasn't run.

◆ value

double pulsatrix::CommitmentRelevance::value = 0

The explained value: the targets' logits, each at the step that wrote it, summed. The relevance seeded, as LXT seeds a logit.


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