# Cracks in Embeddings: Robustness and Stability of JEPA-Based Chest X-Ray Representations

Mansur, Zahid, Yadav, Kalpana, Mishra, Deepak · arXiv · 2026-11-13

- **Problem** Not stated in the paper.
- **Method** Freezes four JEPA-style chest X-ray encoders, trains only a predictor and classifier head on each, and compares adversarial fine-tuning with a 128-entry codebook predictor across five perturbation tests and a label-scarcity test.
- **Results** I-JEPA shows the largest average Macro AUROC loss at the strongest severity level, 10.77%, and fine-tuning raises its average Macro AUROC to 0.68 across five tests.

![Figure 1: (a) Training: each frozen encoder trains its own predictor/classifier pair on clean images, not shared across models. (b) Test: the held-out set is p…](https://refivu.com/papers/daee5a77-a7ae-4a85-aa91-3c0350658e14/figures/figure-90129a2c07a74af8adfde732e70a660c.png?thumb=512)

**Figure 1** : (a) Training: each frozen encoder trains its own predictor/classifier pair on clean images, not shared across models. (b) Test: the held-out set is perturbed, passed through the same frozen encoders, and evaluated by two independently trained predictors, codebook (clean images only) and fine-tuned (clean and perturbed images).

[Original paper](https://arxiv.org/abs/2611.17905v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Mansur, Zahid, Yadav, Kalpana, Mishra, Deepak · Cracks in Embeddings: Robustness and Stability of JEPA-Based Chest X-Ray Representations · Original paper figure · Extracted the figure area from page 3 of the original PDF.

## Why JEPA chest X-ray encoders need a robustness test

JEPA-style world models for chest radiographs, including CheXWorld, X-WIN and RadJEPA, learn by predicting representations rather than pixels. A clean test-set score does not show how these encoders behave when the scanner, the brightness, the contrast or the noise level of a chest X-ray changes, or when an attacker queries the deployed model.

Earlier evaluations of self-supervised medical encoders check label efficiency and out-of-distribution detection, and robustness studies cover natural images, but neither has been applied to JEPA chest X-ray models.

## Frozen encoders with a trainable head

Each of the four encoders stays frozen throughout, and a small head sits on top of it: a residual predictor followed by a single linear classifier over the 14 disease labels. Training this head on all 78,468 clean training images gives the Original baseline, trained for 300 epochs on clean images only.

Two alternative heads are built on the Original predictor and evaluated on the same distorted held-out images, so any difference in their scores comes from the head and not from the test inputs.

The four encoders differ in origin: CheXWorld, RadJEPA and I-JEPA are used as publicly released, while the authors pretrained their own X-WIN encoder on LIDC-IDRI for 100 epochs because the original checkpoint is not public and the NLST recipe was too large to reproduce. I-JEPA is the only encoder pretrained on natural images, which makes it a test of whether a general-purpose encoder transfers to chest X-rays.

## Perturbations and the two measures

Five perturbation tests are used: two black-box attacks, SPSA and the Boundary Attack, and three corruptions, Gaussian Noise, Brightness Shift and Contrast Shift, plus a label-scarcity test. Each corruption and SPSA has four severity levels, while the Boundary Attack uses one fixed setting of 80 queries.

SPSA estimates a damaging direction from random probes and the model's outputs, without gradients. The Boundary Attack starts from a large random change that flips the prediction and shrinks it step by step while the prediction stays flipped. Gaussian Noise adds per-pixel noise, Brightness Shift multiplies every pixel by a fixed factor, and Contrast Shift scales pixel values around the average brightness.

Damage is read through the predictor output: Embedding Cosine Similarity compares the predictor output for a clean image with the output for its perturbed version. In the notation of the study, the cosine similarity is computed as follows.

Macro AUROC is computed on the classifier predictions for clean and perturbed embeddings against the true disease labels, and it is the accuracy measure used throughout.

## Adversarial fine-tuning of the predictor

Fine-tuning starts from the clean-trained predictor and classifier, which are warm-started rather than reinitialised. For each training image, one perturbed copy is generated for every perturbation type in Table 1, always at its strongest severity level, so the training mix holds clean and perturbed images.

The loss has two binary cross-entropy terms, each weighted by one half, one on the clean prediction and one on the prediction for the perturbed image, plus a consistency term weighted by \\(\\lambda\\), which is set to 1. The consistency term is \\(\\lambda(1-\\mathrm{CosSim}(z\_p,\\tilde z\_p))\\), so it grows when the perturbed predictor output drifts away from the clean one.

The predictor output \\(z\_p\\) is computed from the frozen embedding \\(z\\) by a residual sum with three trainable layers, so the consistency term acts on a small learned adjustment and not on the encoder.

Evaluation still uses the full settings from Table 1.

## Quantizing the predictor with a codebook

The codebook variant changes the architecture rather than the training data, and it works on the un-pooled patch tokens: 196 patches for CheXWorld and X-WIN and 256 for RadJEPA and I-JEPA. The tokens are reshaped into a spatial grid and passed through one 3×3 convolution with stride 2, batch normalisation and GELU, which maps the channels to 128 and halves the spatial size.

Each spatial position is normalised with LayerNorm and assigned to its nearest vector among 128 learned codebook vectors, which gives 49 lookups per image for 14×14 grids and 64 for 16×16 grids. The nearest-vector choice has no gradient, so a straight-through estimator passes gradients through this step.

The codebook starts from k-means clusters of the convolved features from a 1,000-image clean subset, and each entry is then moved toward its assigned vectors by an exponential moving average with decay 0.99. Entries that are rarely used are reset periodically so that the codebook keeps its capacity.

The quantized map is added to the pre-quantization features and flattened into one linear classifier with no hidden layer, which takes 6272 or 8192 inputs depending on the encoder.

The predictor never sees a perturbed image: its loss is a classification term plus a commitment term weighted by \\(\\beta=0.25\\) that keeps pre-quantized features close to their assigned codebook entries. It is trained for 300 epochs with Adam, learning rate 10−3, weight decay 10−4 and cosine annealing to 10−5, in batches of 128, on the full 78,468 clean training images.

## How much damage the perturbations cause

At the strongest level, the average Macro AUROC loss is 10.77% for I-JEPA, 6.90% for CheXWorld, 4.76% for RadJEPA and 3.17% for X-WIN. The comparison uses the 1,000-image held-out subset, so these averages describe this subset only.

Its Gaussian Noise embedding similarity falls to 0.33, the lowest value reported in the study.

The Boundary Attack is I-JEPA's sharpest single-test drop: Macro AUROC falls from 0.65 on clean images to 0.53, an 18.46% loss, and embedding similarity drops to 0.39. Across the encoders this is the largest AUROC fall the study reports, 0.12 on I-JEPA.

Brightness and Contrast do not worsen steadily with severity: embedding similarity is often lowest at the mildest setting, with CheXWorld and X-WIN reaching 0.39 and 0.41 at Level 1, while AUROC keeps falling through Level 4.

RadJEPA under Gaussian Noise shows −1.59%: its AUROC is 0.64 on noisy images against 0.63 on clean ones. The authors do not read this as noise helping, and they attribute the small difference to chance, since the test set has only 1,000 images. Each test damages a different model most, so a single test does not describe robustness overall.

## Codebook results on perturbed inputs

The codebook predictor lowers Macro AUROC below its clean value in every test for all four encoders. Averaged over the five tests, the drop is 10.00% for CheXWorld, 13.56% for X-WIN, 9.38% for RadJEPA and 21.43% for I-JEPA.

I-JEPA is hit hardest, reaching a 24.29% loss under Gaussian Noise, while RadJEPA and CheXWorld hold up best. The codebook numbers use a 3,000-image held-out subset and carry different clean baselines, for example 0.70 for CheXWorld against 0.58 in the Original table, so they cannot be compared directly with the Original-predictor table.

The authors conclude that a discrete bottleneck alone does not resist perturbations the codebook was never trained on.

The conclusion also states that the codebook predictor degraded more than the plain Original predictor.

## Fine-tuning results and seed stability

Averaged over the five tests at the strongest level, fine-tuned Macro AUROC reaches 0.62 for CheXWorld, 0.63 for X-WIN, 0.62 for RadJEPA and 0.68 for I-JEPA. The Table 4 caption does not state the size of its held-out subset.

Set against the Original averages of 0.54, 0.61, 0.60 and 0.58 in the Table 2 comparison, I-JEPA shows the largest rise, and the abstract reports a gain of +0.10 on I-JEPA relative to the perturbed baseline. The authors describe RadJEPA as essentially unchanged, consistent with its already high robustness.

Three more seeds, 123, 456 and 789, were run with all other settings held, and X-WIN and RadJEPA have a standard deviation of at most 0.001 across the four seeds.

## Label efficiency of raw embeddings

This test involves no perturbation: a fresh linear classifier is trained on clean images using 100%, 10% or 1% of the training labels, on the Original-predictor embeddings.

I-JEPA has the strongest embeddings at every budget, with Macro AUROC of 0.75, 0.73 and 0.65, even though it is the only encoder pretrained on natural images.

CheXWorld and RadJEPA start lower at full labels but both reach 0.60 at 1%.

The authors also pass clean images through the fine-tuned and codebook predictors and find that these training schemes do not reliably improve low-label AUROC, so robustness training should not be assumed to help label-efficient learning.

## Limitations

Table 2 uses a 1,000-image held-out subset, and the codebook table uses 3,000 images, so the two sets of numbers come from different test sizes. The authors note that with only 1,000 test images a difference as small as the RadJEPA noise result can arise by chance.

Only black-box attacks are used, and the Boundary Attack has a single fixed setting of 80 queries, so the white-box attacks such as FGSM are outside the evaluation.

Fine-tuning evaluates on the same perturbation types, at their strongest severity, that its training copies used, so these results do not show how the head handles perturbations it was not trained on.

The SPSA and Boundary Attack training caches are built on a large training subset rather than the full split.

The codebook predictor uses clean training data only, has 128 entries, and sits inside a small predictor on a frozen encoder, which the authors give as a reason for its weaker results. The X-WIN encoder was pretrained on LIDC-IDRI rather than on the NLST data of its original recipe.

## Paper info

- **Authors**: Mansur, Zahid, Yadav, Kalpana, Mishra, Deepak
- **Venue**: arXiv · Preprint
- **First published**: 2026-11-13
- **Added**: 2026-11-16
- **Updated**: 2026-11-13
- **Version**: v1
- **arXiv**: 2611.17905
- **Category**: cs.CV
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2611.17905v1) · [PDF ↗](https://arxiv.org/pdf/2611.17905v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

Self-supervised Joint Embedding Predictive Architecture (JEPA) models are increasingly used for medical imaging, however there is a limited understanding about robustness of these models toward real-world image changes. We test four JEPA-based chest X-ray encoders, trained on 78,468 NIH ChestX-ray14 images, under six tests: two black-box adversarial attacks (SPSA, Boundary Attack), three image corruptions (Gaussian noise, brightness shift, contrast shift), and a label-scarcity test, measuring embedding change and classification AUROC. These perturbations cause severe, model-dependent damage: encoder-level Cosine Similarity drops as low as 0.33, and AUROC falls by as much as 0.12 in the worst case (I-JEPA under the Boundary Test). We test two ways of training the small predictor on top of each frozen encoder to address this. Adversarial fine-tuning, trained on clean and perturbed images together, raises embedding consistency above 0.97 in nearly every case and improves AUROC, relative to the same perturbed baseline, for most models, with the largest gain of $+0.10$ on I-JEPA. A Vector-Quantized codebook method, trained only on clean images and evaluated on perturbed test images for the first time, instead degrades under distortion for all four models, most noticeably for I-JEPA ($-0.15$ AUROC on average), showing that its discrete bottleneck alone does not provide the robustness that comes from training on perturbed data directly.

## Quote from the paper

Mansur, Zahid, Yadav, Kalpana, Mishra, Deepak (2026). Cracks in Embeddings: Robustness and Stability of JEPA-Based Chest X-Ray Representations. arXiv:2611.17905v1. https://arxiv.org/abs/2611.17905v1

**BibTeX**

```
@misc{zahid2026cracks,
  title = {{Cracks in Embeddings: Robustness and Stability of JEPA-Based Chest X-Ray Representations}},
  author = {Mansur, Zahid and Yadav, Kalpana and Mishra, Deepak},
  year = {2026},
  eprint = {2611.17905},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.17905v1}
}
```

## Other paper commentary

- [Self-supervised Graph Learning for Recommendation](https://refivu.com/en/papers/101a7b08-1d43-4cb8-8a03-8ebbce6be79e-self-supervised-graph-learning-for-recommendation.md)
- [Representation Engineering: A Top-Down Approach to AI Transparency](https://refivu.com/en/papers/f6b6fa1e-01cf-4bad-a9dc-8b83f1107927-representation-engineering-a-top-down-approach-to-ai.md)
- [Text Embeddings by Weakly-Supervised Contrastive Pre-training](https://refivu.com/en/papers/d1351af6-6e66-4a03-9f02-44cc61903f8b-text-embeddings-by-weakly-supervised-contrastive-pre.md)
- [Representation Learning on Graphs: Methods and Applications](https://refivu.com/en/papers/3ca2c648-5d7e-46c2-be1e-357cc66ab085-representation-learning-on-graphs-methods-and-applications.md)
- [Deep Learning Face Representation by Joint Identification-Verification](https://refivu.com/en/papers/1824448e-2edd-4d03-a6b5-1fbd92b71da3-deep-learning-face-representation-by-joint-identification.md)
- [Curiosity-driven Exploration by Self-supervised Prediction](https://refivu.com/en/papers/93936438-d2c7-4a12-b814-3073185546ca-curiosity-driven-exploration-by-self-supervised-prediction.md)
- [Tracing Uncertainties of Extreme El Niño Prediction to Mesoscale Ocean Currents](https://refivu.com/en/papers/e50737f2-d670-42f4-9b3c-5a4a5eaf3da4-tracing-uncertainties-of-extreme-el-nino-prediction-to.md)
- [Fuse-All MoE Inference Kernel with Load Balancing on TPUs](https://refivu.com/en/papers/9cb74dcd-e120-4e43-b2b0-37dad7ccf356-fuse-all-moe-inference-kernel-with-load-balancing.md)
- [Dynamic bigraphical Matérn--Whittle processes: learning dependence graphs among spatial-temporal fields](https://refivu.com/en/papers/cbf27e8a-2ba6-4a1f-8c53-279da5a1a60f-dynamic-bigraphical-matern-whittle-processes-learning.md)
- [Causally Constrained and Uncertainty-Aware Cardiopulmonary Risk Prediction](https://refivu.com/en/papers/2c2b5714-498e-4c41-a2bc-142d04049204-causally-constrained-and-uncertainty-aware-cardiopulmonary.md)
- [Emulating physics-based XCO2 retrievals across OCO-2 viewing modes with compact neural networks](https://refivu.com/en/papers/6eac8a41-4497-46c1-a78e-3b47e416ce0a-emulating-physics-based-xco2-retrievals-across-oco-2.md)
- [Experts Across Schemas: Agent-Guided Mixture-of-Relational-Experts for Cross-Database Generalization](https://refivu.com/en/papers/76b43bb6-c77c-4c61-9629-5e9b2ce3f959-experts-across-schemas-agent-guided-mixture-of-relational.md)

## Terms in this paper

- [ImageNet](https://refivu.com/en/terms/5eadad128667-imagenet)
- [straight-through estimator](https://refivu.com/en/terms/daa90b015f59-straight-through-estimator)
- [Gaussian noise](https://refivu.com/en/terms/6227b86077fd-gaussian-noise)
- [NIH ChestX-ray14](https://refivu.com/en/terms/b6b147113f1c-nih-chestx-ray14)
- [predictor](https://refivu.com/en/terms/a89dd75e5eda-predictor)
- [SPSA](https://refivu.com/en/terms/126373c7fd8e-spsa)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/daee5a77-a7ae-4a85-aa91-3c0350658e14-cracks-in-embeddings-robustness-and-stability-of-jepa)
