← Latest papers
🤖 machine learning

On the Expressiveness of State Space Models via Temporal Logics

This paper analyzes the expressive power of state space models (SSMs) using temporal logics, revealing that their capabilities range from regular languages to non-regular languages depending on gating mechanisms and arithmetic precision, while systematically comparing these findings to transformer architectures.

Original authors: Eric Alsmann, Lowejatan Noori, Martin Lange

Published 2026-01-28
📖 5 min read🧠 Deep dive

Original authors: Eric Alsmann, Lowejatan Noori, Martin Lange

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to teach a robot to read a story and understand the sequence of events. In the world of Artificial Intelligence, there are two main types of "readers" (architectures) competing for the job: the famous Transformers (like the ones powering current chatbots) and the rising stars called State Space Models (SSMs).

This paper is a theoretical investigation into the "brainpower" of SSMs. The authors aren't asking how well these models perform on a specific test; instead, they are asking: "What is the absolute limit of what these models can understand, no matter how much we train them?"

To answer this, they use a special "logic language" (Temporal Logic) as a measuring stick. Here is a breakdown of their findings using simple analogies.

1. The Two Main Types of SSMs

The paper splits SSMs into two main flavors based on how they handle information:

  • Diagonal-Gated SSMs (The "Strict Accountants"): These models have a rule where their internal "gates" (switches that control information flow) can change based on the current word they are reading, but they must remain "diagonal." Think of this like a calculator where you can change the numbers you are adding, but you can't mix the columns together.
  • Time-Invariant SSMs (The "Steady Clocks"): These models have gates that never change, no matter what word they are reading. They are like a metronome or a clock; they tick at the same rate regardless of the story being told.

2. The Precision Problem: Ruler vs. Tape Measure

The authors also looked at how "precise" the math inside these models is.

  • Fixed-Precision: Imagine using a ruler with only 10 marks. No matter how long the story is, you can't measure anything smaller than those marks. This is like standard computer math (floating-point).
  • Log-Precision: Imagine using a tape measure that automatically gets longer and more detailed as the story gets longer. If the story is 100 words long, your ruler has 100 marks; if it's 1,000 words, it has 1,000 marks. This allows for much finer counting.

3. What Can They Actually Understand?

The "Strict Accountants" (Diagonal SSMs)

  • With a simple ruler (Fixed-Precision): They are good at understanding the order of events. They can tell you "A happened before B" or "A happened, then B happened, then C." However, they have a major blind spot: They cannot count in cycles.
    • The Analogy: If you ask them to recognize a pattern like "an even number of 'a's" (e.g., aa, aaaa, aaaaaa), they fail. Because their math is monotonic (it only goes up or stays the same), they eventually get "stuck" and can't tell the difference between 2 'a's and 4 'a's.
  • With a growing tape measure (Log-Precision): If you give them the ability to count precisely, they become much smarter. They can now count exactly how many times something happened in the past. They can understand complex patterns like "The number of 'a's equals the number of 'b's equals the number of 'c's."

The "Steady Clocks" (Time-Invariant SSMs)

  • With a simple ruler: These models are bad at tracking complex "since" relationships (e.g., "Since the last time we saw a 'b', have we seen an 'a'?"). However, they have a superpower: They can count in circles.
    • The Analogy: Because their internal mechanism is a constant cycle, they are excellent at knowing "Is this the 2nd, 4th, or 6th word?" They can easily recognize the "even number of 'a's" pattern that the Strict Accountants failed at.
  • With a growing tape measure: They can do both: count in circles and count total numbers.

The "Hybrid" (Mixed SSMs)

If you combine both types of layers (some Strict Accountants, some Steady Clocks), you get the best of both worlds. They can understand order, cycles, and counting. The paper shows that these hybrid models can recognize almost any "regular" pattern you can think of, up to a certain complexity limit.

4. How Do They Compare to Transformers?

The authors compared their findings to what we already know about Transformers:

  • Diagonal SSMs (Fixed-Precision) are roughly equivalent to Transformers without positional cues (they know the order of words but not their exact position).
  • Time-Invariant SSMs are equivalent to Transformers with Positional Encodings (they know exactly where they are in the sentence).
  • The Big Difference: Transformers with "global attention" (like the Average Hard-Attention type) can look at the entire story at once to count things forward and backward. SSMs, by their nature, only look at the past (what they have already read). Therefore, SSMs are strictly less powerful than the most advanced Transformers when it comes to counting things that happen later in the sequence.

5. The "Impossible" Tasks

The most important takeaway is the list of things these models cannot do, no matter how much you train them:

  • A Fixed-Precision Diagonal SSM can never learn to distinguish between an even and an odd number of repeated items (like aa vs aaa). This is a hard architectural limit, not a training failure.
  • To break this limit, you must either change the architecture (add time-invariant layers) or increase the math precision (use the growing tape measure).

Summary

Think of these models as different types of librarians:

  • Diagonal (Fixed): Good at reading a book in order, but gets confused if asked to count specific patterns.
  • Time-Invariant: Good at counting pages (even/odd), but struggles with complex "since then" stories.
  • Hybrid: The ultimate librarian who can do both, but still can't look ahead to the next chapter to count things.

The paper proves that these limitations are built into the DNA of the architecture. You can't train a "Fixed-Precision Diagonal" librarian to become a "Counting" librarian; you have to give them a better tool (log-precision) or a different brain structure (mixed layers) to achieve that.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →