Context-Inconsistency Scores for Label-Free Lesion Screening on Non-Contrast CT

Most CT scans that could reveal an early kidney or pancreatic cancer are never read with that purpose. They are non-contrast or low-dose scans taken for other reasons. Meanwhile, the AI tools that detect such cancers are trained on contrast-enhanced scans from patients who already had symptoms, and they need voxel-level tumor labels that barely exist for rare subtypes. We propose to borrow the pretraining recipe of ELECTRA, a text model trained by replaced token detection. In that setup, a small "generator" network fills in hidden words with plausible guesses, and a larger "discriminator" network learns, at every position, whether a word is original or a guess. We apply the same recipe to 3D CT patches and then use the discriminator directly as a screening tool. At test time, a region that "looks replaced", meaning it does not fit its anatomical surroundings the way normal tissue does, is flagged. Training needs no tumor labels at all, only the large pool of unannotated scans.

The bet is specific. The discriminator's per-patch output estimates how much more probable a patch is under real anatomy than under a deliberately blurrier model of anatomy. That ratio should flag small, atypical tissue better than raw reconstruction error or likelihood, which are dominated by noise and texture. This matters most for low-dose scans and for rare tumor subtypes that no supervised model has ever seen. If the claim holds, one label-free model trained on non-contrast CT could triage opportunistic scans and catch lesions whose subtype is absent from every training set.

Core Claim

ELECTRA trains a maximum-likelihood generator, deliberately sized at roughly 1/4 to 1/2 of the discriminator. The discriminator then classifies every token as original or replaced. Let $D(x_i \mid c)$ be the discriminator's probability that patch token $x_i$ is original given its surrounding context $c$. Let $p_{\text{data}}$ be the true conditional distribution of anatomy and $p_G$ the generator's distribution. At the optimum,

$$\log\frac{D(x_i\mid c)}{1-D(x_i\mid c)} = \log\frac{p_{\text{data}}(x_i\mid c)}{p_G(x_i\mid c)} + \kappa,$$

where $\kappa$ is a constant set by the replacement rate. This follows from the standard optimal-classifier argument for two mixed sources.

A deliberately weaker generator behaves like a smoothed copy of the data distribution. It spreads probability onto unusual tissue that real anatomy rarely produces. A small hypodense mass in renal cortex therefore receives a low score: it is plausible to the smoothed model but implausible to real anatomy. The background complexity that inflates raw likelihoods, such as low-dose noise and beam-hardening texture, appears in both terms and largely cancels.

The claim is not that 3D ELECTRA pretraining beats masked autoencoding as a general representation learner. In images, masked autoencoders already mask most patches, so ELECTRA's "denser signal" advantage from text is weaker. The claim is narrower. The discriminator's raw output is a better zero-label anomaly map than reconstruction error, generator likelihood, or hand-crafted patch blending, and this advantage grows on non-contrast and low-dose CT and on rare subtypes.

Why This Gap, and What Prior Work Leaves Open

The clinical motivation comes from screening studies. Ishikawa's nationwide surveys of Japanese hemodialysis patients (1990 survey, 2004 survey) report a 12- to 40-fold elevated risk of renal cell carcinoma. They also report that regular imaging caught 88–95% of tumors while patients were asymptomatic, which shows that scheduled imaging works when someone reads it. ePAI shows the same for pancreatic cancer with AI, finding tumors a median 347 days before diagnosis on scans radiologists had called normal. It does so through a three-stage pipeline that requires organ and duct annotations and rule-based lesion insertion.

McGough et al. name the barrier we target. Labeled benchmarks such as KiTS19 and KiTS21 are contrast-enhanced, while screening is mostly non-contrast. The KiTS21 hidden-strata analysis and the absence of chromophobe, collecting-duct and sarcomatoid annotations mean that supervised models are weakest exactly where screening needs them.

Three lines of work supply methods or set constraints. Poisson Image Interpolation is the closest method. It pastes Poisson-blended foreign patches into 2D images and trains a regressor whose output is used directly as an anomaly score. That beats linear patch blending, VQ-VAE2 and Deep SVDD on Chest X-ray14. We keep the idea of using a self-supervised corruption detector as the test-time score. We change two things: replacements come from a learned model of context rather than from another image's pixels, and we work in 3D. FreeTumor synthesizes tumors with an adversarial generator whose discriminator is a segmentation network, needs a quality filter, and then trains a supervised segmenter. That segmenter can only find tumor types its generator was taught. Our model never sees a tumor. P-WAE constrains the design: its analysis of autoencoder over-smoothing is why we distrust reconstruction error for millimetre-scale lesions.

On the text side, ELECTRA's finding that adversarially trained generators perform poorly tells us to keep the generator on plain maximum likelihood. Its finding that a generator as large as the discriminator makes the task too hard predicts a measurable optimum in generator size, which we will test. Prompting ELECTRA as a few-shot learner shows that originality scores can serve directly as classifiers without retraining. That suggests, but does not establish, that the same scores can rank rare-subtype lesions.

Research Program

We first train a 3D patch tokenizer, a vector-quantized autoencoder that maps each $8\times8\times8$-voxel patch at roughly 1 mm spacing to an entry in a learned codebook. Training uses unannotated abdominal CT from the public pool catalogued by FreeTumor: 161,310 volumes, of which 19,571 are abdominal and 97.7% carry no tumor labels. We oversample non-contrast and low-dose series.

Working with discrete codes is the key engineering choice. Both original and replaced patches pass through the same tokenizer. The discriminator therefore cannot win by spotting decoder artifacts, a "generator fingerprint" that would otherwise make it useless on real lesions.

A small masked-token generator, about 1/4 the discriminator's width, is trained by maximum likelihood to predict masked codes from 3D context. A Swin-style 3D transformer discriminator, the backbone of Swin UNETR, classifies every token. Embeddings are shared between the two networks, as in ELECTRA. Masking is applied in contiguous 3D blocks so that replacements span lesion-sized regions rather than isolated voxels.

At test time, the per-token log-odds of "replaced" form a 3D anomaly map. We aggregate it per organ using a free off-the-shelf organ segmenter, so the masks require no tumor labels, and take the maximum within each organ as the patient-level score.

The analysis has three threads. The first tests whether the density-ratio reading holds empirically. We measure whether discriminator scores track the gap between generator and data log-likelihoods on held-out normal tissue, and whether scores on normal low-dose scans are flatter than raw generator likelihood. The second sweeps generator size from 1/8 to equal width to locate the screening optimum. The third probes the rare-disease question: does the anomaly score's sensitivity on held-out rare renal subtypes match its sensitivity on clear cell carcinoma? A supervised model's sensitivity should drop on those subtypes.

Baselines

The naive reference point is a supervised Swin UNETR or nnU-Net trained on KiTS21. Its patient-level score is the maximum predicted tumor probability. This is what a hospital would deploy today. The KiTS21 top team reports tumor Dice of 0.86 on contrast-enhanced test data (KiTS21), so it is strong in-domain. We expect it to fall on non-contrast scans and unseen subtypes. We run it with its published configuration, so it receives no extra tuning budget against it.

The strongest unsupervised competitor is PII lifted to 3D. Poisson blending of foreign volumetric patches trains the same Swin backbone on the same unlabeled pool, with matched GPU-hours and the same hyperparameter search budget. The only reported number is 2D: Average Precision 0.690 on female PA Chest X-ray14 against 0.533 for linear Foreign Patch Interpolation (PII). We found no reported 3D CT result on Lacuna for PII. Beating it means higher patient-level Average Precision and higher sensitivity for tumors under 2 cm on non-contrast test scans, across three seeds with non-overlapping bootstrap intervals.

The strongest label-using competitor is FreeTumor-style synthesis. We insert synthetic tumors into healthy scans of the same pool and train a supervised segmenter. FreeTumor reports a 16.4% average sensitivity gain for tumors under 2 cm and a 6.7% Dice gain over a SwinUNETR baseline (FreeTumor). We do not expect to beat it on clear cell carcinoma in contrast-enhanced CT. Beating it means matching it within a few points there while exceeding it on rare subtypes and non-contrast scans.

A 3D masked autoencoder trained on the same tokens and compute serves both as a representation baseline and as a reconstruction-error anomaly scorer. We found no reported result on Lacuna for a 3D masked autoencoder on these benchmarks.

The ablation that isolates our key ingredient scores anomalies with the trained generator's own negative log-likelihood of each original token. It uses the same model and data and simply drops the discriminator. If the discriminator does not beat its own generator, the density-ratio argument is wrong for CT.

A second ablation replaces the discrete round-trip with continuous decoded replacements. It tests whether the fingerprint control matters.

Why not just…?

Why not just pretrain a 3D masked autoencoder and use reconstruction error? This is the most likely real threat, because image masked autoencoders do not suffer the 15%-masking inefficiency that made ELECTRA attractive in text. The case against it rests on evidence that reconstruction-based scoring blurs fine detail. In the PII study, VQ-VAE2 reached only 0.503 Average Precision on Chest X-ray14, and P-WAE documents autoencoder over-smoothing. Neither result is in 3D CT. We therefore run the masked autoencoder with matched compute. If its reconstruction-error map matches the discriminator on small tumors in non-contrast CT, our claim fails and we will report that.

Why not just extend PII to 3D? It needs no learned generator and already uses the corruption detector as the score. Its weakness is that foreign-patch replacements are anatomically absurd, for example liver texture in renal cortex. The detector can then succeed using organ-identity cues that real small lesions never present. The matched 3D-PII baseline settles this. The telling comparison is sensitivity for tumors under 2 cm, where context consistency rather than gross mismatch should matter.

Why not just synthesize tumors and train a supervised detector, as FreeTumor and ePAI do? On common tumor types this will likely win, and we say so. It cannot detect what its synthesizer was never taught, which is the rare-subtype and novel-appearance regime. It also inherits the contrast-domain problem unless synthesis is redone for non-contrast scans. The held-out-subtype experiment and the non-contrast test set decide whether a label-free score adds anything beyond synthesis. Combining the two, with the anomaly map as an extra input, is a natural follow-up if both carry signal.

Why not just use the generator's likelihood and skip the discriminator? This is precisely our core ablation. If the ratio does not beat the likelihood, the discriminator adds cost without benefit.

Proposed Experiments and Decisive Checks

Pretraining uses the unlabeled public CT pool, with every KiTS19, KiTS21 and evaluation patient excluded. Evaluation needs a labeled non-contrast set, which no benchmark in our file provides. We will therefore assemble one from the public sources' non-contrast series that have tumor annotations, plus a small retrospective cohort of hemodialysis surveillance scans with pathology-confirmed renal masses. KiTS21 serves as a contrast-enhanced reference, with its histology metadata used to hold out non-clear-cell subtypes. If the ePAI prediagnostic cohort becomes accessible, it is the ideal lead-time test; otherwise we omit it.

Metrics are as follows:

  • patient-level AUROC and Average Precision;
  • lesion-level sensitivity at 95% specificity, which is ePAI's reported operating point of 95.4%;
  • sensitivity stratified by size, below and above 2 cm;
  • a triage metric: the fraction of normal scans that can be skipped while keeping 99% sensitivity, a figure McGough et al. report reaching 57% in other screening domains.

We will also report per-subtype sensitivity, because DISSRM shows that many small renal masses can be safely watched. A screening tool that only adds indolent findings is not a win. As a sanity check that the encoder is not degenerate, we fine-tune it on BTCV and BraTS 2021. Swin UNETR's reported hidden-test Dice is 0.853 for enhancing tumor and 0.927 for whole tumor. We aim only for parity with masked-autoencoder initialization there, not superiority.

Three checks decide the project:

  1. The discriminator must beat its own generator's likelihood on small non-contrast lesions. If it does not, the density-ratio mechanism is absent.
  2. The discriminator must score real lesions far above normal tissue, not merely flag held-out generator replacements. Near-perfect detection of replacements combined with chance-level detection of lesions means it learned a fingerprint.
  3. On held-out rare renal subtypes, the anomaly score's sensitivity must drop less than the supervised and FreeTumor baselines' sensitivity drops relative to clear cell carcinoma. This is where the label-free approach has to show its value, and it is the result that would matter for rare disease.