TL;DR
Current vision-language models (VLMs) process video frames or image sequences using "stateless" visual encoders that look at each image completely in isolation. This paper introduces Stateful Visual Encoders (SVE), an architectural extension that injects cross-image interactions directly into the visual backbone. By allowing the encoder to track subtle visual changes over time before passing tokens to the language model, SVEs deliver robust performance gains across diverse tasks like medical imaging, remote sensing, and robotic trajectory tracking.
What Problem Does This Paper Address?
When modern open-weight VLMs (like Qwen-VL or LLaVA) handle multi-image inputs or multi-turn agent interactions, they rely on a late-fusion approach: a pretrained visual encoder (e.g., CLIP or SigLIP) processes each image independently, and the resulting tokens are compared later inside the Large Language Model (LLM).
The authors argue that this makes the visual encoder fundamentally stateless. Because these encoders are trained on static image-text pairs, they tend to optimize for high-level semantics and compress away fine-grained, localized differences. By the time the LLM receives the tokens, subtle but critical visual changes—such as a newly appearing nodule on a chest X-ray, a small building added to a satellite map, or a slight shift in an object's position—may already be completely attenuated.
Methods
To fix this bottleneck, the authors introduce cross-image interaction directly into the vision transformer (ViT) backbone. Instead of retraining a massive spatiotemporal video model from scratch, they propose a lightweight architectural modification that can be plugged into existing pretrained visual encoders.
The authors evaluated four architectural designs to condition the current image tokens ($Z_t$) on the previous image tokens ($Z_{t-1}$):
- Self-Ext: Extending the self-attention key-value context to include the previous image's features.
- AdaLN-Zero: Using pooled features from the previous image to modulate the normalization layers of the current block.
- Cross: Inserting a full token-level cross-attention layer before each pretrained self-attention layer.
- Cross+FFN (The Winner): Augmenting the cross-attention layer with an additional feed-forward network (FFN) block.
To make Cross+FFN stable during supervised finetuning (SFT) without destroying the encoder's pretrained capabilities, they developed a precise training recipe:
- Weight Cloning: The newly added cross-attention and FFN layers are initialized using copies of the weights from the subsequent pretrained self-attention layers.
- Zero-Initialization: The output projection matrix ($W_O$) of the new block is initialized to zero, ensuring the model behaves exactly like the original stateless encoder at the very start of training.
- Stop-Gradient: A stop-gradient operator is applied to the previous image's feature pathway. This prevents complex co-adaptation and treats the past features as a stable retrieval context.
Datasets
The authors validated SVE across both controlled synthetic benchmarks and complex real-world tasks:
Controlled Synthetic Tasks
- Cross-Image Spatial Aggregation: A custom task based on AgentNet/OpenCUA backgrounds where models must calculate geometric properties (distance, convex-hull area) between red dots scattered across image sequences.
- Multi-Object Visual Differencing: An expanded version of the CLEVR-Multi-Change engine featuring cluttered scenes (30–40 objects) with subtle modifications (movements, insertions, deletions).
- Visual Trajectory Behavioral Cloning: Four tasks from VisGym (Patch Reassembly, Matchstick Rotation, and two 3D Mental Rotation tasks) requiring fine-grained state tracking for sequential decision-making.
Real-World Tasks
- Longitudinal Radiology: The Medical-Diff-VQA dataset, containing over 16,000 paired chest X-rays from the same patient taken at different times.
- Fine-grained Image Editing: ImgEdit, where the model must deduce the exact instruction used to transform a source image into an edited version.
- Remote Sensing: LEVIR-CC, a bitemporal satellite change-captioning dataset.
Key Insights and Ideas
- Spatially Sparse Updates: Feature analysis revealed that the SVE doesn't completely overhaul the image representation. Instead, the cross-image updates are highly localized and sparse. The encoder selectively updates only the tokens corresponding to the changed regions of the scene, leaving the rest of the pretrained representations intact.
- It's Not Just More Parameters: To prove that the gains weren't simply due to adding more capacity, the authors tested a capacity-controlled baseline (
Self+FFN) that added the exact same number of parameters and FLOPs but only attended to the current image. The statefulCross+FFNmodel decisively outperformed this baseline, proving that cross-image context is what drives the improvement. - Architectural Universality: SVE isn't tied to a specific model family. The authors successfully integrated it into five distinct open-weight VLM backbones (Qwen3.5, Qwen3-VL, GLM-4.6V-Flash, InternVL3.5, and Gemma-3), achieving consistent improvements across all of them.
Key Results
- Synthetic Benchmarks: On the CLEVR-Multi-Change task, the SVE (
Cross+FFN) boosted the CIDEr captioning score from 529.5 (stateless baseline) to 543.9 and improved exact-match change accuracy. - Scaling Efficiency: SVE scales robustly. Remarkably, smaller language models equipped with an SVE visual encoder frequently matched or outperformed significantly larger language models using standard stateless encoders.
- Real-World Impact:
- Radiology: On Medical-Diff-VQA, SVE improved the CIDEr score from 145.1 to 178.9 and achieved higher Micro/Macro F1 scores in tracking 27 distinct clinical findings.
- Remote Sensing: On the LEVIR-CC dataset, the generalist VLM equipped with SVE achieved a change-captioning score ($S^*_m$) of 80.46, outperforming specialized, domain-specific specialist models.
Limitations and Future Work
- Immediate-Past Boundary: The current SVE architecture only conditions the current image on its immediate predecessor ($Z_{t-1}$) at each layer. While information can propagate diagonally across deeper layers, long-range dependencies across long video sequences are accessed only indirectly.
- Computational Overhead: Introducing token-level cross-attention inside the visual encoder adds computational cost. As image resolutions scale up to 768x768 and sequence lengths grow, this overhead becomes non-trivial. The authors note that future work will need to explore sparse attention mechanisms or memory banks to scale SVE to long-horizon visual histories.
Summary updated