CP-BG-1M: A Controlled Multi-View Benchmark for Density and Background Shortcuts in Morphology Profiling

Tim Treis, Nikita Moshkov, Ghaith Mqawass, Fabian J TheisMLGenX @ ICLR 2026

TL;DR

This paper introduces CP-BG-1M, a novel dataset and framework to diagnose "shortcut learning" in AI models used for cell morphology analysis. They demonstrate that common evaluation metrics can be misleading, favoring models that exploit experimental artifacts like cell density and background noise over those that truly learn biological signals, and CP-BG-1M helps uncover this.

What Problem Does This Paper Address?

High-throughput microscopy, particularly assays like Cell Painting, is revolutionizing drug discovery by allowing researchers to observe how compounds affect cell appearance. AI models, especially deep learning ones, are increasingly used to analyze these images and predict compound effects. However, these models can fall prey to "shortcut learning," where they learn to associate superficial patterns (like cell density or background textures) with correct answers, rather than the underlying biological mechanisms. This is a problem because these shortcuts can lead to models that perform well on specific benchmarks but fail to generalize to new data or accurately predict real biological effects. Existing datasets often confound these signals, making it impossible to isolate whether a model is learning true morphology or exploiting these shortcuts.

Methods

The core of this work is the creation of the CP-BG-1M dataset. This dataset provides four synchronized views of the same single cell:

  1. "crops": A standard image crop including the cell and its surrounding background.
  2. "seg": The same cell with the background removed using segmentation masks.
  3. "seg_density": The segmented cell with an added "density patch" – a small corner area whose intensity directly encodes the cell count in the original field of view.
  4. "crops_density": The original crop with the same density patch added.

This controlled design allows researchers to systematically test how models perform when access to background context and explicit density information is toggled, while keeping the central cell's morphology constant. They then train a DINOv3 Vision Transformer (ViT-B) model with LoRA (a parameter-efficient fine-tuning technique) using a contrastive learning objective guided by chemical similarity. This baseline model is then evaluated on the four different views to diagnose its reliance on shortcuts.

Datasets

The primary dataset introduced is CP-BG-1M, derived from the JUMP-CP Target2 dataset. It contains approximately 1.1 million quality-controlled single-cell tiles from 302 unique chemical perturbations across multiple production sites. The key innovation is the creation of four synchronized views per cell to isolate the effects of background and density.

Key Insights and Ideas

  • Metric Choice Matters Dramatically: The paper highlights that the choice of evaluation metric can completely invert model rankings. Benchmarks that rely on aggregate features (like CellProfiler features) favor models that exploit background and density shortcuts, while metrics focused on biological validity (compound retrieval, phenotypic activity) favor models trained on segmented data.
  • Background is a Major Shortcut: Removing background context ("seg" vs. "crops") significantly improves batch correction and biological signal preservation, suggesting that background features are a primary source of shortcut learning, often entangled with experimental conditions.
  • Density is Nuanced: While explicit density information can be a shortcut, it's not always a purely technical artifact. Cell density can correlate with biological phenomena like cytotoxicity. The key is how density is accessed – through background cues versus an explicit, source-agnostic signal.
  • Segmentation is Key for Generalization: Models trained on segmented cells (ignoring background) show much better performance on tasks requiring cross-site generalization and robust biological signal detection.

Key Results

  • Batch Correction: Segmented models (seg, seg_density) significantly improve batch correction (mixing cells across production sources) compared to crops-based models, with total integration scores of around 0.47-0.48 versus 0.37-0.40.
  • Compound Retrieval: Segmented representations lead to a ~25% relative improvement in compound retrieval (recall@10) compared to crops-based models (0.37-0.38 vs. 0.29-0.30).
  • Phenotypic Activity Detection: Models trained on segmented data achieve near-perfect detection of active compounds (98.67%), while crops-based models only achieve 67.44%-78.41% significant replicate agreement. This means crops-based models could miss nearly a third of true hits in a screen.
  • CellProfiler Feature Prediction: Traditional benchmarks like predicting CellProfiler features are indeed favored by crops-trained models (median R² of 0.149-0.153) over segmented models (0.114-0.126), confirming their reliance on background/density shortcuts.

Limitations and Future Work

  • Dataset Specificity: CP-BG-1M is derived from the JUMP-CP Target2 dataset and focuses on the Cell Painting assay in U2OS cells. The authors acknowledge that generalizing these observed shortcut patterns to other cell lines, imaging platforms, or assay configurations requires further validation.
  • Segmentation Quality: While morphology-based quality control was applied, residual segmentation artifacts might still influence conclusions.
  • Density's Biological Role: The authors emphasize that density isn't always a shortcut to be eliminated, as it can reflect real biology (e.g., cytotoxicity). The goal is to prevent models from exploiting it as a proxy for phenotype, not to remove it entirely.
  • Future Work: The authors plan to extend the framework to additional Cell Painting datasets and cell lines. They also suggest future research directions for developing shortcut-resistant learning methods, such as invariance constraints between views or density-adversarial objectives. They also recommend reporting shortcut susceptibility metrics alongside standard performance metrics for more transparent model evaluation.

Summary updated

BibTeX
@inproceedings{treis2026cp,
  author = {Tim Treis and Nikita Moshkov and Ghaith Mqawass and Fabian J Theis},
  title = {{CP-BG-1M: A Controlled Multi-View Benchmark for Density and Background Shortcuts in Morphology Profiling}},
  booktitle = {MLGenX @ ICLR},
  year = {2026},
  url = {https://openreview.net/forum?id=IrFOBw487r},
}
Figure