Learning interpretable Schur forms of recurrent weight matrices

Alexander Lanine, Liana Akobian, N Alex Cayco GajicNeurIPS 2026

TL;DR

Recurrent neural networks (RNNs) often look like dense, inscrutable tangles of weights, hiding the elegant circuits that actually drive their dynamics. While a classic linear algebra tool called the Schur decomposition can untangle these weights into clean, feedforward pathways, there are factorially many ways to write it—most of which still look like visual static. This paper introduces SchurMO, a technique that uses smooth geometric optimization to effortlessly rotate a network's coordinate system until its hidden architectural motifs snap into sharp focus.

What Problem Does This Paper Address?

Understanding how an RNN computes from its weight matrix $A$ is notoriously difficult. When $A$ is "non-normal" (meaning its eigenvectors aren't orthogonal, which is the rule rather than the exception in neuroscience and ML), standard eigenvalue analysis fails to capture how modes interact.

Researchers often turn to the real Schur decomposition ($A = Q T Q^\top$), which rotates the state space using an orthogonal matrix $Q$ so that the dynamics matrix $T$ becomes quasi-lower triangular. Because $T$ is triangular, recurrent loops disappear: mode 1 feeds into mode 2, mode 2 into mode 3, and so on. It turns a recurrent hairball into a "functionally feedforward" circuit without distorting the geometry of the state space.

Here’s the catch: the Schur form is wildly non-unique. You can order the eigenvalues along the diagonal of $T$ in $n!$ different ways (plus continuous rotations if complex eigenvalues are present). One ordering might reveal a pristine domino-like chain; another mathematically equivalent ordering of the exact same network looks like random noise. Finding the most interpretable Schur form requires searching a space that explodes factorially with network size $n$.

Figure 1: Two equivalent Schur forms from the same weight matrix, but with different interpreted functionally feedfor- ward dynamics. All three matrices are orthogonally similar to each other.

Methods

Instead of playing a hopeless combinatorial guessing game over $n!$ permutations, the authors formulate the Schur ordering problem and relax it into a smooth, continuous optimization problem called SchurMO (Schur-form Manifold Optimization).

Rather than jumping between discrete valid Schur bases, SchurMO glides smoothly across the special orthogonal group $SO(n)$—the curved geometric manifold of all $n \times n$ rotation matrices—using Riemannian conjugate gradient descent. It minimizes a two-part loss function on $Q^\top A Q$:

  1. $\mathcal{L}_{\text{Schur}}$: Penalizes entries above the diagonal, pushing $Q^\top A Q$ to become a valid, quasi-lower triangular Schur form.
  2. $\mathcal{L}_M$: Applies a user-defined binary mask $M$ to penalize unwanted connections below the diagonal, nudging the matrix toward a hypothesized target motif (like a chain, a narrow band, or isolated modules).
Figure 2: SchurMO uses manifold optimization over SO(n) to find approximate Schur forms that best match a target motif. Here, for visualization, the penalization of non-triangular structure in LSchur is absorbed into the mask M; in practice, these are separate loss terms.

When structural hyperparameters aren't known in advance, the authors wrap SchurMO in automated search routines: BandSearch (using bisection to find the narrowest skip-connection bandwidth) and Blockify (recursively splitting the matrix to discover independent modules).

Datasets

The authors evaluate their framework across three distinct settings:

  • Synthetic Benchmark Matrices: Newly constructed dense, noisy weight matrices ($n$ up to 125) planted with ground-truth latent Schur motifs (pure chains, banded skip-connections, and block-diagonal modules) as well as unstructured Gaussian random matrices as negative controls.
  • Task-Trained Nonlinear RNNs: Discrete-time $\tanh$ RNNs trained to generate sequential waves of output activity from a brief input pulse, with readout weights locked to a random orthogonal rotation so hidden-unit dynamics appear tangled.
  • Biological Connectomics Data: Empirical synaptic connectivity of EPG neurons in the Drosophila (fruit fly) ellipsoid body—a biological ring-attractor circuit known via manual sorting to have a banded circulant structure.

Key Insights and Ideas

  • Trading Combinatorics for Geometry: Discrete permutation spaces trap greedy swap-based algorithms in poor local minima, especially when weights are noisy. Relaxing the search onto the continuous manifold $SO(n)$ lets gradients smoothly guide the basis toward global structural clarity.
  • Unmasking Nonlinear Sequence Generators: Even in nonlinear $\tanh$ RNNs where raw neuron activations look chaotic and dense weights defy inspection, SchurMO uncovers latent feedforward chains—bridging static connectivity and high-dimensional sequential dynamics that low-rank RNN analyses miss.
  • Beyond Schur Forms: Replacing discrete node-sorting with Riemannian optimization over $SO(n)$ is a general superpower. By dropping the triangularity penalty and adding sparsity and non-negativity terms, the exact same engine can unscramble shuffled biological connectomes.

Key Results

SchurMO was benchmarked against standard LAPACK Schur routines (Naive) and a custom iterative eigenvalue-swapping baseline (Greedy) using a motif score (from 0 to 1, measuring how much energy lands inside the ground-truth motif):

  • Superior Accuracy & Noise Resilience: On synthetic chains, SchurMO maintains motif scores $\ge 0.95$ across all dimensions ($n = 10$ to $125$), even under noise ($1/\sqrt{\text{SNR}} = 0.1$). Meanwhile, the Greedy baseline degrades sharply as $n$ grows, collapsing to Naive baseline levels ($\sim 0.6$–$0.7$) when noise is added.
  • Orders-of-Magnitude Speedup: By $n = 125$, SchurMO is dramatically faster than Greedy search (taking tens of seconds vs. over $10^3$ seconds across 10 restarts).
  • Banded & Modular Recovery: On noisy banded matrices ($n=125$), SchurMO achieves median motif scores $\ge 0.96$ vs. $0.69$–$0.79$ for Greedy. For unknown modular structures, Blockify recovers the exact number and size of all modules with $\ge 88\%$ accuracy up to noise levels of $1/\sqrt{\text{SNR}} = 0.2$.
  • Trained RNNs & Connectomics: SchurMO reliably extracts hidden chain motifs in sequence-producing $\tanh$ RNNs up to $n=100$ (where Greedy matches Naive failure) and cleanly reconstructs the banded connectivity of scrambled Drosophila EPG neurons.

Limitations and Future Work

  • Non-Convexity & Hypothesis Dependence: Optimizing over $SO(n)$ is non-convex (recoverable only up to sign-flip and subspace-rotation equivalences), and users must specify a target mask $M$ upfront rather than discovering arbitrary motifs completely blind.
  • Partial Dynamical Picture: Schur forms do not directly quantify transient amplification, which still requires complementary tools like pseudospectral analysis.
  • Requires Full Weight Access: SchurMO assumes you have the weight matrix in hand; applying it to partially observed neural recordings remains an open challenge. Future work aims to explore mechanistic interpretability in modern ML architectures (like structured state-space models) and anneal smooth $SO(n)$ matrices directly onto strict permutation matrices for automated connectome sorting.

Summary updated

Abstract

Recurrent neural networks are widely used in neuroscience and machine learning, but their weight matrices often appear dense and unstructured, defying clean interpretation. The Schur decomposition expresses any recurrent weight matrix in quasi-triangular form, allowing network dynamics to be interpreted as a latent circuit of functionally feedforward interactions between orthogonal modes. However, its application for interpreting recurrent weight matrices has been limited due to its well-known combinatorial non-uniqueness. We introduce SchurMO (Schur Manifold Optimization), a method for hypothesis-driven identification of structured Schur forms via Riemannian optimization over orthogonal similarity transformations, enabling recovery of target motifs. Compared to a greedy baseline, SchurMO more reliably and more efficiently recovers ground-truth latent motifs (chain, banded, and modular structure) from noisy weight matrices. Applying SchurMO to nonlinear recurrent networks enables recovery of latent chain-like structure, providing a link between connectivity and the underlying dynamics of sequence production. Our results highlight SchurMO as a scalable, computationally efficient approach to discovering latent structure in the Schur forms of recurrent weights.
BibTeX
@inproceedings{lanine2026learning,
  author = {Alexander Lanine and Liana Akobian and N Alex Cayco Gajic},
  title = {{Learning interpretable Schur forms of recurrent weight matrices}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=8gcHRPsjr5},
}

Loading related content...

Figure