Graph Signal Processing Reveals LLM Numerical Inference Mechanisms

Jiajun Bao, Zihao Qi, Toni J. B. Liu, Gurbir Arora, Rapha\"el Sarfati, Nicolas Boull\'e, Christopher J. Earls· August 5, 2026 View original

Key takeaways

  • LLMs use graph-like structures to organize numerical information during in-context learning.
  • Attention mechanisms create weighted graphs over tokens, with hidden states as signals.
  • Input complexity systematically influences the internal graph structure and signal properties.
  • Understanding these internal signatures can lead to more robust numerical inference in LLMs.

Who benefits

AI ResearchFinanceScientific ComputingData AnalyticsEngineering

Summary

This research applies a graph signal processing perspective to understand how large language models (LLMs) organize numerical information during in-context learning. It reveals that attention mechanisms induce weighted graphs over tokens, and hidden states define signals on these nodes, showing systematic internal signatures related to input complexity.

Large Language Models (LLMs) have shown remarkable abilities in performing numerical inference through in-context learning (ICL) when sequences are presented as text. While previous studies have focused on evaluating the output accuracy of these numerical tasks, the internal mechanisms of how LLMs represent and process numerical information remain largely unclear. This paper introduces a novel approach using graph signal processing to delve into these internal representations. By viewing attention as a mechanism that creates a weighted graph among tokens and considering token hidden states as signals on these graph nodes, the researchers uncover systematic patterns. They found that as the context length increases, the internal representations become more distinctly differentiated based on the dynamical complexity of the input. Simpler numerical inputs lead to token graphs with stronger global connectivity and smoother, spectrally concentrated hidden-state signals. Conversely, more complex inputs result in localized graphs and hidden-state signals with broader spectral support and higher high-frequency energy. These findings highlight consistent, context-dependent internal signatures across different LLM families during numerical ICL.

Why it matters

Understanding how LLMs process numerical information internally is crucial for improving their reliability and interpretability in quantitative tasks. This research provides insights that can guide the development of more robust and accurate LLMs for scientific, financial, and engineering applications.

How to implement this in your domain

  1. 1Analyze the internal representations of your LLMs when performing numerical tasks using graph signal processing techniques.
  2. 2Develop diagnostic tools to visualize token-graph structures and hidden-state signals for different input complexities.
  3. 3Use these insights to identify potential weaknesses or biases in numerical reasoning within your LLMs.
  4. 4Experiment with fine-tuning strategies that specifically target the spectral properties of hidden states for improved numerical ICL.
  5. 5Inform future LLM architecture design to better handle and represent numerical sequences.

Original post by Jiajun Bao, Zihao Qi, Toni J. B. Liu, Gurbir Arora, Rapha\"el Sarfati, Nicolas Boull\'e, Christopher J. Earls

"arXiv:2608.03015v1 Announce Type: new Abstract: Pretrained large language models (LLMs) have demonstrated in-context learning (ICL) capabilities for numerical inference over sequences serialized as text. Prior work has identified and characterized this form of numerical inference…"

View on X

Originally posted by Jiajun Bao, Zihao Qi, Toni J. B. Liu, Gurbir Arora, Rapha\"el Sarfati, Nicolas Boull\'e, Christopher J. Earls on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses