Benchmarking the Computational and Representational Efficiency of State Space Models against Transformers on Long-Context Dyadic Sessions
Abidemi Koledoye, Chinemerem Unachukwu, Gold Nwobu, and Hasin Rana

TL;DR
This paper benchmarks state space models against Transformers in long-context sequence tasks, demonstrating that SSMs can be more efficient computationally and representationally in specific long-sequence scenarios.
Contribution
It provides a comprehensive comparison of SSMs and Transformers on long-context data, highlighting conditions where SSMs outperform Transformers in efficiency.
Findings
SSMs have linear $O(N)$ complexity, outperforming Transformers in long sequences.
Mamba SSM shows comparable or better inference speed than LLaMA Transformer on long sequences.
Insights into when SSMs are preferable over Transformers for long-context modeling.
Abstract
State Space Models (SSMs) have emerged as a promising alternative to Transformers for long-context sequence modeling, offering linear computational complexity compared to the Transformer's quadratic scaling. This paper presents a comprehensive benchmarking study comparing the Mamba SSM against the LLaMA Transformer on long-context sequences, using dyadic therapy sessions as a representative test case. We evaluate both architectures across two dimensions: (1) computational efficiency, where we measure memory usage and inference speed from 512 to 8,192 tokens, and (2) representational efficiency, where we analyze hidden state dynamics and attention patterns. Our findings provide actionable insights for practitioners working with long-context applications, establishing precise conditions under which SSMs offer advantages over Transformers.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMachine Learning in Healthcare · Ferroelectric and Negative Capacitance Devices · EEG and Brain-Computer Interfaces
