The Platonic Defense: Backdoor Defense for Self-Supervised Encoders in the Era of Large Scale Pre-training

Tuo Chen, Minjing Dong, Benlei Cui, Jie Gui, Jian liu

TL;DR

As large AI models scale up, independently trained encoders begin to see the world in remarkably compatible ways—a phenomenon known as the Platonic Representation Hypothesis. This paper turns that philosophical curiosity into a practical security shield: if trusted reference models agree on what an image means, a sudden disagreement from an audited model is a dead giveaway of a backdoor attack. Better yet, this works at test time in a completely black-box setting, allowing us to both flag poisoned embeddings and mathematically nudge them back to safety.

What Problem Does This Paper Address?

Modern computer vision relies heavily on general-purpose, self-supervised learning (SSL) encoders (like CLIP or DINOv2) as foundational backbones. However, if an attacker poisons the pre-training data or alters the weights, they can implant a backdoor: the encoder behaves normally on clean images, but whenever a secret "trigger" pattern appears, it warps the output embedding toward an attacker-chosen target class.

Defending against this is notoriously tricky for downstream users. You usually download an encoder's API or frozen embeddings without access to its massive pre-training dataset, upstream training pipeline, downstream task labels, or internal weights and gradients. Existing defenses typically fail here because they assume white-box access, closed label spaces, or knowledge of specific trigger types. How do you audit and clean a suspect encoder when all you can see are the output vectors it spits out?

Figure 1: The Platonic Representation Defense: Representations (z1, z2, z3) are projections of a shared underlying reality. We conjecture that backdoor attacks will deviate from this pattern.

Methods

The authors introduce the Platonic Representation Defense, which operates entirely in representation space by comparing the output vector $z^s$ of a suspect "source" encoder against the vectors $z^{r_{1:K}}$ of $K$ trusted, publicly available "reference" encoders (such as DINOv2 or SigLIP) fed the exact same input.

To compare vectors of different dimensions and coordinate systems, the authors formalize multi-encoder compatibility as a conditional energy-based model (EBM), $E_\theta(z^s, z^{r_{1:K}})$. Low energy means the suspect representation harmonizes with the reference ensemble; high energy signals an anomaly.

Using a shared architecture—MLPs to project heterogeneous embeddings into a common token dimension, followed by a Transformer where the source token attends to reference tokens—they train the framework via two routes without ever needing poisoned examples:

  1. Detection via Sigmoid-NCE: Using Noise-Contrastive Estimation (similar to SigLIP), the model learns to distinguish matched representations (from the same image) from mismatched cross-sample pairs. At test time, the scalar energy $E_\theta$ acts directly as an anomaly score.
  2. Purification via Conditional Denoising Score Matching (cDSM): Following modern diffusion model parameterizations (EDM), they add Gaussian noise to clean source embeddings and train a denoiser conditioned on the clean reference embeddings. Via Tweedie’s identity, this yields a score field ($-\nabla_{z^s} E_\theta$) that allows the defender to pull a corrupted, backdoored embedding right back into the low-energy "clean" region.

Datasets

  • ImageNet-1K is explicitly used to measure cross-model representation alignment across diverse model families.
  • (Note: Specific datasets used for backdoor evaluation and defense training in the later experimental sections are truncated from the provided text, though extracted figures indicate evaluations across MLLM setups.)

Key Insights and Ideas

  • Convergence is a free security signal: Because capable models across totally different paradigms (SSL, vision-language contrastive, MLLMs, autoregressive generative) naturally converge toward a shared statistical reality, cross-model consensus serves as an intrinsic, attack-agnostic ground truth.
  • Alignment is learned, not architectural: Randomly initialized versions of these exact same architectures show near-zero alignment (<0.01 CKNNA score), proving that representation harmony comes from learning the structure of the world rather than inductive bias.
  • Information theory guarantees an energy gap: The authors prove mathematically that the expected energy gap between clean (matched) and backdoored (mismatched) representations is lower-bounded by the mutual information $I(Z^s; Z^{r_{1:K}})$ between the source and reference encoders. The stronger the Platonic convergence, the wider and safer the detection margin.
Figure 2: Cross-model representation alignment on ImageNet-1K. LEFT: Pairwise CKNNA scores with 10 neighbors among 8 diverse independently trained models. All discriminative mod- els exhibit substantial mutual alignment despite differing architectures and training objectives. SD- VAE [54] serves as comparision. RIGHT: UMAP of the jointly embedded relational representations after per-model centering and row-ℓ2 normalization. Samples from different models cluster primar- ily by semantic class rather than by model identity, providing a geometric view of the convergence.

Key Results

  • Strong Cross-Paradigm Alignment: Evaluating 8 diverse models on ImageNet-1K using Centered Kernel Nearest-Neighbor Alignment (CKNNA), discriminative and generative semantic encoders show substantial mutual alignment—for example, 0.58 between DINOv2-B and SigLIP2-B, and 0.55 between DINOv2-B and AIMv2-L/14—whereas a low-level reconstruction model (SD2.1 VAE) sits at 0.01–0.02. In UMAP projections, embeddings cluster by semantic class rather than by which model produced them.
  • Broad Defense Efficacy: Evaluated across more than 10 backdoor and adversarial attacks, the method substantially reduces Attack Success Rates (ASR) while preserving clean utility. For instance, in downstream MLLM evaluations (across Qwen3-VL, InternVL3, Llama3.2, and Gemma3), ASR against BadEncoder is driven down to 0.7%–1.9%, and against CLIP-Backdoor down to 0.0%–0.2%, while maintaining poisoned-input task accuracy between 35.2% and 46.0%.
Defense performance on CLIP-Backdoor across MLLMs

Limitations and Future Work

  • Modality Scope: While the mathematical framework is modality-agnostic in principle, the authors explicitly focus this work on visual representations and leave non-visual modalities (such as pure text or audio encoders) to future work.
  • Reliance on Trusted References: By design, the threat model assumes the defender has access to a set of clean, uncompromised public reference encoders at test time (and the compute budget to run inputs through them alongside the audited model).

Summary updated

Abstract

Self-supervised learning (SSL) has become a dominant paradigm for visual representation learning, but SSL encoders are vulnerable to backdoor attacks. Existing defenses struggle against such attacks in a fully black-box setting because they often require access to labels, attack patterns, or training data. To tackle this issue, we propose a new attack-agnostic, model-agnostic, and modality-agnostic black-box test-time defense paradigm, called \emph{Platonic Representation Defense}. It is inspired by the Platonic Representation Hypothesis, which suggests that large-scale independently trained encoders converge toward compatible projections of the same underlying reality. We formalize this idea as a conditional energy function defined over source representations and a set of reference representations. The energy function is trained for backdoor detection through noise-contrastive estimation and for representation purification through denoising score matching. Theoretically, the energy gap between matched and mismatched samples is lower bounded by the mutual information between source and reference representations. We demonstrate the effectiveness of our method on multiple self-supervised encoders and more than 10 attacks. The method performs both representation detection and purification, achieving substantial gains across attacks.
BibTeX
@inproceedings{chen2026platonic,
  author = {Tuo Chen and Minjing Dong and Benlei Cui and Jie Gui and Jian liu},
  title = {{The Platonic Defense: Backdoor Defense for Self-Supervised Encoders in the Era of Large Scale Pre-training}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=AprP1QZ0Te},
}
Figure