Depth-Varying Information: Cross-Slice Self-Supervision That Does Not Learn the Scanner

Self-supervised learning (SSL), which trains an image encoder on unlabeled scans by asking it to match different "views" of the same data, looks like a natural fit for 3D CT and MRI. Neighbouring slices of a volume are ready-made views: they show the same patient and the same organs from a slightly different position, and no hand-designed augmentation is needed. The problem is that neighbouring slices also share everything that has nothing to do with anatomy. That includes the scanner's noise texture, its reconstruction filter, its slice thickness, the patient couch, and the site's field of view. These acquisition fingerprints are constant through the whole volume, so they are the easiest possible signal for an objective that rewards "information shared between views." We argue that cross-slice SSL, done naively, is a machine for learning shortcuts. A shortcut here means a non-anatomical cue that happens to correlate with the label and breaks when the correlation does.

This note proposes a fix that needs no confounder labels. Every slice feature can be split into two parts: a part that is constant across depth within one volume, where scanner fingerprints must live, and a part that changes with depth, where organ boundaries and small focal lesions live. The objective spends its "spread the representation out" budget only on the depth-varying part. It caps how much volume-constant information the encoder may carry, and it asks the encoder to predict a slice at a known depth offset from another slice. The claim is that this single change to the entropy term suppresses acquisition shortcuts and preserves through-plane anatomy better than generic spectrum-flattening or 3D pre-training. It should also favour sparse lesions rather than discard them, because a lesion that appears on two slices is exactly a depth-varying signal.

Core Claim

The information-theoretic view of SSL writes the objective between two views' representations $Z_1, Z_2$ as $I(Z_1;Z_2)=H(Z_1)-H(Z_1\mid Z_2)$. The first term is entropy, which spreads the representations out and prevents collapse. The second is conditional entropy, which should be small so that one view predicts the other. The Role of Entropy and Reconstruction in Multi-View Self-Supervised Learning turns this into an explicit Entropy-Reconstruction (ER) bound. It shows that managing the entropy term explicitly stabilises BYOL and DINO. An Information-Theoretic Perspective on Variance-Invariance-Covariance Regularization shows that VICReg's variance and covariance penalties approximate entropy, and that a log-determinant (LogDet) estimator does better. Both papers supply our method.

Neither paper asks where the entropy comes from. Let $V$ be the identity of the volume a slice came from. Then $H(Z)=I(Z;V)+H(Z\mid V)$. An encoder can satisfy the entropy term entirely through $I(Z;V)$, meaning features that tell volumes apart. For slices, the cheapest volume-identifying features are acquisition fingerprints. Our objective keeps the entropy reward only for the within-volume term $H(Z\mid V)$ and budgets the between-volume term. For a batch of $B$ volumes with $S$ slices each, let $\Sigma_W$ be the pooled within-volume covariance of slice embeddings and $\Sigma_B$ the covariance of per-volume mean embeddings. A Gaussian approximation gives $\hat I(Z;V)=\tfrac12[\log\det(\Sigma_W+\Sigma_B+\epsilon I)-\log\det(\Sigma_W+\epsilon I)]$, and the loss is

$$ \mathcal L=\mathbb E\,\big\|g(z_d,k)-z_{d+k}\big\|^2-\alpha\log\det(\Sigma_W+\epsilon I)+\beta\max\!\big(0,\hat I(Z;V)-\tau\big), $$

The symbols are as follows. $z_d$ is the embedding of the slice at depth $d$. $g$ is a small predictor that receives the physical offset $k$ in millimetres. $\alpha,\beta$ weight the terms, $\epsilon$ is a stabiliser, and $\tau$ is a budget for volume-constant information. The predictor is conditioned on the offset so that it cannot succeed by outputting a depth-invariant constant. It must model how anatomy changes along the depth axis, which is the through-plane context that slice-based pipelines lose. The LogDet on $d$-dimensional features costs $O(d^3)$ per step, which is modest at $d\approx256$.

The budget $\tau$ is a cap, not a ban, and this is deliberate. Diffuse disease such as emphysema or fatty liver, and patient-level anatomy, are also constant across depth. Removing all volume-constant information would be wrong. Section 4 of the file names this trade-off as a known limitation of shortcut suppression.

Relation to Prior Work

Three label-free lines of work attack shortcuts inside SSL, and all were tested only on 2D natural or synthetic images. Mitigating Spurious Features in Contrastive Learning with Spectral Regularization observes that shortcut-reliant encoders have a spiky feature spectrum and flattens it. It raised SpurCIFAR-10 worst-group accuracy from 36.5% to 64.6%. Automatic Shortcut Removal for Self-Supervised Representation Learning trains an adversarial image "lens" that removes low-level cues; the file notes it gave no gains alongside SimCLR. The ER and VICReg analyses above increase entropy globally. Our proposal differs from all three in one respect: it decides which entropy to reward, using the depth structure that only volumetric data provides. Spectral flattening can make a spectrum flat by spreading capacity over many scanner-texture dimensions, and our within/between decomposition is designed to prevent exactly that.

Several methods motivate the problem but require labels. Benchmarking Dependence Measures to Prevent Shortcut Learning in Medical Imaging minimises dependence between task and confounder subspaces using the Mutual Information Neural Estimator (MINE). Information-Theoretic Bias Reduction via Causal View of Spurious Correlation penalises the conditional mutual information $I(F;Z\mid Y)$ between features and a known bias. SpurCon uses Patient-ID pairs and pseudo-labelled artifacts. All three need the confounder or its proxy, and all are 2D. We treat MINE as a label-using upper reference rather than a competitor in the same regime.

Three papers define the volumetric setting. Shortcut Learning in Medical Image Segmentation shows that segmentation models exploit calipers, centre cropping and zero padding. Its evidence is 2D, and it leaves open whether slice stacking creates new shortcuts; we test that. CARVE documents high redundancy between slices alongside findings that occupy only one or two slices. This supports our bet that the depth-varying component carries the diagnostically sparse signal. Disruptive Autoencoders pre-trains a native 3D Swin-UNETR on more than 10,000 volumes but never measures shortcut robustness.

Research Program

The first step is diagnostic and could falsify the premise. We will pre-train a 2D slice encoder (ResNet-50) with cross-slice SimCLR and cross-slice VICReg. We will also pre-train one with standard within-slice augmentations. All three use the multi-source pre-training collection used by Disruptive Autoencoders (BraTS21, LUNA16, TCIA Covid19, HN-SCC, TCIA Colon, LIDC). On frozen features we measure four things:

  • Acquisition decodability: linear-probe accuracy for source dataset, scanner manufacturer, reconstruction kernel and slice thickness, taken from DICOM headers only for evaluation.
  • Information split: the ratio of $\hat I(Z;V)$ to $H(Z\mid V)$.
  • Effective rank: a summary of how spread the feature spectrum is.
  • Depth decodability: whether slice depth can be read out from features within a volume.

The premise predicts that cross-slice views raise acquisition decodability above augmentation-based SSL. If they do not, the motivation collapses and we would redirect the work toward the through-plane context question alone.

The second step trains the proposed objective with the same encoder, data and schedule. It sweeps $\tau$ and checks the diagnostic measurements again. The third step is downstream transfer. Slice features are aggregated along depth by a light 1D model or used as a 2.5D segmentation encoder. We evaluate on clean tasks and on shortcut stress tests.

The file contains no 3D shortcut benchmark, so we build controlled ones, following the inverted-correlation design of the CheXpert-sex experiment in the dependence-measures benchmark. On LIDC nodule malignancy we tie a synthetic acquisition cue to the label during training and reverse the tie at test. The cues are a reconstruction-kernel-like noise texture, a simulated couch or marker in the peripheral slices, and a slice-thickness change. We also test under a natural shift by holding out entire source datasets.

Baselines

The naive reference is a slice encoder trained with supervision from scratch, plus ImageNet-initialised fine-tuning. Together these show how much any pre-training helps and how badly empirical risk minimisation latches onto the injected cue.

The first SSL baselines are cross-slice SimCLR and VICReg+LogDet, as specified in An Information-Theoretic Perspective on Variance-Invariance-Covariance Regularization. They use the same positive pairs and predictor as our method. VICReg+LogDet is the closest methodological sibling because it already uses the entropy estimator we use, only on raw features.

The strongest label-free shortcut competitor is spectral regularization from Mitigating Spurious Features in Contrastive Learning with Spectral Regularization, added to cross-slice SimCLR. Its best reported figure is 64.6% worst-group accuracy on SpurCIFAR-10 versus 36.5% for SimCLR. No reported result was found on Lacuna for it on any medical or 3D data.

The strongest volumetric competitor is Disruptive Autoencoders, which reports a BTCV Dice of 0.921 with a native 3D Swin-UNETR. We will fine-tune its released-style recipe on the same pre-training data. No reported result was found on Lacuna for its shortcut robustness.

MINE with true confounder labels, following Benchmarking Dependence Measures to Prevent Shortcut Learning in Medical Imaging, serves as a label-using ceiling. It reported 87.7 AUROC on inverted CheXpert versus 45.8 for the baseline; that result is 2D, and no reported 3D result was found on Lacuna.

Fairness is controlled in four ways. All slice-based methods share the encoder, pre-training data, epochs and batch composition of $B$ volumes by $S$ slices. Every method gets the same hyperparameter budget, 16 trials tuned on a validation split that contains no shortcut inversion. DAE is compared at matched pre-training GPU-hours as well as at its own full scale.

Three ablations isolate the key ingredient:

  • the entropy term applied to raw $Z$ instead of within-volume $Z$;
  • the removal of the $\hat I(Z;V)$ cap;
  • the removal of the offset $k$ from the predictor.

The first ablation matters most. Beating the method means three things together. Worst-group AUROC on the inverted 3D stress tests must be higher than spectral regularization's by more than the seed-to-seed spread across five seeds. Acquisition decodability must be lower. Clean performance must stay within one Dice point of the best slice-based baseline on BTCV.

Why not just…?

Why not just add aggressive 3D augmentations such as noise injection, random crops and intensity jitter? Shortcut Learning in Medical Image Segmentation shows that random cropping does fix the cropping shortcut it targets. Augmentations only remove cues someone anticipated, though, and Your other Left! shows that flips can corrupt anatomical orientation, which radiology depends on. We include a strong augmentation baseline tuned specifically against our injected cues. It is a real threat on those cues. The decisive evidence is therefore the held-out-source shift, where the shortcuts were not designed by us.

Why not just use the scanner metadata in DICOM headers with an adversarial head? This is the most serious alternative, because unlike 2D confounders, 3D acquisition parameters are often recorded. The dependence-measures benchmark found that gradient-reversal adversaries underperform MINE in high dimensions. Headers are also incomplete across public collections and do not encode couch position or site-specific protocols. We run gradient-reversal and MINE on the header fields that exist. If they match our method on the held-out-source shift, the contribution shrinks to "equal robustness without labels," and we will report it that way.

Why not just flatten the spectrum? Spectral regularization is label-free and cheap. However, a flat spectrum says nothing about which directions carry the variance. The ablation that applies LogDet to raw features, and the spectral baseline itself, will show whether acquisition decodability stays high even when the spectrum is flat. If it does, the within/between split is doing the work.

Why not just train a native 3D network? Native 3D pre-training such as DAE preserves through-plane context. Nothing in its objective, however, stops it from encoding scanner texture, which is constant through the volume. We test DAE on the same stress tests. If it is already robust, our method's value reduces to lower compute through a 2D encoder, which we measure directly.

Decisive Checks

Three results decide the proposal. First, cross-slice SimCLR must encode acquisition identity more than augmentation-based SSL does; without this, the problem does not exist. Second, the within-volume entropy variant must beat the raw-entropy variant on inverted-shortcut worst-group AUROC at matched clean BTCV Dice. Third, depth decodability and small-nodule recall on LIDC must not fall as $\tau$ tightens until diffuse-disease probes start degrading. This last check traces out where the volume-constant cap begins to cost real signal.