Optimal packing of attractor states in neural representations

John J. VastolaarXiv 2025 · DOI

TL;DR

This paper proposes a mathematical framework for "optimal packing" in neural representations, balancing the need for fast transitions between internal states with the need for robustness against neural noise. By leveraging symmetries in environmental statistics, the author shows that the brain's "internal map" should mirror the structure of the world, though often in surprising, non-intuitive geometric arrangements.

What Problem Does This Paper Address?

Animals maintain internal neural representations of the world—think of head-direction cells tracking orientation or place cells tracking location. These representations are often modeled as "attractor states," stable patterns of activity that the brain can settle into.

However, there is a fundamental tension in how these states should be arranged in neural space:

  1. Speed: If two environmental states frequently transition into one another (e.g., turning your head 5 degrees), their neural representations should be "close" so the brain can update quickly.
  2. Stability: If states are too close, random neural noise can cause the representation to "slip" into the wrong state, leading to encoding and decoding errors.

The author treats this as an optimization problem: how do you "pack" these attractor states to maximize transition accuracy while minimizing the cost of neural activity?

Methods

The paper formulates a toy model using five components:

  • Environment Dynamics: Modeled as a Markov chain with $M$ states.
  • Internal Dynamics: A model of how the brain moves between attractors, based on Kramers’ theory of transition rates in a landscape.
  • Encoding/Decoding: A noisy Bayesian model where the "bias" ($b$) represents how much the system favors the correct state over neighbors.
  • Cost Function: An objective function that minimizes the Kullback-Leibler (KL) divergence between desired environmental transitions and actual internal transitions, plus a regularization term (a "firing rate penalty").
  • Symmetry Analysis: To solve this difficult non-convex problem, the author uses the "Purkiss principle"—the idea that if a problem has a certain symmetry (like a ring or a complete graph), the optimal solution likely shares that symmetry.

Datasets

This is a theoretical paper and does not use empirical neural datasets. Instead, it evaluates the model on synthetic "toy" topologies:

  • Uniform Topology: A complete graph where every state is equally likely to transition to any other.
  • Cyclic Topology: A ring-like structure (e.g., $M=4$ states in a square) where transitions only happen between neighbors.

Code for these simulations is available on GitHub.

Key Insights and Ideas

  • The Simplex Solution: For perfectly uniform environments, the optimal arrangement is an $(M-1)$-simplex. In 3D, this means 4 states would form a perfect tetrahedron, ensuring every state is equidistant from every other.
  • Geometry Isn't Always Intuitive: You might expect a cyclic 4-state environment (a square) to result in a square neural representation. However, the paper shows that the optimal arrangement is often a "folded" square or even a line, depending on the level of noise (bias). The ratio of diagonal distance to edge distance ($L/d$) rarely equals the Euclidean $\sqrt{2}$ expected of a square.
  • Phase Transitions: The model exhibits "phase-transition-like" behavior. At very high noise (low bias), the optimal strategy is to collapse all states to the origin (zero activity). As noise decreases, a non-trivial geometry suddenly emerges.
  • Symmetry as a Shortcut: The paper demonstrates that we don't need to solve for every individual neuron's activity. By identifying the symmetry group of the environment (like the Dihedral group $D_4$ for a square), we can drastically reduce the number of variables in the optimization problem.

Key Results

  • Uniform Case: The optimal distance $d$ between states decreases monotonically as the encoding bias $b$ increases. When the bias is moderate, a clear "optimal packing" distance exists; when bias is too low or too high, the optimal distance shrinks to zero.
  • Cyclic Case ($M=4$): The optimal arrangement is effectively three-dimensional. The paper finds that the "squareness" of the representation is highly sensitive to the noise level. Only at specific bias values does the representation look like a flat square.
  • High-Bias Limit: For large $M$ cyclic topologies, the author provides an approximate analytical solution for the internal transition probabilities, suggesting that the optimal configuration should approximate a regular polygon.

Limitations and Future Work

  • Toy Topologies: The paper focuses on very simple graphs (complete graphs and rings). Real-world environments are much more complex, involving hierarchical or sparse structures.
  • Euclidean Assumption: The model assumes states exist in a flat Euclidean space. Neural manifolds might be better described using non-Euclidean (e.g., hyperbolic) geometry.
  • Static Transitions: The environment is modeled as a static Markov chain. In reality, transition statistics change (e.g., moving from a hallway to an open room). The author suggests that "representational drift"—the observed shifting of neural codes over time—might actually be the brain re-optimizing its packing as it learns new environmental statistics.
  • Biological Realism: Future work could replace the abstract cost function with more realistic spiking neuron models or recurrent neural networks (RNNs).

Summary updated

Abstract

Animals' internal states reflect variables like their position in space, orientation, decisions, and motor actions -- but how should these internal states be arranged? Internal states which frequently transition between one another should be close enough that transitions can happen quickly, but not so close that neural noise significantly impacts the stability of those states, and how reliably they can be encoded and decoded. In this paper, we study the problem of striking a balance between these two concerns, which we call an `optimal packing' problem since it resembles mathematical problems like sphere packing. While this problem is generally extremely difficult, we show that symmetries in environmental transition statistics imply certain symmetries of the optimal neural representations, which allows us in some cases to exactly solve for the optimal state arrangement. We focus on two toy cases: uniform transition statistics, and cyclic transition statistics. Code is available at https://github.com/john-vastola/optimal-packing-neurreps23 .
BibTeX
@misc{vastola2025optimal,
  author = {John J. Vastola},
  title = {{Optimal packing of attractor states in neural representations}},
  year = {2025},
  eprint = {2504.12429},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.12429},
  howpublished = {arXiv},
}
Figure