# Commutator Memory: Sparse, Path-Local Reading and Steering in Language Models

*John Sweeney*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/156037) · [Open on the map](../papers.html#p156037)

Category: [LLM Reasoning, Memory & RAG](../pcat/19.md) › [Hallucination Detection Methods](../pgroup/500.md) · Type: new method · Keywords: training order effects, Lie bracket, token localization, intervention analysis, paired endpoint statistic

## Summary
Commutator memory provides a localized, intervention-testable, and paired-endpoint-readable measure of training order effects in language models by projecting Lie brackets onto token scores.

## Explained to a 5-year-old
When we train a big language model, the order of steps matters. If we swap two steps, the model changes, but we only saw a big number change before. This paper finds a way to see exactly which words the change affects, using a kind of math trick. It shows that most of the change is hidden in a few important words, and we can even fix some of it. This helps us understand why the order matters.

## Explained to a 5-year-old, longer
Imagine you are teaching a robot two tricks, A and B. If you do A then B, the robot ends up doing something different than if you do B then A. Usually you only notice that the robot behaves differently, but you don’t know which part of the behavior changed. This paper creates a special method to look inside the robot’s brain and find the exact spots where the order made a difference. It uses a mathematical idea called a Lie bracket to point to specific words or actions that are affected. By looking at these spots, the researchers can see that the change is concentrated in a few key areas, and they can even intervene to reduce the difference. They also develop a way to tell, just from the start and end models, whether the order of training steps was swapped. This gives us a clearer picture of how training order influences language models and opens the door to better control over them.

## For a technical reader
The paper defines a two-stage path (A,B) and computes the Lie bracket of the stages’ Jacobians and Hessians, projecting it onto token scores via logits to obtain a localized measure of order effects. It demonstrates that this measure preserves top-token supports far better than random directions and recovers a majority of active tokens. Interventions on high-τk tokens close a substantial portion of the ordering gap, and a paired-endpoint statistic reliably distinguishes training order across multiple LLMs.

## Problem
When swapping training stages of a language model, the final model changes, but overall metrics only show that something moved, not where the change occurs. The problem is to characterize this order-dependent residue as a structured, localized memory trace that can be measured and intervened upon.

## Method
The approach defines a two-stage path (A,B), computes the Lie bracket of the stages' Jacobians and Hessians, projects this bracket onto token scores via logits, and uses these scores to localize and intervene on order effects. It also introduces a paired-endpoint statistic to detect training order differences.

## Results
The token readout is highly localized (82-99% top-20 overlap vs. 35-49% for random directions) and recovers 53-57% of active tokens; interventions on top-τk tokens close 32% (median) of the ordering gap, and the paired-endpoint statistic distinguishes training order in 66/72 units across four LLMs.

## Contributions
It introduces a localized memory trace of training order effects via Lie-bracket projection onto token scores, provides intervention leverage to close ordering gaps, and offers a paired-endpoint statistic to detect order differences across models.

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](../feedback/?on=p/156037)
