From the source
LG AI Research presented a mechanistic interpretability study of TokenGT, a graph transformer, at the third Mechanistic Interpretability Workshop, following ICML 2024 and NeurIPS 2025.
- The work, "Discovering Mechanisms in Tokenized Graph Transformers," is described as a first step toward applying mechanistic interpretability to graph transformers, an architecture often used for molecular data in chemistry and biology.
- Most mechanistic interpretability research has focused on LLMs, and findings are usually confined to the specific target model, leaving graph transformers largely unexplored.
- The team trained separate TokenGT models, specifically a T5 encoder, on synthetic undirected, unweighted graphs with no node or edge features, shuffling node IDs each batch so the model learns graphs independently of node indices.
- The models were tested on degree calculation, cycle detection and shortest-path distance calculation, and all three reached nearly 100% validation accuracy.
- A central finding is that all three models begin with a shared local-structure computation: in the first transformer layer, node tokens attend more strongly to edge tokens whose endpoint IDs match the node identifier, recovering which edges are incident to each node despite the architecture having no built-in graph operations.
- Query-key analysis shows this ID-matching mechanism is distributed across nearly all attention heads in the first layer and stays consistent across the three task-specific models.






