Chimera: State Space Models Beyond Sequences

Aakash Lahoti, Tanya Marwah, Ratish Puduppully, Albert Gu · Submission to ICLR 2025 · Rejected

Deep learning architectures frequently struggle with natively understanding the underlying structure—or topology—of data. Transformers, the current gold standard, are fundamentally permutation-invariant, treating data as an unordered set of elements. To adapt them for sequences (like language) or grids (like images), researchers must inject structural awareness using inductive biases such as position embeddings or random walk features.

These domain-specific heuristics are often fragile. For instance, Rotary Position Embeddings (RoPE) excel in language tasks but struggle to generalize to sequence lengths unseen during training. In vision, flattening a 2D image into a 1D sequence of patches discards its natural neighborhood structure.

Chimera introduces a unified framework that mathematically generalizes State Space Models (SSMs) to incorporate any graph topology directly into the architecture, moving beyond simple 1D sequences.

The Core Insight: SSMs as Graph Models

The foundational insight of Chimera is that State Space Models (like Mamba) are not strictly "sequence models"—they are a specific instantiation of graph models. A standard sequence is merely a directed line graph where every node connects only to its immediate successor.

The authors demonstrate that the "mask matrix" used in SSMs is mathematically equivalent to the resolvent of the adjacency matrix of a directed line graph. If $A$ is a graph's adjacency matrix, the mask $L$ is defined as $(I - A)^{-1}$. In a sequence, this resolvent naturally captures how information flows from one token to the next, aggregating the influence between nodes across all possible paths.

Equivalence of SSM recurrence, resolvent matrix, and graph topology

Chimera’s breakthrough is realizing that by swapping the line-graph adjacency matrix $A$ for the adjacency matrix of any graph, the SSM inherently "sees" and processes that specific topological structure.

Making Topological SSMs Practical

Computing the resolvent $(I - A)^{-1}$ typically requires a cubic-cost matrix inverse, which is computationally prohibitive for large graphs. To make Chimera efficient and scalable, the authors introduce several key techniques:

  1. DAG Specialization and Decomposition: For Directed Acyclic Graphs (DAGs), Chimera can be implemented as a highly efficient linear-time recurrence. Complex, undirected structures (like 2D image grids) can be decomposed into simpler directional flows (e.g., Up, Down, Left, Right DAGs). This provides the topological richness of the full graph while maintaining linear-time efficiency.
Decomposing an undirected graph into directed acyclic graphs (DAGs)
  1. The Squaring Trick: To run efficiently on modern GPUs, the model employs a "squaring trick" to compute the resolvent using $O(\log(\text{diameter}))$ matrix multiplications, drastically reducing computational overhead.
  2. Finite-Sum Approximation: For general graphs containing cycles, Chimera approximates the infinite sum $(I - A)^{-1} = \sum A^k$ with a finite sum. This keeps the complexity quadratic (comparable to standard attention) but yields vastly superior topological awareness.
  3. Row-wise Normalization: A novel parameterization scheme ensures the model remains numerically stable during training across diverse topologies.

Empirical Performance

Chimera was evaluated across three distinct domains—language, vision, and graphs—consistently outperforming established baselines:

  • Language (GLUE Benchmark): Pre-trained on the C4 dataset, Chimera outperformed BERT-Base by 0.7 points (83.93 vs 83.2) while maintaining linear complexity.
  • Vision (ImageNet-1k): Chimera-ViT-B achieved 81.4% classification accuracy, outperforming the standard ViT-B by a significant 2.6% margin.
  • Graphs (Long Range Graph Benchmark): On the LRGB Peptides-Struct task, Chimera achieved a Mean Absolute Error (MAE) of 0.2433, surpassing all baselines, including Graph Convolutional Networks (GCNs) and Graph Transformers. It also showed a 12% improvement on PascalVOC.

Crucially, an ablation study highlighted the power of this topological bias: when the 2D topology of an image was intentionally destroyed by flattening it into a 1D sequence (the standard Vision Transformer approach), Chimera's performance dropped from 77.8% to 73.8%.

Limitations and Future Directions

While Chimera represents a significant methodological leap, it currently faces computational overhead. The implementation is roughly 1.5x slower than a standard Transformer, primarily due to the lack of hardware-optimized CUDA kernels for its specific graph operations (unlike the highly optimized kernels available for standard SSMs or FlashAttention). Additionally, for general graphs that cannot be easily decomposed into DAGs, the model defaults to quadratic complexity.

Future work focusing on specialized kernels for grid-graphs and more sophisticated DAG decompositions will likely unlock even greater speed and performance, cementing topologically-aware SSMs as a versatile foundation for multi-modal deep learning.

Summary updated

BibTeX
@misc{lahoti2025chimera,
  author = {Aakash Lahoti and Tanya Marwah and Ratish Puduppully and Albert Gu},
  title = {{Chimera: State Space Models Beyond Sequences}},
  year = {2025},
  eprint = {2510.12111},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.12111},
}
Figure