RATS! Patches Talk Through Registers: Emergent Parts in Register Attention Transformers

Timing Yang, Predrag Neskovic, Jansen Seheult, Wenchao Han, Anand Bhattad, Alan Yuille, Feng WangNeurIPS 2026

TL;DR

When you look at a bird, you effortlessly see a structured assembly of reusable parts—wings, beak, and talons—rather than a single, monolithic blob. Standard Vision Transformers (ViTs) know about these parts implicitly, yet squash everything into one global summary token. RATS (Register Attention Transformers) replaces that all-to-all chatter with a clever architectural bottleneck, forcing self-supervised models to spontaneously organize the visual world into a clean, reusable dictionary of object parts—all without a single part label and while cutting compute costs in half.

Figure 1: RATS discovers compositional part structure through a register-token bottleneck. Top: unsupervised part segmentations emerge across diverse categories (birds, snake, shark, monkey, fish). Top-right: the bottleneck makes inference scale efficiently with image resolution. Bottom: each block routes patch–patch communication through N register tokens via a three-step compress– communicate–broadcast attention; per-register similarity maps over the patch grid recover semantic parts, which we catalog into a small dictionary of reusable part entries.

What Problem Does This Paper Address?

Self-supervised vision models like DINO have a remarkable secret: if you run Principal Component Analysis (PCA) on their internal patch features, you'll see the same components lighting up on cat ears, dog ears, and rabbit ears across totally different images. The model knows what an ear is.

Yet, standard Vision Transformers have no mechanism to surface this knowledge explicitly. Every image patch talks directly to every other patch in a giant $L \times L$ attention matrix, eventually collapsing the entire scene into a single [CLS] token. Patch tokens remain an unorganized bag of local features, and the model makes no commitment to grouping them into coherent regions. Previous attempts to force grouping either relied on text supervision, local pixel boundaries (which miss global context), or pixel-reconstruction "slots" that compete fiercely and end up grabbing whole objects rather than transferable parts. The question is: can pure architectural design coax a self-supervised model into discovering semantic parts on its own?

Methods

RATS makes one surgical change to a standard Vision Transformer trained with standard DINO self-distillation (where a student network learns to match a teacher network's view of augmented image crops, using no human labels).

Instead of using a single [CLS] token and letting $L$ image patches attend directly to one another, RATS introduces $N$ learnable register tokens and forces all patch communication through an $L \to N \to N \to L$ bottleneck in every block:

  1. Compress ($L \to N$): Registers attend to image patches, pulling spatial information into compact summaries.
  2. Communicate ($N \to N$): Registers perform self-attention among themselves, allowing co-occurring parts (like a wing and a tail) to exchange context.
  3. Broadcast ($N \to L$): Image patches attend back to the updated registers, writing part-aware context back onto the image grid.
Figure 2: Register attention block. The shared QKV linear projects the input X=[R; P] once. The register projections are partitioned into H disjoint per-head slices R1, . . . , RH, while the patch projections P are shared across all heads. Each head runs the three-step attention — compress, communicate, broadcast — between its own register slice and the shared patches. Per-head outputs are concatenated and projected by the output projection WO

Crucially, registers are partitioned exclusively across the $H$ attention heads. Head 1 owns its slice of registers, Head 2 owns a completely separate slice, and they never mix during attention. Confining each head to its own low-rank subspace prevents the tokens from entangling into generic global summaries, nudging each register to specialize in a distinct visual part. At the end of the network, the registers are simply averaged to compute the standard DINO loss.

Figure 3: Visualization of the three-stage register attention block. Compress: registers R4 and R9 attend to distinct image regions (lower vs. upper tier). Communicate: self-attention among registers lets co-occurring parts exchange context and bind into larger structures. Broadcast: each register writes back to its own footprint, closing the P→R→R→P bottleneck and regrouping patches into proto-semantic regions.

Datasets

No new datasets are introduced, though the authors construct proxy ground-truth masks where fine-grained human annotations are missing:

  • Pretraining: ImageNet-1k (at $224 \times 224$ resolution, without labels).
  • Part & Region Segmentation Evaluation: PartImageNet (object parts), ImageNet-$S_{919}$ (object classes), and ADE20K (scene regions) using human annotations; plus COCO 2017 val and ImageNet val scored against proxy masks generated by SAM 2.1.
  • Downstream Fine-tuning: ADE20K (semantic segmentation) and COCO 2017 (object detection and instance segmentation).

Key Insights and Ideas

  • Repurposing registers from "trash cans" to primitives: In recent ViT literature, register tokens were introduced as scratchpads to absorb noisy outlier artifacts. By moving them into the attention bottleneck, RATS turns a cleanup mechanism into a representational primitive for visual parts.
  • Head isolation is the secret sauce: Letting all attention heads share all registers degrades segmentation quality. Giving each head an isolated subset of registers forces specialization—much like assigning distinct roles to specialists on a team.
  • Emergent, compositional dictionaries: Clustering activated registers across images yields a reusable "part codebook." A "tire" entry fires on both bicycles and pickup trucks. Even cooler, when shown a mythical Pegasus—an unseen mashup of horse and bird—RATS decomposes it zero-shot using its independently learned "quadruped head," "quadruped body," and "bird wing" entries.

Key Results

  • Unsupervised Segmentation: Across five benchmarks, RATS beats all self-supervised, superpixel, and slot-based baselines, outperforming the strongest baseline (AdaSlot) by +9.8 mIoU on average at a matched token budget (37.26% vs. 27.45%).
  • Faster and Lighter: Because $N \ll L$, replacing quadratic $O(L^2)$ patch attention with the bottleneck slashes compute at higher resolutions. At $512 \times 512$, RATS-S runs in 81.7 ms using 0.49 GB of memory, compared to standard ViT-S's 172.8 ms and 1.08 GB—more than $2\times$ faster at the exact same parameter count (~21.7M).
  • Better Downstream Initialization: Feeding RATS's pretrained registers directly as input queries into a Mask2Former decoder beats a DINO ViT baseline on ADE20K (+1.11 mIoU) and COCO (+0.2 $\text{AP}^m$).

Limitations and Future Work

  • Granularity vs. Fragmentation Trade-offs: Adding more registers per head (or selecting more top-activated registers $\tau$ at inference) improves spatial coverage but fragments single objects into over-segmented pieces. Similarly, scaling up test resolution boosts mIoU up to $640 \times 640$, after which excessive patch counts begin to dilute attention coherence.
  • Small-Model Training Drift: In the smaller RATS-S variant, part segmentation quality peaks around epochs 160–180 and slowly declines if trained out to 300 epochs (though the larger RATS-B model does not suffer from this drop).
  • Dictionary Purity vs. Utilization: When learning an explicit part codebook, enlarging the dictionary increases per-entry semantic purity, but leaves up to 90% of the codebook entries unused.
  • Future Directions: The authors suggest RATS's architectural inductive bias can serve as a foundation for fine-grained visual recognition, interpretable model analysis, and compositional scene understanding.

Summary updated

Abstract

When humans see a bird, they recognize far more than just "bird" — they see a head, wings, and talons, a structured assembly of reusable parts that can be identified across every bird they have ever seen. We ask whether a self-supervised visual model can discover the same compositional structure on its own. To this end, we propose RATS (Register Attention Transformers), which decomposes the classification token into N learnable register tokens that route the information of L patches through an L→N→N→L bottleneck via a three-step compress–communicate–broadcast attention. The N registers are partitioned across the H attention heads, so that registers assigned to different heads do not interact with each other. Without auxiliary losses or part annotations, each register spontaneously specializes into a proto-semantic region whose emerging structure resembles object parts. RATS surpasses all baselines by +9.8 mIoU on average across five segmentation benchmarks at a matched token budget, with consistent gains on ADE20K (+1.11 mIoU) and COCO (+0.2 AP^m). Its register dictionary further exhibits part-level consistency and semantic proximity across related categories. Our results suggest that RATS may provide a useful architectural prior for structured and interpretable visual representation learning.
BibTeX
@inproceedings{yang2026rats,
  author = {Timing Yang and Predrag Neskovic and Jansen Seheult and Wenchao Han and Anand Bhattad and Alan Yuille and Feng Wang},
  title = {{RATS! Patches Talk Through Registers: Emergent Parts in Register Attention Transformers}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=Ylj622Nr12},
}
Figure