Deep sequence models tend toward geometric memory, reasons remain unclearDeep sequence models tend to memorize geometrically; it is unclear why
The authors say Transformers do in-weights pathfinding with geometric memory; G_{10^4,10} first token is 57.16%.
- Without high-level patterns, deep sequence models may still store atomic co-occurrences as embeddings with global relations, rather than lookup tables. The authors aim to explain why geometric memory prevails over associative memory that also fits the data and is equally simple.
- The authors have Transformers and Mamba trained from scratch memorize the edges of a fixed path-star, then pathfind on unseen leaves, and compare with associative storage with frozen embeddings. Then, using a two-layer Node2Vec-style model without intermediate layers, they check whether embeddings bias toward top graph spectrum directions when there is only one-hop cross-entropy and width exceeds node count.
- When training only the first token, Transformer achieves 100% accuracy on G_{5×10^3,5} and G_{10^4,6}, and 57.16% on G_{10^4,10} (Fig 3). On wide models, associative memory forms in 2 steps, while geometric memory takes 100 steps (§3.2).
- In §6, the authors note that positive results are limited to symbolic graphs and specific topologies, do not examine natural language or large-scale pretraining, and the argument is empirical. Experiments ran GPT-mid, Mamba, small models, and two-layer Node2Vec-style models, plus path-star and small graphs; the paper does not report the number of repetitions.
- Evaluated models
- Transformer (GPT-mid)Mamba3-layer neural networkNode2Vec (2-layer weight-tied model)
- Benchmarks
- in-weights path-starin-context path-starTiny Path-StarTiny GridTiny CycleTiny Irregular
- Metrics
- full path accuracyhardest-token accuracyper-token accuracycosine distance
The paper identifies a new form of atomic fact storage in deep sequence models, which the authors call geometric memory, distinct from associative memory that does brute-force lookup of co-occurring entities. In this form, the model synthesizes embedding vectors that encode new global relationships among all entities, including entities that did not co-occur in training, thereby turning ℓ-composite reasoning tasks into an easily learnable one-step navigation task. The authors argue that the emergence of this geometry cannot be simply attributed to common supervision, architectural, or optimization pressures, and that it is learned even when it is more complex than brute-force lookup. Through a connection to Node2Vec, the authors show that the geometry arises from spectral bias, and point out that Transformer memory still has visible room for improvement in geometrization.
Related events and news
0 events · 1 news mentions
News that mentions this paper
- Goodfire Researchcites the paper's id or linkGoodfire 提出神经几何:神经网络内部世界呈弯曲流形结构
Sun et al. 2025, Zhao et al. 2025, Yocum et al. 2025, Noroozizadeh et al. 2025, Sun et al. 2026, Shafran et al. 2026, Sofroniew et al. 2026, Shai et al. 2026, Liu et al. 2026, Luo et al. 2026,
Paper analysis
What problem does this paper attempt to solve?
Atomic co-occurrence is also stored as global geometry, not as a lookup table; the authors ask why this is so.
Even when memorizing only incompressible atomic co-occurrences, deep sequence models synthesize geometric memory that encodes global relations, rather than lookup-style associative memory; the authors aim to explain why.
- Emergence scenario: The authors believe that when data have no simple high-level pattern (e.g., country capitals), existing narratives default to models brute-force looking up co-occurring entities, i.e., associative memory.
- Why it matters: On path-star, if edges exist only in a lookup table, the first token must compose the predecessor function ℓ times. The authors say this requires Ω(exp(ℓ)) computation without step-by-step supervision.
- Existing gap: The authors say associative memory is sufficient to understand unrelated facts; existing in-weights reasoning is mostly on about 200 entities or 2-hop, or with curricula, full-path supervision, and path overlap.
- Core observation: After edges are stored in weights, Transformers and Mamba can still predict the first token of unseen paths. The authors believe embeddings are organized by path, turning ℓ-fold composition into one-step alignment.
- This paper proposes: The authors formalize two parameter memories (Def. 2a, 2b, Table 1), propose a memorization puzzle with experiments removing common supervision, capacity, and optimization pressures, and connect two-layer Node2Vec-style models to spectral bias under cross-entropy.
What related research exists?
The authors place this paper between associative memory, in-weights reasoning, and Node2Vec spectral analysis.
Associative memory and factorization
- Lookup memory: Hopfield, Geva et al. (2021), Bietti et al. (2023), Nichani et al. (2024) write fact recall or attention as key-value lookup. The authors say this perspective is sufficient to understand unrelated facts.
- Distance embeddings: Jiang et al. (2024), Khona et al. (2024), Ye et al. (2025), Nishi et al. (2025) observe that node embeddings encode distance. The authors say Jiang et al. argue structure matters mainly when underparameterized, while this paper still sees geometry when associative memory is expressible.
- Low-rank factorization: Saxe et al. (2014, 2019) give theoretical results on two-layer models learning associative factorizations; Huang et al. (2025) discuss two-hop reasoning and key-query separation. The authors believe that low-rank bottlenecks or early stopping under squared loss, or implicit regularization from reasoning supervision, cannot explain geometry under purely local supervision (Remark 1).
In-weights reasoning and compositional learning
- Synthetic graphs: Khona et al. report pathfinding on about 200 nodes; Wang et al. (2024), Ye et al., Huang et al. do 2-hop. The authors say these setups often have curricula, full-path supervision, train-test overlap, or exponentially smaller sizes.
- Natural language multi-hop: Two-hop results from Press et al. (2023) etc. are called limited or confounded by the authors. The authors leave the gap with synthetic setups for future work.
- Composition is hard to learn: B&N’24’s in-context path-star is a next-token failure example. The authors cite empirical and theoretical work on compositional functions being hard to learn, but Remark 2 notes that existing hardness results usually cover worst-case instances within a function class.
Graph spectra, generalization, and linear representations
- Node2Vec: Levy and Goldberg (2014), Qiu et al. (2018) etc. connect embedding inner products to PMI or graph spectra. The authors say these analyses often assume bottlenecks, regularization, or multi-hop objectives, and often use simpler losses than cross-entropy.
- Generalization puzzle: Zhang et al. (2017), Neyshabur et al. (2015) discuss tasks with statistical redundancy. The authors believe that pressure cannot explain sequence memory without redundancy (Remark 3).
- Linear representations: Mikolov et al., Park et al. etc. study analogy directions. The authors say this is related to geometric memory but not reducible to it.
Baselines and data: Chance is 1/d; frozen embeddings with only one trainable intermediate layer are used to create associative storage; B&N’24’s in-context path-star serves as a baseline. Data are edge bigrams and paths from fixed graphs, plus small graphs path-star, grid, cycle, irregular.
The authors position this paper as: collecting scattered in-weights reasoning into an isolatable geometric memory, and arguing its emergence cannot be directly attributed to common supervision, architecture, or optimization pressures.
How does the paper address this problem?
Store edges in weights, use structured embeddings to turn multi-hop into one-step alignment.
The authors compare two parameter memories that can both fit edges on a fixed path-star, then use a Node2Vec-style two-layer model without associative storage to see where the geometry comes from.
Task setup
- Graph: The root node extends d disjoint, equal-length paths of length ℓ. All samples come from the same graph, and the context does not provide the adjacency list.
- Two sample types: For edge memory, the input is a node and the target is a neighbor, with training covering all edges; for path samples, the input is a leaf (optionally with a pause token), and the target is the root-to-leaf sequence. The entire path of a test leaf never appears end-to-end.
- Why this graph: The authors follow the adversarial topology of B&N’24. In the in-context version, subsequent tokens can be fit by the “unique child of the previous true token,” so the first token loses gradient and becomes an isolated ℓ-hop composition.
Two data structures
Associative memory (Def. 2a) requires logits to be high only on neighboring edges. The simplest form is f(u)[v]=Φ(u)TWassocΦ(v), where Φ is an arbitrary, near-orthogonal key and W_assoc approximates the adjacency matrix. Geometric memory (Def. 2b) requires logits to reflect some multi-hop proximity, with the simplest form f(u)[v]=Φgeom(u)·Φgeom(v). The authors argue that if node embeddings of the same path are close to the same path vector, predicting the first hop becomes a one-step neighbor selection aligned with that vector.
§2.5 relaxes the definition: geometry can be in other layers; full-rank or decompositions with positive and negative eigenvalues still count as geometric memory as long as a probe can read the global direction. The authors mention that networks often use auxiliary circuits to suppress self-loop logits, and set this aside in the discussion.
Training and evaluation
- Models: The main experiments use decoder-only Transformers trained from scratch (GPT-mid: 12 layers, 8 heads, width 384; G_{10^4,10} width 784) and Mamba (d_state=16, d_conv=4, expand=2). Input and output embedding weights are tied.
- Stable setup used by the authors: Interleave edge samples and path samples; edge memory is given both forward and reverse edges, which the authors say is to avoid the reversal curse, though it may be unnecessary for small graphs; the path side uses a pause token, which is 5, 6, 10 in Table 2. The optimizer is AdamW with weight decay 0.01 and a peak learning rate of 5×10^{-5} for in-weights.
- Evaluation: Greedy top-1. Exact-match on the full path, and accuracy when loss is computed only on the first token. Chance is 1/d. Path supervision uses 75% of the paths, with the remaining leaves as test.
Spectral bias analysis
The authors set aside the competition and analyze only geometry: a two-layer, weight-tied linear network is equivalent to 1-hop, 1-layer-embedding Node2Vec, with loss still being cross-entropy on edge bigrams. Associative memory is considered by the authors to be unrealizable in the form of interest in this structure. The embedding dimension is 100, larger than the number of nodes in the small graphs, so there is no rank bottleneck and no regularization.
The authors write the dynamics as the change in the embedding matrix V being proportional to a time-varying coefficient matrix C left-multiplied by V. The question is whether the columns of V fall onto the top, non-degenerate eigenvectors (Fiedler-like) of the negative graph Laplacian, and whether these directions enter the null space of C. The authors conjecture that Transformers have a similar spectral bias, but it is mixed with associative memory, so the geometry is less clean than Node2Vec.
What experiments did the paper conduct?
In Fig3, Transformer first-token accuracy is 100%, 100%, and 57.16%.
Experimental setup
- Models: GPT-mid and Mamba trained from scratch; TinyGPT, attention-free TinyNN, TinySSM for small graphs; width-100 two-layer weight-tied Node2Vec-style model for spectral analysis.
- Graphs: in-weights are G_{5×10^3,5}, G_{10^4,6}, G_{10^4,10}. Edges cover all edges with reverse edges added; paths trained on 75% of leaves (Observation 1). Observation 5a separately states using 75% of all 10^4 paths. in-context controls are G_{2,5}, G_{10,5}, G_{20,5}. There are also four tiny graphs.
- Optimization: AdamW, weight decay 0.01. Peak learning rate for in-weights in Table 2 is 5×10^{-5}, pause is 5, 6, 10. The authors state large graphs trained to 50,000 epochs, with accuracy changes visible around two thousand epochs. Batch size drawn from {64, 128, 256, 512, 1024}.
- Metrics: greedy top-1 whole-path exact-match, first-token accuracy, per-token accuracy. chance is 1/d. No LLM evaluation. Geometry uses cosine distance and eigenvector projections (§B.5).
- Controls: associative memory with frozen embeddings; weight decay or dropout turned off; edges only. The paper does not report random seeds or number of repeats.
Main results
Figure 3 labels Transformer accuracy on unseen paths when training only the first token; the y-axis is Accuracy[%]. Figure 12 right panel has the same three accuracy labels.
Graph hardest-token chance label G_{5×10^3,5} 100% 0.02% G_{10^4,6} 100% 0.01% G_{10^4,10} 57.16% 0.01% - Authors' interpretation: isolating first-token learning still predicts unseen leaves, which the authors consider inconsistent with the expectation that ℓ-time composition under associative memory is hard to learn; paths are equal length, have no subsequent-token gradients, and training and test paths are disjoint.
- Learning order: the authors state tokens are not learned right-to-left sequentially (in Fig 12), so this does not support a right-to-left solution learned via future-token gradients. The authors state Mamba reaches 100% at most (Observation 1, Fig 14); the main text gives no readings corresponding cell-by-cell to the table above.
- in-context: the authors state full paths stay at chance level, and isolated training on the hardest token also fails (Figure 13). The figure shows labels 50, 10, 5.
Whether geometry depends on path supervision
- What was measured: on large graphs, edge memorization only, looking at cosine distance between leaf embeddings and first-hop embeddings (Fig 5); on small graphs, edges only, compared with frozen embeddings (Fig 1).
- Results: the authors state the diagonal in Fig 4 remains under edge-only training; the authors state the Mamba heatmap is stronger (Fig 15), with no cosine readings in the main text. Fig 1 caption states geometry is cleaner after removing middle layers, and states visualization alone cannot determine how global it is.
- Authors' interpretation: the authors believe geometry still appears without multi-hop targets. After edge-only training followed by fine-tuning on the hardest token, the authors state test accuracy on unseen paths is high (§3.1), with no percentage given in the main text.
Capacity, order, and spectral bias
- Capacity: the authors cite Nichani et al., stating m-dimensional frozen embeddings with at least m^2 free parameters can store m^2 associations; here m≈400. With frozen embeddings, edges can be fit associatively; geometry still appears with weight decay and dropout turned off (Refutation 3b). The main text gives no accuracy for these controls.
- Order: the authors state that with cross-entropy, on sufficiently wide small graphs, associative memory forms in 2 steps and geometric memory takes 100 steps (§3.2, Fig 6). The authors read "atomic facts fitted first, then two-hop circuits appear" as association first, geometry second, and state this setting can be called a minimal instance of grokking.
- Spectrum: with width 100, no regularization, and only 1-hop supervision, the authors state projections are more biased toward top directions than eigenvalues, and cycle and grid learn only 2-dimensional embeddings (Fig 7 caption). Fig 8 caption states embeddings receive Fiedler-like directions and other projections tend to 0; the coefficient matrix norms on these directions receive 0 or very small values.
Other ablations and analyses
- Reverse edges: the authors state they are critical for implicit reasoning on large path-star, while small-graph geometry does not need reverse edges (§5.2); the main text gives no accuracy difference.
- zigzag: Fig 9 caption states on weight-untied Transformer, adjacent-vertex similarity is very low or even negative; the authors state this pattern usually disappears after adding self-loops (§4.4, Fig 25).
- Description length: the authors state on path-star or cycle, associative memory's bit and ℓ2 complexity equals geometric memory, or is at most twice it (Refutation 3d).
- Composition with frozen embeddings: the authors state the model fails (§E.1), with no accuracy in the main text.
- Two-layer weight-tied models can only represent positive semidefinite matrices, so they cannot express negative eigen-directions (§4.4).
- Learning rate, weight decay, and initialization shift the bias between the two memories (§C.3.1); the main text gives no corresponding numbers.
What are some points that can be further explored?
The authors state that the conclusions are limited to symbolic graphs and small-to-medium models, and how the two memories compete remains unresolved.
Limitations and Future Directions Noted by the Authors
- Topology: Positive results are on purely symbolic tasks, with graphs being path-star and tree-star in §C.2; the authors state it is unclear whether they generalize to other topologies and scales (§6).
- Natural language: Whether insights extend to natural language is not obvious because segmentation and relation presentation are more unstructured (§6).
- Scale: Only small-to-medium Transformers trained from scratch (GPT-mid) are used, without examining large models or large-scale pretraining (§6).
- Argument form: The argument is empirical and informal. The authors write that finer norms or loss flatness may still explain preferences; insufficient pressure in the learning setting may also explain why Transformer geometry is less effective than Node2Vec (§6).
- Conceptual separation: In multi-layer networks, it remains unclear how to conceptually separate the two storage types (§6).
- Future work: In §7, the authors leave how the two compete in optimization, and factors like graph connectivity, training time, learning rate, and weight decay, for future work, and hope to extend spectral bias analysis from Node2Vec-style structures to deep sequence models.
Experimental Coverage
- Architectures: Experiments include GPT-mid trained from scratch (Table 2: 12 layers, width 384 or 784), Mamba, and TinyGPT, TinyNN, TinySSM, and two-layer Node2Vec-style models with width 100 (§B, §4).
- Graphs: In-weights path-star are G_{5×10^3,5}, G_{10^4,6}, G_{10^4,10}, with path supervision using 75% leaves; in-context are G_{2,5}, G_{10,5}, G_{20,5} (Table 2, Fig 13). Additionally, edge memory on Tiny Path-Star, Grid, Cycle, and Irregular (Fig 1, Fig 7).
- Metrics: Whole-path exact-match under greedy decoding and first-token accuracy, with chance at 1/d; geometry uses cosine distance and eigenvector projection (§B.4, §B.5). The paper does not report repetition counts.
- Controls: The text compares frozen embeddings, removing weight decay or dropout, training only edges, and reverse edges and pause tokens (§3, §B).
- Node scale notation: Observation 1 states graphs have at most 5×10^4 nodes; §2.2 also states graphs approximately up to 10^4 nodes. The paper does not report the number of queries per run.
Summarize the main content of the paper
Geometric memory turns in-weights multi-hop pathfinding into one-step navigation; spectral bias can emerge without explicit pressure.
The authors use in-weights path-star pathfinding to distinguish two parameter storages that can both remember edges: lookup-table-style associative memory, and geometric memory that encodes global proximity relations.
- Problem: If edges exist only in near-orthogonal keys and an adjacency-style matrix, predicting the first token of a path is an ℓ-fold composition. The authors say this should be hard to learn without step-by-step supervision. The task fixes path length, removes loss on subsequent tokens, and test paths are disjoint from training paths.
- Approach: Transformers (GPT-mid) and Mamba trained from scratch memorize the edges of a fixed graph, then generate root-to-leaf paths on unseen leaves. The authors also implement associative storage with frozen embeddings, and separately examine geometry with a two-layer Node2Vec-style model without intermediate layers.
- Pathfinding: When training only the first token with 75% of paths, Figure 3 annotates unseen-path accuracy for Transformers as 100% on G_{5×10^3,5} and G_{10^4,6}, and 57.16% on G_{10^4,10}; chance is annotated as 0.02%, 0.01%, 0.01% in the figure. The authors state that full-path and Mamba reach a maximum of 100%. The in-context baseline stays at chance level (Figure 13).
- Why surprising: The authors say geometry persists when training only edges; frozen embeddings can fit associatively, and geometry still appears when weight decay and dropout are turned off. On wide models, associative memory forms in 2 steps, while geometric memory takes 100 steps (§3.2). The authors say that on sparse graphs, the bit and ℓ2 complexities of the two storages are the same, or geometry is at most twice that of associative.
- Spectral bias: With width 100, no regularization, and only one-hop cross-entropy, the authors say the two-layer model still biases toward top eigenvectors, and cycle and grid learn only 2-dimensional embeddings (Fig 7). The authors conjecture that Transformer geometry is mixed with associative memory, so there is room to make memory more geometric.
- Authors' conclusion: The authors believe this geometry could be used to discover connections among scattered facts, may make editing, forgetting, and precise retrieval harder, and may produce associations not seen in training. The authors leave how the two memories compete as an open question.