← Back to Research

Recursive-Depth Flash Loop

An open-source, byte-level pure-recurrent sequence architecture built around strictly constant O(1) state memory, zero attention or KV-cache, and weight-tied recursive depth.

Why it was designed

Autoregressive Transformers bind memory directly to context length through a linearly growing O(T) key-value cache, while binding computational depth to a fixed stack of distinct parameter blocks. They also rely on frozen external subword tokenizers that fragment raw input before sequence modeling begins.

Recursive-Depth Flash Loop takes a different structural stance. It separates state memory from context length, separates computation depth from parameter count, and operates directly on raw byte streams. Rather than storing every past token or adding layers to deepen computation, a shared recurrent core refines a bounded constant-size state across recursive steps.

How the architecture works

Four structural principles govern the formulation, keeping memory strictly bounded while preserving expressive state transitions and variable-depth computation.

Strictly constant O(1) recurrent state

The architecture contains zero attention layers and zero KV-cache. Total recurrent state remains strictly fixed regardless of sequence length or loop depth, allowing bounded-memory streaming inference and exact mathematical correspondence between chunk-parallel training and single-step execution.

Two-stage byte and causal patch recurrence

Inputs enter directly through a native 256-byte alphabet with no external BPE tokenizer. A fine-grained byte stage combines byte embeddings, a multi-scale N-gram stem, and Householder-reflection micro-recurrence supporting negative-eigenvalue transitions; a causal patch stage groups bytes into fixed patches for macro-level recurrence.

Weight-tied recursive depth and learned halting

A weight-tied macro core iterates recursively over the constant state, decoupling computational depth from parameter count. A single state write on the initial pass followed by read-only refinement prevents state overwrite collapse, while a learned halting gate adapts step depth without letting norms diverge.

Global workspace and continual memory

Fast recurrent working state is paired with an orthogonal slow-memory consolidation pathway driven by a loop-external surprise signal. This separation enables internal workspace broadcast while supporting sequential adaptation without storing raw replay buffers.

Architectural profile

Summary of the core design choices distinguishing Recursive-Depth Flash Loop from attention-based sequence models.

Dimension Design choice
Input representation Native 256-byte alphabet (no external BPE tokenizer)
Attention and KV-cache None — pure-recurrent state evolution
State memory scaling Strict O(1) invariant to context length and recursive depth
Depth mechanism Weight-tied recursive core with single-write initial pass and read-only refinement
Adaptive computation Learned halting gate with bounded state norms across deep loops
Continual memory Orthogonal slow-memory consolidation without replay buffers
License MIT Open-Source

Open-source specification

The Recursive-Depth Flash Loop architecture reference and verification unit tests are published openly under the MIT License.