VISUAL ENTANGLED STATE ATTENTION

VESA
Architecture

Active

Visual computing powered by ESA.

Turn image patches into spatial sequences, then let state carry information through the visual field.

VESA brings Entangled State Attention into a shared visual runtime. Choose how image structure is presented—directional scans, ViT-style patches, local convolution, diffusion, or autoregressive visual tokens—while ESA remains the underlying state mixer.

VisionESAMulti-EngineNative / PyTorch

[ ONE VISUAL SURFACE ]

Five engines.
One ESA-powered family.

MLBricks separateshow spatial structure is presentedfromwhich sequence mixer processes it. That keeps the visual API consistent while the computational core stays ESA-based.

02 · ViT

Patch-sequence classification

Use a ViT-style image-token path. Withposition="auto", MLBricks resolves to 2-D sinusoidal position for this engine.

2-D POSITION
03 · CNN

Local + sequence processing

A depthwise local convolution handles nearby spatial structure before the ESA mixer processes the ordered patch sequence.

LOCAL + GLOBAL
04 · DIFFUSION

Image denoising engine

Patch-based image input and output with timestep conditioning. The engine exposesforward(images, timesteps)and a benchmark sampling loop.

IMAGE → IMAGE
05 · AR

Autoregressive visual tokens

Visual token IDs are processed causally and can be extended throughgenerate(), giving the same family an autoregressive visual-token mode.

VISUAL TOKEN GENERATION

[ VISUAL COMPUTE PATH ]

Image structure in.
ESA computation through the middle.

The classifier path makes the separation explicit: patch creation and spatial policy belong to the visual engine; sequence interaction belongs to the mixer.

01IMAGE

[B,C,H,W]

02PATCH EMBED

Conv2d → visual tokens

03SPATIAL ENGINE

scan / position / local context

04ESA MIXER

state recurrence

05FFN + RESIDUAL

standard or MLBricks bricks

06TASK HEAD

classify / denoise / generate

SPATIAL POLICYEngine ≠ mixer

The engine controls scan order, positional representation and local spatial work independently from the sequence-mixing family.

MIXER FAMILYESA

VESA uses ESA state mixing across visual tokens.

OUTPUT FAMILY3 task shapes

Classification returns class logits, Diffusion returns images, and AR returns visual-token logits / generated IDs.

[ COMPOSABLE VISUAL BLOCKS ]

Use more than one MLBricks idea
inside the same visual model.

The visual configuration can replace the standard FFN or residual path with MLBricks components without changing the high-level image engine.

FFN

Standard FFN

Use the conventional MLP path when you want the simplest visual block.

ffn="standard"
STATE

State-Aware FFN

Carry FFN state across physical visual blocks and condition updates on the current and previous mixer signal.

ffn="ffnbrick"
REFINE

Virtual / Micro FFN

Choose shared virtual refinement or compact micro-refinement paths when the model needs extra iterative computation.

virtual_ffnbrick · micro_ffnbrick
FLOW

ResController

Replace raw residual addition with RMS-aware control of update energy and candidate stream growth.

residual="rescontroller"

[ RUNTIME ]

Visual architecture above.
Execution planning underneath.

Both visual families use the MLBricks backend surface:auto,native, orpytorch. Auto can calibrate a representative inference workload and reuse the selected execution plan.

AUTOMeasure + reuse

Use the MLBricks execution planner on representative inputs and keep the selected routes stable for inference.

NATIVEC++ / CUDA paths

Use supported native visual operations and mixer kernels when explicitly requested or selected.

PYTORCHReference path

Keep a readable PyTorch execution route for compatibility, training, debugging, and parity checks.

model.prepare_execution(images)model.execution_plan()model.predict(images)

[ SAME VISUAL RUNTIME · DIFFERENT MIXER ]

VESA and VisualBolt

Use the same visual engine surface with Bolt as the sequence mixer.

Explore VisualBolt

[ INSTALLATION · MLBRICKS KIT 1.0.0B1 ]

Install once.
Import frommlbricks.

This component ships inside the unifiedmlbricks-kitdistribution. Python imports continue to use themlbricksnamespace.

TERMINAL
pip install mlbricks-kit==1.0.0b1

[ QUICK START ]

Start with one engine.
Change it with one argument.

The same constructor can target classification, diffusion, or autoregressive visual-token work.

SerpentineViTCNNDiffusionAR
PYTHON
import torch
from mlbricks import Vesa

model = Vesa(
    image_size=32,
    patch_size=4,
    num_classes=10,
    dim=192,
    depth=6,
    engine="Serpentine",
    position=None,
    scan="cross",
    backend="auto",
)

images = torch.randn(2, 3, 32, 32)
logits = model(images)

[ API · MLBRICKS KIT 1.0.0B1 ]

One visual constructor.
A moderate public surface.

UseVesafor the high-level visual family. Runtime planning methods are shared across classifier, diffusion, and autoregressive engines where applicable.

PYTHON
from mlbricks import Vesa, VesaConfig

model = Vesa(
    image_size=32,
    patch_size=4,
    num_classes=10,
    dim=192,
    depth=6,
    engine="Serpentine",
    backend="auto",
)
set_backend(...)

Switch the requested runtime policy.

backend_report()

Inspect component backend routes.

execution_plan()

Read the current hierarchical execution plan.

prepare_execution(...) / predict(...)

Calibrate representative inference and run optimized prediction.

generate(...)

Available whenengine="AR".

benchmark_sample_loop(...)

Available whenengine="Diffusion".

[ POWERED BY ESA ]

Make state part of the visual pipeline.

Use one visual API across spatial classification, local-plus-sequence models, image denoising, and autoregressive visual tokens.