Manuscript Offprint

arXiv:2610.25877

DeltaTrace: Efficient Signed Attribution for Reasoning Language Models

Chen Liang, Daoping Wu, Donghua Yang, Zhiyu Liang, Ying Zhang, Shuguang Xiong, Hongzhi Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

We study how words in the context support or oppose a language model's response and present DELTATRACE, a novel attribution framework that explains the effect of input tokens on a fixed model response. DELTATRACE measures how the response's log-probability changes when the context tokens being explained are masked. To distribute this difference among source tokens, it constructs operator-specific local rules for finite changes and composes them backward through the computational graph using effective secant slopes. Each token is assigned a signed attribution as the inner product of its embedding displacement and the corresponding backward-propagated slope. Local conservation makes these contributions sum to the measured score difference and preserves their meaning when aggregated over sentences or passages. DELTATRACE supports both attention and linear-attention models, with auxiliary memory growing linearly with sequence length at fixed model dimensions and chunk size. On the evaluated attention model, DELTATRACE achieves the lowest deletion-faithfulness scores (RISE and MAS) on most retrieval and reasoning tasks and the highest needle-in-a-haystack Recall, exceeding FlashTrace by 5.67-24.33 percentage points. On the evaluated hybrid attention and linear-attention model, DELTATRACE lowers RISE on 9 tasks and MAS on 12 relative to FlashTrace.

1 INTRODUCTION

As people increasingly use large language models (LLMs) to support decisions, they need to know what information the models rely on. Input attribution helps answer this question by tracing a response back to the words in its context. A reasoning response depends on both the information available and the computations that select and combine it (Ferrando & Voita, 2024). Figure 1(d) shows a passage containing a playwright, William Shakespeare, and a composer, William Walton. The names supply candidate answers, and the phrase “the author of the play” specifies which role to use. Attribution should account for how both the candidate names and the requested role affect the response. It should also distinguish words that support the response from words that oppose it.

We ask how masking selected context tokens changes a language model’s score for a fixed response. We compare the original prompt with a reference in which the selected tokens are re-

(a) Recall (%)

Figure

(b) Attribution time

Budgets: 10%; †20%; ‡30%.

(a) Overall method

Two forward runs with fixed response y

Figure

Original x1x_{1} Secant slope meim_{e_{i}} Reference x0x_{0}

Token embed EOS embed

Displacement Δei\Delta e_{i} Slop meim_{e_{i}}

Token score Ai=⟨mei,Δei⟩A_{i} = \langle m_{e_{i}}, \Delta e_{i} \rangle

Displacement Δe×\Delta e \times slope me=DisplacementΔFm_{e} = Displacement \Delta F

Reverse-pass examples

(b) Attention product

→ Forward

← Backward DfTD_{f}^{T}

Attention weights

Value vectors

Output

Figure

(c) Gated DeltaNet

Memory

Value, key, gates

Memory

Update

Query

Readout

St−1S_{t-1}

StS_{t}

OtO_{t}

mSt−1m_{S_{t-1}}

mStm_{S_{t}}

motm_{o_{t}}

Value, key, gate slopes

Query slopes

(d) Choose the playwright, not the composer.

CONTEXT EXCERPTS

... William Shakespeare's play

... The score is by William Walton.

REQUESTED ROLE (EXCERPT)

... the author of the play...

Full input

Name-span total (nats)

+1.56

-1.13

Token contribution (nats)

≤-2.5

0

≥+2.5

Shown spans underlined

MoreHopQA example

Answer

William

Shakespeare

∑iAi=ΔF\sum_{i} A_i = \Delta F

Across all input sources

Figure 1: DeltaTrace assigns a response-score difference to input tokens. (a) Two executions score the same fixed response y, with source tokens kept in the original input and masked with EOS in the reference. Each operation's formula and values from both runs determine local maps DfD_f that express output changes as weighted sums of input changes. Applying their transposes in reverse yields m, the effective secant slopes from the indicated activations to the response log-probability F. At the inputs, multiplying these slopes by embedding displacements and summing within each token gives contributions whose total recovers the measured ΔF\Delta F. Δ\Delta denotes original minus reference. (b, c) Attention and linear attention (Gated DeltaNet) are examples within this reverse pass. Gray arrows show forward operations, and purple arrows return these slopes to their inputs. Other operations appear in Appendix A.3. (d) Positive and negative scores identify support and opposition. Name annotations sum token scores, colors saturate at ±2.5\pm2.5 nats, and ellipses omit text. The target is the full stored response plus EOS.

placed by EOS, while the response and its preceding tokens remain fixed. The resulting score difference is divided into signed contributions for the selected tokens.

Attribution methods can explain prediction differences relative to a reference (Sundararajan et al., 2017; Shrikumar et al., 2017). Relevance propagation and representation decomposition trace information through attention and recurrent states (Ali et al., 2022; Achitbat et al., 2024; Rezaei Jafari et al., 2024; Modarressi et al., 2023; Pitorro & Treviso, 2025). FlashTrace follows source importance through multi-token responses (Pan et al., 2026). For the fixed-response question above, the target is a finite log-probability difference. Computing token contributions requires relating the response-score difference to activation differences throughout the model.

Existing attribution methods often propagate local derivatives or relevance. For the counterfactual above, this leaves a gap. Masking creates a finite score change, and several operands can change together inside one operation. In attention, both the weights and values change. In Gated DeltaNet, values, keys, queries, and gates jointly affect memory updates and reads (Yang et al., 2025). The missing rule is one that expresses the observed output change in terms of these joint input changes before carrying it backward.

DELTATRACE traces the finite score difference ΔF\Delta F back to its source tokens. It modifies back-propagation because derivatives evaluated at the original execution generally cannot reconstruct the finite response-score change caused by masking. From each operation's formula and the two executions, it constructs local finite-change rules and composes them in one reverse pass into effective secant slopes from input embeddings to the response score. Just as a secant slope converts horizontal displacement into vertical displacement, multiplying each embedding component's change by its effective slope gives its signed share of the score change. Summing these shares within a token gives its attribution; local conservation makes the total across all tokens equal the measured difference and preserves this interpretation when tokens are grouped into sentences or passages. Figure 1(a) shows the complete method, while (b) and (c) illustrate its backward calculations for two operations.

References (31)