mlsanityData to 14 Oct 2026

TensorLens: End-to-End Transformer Analysis via High-Order Attention Tensors

arXiv 2601.17958 ↗First posted 25 Jan 2026cs.LGcited by 3

Not on the map. Why?

Abstract (arXiv)

Attention matrices are fundamental to transformer research, supporting a broad range of applications including interpretability, visualization, manipulation, and distillation. Yet, most existing analyses focus on individual attention heads or layers, failing to account for the model's global behavior. While prior efforts have extended attention formulations across multiple heads via averaging and matrix multiplications or incorporated components such as normalization and FFNs, a unified and complete representation that encapsulates all transformer blocks is still lacking. We address this gap by introducing TensorLens, a novel formulation that captures the entire transformer as a single, input-dependent linear operator expressed through a high-order attention-interaction tensor. This tensor jointly encodes attention, FFNs, activations, normalizations, and residual connections, offering a theoretically coherent and expressive linear representation of the model's computation. TensorLens is theoretically grounded and our empirical validation shows that it yields richer representations than previous attention-aggregation methods. Our experiments demonstrate that the attention tensor can serve as a powerful foundation for developing tools aimed at interpretability and model understanding. Our code is attached as a supplementary.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 36 of its 51 references that are in the map. First posted on arXiv 25 Jan 2026.

Builds on

36 of 51 references.

References · 36

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2020Language Models are Few-Shot Learnerscited by 32,419
  4. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  5. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  6. 2016Layer Normalizationcited by 5,669
  7. 2020Training data-efficient image transformers & distillation through attentioncited by 4,586
  8. 2019ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Taskscited by 2,222
  9. 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,786
  10. 2017Learning Important Features Through Propagating Activation Differencescited by 1,458
  11. 2017Towards A Rigorous Science of Interpretable Machine Learningcited by 1,416
  12. 2016Understanding intermediate layers using linear classifier probescited by 1,353
24 more
  1. 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
  2. 2020Quantifying Attention Flow in Transformerscited by 775
  3. 2020Transformer Interpretability Beyond Attention Visualizationcited by 627
  4. 2023Textbooks Are All You Need II: phi-1.5 technical reportcited by 565
  5. 2024Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inferencecited by 554
  6. 2023Hyena Hierarchy: Towards Larger Convolutional Language Modelscited by 393
  7. 2020Opportunities and Challenges in Explainable Artificial Intelligence (XAI): A Surveycited by 254
  8. 2023Linearity of Relation Decoding in Transformer Language Modelscited by 200
  9. 2020Dissecting Neural ODEscited by 153
  10. 2023Representational Strengths and Limitations of Transformerscited by 133
  11. 2024AttnLRP: Attention-Aware Layer-Wise Relevance Propagation for Transformerscited by 120
  12. 2022XAI for Transformers: Better Explanations through Conservative Propagationcited by 100
  13. 2024The Hidden Attention of Mamba Modelscited by 91
  14. 2019A Tensorized Transformer for Language Modelingcited by 86
  15. 2022Entropy-based Attention Regularization Frees Unintended Bias Mitigation from Listscited by 55
  16. 2021Incorporating Residual and Normalization Layers into Analysis of Masked Language Modelscited by 51
  17. 2022GlobEnc: Quantifying Global Token Attribution by Incorporating the Whole Encoder Layer in Transformerscited by 44
  18. 2018Multi-Head Attention with Disagreement Regularizationcited by 35
  19. 2023Analyzing Feed-Forward Blocks in Transformers through the Lens of Attention Mapscited by 33
  20. 2024Backward Lens: Projecting Language Model Gradients into the Vocabulary Spacecited by 32
  21. 2024Explaining Modern Gated-Linear RNNs via a Unified Implicit Attention Formulationcited by 11
  22. 2020Kronecker Attention Networkscited by 9
  23. 2025Revisiting LRP: Positional Attribution as the Missing Ingredient for Transformer Explainabilitycited by 6
  24. 2024Reversed Attention: On The Gradient Descent Of Attention Layers In GPTcited by 2

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 3.

3 papers.