- The paper demonstrates that an agent-driven composite phenotype generation approach yields superior discrimination over expert-defined features for cardiac disease associations.
- It introduces a three-agent framework—Analyst, Proposer, and Verifier—that uses LLM-guided transformations and multi-metric validation to ensure interpretability and numerical safety.
- It validates the method using UK Biobank data, showing significant improvements in AUC, recall, and silhouette metrics, which enhances clinical interpretability.
Agentic Composite Phenotype Generation for Cardiac Disease Association: A Technical Analysis of CPAgents
Motivation and Problem Statement
Large-scale cardiac imaging cohorts such as the UK Biobank present an unprecedented opportunity for population-level mapping of cardiac phenotypes to a broad spectrum of clinical diseases. Traditional phenome-wide association studies (PheWAS) typically rely on pre-defined, single-variable imaging phenotypes or expert-crafted indices, which are limited in their ability to capture higher-order, non-linear, and interaction effects inherent in imaging-derived data. Moreover, the combinatorial complexity and redundancy among base traits pose analytic bottlenecks for robust, interpretable phenotype discovery. CPAgents is introduced as an agentic, closed-loop framework for compositional phenotype generation in PheWAS, addressing the requirements for compositional expressivity, numerical validity, confounder adjustment, and evidential transparency.
Framework Architecture and Methodological Details
CPAgents leverages three specialized agents—Analyst, Proposer, and Verifier—to implement an iterative, evidence-guided search over a constrained composite phenotype space:
- Analyst: Profiles statistical characteristics of the current feature set, including non-linearity, distributional distortion, redundancy, and group-dependent effects, synthesizing LLM-based reports to recommend transformation pathways.
- Proposer: Synthesizes mathematically valid, domain-constrained composite feature candidates via Abstract Syntax Tree (AST) construction, conditioned on feedback from the Analyst. Operators include clinically motivated transformations (log, sqrt, group standardization), arithmetic interactions, and group-aware reductions.
- Verifier: Subjects candidates to multi-stage filtering, including ΔAUC checks, stability selection with ElasticNet regularization, SHAP-based feature importance assessment, and redundancy elimination. Only composites with robust, cross-validated improvements are retained.
Figure 1: CPAgents orchestrates a closed-loop of statistical profiling, LLM-driven composite feature proposal, multi-stage verification, and global acceptance to discover interpretable, high-utility phenotypes for cardiac disease association.
Each iteration consists of a four-phase cycle: (1) statistical profiling, (2) LLM-driven candidate generation, (3) multi-stage filtering, and (4) cross-model, cross-metric acceptance using a hybrid SVM, LDA, AdaBoost, and MLP panel. Iteration proceeds until performance plateaus, as defined by a composite score combining AUC and recall.
Expressivity in the composite space is achieved via AST construction, supporting nested non-linear, interaction, and group normalization operations. All operators are instrumented for numerical safety. Importantly, domain-specific constants (e.g., allometric scaling exponents) are elicited from the LLM’s clinical prior, circumventing the inefficiency of random search.
Experimental Evaluation and Quantitative Benchmarks
The framework is evaluated on the UK Biobank imaging cohort (n=26,893; K=9 disease endpoints). Disease association heatmaps indicate that agent-derived composite phenotypes yield markedly more localized and interpretable association patterns compared to expert-defined features, especially in discriminating major cardiac and metabolic disease clusters.

Figure 2: Composite phenotypes (right) yield more concentrated, disease-specific association heatmaps compared to expert-defined features (left), particularly outside asthma/depression domains.
For predictive classification, CPAgents demonstrates clear superiority across 72 (classifier, disease, metric) triads. Its composite phenotypes attain the top rank in 56 cases (versus only 18 for baselines), consistently outperforming both expert single-variable features and other LLM/agent-based alternatives. Performance gains are confirmed in AUC, recall, and silhouette metrics, evidencing not only discrimination but also improved phenotypic cluster separability.
Ablation analyses verify the necessity of the full agentic loop; removal of the Verifier, Analyst, feedback, or SHAP-based ranking each causes measurable performance degradation, with the Verifier being the most critical. Silhouette analyses further confirm cluster-level interpretability improvements, with composite phenotypes 1.5× superior to expert features.
Interpretability, Theoretical Implications, and Practical Impact
The agentic design paradigm prioritizes both scientific transparency and numerical stability:
- Transparency: Each composite phenotype is a closed-form formula with an auditable construction trace and cross-validated empirical support, aiding in regulatory compliance and clinical reproducibility.
- Interpretability: The framework yields demographically- and physiologically-aware features (e.g., sex-standardized or allometrically scaled indices) grounded in cardiology literature, facilitating domain trust and adoption.
- Statistical Rigor: By confining candidate proposals to statistically- and clinically-informed transformations, and by requiring ensemble agreement and multi-metric improvement in cross-validation, CPAgents reduces the risk of spurious, cohort-specific discoveries and overfitting.
This approach theoretically bridges feature construction and hypothesis testing, offering a scalable alternative to both manual feature enrichment and unrestricted symbolic regression. Practically, the framework supports precision stratum identification, robust biomarker discovery, and the development of parsimonious risk indices, with downstream implications for trial design and clinical decision support.
Future Developments
Potential extensions include multi-modal phenotype fusion (integrating genomics, imaging, EHR data), transfer learning for phenotype discovery in rare diseases or limited-annotation cohorts, and generalization to other organ systems. The modular agentic composition paradigm is also readily adaptable to multi-task feature learning and causal inference frameworks.
Conclusion
CPAgents establishes an agentic, iterative abstraction for automatic composite phenotype discovery in cardiac PheWAS, grounded in statistical, clinical, and interpretability constraints. It demonstrates clear, robust improvements over both hand-crafted and other LLM-aided approaches, producing compact, clinically meaningful phenotype sets with transparent construction and empirical validation. This work sets a new standard for systematic, agent-driven phenotype engineering and interpretability in high-dimensional imaging biomarker research (2606.28179).