Leveraging Attractor Dynamics in Spatial Navigation for Better Language Parsing

Xiaolong Zou, Xingxing Cao, Xiaojiao Yang, Bo HongICML 2024

Human language is remarkably compositional. If you know what "run" and "twice" mean, you instantly understand the command "run twice," even if you have never encountered that specific phrase before. While humans grasp these rules from just a few examples, standard deep learning models often struggle with this systematic generalization, frequently requiring massive datasets to learn the same underlying logic.

Neuroscience offers a compelling clue to solving this problem: the hippocampal-entorhinal system. Evolutionarily shaped for spatial navigation—finding your way in the physical world—this brain region is also highly active during language processing. This overlap suggests that the brain might use a shared "cognitive scaffold" for both navigating physical space and parsing abstract thought.

Analogy between physical space navigation and syntactic space parsing.

This paper investigates how the mathematics of navigating a 2D room can help a neural model parse a sentence, introducing a brain-inspired architecture that repurposes the neural machinery of spatial navigation to solve complex language parsing tasks.

The PHE-trinity Model

To bridge the gap between spatial navigation and language, the authors developed the PHE-trinity model. This architecture mimics the Prefrontal-Hippocampal-Entorhinal circuit found in the brain and features three core modules:

  1. MEC (Medial Entorhinal Cortex): Implemented as a modular Continuous Attractor Neural Network (CANN). In physical navigation, this network integrates velocity to track a subject's position. In the PHE-trinity model, it treats grammatical roles as "velocity" inputs, integrating them to represent the syntactic structure of a sentence.
  2. HC (Hippocampus): Acting as a relational memory, the HC binds the "position" (the syntactic structure derived from the MEC) with the "content" (semantic word embeddings) into a unified memory table.
  3. PFC (Prefrontal Cortex): An LSTM-based decoder that queries the HC memory to translate input commands into actionable output sequences (e.g., translating "run twice" into the output RUN RUN).
The PHE-trinity model architecture, illustrating the mapping from brain regions to torus attractors and the neural network processing pipeline.

A critical component of this approach is the model's "pre-training" phase. Before it ever sees a word of language, the model learns to perform spatial path integration on a synthetic 2D navigation task. This establishes stable, grid-like attractor dynamics—forming a "torus" manifold—in the MEC.

Key Insights: Grammar as Velocity

The most striking conceptual leap in this research is treating words as "velocity vectors" within a high-dimensional syntactic space. For example, encountering the word "after" consistently pushes the neural state in a specific direction, signaling a reversal or shift in the parsing logic.

Through dimensionality reduction, the authors demonstrate that the MEC network forms a torus-like (donut-shaped) attractor manifold. Remarkably, both physical navigation trajectories and language parsing trajectories live on this exact same geometric structure. By strictly separating structure (where you are in the sentence) from content (what the specific word is), the model successfully avoids the "memorization trap" that limits the generalization capabilities of many standard sequence-to-sequence models.

Performance and Generalization

The model was evaluated on the SCAN dataset, a standard benchmark for testing compositional generalization in translating natural language commands into action sequences.

  • Perfect Generalization: On the "Add Jump" task—which requires learning a new verb and applying it to all previously known grammatical patterns—PHE-trinity achieved 100% accuracy. In contrast, a robust "Syntactic Attention" baseline managed only 78.4%.
  • Extreme Data Efficiency: The model reached approximately 99.7% accuracy using only 2,000 training examples. Ablation studies showed that models lacking pre-established attractor dynamics converged much slower and yielded poorer final performance.
  • Length Generalization: PHE-trinity significantly outperformed baselines on the "Length" task, which tests the ability to generalize to longer sequences than those seen during training. It achieved 21.48% accuracy, compared to 0% for several state-of-the-art compositional models.
  • Emergent Clustering: Visualizations of the model's internal states revealed that it naturally learned to cluster verbs (e.g., walk, run, jump) and logical operators (e.g., and, after) into distinct "velocity" directions without any explicit supervision.

Limitations and Future Directions

While the results strongly support the hypothesis that high-level cognition can be "recycled" from ancient spatial navigation circuits, there are limitations. The SCAN dataset uses a highly restricted, synthetic grammar. It remains an open question whether these attractor dynamics can scale to the messy, ambiguous, and highly variable world of natural human languages.

Furthermore, the current model lacks feedback connections from the Hippocampus back to the MEC, which in the biological brain are crucial for error correction and "resetting" path integration. Finally, while PHE-trinity is highly data-efficient, it is fundamentally a small-scale model. Integrating these biologically inspired "spatial priors" into massive Transformer-based architectures represents a promising, yet unexplored, frontier for future AI research.

Summary updated

BibTeX
@inproceedings{zou2024leveraging,
  author = {Xiaolong Zou and Xingxing Cao and Xiaojiao Yang and Bo Hong},
  title = {{Leveraging Attractor Dynamics in Spatial Navigation for Better Language Parsing}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=eapFRURALQ},
}
Figure