CP-Agent: Context‑Aware Multimodal Reasoning for Cellular Morphological Profiling under Chemical Perturbations

Yuxin Zhang, Yiyao Li, Ping Shu Ho, Simon See, Zhenqin Wu, Kevin Kin-Man Tsia

Introduction

In drug discovery, Cell Painting is a powerful technique used to visualize how drugs affect cells by staining various organelles with fluorescent dyes. This process generates high-dimensional phenotypic readouts critical for tasks like mechanism-of-action (MoA) inference and toxicity prediction. However, traditional workflows for analyzing these images are notoriously slow, expensive, and difficult to interpret.

Current AI approaches for drug screening face a significant "context" problem. They predominantly treat microscopy images as isolated data points, ignoring crucial experimental conditions such as the specific cell line used, the administered dose, or the elapsed time. Because a drug’s effect can vary wildly depending on these factors, ignoring them leads to models that fail to generalize. Furthermore, most existing models act as "black boxes," providing predictions without explaining the biological rationale—leaving researchers guessing which morphological features (e.g., a shrunken nucleus or fragmented mitochondria) actually drove the result.

To address this, researchers have introduced CP-Agent, an "agentic" multimodal framework that transforms drug discovery by teaching AI to understand the experimental context behind microscopy images. By combining a specialized alignment model with a reasoning pipeline of specialized agents, CP-Agent generates human-readable reports that explain why a drug causes specific cellular changes.

The CP-Agent Framework

The architecture of CP-Agent is divided into two primary systems: a perception layer for multimodal alignment and a reasoning layer for agentic analysis.

Overview of the CP-Agent framework

1. CP-CLIP (The Perception Layer)

CP-CLIP is a contrastive learning module designed to align high-content microscopy images with structured experimental metadata. Unlike standard vision-language models, it employs a customized token injection strategy. It takes numerical and categorical data—such as molecular descriptors, dose, and time—and injects them directly into a language model's vocabulary as specialized "placeholder tokens" (e.g., <CMPD>, <CONC>). This allows the model to "read" and embed the experimental context alongside the visual data, enabling robust treatment and MoA discrimination.

2. CP-Agent (The Reasoning Layer)

Building on the embeddings from CP-CLIP, the reasoning layer utilizes a Large Language Model (LLM) as a cognitive controller. It breaks down the complex analysis into sequential steps handled by specialized agents:

The CP-Agent reasoning workflow
  • CPContext Agent: Retrieves the relevant experimental background.
  • ChannelSeg & CellFeat Agents: Segment the cells and extract hundreds of handcrafted, interpretable features using industry-standard tools like CellProfiler.
  • FeatRank & StatSynth Agents: Rank which morphological features are most relevant to the drug's known mechanism and calculate the statistical significance of those changes.
  • ReportGen Agent: Synthesizes all findings into a structured, human-readable report to guide experimental design and hypothesis refinement.

Datasets and Evaluation

The model was trained and evaluated on three major open-access Cell Painting datasets, comprising approximately 1.9 million image-context pairs:

  • BBBC021: Focused on MCF-7 cells and 38 reference drugs.
  • CPJUMP1: Encompassing 301 small molecules in U2OS and A549 cells.
  • RxRx3: A massive collection featuring over 1,600 bioactive compounds in HUVEC cells.

Key Insights and Results

  • Context is Signal, Not Noise: Instead of attempting to "normalize away" differences in dose or cell line, CP-Agent treats them as essential features. The model learns that a drug's "morphological trajectory" across different concentrations is a key identifier of its MoA. This dose-response sensitivity allows the model to capture sharp morphological changes in drugs like Anisomycin while correctly identifying drugs with minimal impact across dosages.
  • Superior Discrimination & Zero-Shot Generalization: CP-CLIP achieved a maximum F1-score of 0.896 in compound and MoA classification. When tested on completely "unseen" drugs not present in the training set, CP-CLIP demonstrated a 14.6% absolute increase in alignment accuracy over baseline CLIP models.
  • The Value of Handcrafted Features: While many modern AI approaches favor end-to-end deep learning, this research highlights that using interpretable, handcrafted features (like "Tubulin Texture Variance") allows the LLM to reason more effectively and provide explanations that biologists can trust.
  • Generalist LLMs Fail at Biology: Top-tier general models (such as GPT-5, Grok-4, and Claude-4) perform near or below random chance when asked to identify drugs from images alone, lacking the semantic grounding provided by CP-CLIP. However, when powered by CP-Agent's structured pipeline, PhD-level researchers rated the generated reports highly for biological deduction and mechanistic insight.

Limitations and Future Work

While CP-Agent represents a significant leap forward, the authors note several areas for future development. Small sample sizes for certain perturbations can lead to non-significant statistical results that the agent must navigate. Additionally, while the model includes "time" as a variable, many current datasets only provide a single timepoint; incorporating complex time-course data could better model drug kinetics. Finally, extending the agentic architecture to include multi-omics data (such as gene expression) could provide an even more holistic view of drug effects, further accelerating the iterative cycles of hypothesis generation in drug discovery.

Summary updated

BibTeX
@inproceedings{zhang2026cp,
  author = {Yuxin Zhang and Yiyao Li and Ping Shu Ho and Simon See and Zhenqin Wu and Kevin Kin-Man Tsia},
  title = {{CP-Agent: Context‑Aware Multimodal Reasoning for Cellular Morphological Profiling under Chemical Perturbations}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=7BLnSeWuei},
}
Figure