SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.11042 · ICML · 2025

Persistent Topological Features in Large Language Models

Matteo Biagetti, Yuri Gardinazzi, Karthik Viswanathan, Giada Panerai, Alessio Ansuini, Alberto Cazzaniga

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 10 functions out of this paper's own repositories and ran 9 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
ritareasciencepark/zigzagllms canonical 5 of 5
RitAreaSciencePark/ZigZagLLMs canonical 4 of 5
FunctionStatusWhere it lives
check_dir Ran ritareasciencepark/zigzagllms/src/benchmark/benchmark.py
code served (permissive licence) · get_code("d8f3a9f76735c093")
div Ran RitAreaSciencePark/ZigZagLLMs/src/benchmark/post_process.py
code served (permissive licence) · get_code("d1af30de1d59a5a9")
flattening_for_zigzag_ver Ran ritareasciencepark/zigzagllms/src/zigzag/run_fast_zigzag.py
code served (permissive licence) · get_code("8360fa8b0b26a936")
get_embdims Ran RitAreaSciencePark/ZigZagLLMs/src/representation/rep-extraction/intrinsic_dimension/compute_distances.py
code served (permissive licence) · get_code("4a6302d7905ab810")
get_intersection Ran RitAreaSciencePark/ZigZagLLMs/src/zigzag/utils/fclaux.py
code served (permissive licence) · get_code("d925e138f4a79f89")
get_isin Ran RitAreaSciencePark/ZigZagLLMs/src/zigzag/utils/fclaux.py
code served (permissive licence) · get_code("29437b95d5fb999a")
iord Ran ritareasciencepark/zigzagllms/src/zigzag/run_fast_zigzag.py
code served (permissive licence) · get_code("e0c72a9bd230cf23")
layers_to_cut_given_r Ran ritareasciencepark/zigzagllms/src/benchmark/benchmark.py
code served (permissive licence) · get_code("ed4aa8002a88c246")
similarity_persistance Ran ritareasciencepark/zigzagllms/src/benchmark/benchmark.py
code served (permissive licence) · get_code("b063c470e47070c8")
read_pd_from_csv Not yet run RitAreaSciencePark/ZigZagLLMs/src/benchmark/post_process.py
code served (permissive licence) · get_code("5df05607e799aec8")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Understanding the decision-making processes of large language models is critical given their widespread applications. To achieve this, we aim to connect a formal mathematical framework-zigzag persistence from topological data analysis -with practical and easily applicable algorithms. Zigzag persistence is particularly effective for characterizing data as it dynamically transforms across model layers. Within this framework, we introduce topological descriptors that measure how topological features, p-dimensional holes, persist and evolve throughout the layers. Unlike methods that assess each layer individually and then aggregate the results, our approach directly tracks the full evolutionary path of these features. This offers a statistical perspective on how prompts are rearranged and their relative positions changed in the representation space, providing insights into the system's operation as an integrated whole. To demonstrate the expressivity and applicability of our framework, we highlight how sensitive these descriptors are to different models and a variety of datasets. As a showcase application to a downstream task, we use zigzag persistence to establish a criterion for layer pruning, achieving results comparable to state-of-the-art methods while preserving the system-level perspective.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2410.11042")
get_code_for_paper("2410.11042")
have("2410.11042")

Connect an agent — have() is free.