NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Geometry, topology and mechanistic interpretability of large scale AI models

Alessio Ansuini, Lorenzo Basile, Federica Bazzocchi, Matteo Biagetti, Alberto Cazzaniga, Stefano Cozzini, Francesca Cuturello, Diego Doimo, Yuri Gardinazzi, Ruggero Lot, Francesco Ortu, Emanuele Panizon, Valerio Piomponi, Tommaso Rodani, Alessandro Serra, Niccolò Tosato, Lucrezia ValerianiItal-IA 2025

Abstract

As Large Language Models (LLMs) and Vision-Language Models (VLMs) scale, they become increasingly opaque, presenting significant risks for safety-critical applications. This research, conducted by the Laboratory of Data Engineering (LADE), utilizes advanced mathematical frameworks—specifically geometry and topology—to deconstruct the internal representations of these "black box" systems. By analyzing high-dimensional data manifolds, the authors uncover how models organize information, manage conflicting facts, and develop universal processing strategies. This paper summarizes key methodologies, including Intrinsic Dimension (ID) analysis and mechanistic probing, and demonstrates their efficacy in domains such as proteomics and material science.

Introduction

The rapid advancement of AI has shifted the focus from mere performance metrics to the foundational understanding of model behavior. While we know these models work, the internal logic governing their decisions remains largely unknown. This lack of transparency is particularly problematic in fields like medicine and the physical sciences. The authors address this by investigating the "shape" of data as it passes through neural layers, seeking to identify the specific "circuits" responsible for complex tasks and how different training regimes, such as fine-tuning versus in-context learning, alter a model's internal geometry.

Methodology

The research employs a multi-pronged framework to probe the internal states of large-scale models:

  • Intrinsic Dimension (ID) Analysis: Rather than focusing on raw layer size, researchers calculate the minimum number of variables required to describe the data manifold. This identifies "phase transitions" where models suddenly compress information or organize it into semantic clusters.
  • Topological Data Analysis (TDA): TDA is used to track the "birth and death" of topological cycles across layers, identifying robust features that persist across different architectures and datasets.
  • Mechanistic Probing: This involves direct intervention in hidden states to separate competing mechanisms, such as distinguishing how a model processes factual versus counterfactual statements.
  • ResiDual: A novel, interpretable method for VLMs that identifies and reweights specialized attention heads to enhance zero-shot performance without requiring extensive fine-tuning.
  • Forward-Forward Algorithm: The team explores biologically inspired alternatives to backpropagation to understand how different learning objectives influence representation geometry.

Data and Domain Applications

The LADE laboratory's research spans several specialized domains:

  • Proteomics: Utilizing MSA-based models for protein remote homology detection and stability prediction.
  • Scientific Imaging: Applying geometric insights to Scanning Tunneling Microscopy (STM) for artifact detection and data annotation.
  • Multimodal Reasoning: Developing new counterfactual datasets to test how VLMs resolve conflicts between visual input and internal training knowledge.
  • General Benchmarking: Standard QA tasks are used to compare the structural impacts of fine-tuning and in-context learning.

Key Insights and Results

The Geometry of Learning

The researchers discovered that In-Context Learning (ICL) and supervised fine-tuning (SFT) create fundamentally different internal structures. ICL tends to recover semantic subjects in early layers, whereas SFT sharpens answer representations in deeper layers. Furthermore, a direct correlation was found between the intrinsic dimension of token representations and model loss; high-dimensional regions often signal a failure to generalize.

Architectural Universality

Despite differences in scale and training data, Transformers appear to employ remarkably universal strategies for organizing information. In multimodal models, a dichotomy exists between "narrow gate" architectures, which funnel visual information through a few tokens, and distributed architectures, which spread interactions across the network. The former are easier to intervene upon, while the latter are more robust.

Practical Outcomes

  • Bioinformatics: The geometric approach resulted in a state-of-the-art pipeline for predicting protein stability changes caused by mutations.
  • Material Science: The "STM explorer" tool successfully filters microscope tip artifacts, improving data quality for electron microscopy.
  • Knowledge Disentanglement: Mechanistic probes successfully separated the internal pathways LLMs use for factual vs. counterfactual information, revealing how these facts compete to drive final outputs.

Conclusion and Future Directions

While significant progress has been made in identifying where information is stored, disentangling cross-modal communication remains a challenge. Future work will focus on "surgical" interventions to rank and manage attention heads responsible for toxic or emotional content, deepening the study of knowledge conflict resolution, and exploring energy-efficient, biologically inspired learning algorithms to create more transparent AI systems.

Summary updated

BibTeX
@inproceedings{ansuini2025geometry,
  author = {Alessio Ansuini and Lorenzo Basile and Federica Bazzocchi and Matteo Biagetti and Alberto Cazzaniga and Stefano Cozzini and Francesca Cuturello and Diego Doimo and Yuri Gardinazzi and Ruggero Lot and Francesco Ortu and Emanuele Panizon and Valerio Piomponi and Tommaso Rodani and Alessandro Serra and Niccolò Tosato and Lucrezia Valeriani},
  title = {{Geometry, topology and mechanistic interpretability of large scale AI models}},
  booktitle = {Ital-IA},
  year = {2025},
}
Figure