Elastic Spectral State Space Models for Train-Once Budgeted Inference
Organizations: Department of Electrical and Computer Engineering, George Mason University, Fairfax, VA, USA · Department of Computer Science, George Mason University, Fairfax, VA, USA
Abstract
Modern sequence models are typically trained at a fixed computational capacity, while real-world applications require deployment across platforms with different resource constraints. Existing approaches either train or distill separate compact models for selected budgets, or use elastic architectures that shrink dimensions such as width, depth, Feed-Forward Network (FFN) size, or SSM state dimension. In this paper, we propose Elastic Spectral State Space Models (ES-SSM), a train-once, export-many sequence modeling framework that gains elasticity through spectral approximation of the SSM sequence operator. ES-SSM builds on Hankel spectral filtering for state space models, where long-range token mixing is represented through fixed Hankel spectral channels that define an operator-level approximation resolution. To make this spectral elasticity reliably deployable, ES-SSM combines input-adaptive channel-wise gates with budget dropout, training the same spectral prefixes that are used by compact models at inference time. This encourages low-index channels to become predictive on their own, while higher-index channels provide refinements for larger budgets. We evaluate ES-SSM across byte-level language modeling, Long Range Arena, Speech Commands V2, and offline reinforcement learning benchmarks. Across these settings, a single trained ES-SSM can be truncated to competitive compact models compared with modern Transformer and SSM baselines at similar parameter scales. Furthermore, by testing under various runtime budgets, we observe smooth and stable quality-cost curves over a wide range of truncation levels. Code is available at https://github.com/GMU-MICO/ES-SSM.
Figures & tables
Appendix figures & tables32 assets
Supplementary material from the paper’s appendix.
Appendix
| Config | main | spec. | Val BPB K=2 | Val BPB K=8 | Val BPB | |
| B. naive bf16 | bf16 | low | 1.7826 | 1.6064 | 1.6089 | |
| C. naive fp16+scaler | fp16 | low | 1.7841 | 1.6088 | 1.6114 | |
| D. bf16 + fp32 spectral ( ours ) | bf16 | fp32 | 1.7786 | 1.6002 | 1.6027 | — |
| E. fp16 + fp32 spectral | fp16 | fp32 | 1.7778 | 1.5997 | 1.6023 |
| Hyperparameter | Value |
| Optimizer | AdamW, , |
| Weight decay | on non-LayerNorm, non-embedding, non-bias parameters |
| Peak learning rate | |
| Warmup | Linear, first of total optimization steps |
| Decay | Cosine to of peak at the final step |
| Gradient clipping | Global norm clipped to |
| ( no_bd) | |||||||||
| (reference) |
| Training budget set | Mean val. BPB | Max. gap | ||
| Dense-31 | 2.2307 | – | 2.4838 | 2.2244 |
| Paper-10 | 2.2319 | 0.0030 | 2.4848 | 2.2253 |
| Runtime budget | 40M-token warmup | Zero warmup | Absolute difference |
| Method | Full-budget val. BPB | Steps and byte-tokens | Analytic compute | Measured wall-clock |
| Always-full control | ||||
| ES-SSM |
| Component | Expression | Scales with ? |
| Channel projections | yes | |
| Gate MLP output row | yes | |
| Gate MLP output bias | yes | |
| Gate MLP hidden layer | no | |
| FFN (widening ) | no | |
| LayerNorm (pre-spectral, pre-FFN) | no |
| Stage | FLOPs / token | Scales with ? |
| Gate MLP hidden | no | |
| Gate MLP output (sliced) | yes | |
| Spectral rFFT (input) | no | |
| Spectral complex multiply | yes | |
| Spectral irFFT (output) | yes | |
| Channel projection einsum | yes |
| Knob | Value |
| Sequence length | |
| Vocabulary | (bytes + PAD + BOS) |
| Token budget | B byte-tokens |
| Effective batch | sequences grad accum. tokens / step |
| Optimizer | AdamW, , |
| Weight decay | on tensor parameters; otherwise |
| Knob | Value |
| Maximum spectral budget | |
| Runtime-budget set | |
| Gate MLP hidden width | |
| Gate output bias init. |
| Quality | Inference cost | ||||||
| Family | Params (M) | Val BPB | Test BPB | Lat. (ms) | Tput (kt/s) | Mem (GB) | |
| ES-SSM (ours) | 2 | 335.00 | 1.40 | 1.41 | 6.18 | 331.40 | 0.87 |
| ES-SSM (ours) | 3 | 366.90 | 1.22 | 1.23 | 7.50 | 273.10 | 0.93 |
| ES-SSM (ours) | 4 | 398.70 | 1.10 | 1.10 | 8.65 | 236.80 | 1.00 |
| ES-SSM (ours) | 5 | 430.60 | 1.05 | 1.06 | 9.98 | 205.20 | 1.06 |
| ES-SSM (ours) | 6 | 462.50 | 1.02 | 1.03 | 11.34 | 180.60 | 1.13 |
| Model | Specific | Params | ||
| Transformer (FA-2) | , RoPE | M | ||
| Mamba-2 | , | M | ||
| STU | , fixed Hankel basis | M | ||
| ES-SSM (ours) | , adaptive gate, budget dropout | M |
| Task | Seq. len. | Batch | Grad accum | Epochs | LR (peak) |
| ListOps | |||||
| Text | |||||
| Retrieval | |||||
| sCIFAR | |||||
| Pathfinder | |||||
| Path-X |
| Model | ListOps | Text | Retrieval | sCIFAR | Pathfinder | Path-X |
| Transformer (FA-2) | FAIL | |||||
| Mamba-2 | ||||||
| STU | ||||||
| ES-SSM (ours) |
| Task | ||||||||||
| ListOps | ||||||||||
| Text | ||||||||||
| Retrieval | ||||||||||
| sCIFAR | ||||||||||
| Pathfinder | ||||||||||
| Path-X |
| Model | Params | Top- (%) | Latency (ms) | ECE |
| Conformer | M | |||
| Transformer++ | M | |||
| Mamba (causal) | M | |||
| Audio-Mamba (bidir.) | M | |||
| AR-STU | M | |||
| ES-SSM (ours, ) | M |
| Params | Top- Acc. (%) | Retention (%) | Budget (%) | Latency (ms) | |
| M | |||||
| M | |||||
| M | |||||
| M | |||||
| M | |||||
| M |
| Protocol | Trainings / cell | Time / training | Suite time / cell | Total time | Relative total |
| ES-SSM exported suite | min | min | h | ||
| Transformer 5- suite | min | min | h | ||
| ES-SSM reduction | fewer | – | min saved | h saved | lower |
| Dataset | DT-paper | DT (ours) | ES-SSM ( ) | vs. DT (ours) |
| halfcheetah-medium | ||||
| halfcheetah-medium-replay | ||||
| halfcheetah-medium-expert | ||||
| hopper-medium | ||||
| hopper-medium-replay | ||||
| hopper-medium-expert |
| Family | Params | Norm. return | Lat. (ms) | Tput (kt/s) | Mem (MB) | |
| ES-SSM exported compact models (one training) | ||||||
| ES-SSM | k | |||||
| ES-SSM | k | |||||
| ES-SSM | k | |||||
| ES-SSM | k | |||||
| ES-SSM | k | |||||
| Family | Params | Effective batch | Final val. BPB ( ) | Wall |
| Transformer++ (full) | M | tokens/step | h | |
| MatFormer (full width) | M | tokens/step | h | |
| ES-SSM ( ) | M | tokens/step | h |
| Tokens (B) | ||||||||||
| Transformer++ | ||||||||||
| MatFormer (full width) | ||||||||||
| ES-SSM ( ) |
| Training regime | ||||||||||
| ES-SSM (reference) | 1.965 | 1.873 | 1.847 | 1.833 | 1.827 | 1.822 | 1.821 | 1.822 | 1.824 | 1.826 |
| No budget dropout ( ) | 3.974 | 4.583 | 4.596 | 4.432 | 3.555 | 2.797 | 2.079 | 1.895 | 1.810 | 1.796 |
| Gating variant | ||||||||||
| Adaptive sigmoid gate (reference) | 1.965 | 1.873 | 1.847 | 1.833 | 1.827 | 1.822 | 1.821 | 1.822 | 1.824 | 1.826 |
| Uniform | 2.246 | 2.131 | 2.091 | 2.068 | 2.058 | 2.049 | 2.043 | 2.041 | 2.045 | 2.052 |
| Per-channel scalar, input-independent | 2.104 | 2.000 | 1.965 | 1.947 | 1.939 | 1.933 | 1.929 | 1.929 | 1.933 | 1.940 |
| (steps) | ||||||||||
| (never force ) | 1.955 | 1.869 | 1.845 | 1.832 | 1.826 | 1.823 | 1.823 | 1.825 | 1.829 | 1.834 |
| 1.960 | 1.871 | 1.847 | 1.834 | 1.828 | 1.825 | 1.824 | 1.825 | 1.828 | 1.831 | |
| (reference) | 1.965 | 1.873 | 1.847 | 1.833 | 1.827 | 1.822 | 1.821 | 1.822 | 1.824 | 1.826 |
| 1.974 | 1.877 | 1.851 | 1.836 | 1.828 | 1.823 | 1.821 | 1.821 | 1.822 | 1.824 | |
| (no budget dropout) | 3.974 | 4.583 | 4.596 | 4.432 | 3.555 | 2.797 | 2.079 | 1.895 | 1.810 | 1.796 |
| Channel index | Mean | Std | Min | Max |
| Variant | |||
| Adaptive sigmoid gate (reference) | |||
| Adaptive, no budget dropout ( no_bd ) | |||
| Per-channel scalar ( gate_static ) | |||
| Uniform ( gate_uniform ) |
Sequence Modeling
Sequence modeling studies how to represent, predict, classify, and generate ordered data such as text, time series, events, and biological sequences.
See all 261 papers