TL;DR
Instead of routing information via convolutions, self-attention, or state-space scans, this paper builds a general-purpose vision backbone entirely around explicit memory reads and writes. Inspired by human cognition, DuSAM pairs a temporary "working memory" for the current image with a permanent "semantic memory" accumulated across the entire training set. The result is a linear-complexity model that scales effortlessly to high resolutions and lets you inspect—or even surgically erase and restore—what it knows about specific object classes without retraining a single weight.
What Problem Does This Paper Address?
Every visual backbone needs a mechanism to let distant pixels talk to each other. CNNs pass notes locally; Vision Transformers (ViTs) throw every token into a computationally expensive global group chat ($O(N^2)$); State-Space Models (like Mamba) compress context along sequential scans.
Regardless of the mechanism, these architectures share a quirk: once training ends, all cross-image semantic knowledge—like what "grass" or a "washing machine" generally looks like—is baked invisibly into millions of frozen network weights. While external memory banks have occasionally been bolted onto existing backbones for niche tasks like video tracking, nobody had asked a more fundamental question: Can explicit, addressable memory serve as the core organizing principle of a general-purpose vision backbone?
Methods
Drawing on cognitive models of human memory, the authors introduce DuSAM (Dual-Store Associative Memory), structured as a standard four-stage hierarchical pyramid where attention and state-space blocks are replaced by custom Memory Blocks.
Each Memory Block orchestrates two distinct memory stores:
- Image-Local Working Memory (WM): Built fresh for every image, WM acts as a compact scratchpad of $K$ spatially anchored states. Pixels write local features into these states based on content similarity and spatial proximity—using Sinkhorn normalization (an optimal-transport trick) to ensure tokens distribute evenly rather than piling into one slot. These states travel across network stages to preserve context and are read back via gated residuals to refine dense pixel features. Because $K$ is fixed, context exchange scales linearly ($O(NK)$) with image resolution.
- Persistent Semantic Memory (PM): Shared across the deeper stages (3 and 4), PM is a fixed-capacity bank storing $P$ vector prototypes per category across the dataset. Crucially, PM is not updated by gradients. During training, a separate writer pools features from annotated images or masks and updates prototypes via an exponential moving average (EMA). During processing, image tokens query PM using both visual similarity and a predicted category "address" (via differentiable Hopfield-style softmax retrieval). Rather than dumping retrieved semantics directly onto raw pixels, DuSAM binds them into the Working Memory states, blending long-term knowledge with current scene context. At inference, PM is frozen, adding zero writer overhead.
Datasets
DuSAM is evaluated on three standard computer vision benchmarks (no new datasets are introduced):
- ImageNet-1K for image classification.
- ADE20K for semantic segmentation (paired with UPerNet).
- COCO 2017 for object detection and instance segmentation (paired with Mask R-CNN).
Key Insights and Ideas
- Editable knowledge without weight updates: Because category knowledge lives in explicit PM slots, you can perform "brain surgery" on a frozen network. Wiping a class's PM prototypes degrades its segmentation IoU; feeding just five annotated regions back through the writer restores 77% to 93% of the lost accuracy—without touching network parameters or disturbing other classes.
- Long-term memory rescues rare classes: Ablations show PM provides its biggest boosts on tail classes with the fewest annotated training pixels, acting as a crisp reference library where learned weights lack training signal.
- Where you inject memory matters: Routing retrieved PM prototypes through Working Memory outperforms fusing them directly into pixel tokens (especially on rare classes), showing that abstract semantics work best when integrated with broader scene context first.
- Built-in interpretability: Tracing which PM prototypes a pixel retrieves back to their nearest training exemplars visually exposes the exact training patterns informing a prediction.
Key Results
With roughly 20M parameters and zero self-attention, DuSAM competes head-to-head with established CNNs, ViTs, and SSMs:
- Accuracy: Achieves 79.1% top-1 accuracy on ImageNet-1K (20.5M params), 43.3 / 44.5 single-/multi-scale mIoU on ADE20K, and 42.6 box AP / 38.9 mask AP on COCO (matching Swin-T box AP with 17% fewer detector parameters).
- High-Resolution Scaling: Because memory interactions scale linearly with pixel count, DuSAM shines as images get large. At $2048 \times 2048$ resolution on an H100 GPU, a DuSAM segmentor achieves 2.36$\times$ the throughput of DeiT-S/16 while using 59.5% less GPU memory, and edges out the linear-complexity VMamba-T by 1.24$\times$ in throughput.
Limitations and Future Work
- Low-resolution kernel overhead: Despite having low FLOP counts, DuSAM's throughput lags behind simpler CNNs at small resolutions ($512^2$). Kernel profiling reveals this is due to GPU launch overhead from multiple small memory operations, pointing to custom kernel fusion as a clear engineering next step.
- Reliance on category labels for PM: Writing to Persistent Memory and training the semantic-address heads currently rely on ground-truth class annotations (image labels, segmentation regions, or instance masks). Extending this dual-store paradigm to unlabelled, self-supervised, or open-vocabulary regimes remains an open frontier.
Summary updated