Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Intelligence View
⚡ tsecurity.de Intelligence

Mamba/SSM Basics

State Space Models offer linear-time sequence modeling with content-aware selective filtering, challenging Transformers for long-context inference. Why This Matters State Space Models (SSMs) provide a principled alternative to…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

State Space Models offer linear-time sequence modeling with content-aware selective filtering, challenging Transformers for long-context inference.







Why This Matters



State Space Models (SSMs) provide a principled alternative to Transformers for long-sequence modeling. In production systems handling long contexts (e.g., code generation, genomic analysis), Transformer attention's quadratic cost becomes a bottleneck. Mamba achieves linear-time inference with constant-memory state, making it viable for million-token contexts where attention-based models are prohibitively expensive.






Core Idea



SSMs originate from continuous-time control theory: a latent state evolves over time driven by input, and observations are linear projections of that state. Mamba's key innovation is making the SSM parameters input-selective — the model learns to gate which information enters and exits the state, mimicking attention's ability to focus on relevant tokens without the


O(n2)O(n^2)O(n2)

cost.





Technical Details



The continuous-time SSM is defined as:





x′(t)=Ax(t)+Bu(t),y(t)=Cx(t)+Du(t)
x'(t) = Ax(t) + Bu(t), \quad y(t) = Cx(t) + Du(t)
x′(t)=Ax(t)+Bu(t),y(t)=Cx(t)+Du(t)




where

x(t)∈RNx(t) \in \mathbb{R}^Nx(t)∈RN

is latent state,

u(t)u(t)u(t)

is input, and

A∈RN×NA \in \mathbb{R}^{N \times N}A∈RN×N

,

B∈RN×1B \in \mathbb{R}^{N \times 1}B∈RN×1

,

C∈R1×NC \in \mathbb{R}^{1 \times N}C∈R1×N

. Using zero-order hold discretization with step

Δ\DeltaΔ

:





Aˉ=exp⁡(ΔA),Bˉ=(ΔA)−1(exp⁡(ΔA)−I)⋅ΔB
\bar{A} = \exp(\Delta A), \quad \bar{B} = (\Delta A)^{-1}(\exp(\Delta A) - I) \cdot \Delta B
Aˉ=exp(ΔA),Bˉ=(ΔA)−1(exp(ΔA)−I)⋅ΔB




The recurrent update becomes:





xk=Aˉxk−1+Bˉuk,yk=Cxk
x_k = \bar{A}x_{k-1} + \bar{B}u_k, \quad y_k = Cx_k
xk​=Aˉxk−1​+Bˉuk​,yk​=Cxk​




Mamba's selective mechanism makes

BBB

,

CCC

, and

Δ\DeltaΔ

input-dependent:





Bk=LinearB(xk),Ck=LinearC(xk),Δk=softplus(LinearΔ(xk))
B_k = \text{Linear}B(x_k), \quad C_k = \text{Linear}_C(x_k), \quad \Delta_k = \text{softplus}(\text{Linear}\Delta(x_k))
Bk​=LinearB(xk​),Ck​=LinearC​(xk​),Δk​=softplus(LinearΔ(xk​))




The parallel scan algorithm computes this recurrence in

O(nlog⁡n)O(n \log n)O(nlogn)

during training. Inference is

O(1)O(1)O(1)

O(1) per token with fixed state size N

NNN

, yielding constant-memory decoding regardless of sequence length.






How It Works





  1. Project input: Map token

    uku_kuk​

    to expanded dimension

    D⋅ND \cdot ND⋅N

    .


  2. Generate selective parameters: Compute input-dependent

    BkB_kBk​

    ,

    CkC_kCk​

    ,

    Δk\Delta_kΔk​

    from

    uku_kuk​

    .


  3. Discretize: Convert continuous

    (A,B)(A, B)(A,B)

    to discrete

    (Aˉk,Bˉk)(\bar{A}_k, \bar{B}_k)(Aˉk​,Bˉk​)

    using

    Δk\Delta_kΔk​

    .


  4. Recurrent scan: Apply parallel scan (training) or sequential update (inference) to compute hidden states

    xkx_kxk​

    .


  5. Output projection: Compute

    yk=Ckxky_k = C_k x_kyk​=Ck​xk​

    , then project through gating (SiLU) to output dimension.






Key Insights





  • Selectivity is essential: Non-selective SSMs (S4) cannot do in-context retrieval; making

    B,C,ΔB, C, \DeltaB,C,Δ

    input-dependent enables content-aware filtering.


  • Diagonal + low-rank structure on

    AAA

    enables

    O(n)O(n)O(n)

    recurrence; Mamba uses diagonal

    AAA

    matrices exclusively.


  • Hardware-aware design: The scan kernel is IO-bound, not compute-bound — Mamba's CUDA kernel fuses discretization, scan, and output projection to minimize memory reads.


  • Linear decoding cost: Unlike KV-cache which grows linearly, SSM state is fixed-size

    O(ND)O(ND)O(ND)

    , making generation memory-constant.






Sources



2. Cyber Threat Intelligence & Forensik

CTI Threat Relationship Graph2 Knoten / 1 Relationen
CVE / Incident Software MITRE ATT&CK CWE Weakness IoC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Mamba/SSM Basics

Thematisch verwandte Begriffe: MambaSSM, Basics · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-94417 | When an application enables both OCSP and CRL revocation checking on one…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag