# SpectralGuard: Detecting Memory Collapse Attacks in State Space Models

Source: [SpectralGuard: Detecting Memory Collapse Attacks in State Space Models](<https://www.sota2.com/research/paper/69b78e970636e5bf4afbdc5f>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2026-03-17T05:00:04.157Z

Authors: Davi Bonetto

Published: 2026-03-12T19:52:37.000Z

## Abstract

State Space Models (SSMs) such as Mamba achieve linear-time sequence processing through input-dependent recurrence, but this mechanism introduces a critical safety vulnerability. We show that the spectral radius rho(A-bar) of the discretized transition operator governs effective memory horizon: when an adversary drives rho toward zero through gradient-based Hidden State Poisoning, memory collapses from millions of tokens to mere dozens, silently destroying reasoning capacity without triggering output-level alarms. We prove an Evasion Existence Theorem showing that for any output-only defense, adversarial inputs exist that simultaneously induce spectral collapse and evade detection, then introduce SpectralGuard, a real-time monitor that tracks spectral stability across all model layers. SpectralGuard achieves F1=0.961 against non-adaptive attackers and retains F1=0.842 under the strongest adaptive setting, with sub-15ms per-token latency. Causal interventions and cross-architecture transfer to hybrid SSM-Attention systems confirm that spectral monitoring provides a principled, deployable safety layer for recurrent foundation models.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Adversarial Attack Detection on Balanced 500-sample non-adaptive](<https://www.sota2.com/research/sota/adversarial-attack-detection-on-balanced-500-sample-non-adaptive.md>): Adversarial Attack Detection; Balanced 500-sample non-adaptive; Precision: 94.

- [Adversarial Detection on Wikipedia HiSPA word-shuffle benign adversarial (N=500 held-out)](<https://www.sota2.com/research/sota/adversarial-detection-on-wikipedia-hispa-word-shuffle-benign-adversarial-n-500-held-out.md>): Adversarial Detection; Wikipedia HiSPA word-shuffle benign adversarial N=500 per model (held-out); F1 Score: 65.

- [Adversarial Attack Detection on Adaptive Threshold Evasion](<https://www.sota2.com/research/sota/adversarial-attack-detection-on-adaptive-threshold-evasion.md>): Adversarial Attack Detection; Adaptive Threshold Evasion; Precision: 94.1.

- [Adversarial Attack Detection on Adaptive Multi-layer-aware Split](<https://www.sota2.com/research/sota/adversarial-attack-detection-on-adaptive-multi-layer-aware-split.md>): Adversarial Attack Detection; Adaptive Multi-layer-aware Split; Precision: 88.9.

- [Adversarial Attack Detection on Cross-architecture Transfer (Split)](<https://www.sota2.com/research/sota/adversarial-attack-detection-on-cross-architecture-transfer-split.md>): Adversarial Attack Detection; Cross-architecture Transfer (Split); F1 Score: 0.891.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2603.12414>)

[PDF](<https://arxiv.org/pdf/2603.12414.pdf>)
