NeurIPS 2026QuestionsPapersAreasAboutMarkdown

StructLens: A Structural Lens for Language Models via Maximum Spanning Trees

Haruki Sakajo, Frederikus Hudi, Yusuke Sakai, Hidetaka Kamigaito, Taro Watanabe

NeurIPS page · OpenReview · Open on the map

Category: Interpretability & Model Adaptation › Mechanistic Interpretability · Type: new method · Keywords: language model interpretability, representation analysis, maximum spanning trees, structural organization, pre-training dynamics

Areas: Interpretability › Mechanistic Interpretability › Mechanistic Interpretability

Summary

StructLens is a framework that analyzes language model representations via maximum spanning trees to reveal how token representations are organized across layers and training.

Explained to a 5-year-old

Big computers learn to understand words by making little pictures inside them. We draw a special kind of picture that shows how the words are linked together like a family tree. This picture helps us see that words that appear close together in a sentence are also close in the picture. We also see that the model starts to notice small groups of words early, and bigger groups later as it learns. This gives us a new way to look inside language models and understand how they organize their knowledge.

Explained to a 5-year-old, longer

Computers can learn to read and understand words by looking at lots of text. Inside these computers, there are hidden pictures that show how words are related. We created a new way to draw those hidden pictures using a special kind of tree that connects words. This tree helps us see which words are close to each other in the picture, just like friends sitting near each other. We found that when the model looks at a sentence, the words that appear next to each other also appear close together in the picture. The middle layers of the model show the strongest connections between nearby words. By looking at different stages of learning, we saw that small groups of words become clear early on. Larger groups of words take longer to become clear as the model keeps learning. This gives us a new tool to understand how language models organize their knowledge over time. It helps researchers see patterns that were hidden before. The method can be used to study other kinds of models that work with language. Overall, it makes it easier to open up the black box of big language models.

For a technical reader

The paper introduces a structural analysis framework that builds maximum spanning trees over residual stream representations to capture token relationships. By examining how contiguous tokens cluster in representation space, the authors observe that middle layers exhibit the strongest local-span organization. They also show that smaller representation units emerge early in pre-training, while larger units appear later. This approach provides a holistic view complementary to attention patterns and sparse autoencoders, revealing how models organize their internal representations across layers and training stages. The findings can guide future model design and interpretability tools by highlighting the temporal dynamics of representation formation.

Problem

Understanding how language models organize token representations internally is challenging because existing interpretability methods focus on attention patterns and sparse autoencoders, overlooking the structural relationships among representations.

Method

The approach constructs maximum spanning trees from semantic representations in residual streams, inspired by dependency parsing, to summarize token relationships and examine local-span organization across layers and training stages.

Results

The approach finds that middle layers exhibit the strongest local-span organization and that smaller representation units appear earlier in training while larger units emerge later.

Contributions

It introduces a holistic structural analysis framework that uses maximum spanning trees to reveal token representation organization across layers and training, uncovering layer-dependent local-span patterns and the temporal emergence of representation units.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction