Align Once to Explain: Feature Alignment for Scalable B-cosification of Foundational Vision Transformers

Raphael Maser, Siddhartha Gairola, Sukrut Rao, Bernt Schiele

TL;DR

Vision foundation models are incredibly powerful but operate as complete black boxes. This paper introduces ALOE (ALign Once to Explain), a label-free feature alignment method that efficiently converts pre-trained Vision Transformers (ViTs) into inherently interpretable "B-cos" variants. ALOE requires up to 1000× less data than training from scratch, preserves the original model's downstream performance, and provides faithful, object-centric explanations by design.

What Problem Does This Paper Address?

Large-scale vision foundation models (like DINOv3 or SigLIP2) are the bedrock of modern computer vision, but their decision-making processes are notoriously opaque. To understand them, researchers typically rely on post-hoc explanation methods (e.g., Integrated Gradients or AttnLRP). However, these post-hoc methods can be noisy, slow, and unfaithful to the actual mechanics of the model.

An alternative is to use inherently interpretable architectures, such as B-cos networks. These networks replace standard linear layers with bias-free, input-dependent transforms, making the model's final output an exact, linear decomposition of its inputs. The catch? Training B-cos models from scratch at a foundational scale is prohibitively expensive. While prior work introduced "B-cosification" to convert pre-trained convolutional networks post-hoc, this recipe fails to maintain competitive performance when applied to modern Vision Transformers (ViTs). ALOE addresses this gap, providing a scalable, data-efficient way to make foundation ViTs inherently interpretable.

Methods

ALOE uses a label-free teacher-student framework to transfer knowledge from a frozen foundation model (the teacher) to an inherently interpretable B-cos variant (the student).

The ALOE framework converts a foundation ViT into a B-cos student and aligns their features using unlabeled images.

The process consists of two main steps:

  1. B-cos Conversion: Standard linear and MLP layers in the ViT are replaced with bias-free B-cos transforms, and all biases are removed. Crucially, special token pathways (like [CLS] and register tokens) are kept identical to the teacher to preserve the base model's computational routing.
  2. Label-Free Feature Alignment: The student is optimized using unlabeled images via a multi-scale cosine similarity loss. This loss combines:
  3. A global guidance term to match the geometry of the final embedding space.
  4. A token-level depth-wise guidance term applied at intermediate transformer blocks (specifically at 1/3, 2/3, and full depth) to stabilize training.
  5. A weight magnitude regularization term that forces the student to align its weight directions with the teacher without exploding in magnitude.

Datasets

  • Alignment (Training): Unlabeled, web-scale image datasets including CC3M, CC12M, and YFCC15M.
  • Evaluation:
  • ImageNet-1k for linear probing, $k$-NN classification, and zero-shot evaluation.
  • 10 downstream classification datasets (including Caltech101, Oxford Flowers, Food101, Stanford Cars, and CIFAR-10/100) to test representation robustness.
  • NYUv2 to evaluate dense prediction performance via monocular depth estimation.

Key Insights and Ideas

  • Amortized Interpretability: You only need to align the backbone once. Once the B-cos backbone is aligned, it can be used as a drop-in replacement across various downstream tasks (classification, zero-shot transfer, dense prediction) without requiring any task-specific interpretability tuning.
  • Extreme Data Efficiency: ALOE approaches teacher-level generalization with as few as 3 million images—and plateaus effectively at just 150k images (1% of YFCC15M). This represents a $\sim 1000\times$ reduction in data compared to the billion-scale pre-training corpora typically required for foundation models.
  • Token Preservation is Vital: Unlike CNNs, ViTs rely heavily on specialized token routing. Matching these token pathways one-to-one between the teacher and student is the secret ingredient that prevents the performance degradation seen in prior B-cosification attempts.

Key Results

  • Performance Retention: On ImageNet-1k linear probing, ALOE closely matches the original foundation models. For instance, an ALOE-aligned SigLIP2 ViT-B/16 achieves 83.67% top-1 accuracy compared to the teacher's 84.24%, while outperforming vanilla B-cosification by +7.83 percentage points.
ALOE maintains competitive ImageNet accuracy while dramatically boosting localization scores across different model families.
  • Superior Localization: ALOE substantially boosts localization quality on the Grid Pointing Game (GridPG) metric. Across ViT-B/16 backbones, it yields localization improvements of +26.6 points for SigLIP2 and +20.7 points for DINOv3 relative to baseline post-hoc methods.
  • Zero-Shot & Dense Prediction Success: Aligned SigLIP2 models retain strong zero-shot capabilities (77.20% on ImageNet vs. 78.07% for the teacher). On monocular depth estimation, ALOE drastically reduces RMSE from 0.46 (vanilla B-cosification) to 0.30, approaching the DINOv3 teacher (0.24).

Limitations and Future Work

While the authors demonstrate that ALOE-aligned backbones can be integrated into Multimodal Large Language Models (MLLMs) to enable token-level visual grounding, the current setup still relies on post-hoc methods (like AttnLRP) to propagate relevance through the language model component. Developing a fully end-to-end, inherently interpretable MLLM remains an open and promising direction for future research.

Summary updated

BibTeX
@inproceedings{maser2026align,
  author = {Raphael Maser and Siddhartha Gairola and Sukrut Rao and Bernt Schiele},
  title = {{Align Once to Explain: Feature Alignment for Scalable B-cosification of Foundational Vision Transformers}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=eglSKGDlzz},
}
Figure