TL;DR
When we adapt pre-trained State Space Models (SSMs) for iterative tasks like diffusion, we usually feed them context from the outside—leaving their internal memory mechanics completely frozen. MaRK (Markov-adapted Recurrent Kernels) flips this script by reaching directly inside the SSM to dynamically reshape its core temporal operators at every step. Using a tiny fraction of trainable parameters, it turns a static sequence model into a context-aware, mathematically guaranteed stable diffusion generator.
What Problem Does This Paper Address?
State Space Models (like Mamba and its bidirectional cousin, Hydra) are fast, continuous-time alternatives to Transformers. Instead of attending to all tokens at once, an SSM compresses sequence history into a running state governed by core dynamical matrices: recurrence ($A$, how memory decays), read-in ($B$), read-out ($C$), skip ($D$), and discretization step ($\Delta$).
Now, suppose you want to adapt a pre-trained SSM for discrete diffusion—an iterative process where text is generated by gradually unmasking noisy tokens over time $t$. The model needs to know what timestep it is on, because early denoising (all noise) requires very different context-gathering than late denoising (mostly clean text).
Standard conditioning tricks do this externally:
- Input-Stream Injection: Tacking the timestep vector onto the input tokens, forcing the state space to lug that extra info across the whole sequence.
- Adaptive Layer Normalization (AdaLN): Scaling and shifting activations between layers.
Neither method touches the SSM's internal engine ($A, B, C, \Delta$). Its fundamental memory horizon—how fast it forgets or integrates distant tokens—stays frozen across the entire generation process. The authors ask: What if we let the diffusion timestep directly rewire the SSM's temporal physics on the fly?
Methods
Enter MaRK, which treats a frozen SSM through the control-theory lens of Linear Parameter-Varying (LPV) systems—linear systems whose governing equations smoothly change based on an external scheduling signal (here, the diffusion timestep $t$).
Keeping a 111M-parameter Hydra BERT backbone completely frozen, MaRK introduces lightweight adapters (6.3M to 11.0M parameters) that map the timestep embedding into low-rank scales and shifts for all five internal SSM parameters ($A, B, C, D, \Delta$).
Tweaking recurrence matrices on the fly is notoriously dangerous—push an eigenvalue past 1, and your hidden states explode. MaRK prevents this constructively: by wrapping modulations in bounded tanh and softplus functions in log-space, every discrete eigenvalue is strictly trapped in $(0, 1)$, yielding an analytic Affine Quadratic Stability (AQS) certificate without expensive solver overhead.
The authors explore three novel adapter geometries to generate these parameter shifts, paired with a standard CART (Context-Adaptive Token-level Noise Rescheduling) masked diffusion objective:
- Hypernet (6.3M params): A direct MLP projection from the timestep embedding.
- Chebyshev Polynomial (11.0M params): Projects onto smooth orthogonal polynomial basis functions.
- Discrete Cosine Transform / DCT (7.1M params): Uses frequency-damped cosine bases to capture spectral dynamics across timesteps.
Datasets
- Synthetic LPV trajectories: Custom-generated datasets ($N \in [50, 1600]$ trajectories with Gaussian noise) to test whether MaRK can theoretically and empirically recover true underlying system dynamics. No new public benchmark is introduced, though this synthetic suite serves as a controlled diagnostic.
- Language Modeling Benchmarks: Five standard text datasets used for masked diffusion validation: Penn Treebank (PTB), WikiText, Lambada, AG News, and Arxiv.
Key Insights and Ideas
- Smooth priors beat raw MLP flexibility: Adjacent diffusion timesteps represent nearly identical denoising tasks, meaning parameter modulations should vary smoothly over $t$. A raw Hypernet MLP treats each timestep independently and wastes capacity fitting high-frequency jitter. Chebyshev and DCT bake smoothness directly into their mathematical bases, acting as structural regularizers that dramatically lower validation loss.
- Modulating memory decay ($A$) is non-negotiable: Standard Mamba models make $B, C,$ and $\Delta$ input-dependent while keeping $A$ static. In MaRK's leave-one-out ablations, freezing $A$ caused a sharp drop in performance (+0.18 to +0.25 loss degradation), proving that dynamically stretching and shrinking the persistent memory horizon itself—not just gating inputs—is crucial for iterative refinement.
- Genuine operator reshaping: An SSM's true coordinate-invariant fingerprint is its Markov parameter sequence ($C A^k B$), which measures how much an input token echoes $k$ steps later. Plotting these norms shows MaRK doesn't just rescale activations; it actively reshapes memory persistence across diffusion time. For instance, DCT amplifies short-range responses during high-noise steps while attenuating faster at cleaner steps.
Key Results
- Guaranteed Stability & Convergence: All 23 layers of the modulated Hydra model analytically certified as stable under worst-case modulation bounds. In synthetic tests, all adapters recovered the true operators at roughly the optimal $O(1/\sqrt{N})$ parametric rate ($N^{-0.54}$ to $N^{-0.66}$).
- Validation Loss ($L_{\text{CART}} \downarrow$): Across the five text datasets, Chebyshev achieved the best average loss at 2.55, closely followed by DCT at 2.59, both crushing the unstructured Hypernet baseline (3.77) and the unmodulated frozen backbone (4.00 on WikiText). DCT offers the sweet spot for parameter efficiency (7.1M vs. Chebyshev's 11.0M).
- Amortized Inference Overhead: Because adapter math depends only on the timestep $t$ and not sequence length, MaRK adds a flat ~37–42 ms cost per forward pass. While heavy at short lengths (+65% to +104% latency at length 512), it amortizes nicely at sequence length 4096 to just 14%–16% latency overhead and <1% memory overhead on an A100 GPU.
Limitations and Future Work
- Missing head-to-head downstream benchmarks: While Table 3 compares latency against Input Injection and AdaLN-Zero, the validation accuracy ablations are strictly internal to MaRK variants. Systematic downstream quality comparisons against established conditioning frameworks remain open.
- Scale: Experiments are confined to a single 111M-parameter Hydra backbone. Testing whether dynamic operator modulation holds up under multi-billion-parameter scaling laws is left for future work.
Summary updated