cs.CLOct 12, 2026

RIFT: Token Influence Follows the Path of Least Resistance

Authors: Tingan Jin, Shuhang Dong, Haosong Li

Organizations: University of California, Los Angeles Los Angeles, CA, USA · Independent Researcher

Abstract

Which context tokens drive a language model's answer? Graph-based tools such as attention rollout and attention flow answer this from a single forward pass, yet their faithfulness in decoder-only models is rarely tested against interventions. We view the layers of a decoder as a causal network whose conductances are attention weights, and read a token's influence on the answer from the resistance between them. We propose RIFT (Resistance-based Information Flow in Transformers), which scores a token by the series resistance of its path of least resistance to the answer, found exactly by a classic shortest-path dynamic program. On synthetic in-context retrieval tasks and extractive question answering over Wikipedia paragraphs, RIFT predicts the effect of replacing a token with a Spearman correlation of 0.52-0.68; predicting a single replacement, it reaches 77-96% of the agreement between two different random replacements. It needs no gradients and no extra forward passes, scoring every token of a prompt in 0.9-3.4 ms on one CPU thread, whereas the replacement experiment needs a forward pass per token. On 576 held-out prompts from four models of two families (Qwen3 and Llama 3.2), it outperforms token distance, attention rollout and attention flow in every pre-specified comparison, by 0.23 to 0.88 in mean Spearman correlation, and it is the best or tied-best of all attention-based scores we test. Aggregates that add up all routes (attention flow, effective resistance and rollout) instead mostly encode token position: as a simple proposition shows, early tokens have many more parallel routes to the answer.

Figures & tables

Explore similar work

CardsList
  1. DeltaTrace: Efficient Signed Attribution for Reasoning Language Models

    Oct 19, 2026Chen Liang, Daoping Wu, Donghua Yang +4Feature AttributionLLM Interpretability

  2. RCStat: A Statistical Framework for using Relative Contextualization in Transformers

    Jun 24, 2025Debabrata Mahapatra, Shubham Agarwal, Apoorv Saxena +1Attention MechanismsTransformer Interpretability

  3. Ask Self, Ask Others: Relation Is All You Need

    Aug 20, 2026Yuting Ge, Pengju Yang, Mingkai NieSelf-AttentionDecoder-Only Language Models