Papers › Tracking Representation Dynamics in Large Language Models with Persistent Homology

Tracking Representation Dynamics in Large Language Models with Persistent Homology

17 Jun 2026arXiv:2606.19542added by Syntology

Naman Malhotra, Jay Ambadkar, Abhinav Gupta, Kushal Kasivel, Abbas Schwarz, Kamillo Ferry, Anthea Monod

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

Large language models are commonly aligned through supervised fine-tuning, yet little is known about how their internal representations evolve during this process. We study alignment dynamics using persistent homology by tracking the topology of activation spaces throughout fine-tuning. Across four transformer language models ranging from 1B to 7B parameters and three alignment objectives corresponding to helpful, harmless, and mixed training data, we find that the majority of topological reorganization occurs during the earliest stages of training. A dense checkpoint analysis reveals a transient peak in topological activity followed by rapid stabilization. We further show that different alignment objectives induce distinguishable topological trajectories, while instruction-tuned and pretrained models exhibit qualitatively different patterns of evolution. Our results suggest that persistent homology provides a complementary perspective on alignment, revealing representation-level changes that are not apparent from behavioral metrics alone.

PaperPDFCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2606.19542")

Code

Syntology Ran 23 of 27 code samples harvested from 1 repository linked to this paper; 4 have no recorded run. Of those that ran: 23 ran with no contract checked.

By repository: found in paper text by Syntology: 27 samples from 1 repository, 23 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

27 samples harvested; 23 ran; 0 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

23ran
4unverified

Licence: 0 of the 27 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from malhotranaman/tracking-representation-dynamics-with-persistent-homology. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

bootstrap_ci malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/analysis/stats.py found in paper text by Syntology ran MIT (permissive) · 51eac5b0969514f0 · report
centroid malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/analysis/baselines.py found in paper text by Syntology ran fingerprinted MIT (permissive) · 010bd987d79354b2 · report
centroid_drift malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/analysis/baselines.py found in paper text by Syntology ran fingerprinted MIT (permissive) · e7862623f7a48f35 · report
correlate malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/analysis/trajectories.py found in paper text by Syntology ran MIT (permissive) · fca13e03452f7848 · report
cross_val_accuracy malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/analysis/classify.py found in paper text by Syntology ran MIT (permissive) · 58620dcaa4abb2eb · report
feature_trajectory malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/analysis/trajectories.py found in paper text by Syntology ran MIT (permissive) · b456e001ef79cc16 · report
fit_full malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/analysis/classify.py found in paper text by Syntology ran MIT (permissive) · 3ded0586954bc634 · report
get_device malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/device.py found in paper text by Syntology ran MIT (permissive) · 71935ebe55b1fe12 · report
js malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/analysis/divergence.py found in paper text by Syntology ran MIT (permissive) · 7aa603bd51e0bc2f · report
kl malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/analysis/divergence.py found in paper text by Syntology ran MIT (permissive) · 626cff0e7fb7d225 · report
l2_mean_diff malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/analysis/stats.py found in paper text by Syntology ran fingerprinted MIT (permissive) · 6e3e6544a6c1b59a · report
load_exp1 malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/config.py found in paper text by Syntology ran MIT (permissive) · d376d5df57d73f50 · report
load_exp2 malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/config.py found in paper text by Syntology ran MIT (permissive) · 73de5f9e3f567281 · report
make_classifier malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/analysis/classify.py found in paper text by Syntology ran MIT (permissive) · ce79861aaeb0f94f · report
pca_summaries malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/analysis/pca.py found in paper text by Syntology ran fingerprinted MIT (permissive) · 2afb52bea555bc85 · report
permutation_test malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/analysis/stats.py found in paper text by Syntology ran MIT (permissive) · 7b708cec491923b8 · report
plot_evolution malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/viz/dynamics_plots.py found in paper text by Syntology ran MIT (permissive) · 5c2f34c82a56e379 · report
plot_grokking_dual malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/viz/dynamics_plots.py found in paper text by Syntology ran MIT (permissive) · d8547f900598f5f0 · report
plot_velocity malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/viz/dynamics_plots.py found in paper text by Syntology ran MIT (permissive) · 939124d0678a49c4 · report
resolve_dtype malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/device.py found in paper text by Syntology ran MIT (permissive) · a3e3458fdf8343c4 · report
subsample_clouds malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/sampling.py found in paper text by Syntology ran MIT (permissive) · 40e12ee7da8f1e50 · report
symmetric_kl malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/analysis/divergence.py found in paper text by Syntology ran MIT (permissive) · fdbc97bb9b626e9b · report
total_variance malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/analysis/baselines.py found in paper text by Syntology ran fingerprinted MIT (permissive) · 436bdd000624200b · report
describe malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/device.py found in paper text by Syntology unverified MIT (permissive) · 3171b6f56f728abf · report
global_filtration_range malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/analysis/dynamics.py found in paper text by Syntology unverified MIT (permissive) · baccdceec0407bef · report
run_velocity malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/analysis/dynamics.py found in paper text by Syntology unverified MIT (permissive) · 0d1728208d5ec90a · report
trajectory_with_ci malhotranaman/tracking-representation-dynamics-with-persistent-homology/src/phlatent/analysis/dynamics.py found in paper text by Syntology unverified MIT (permissive) · 91527b5241b8ad09 · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2606.19542, was issued in June 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections