Beyond Discrete Ancestry Groups: DA-ICL Uses In-Context Learning to Predict Cancer Outcomes

DA-ICL treats ancestry background as a continuous spectrum rather than discrete categories to improve accuracy and fairness in cross-population cancer outcome prediction.
The article points out that traditional cancer outcome prediction models use discrete ancestry modeling, grouping samples by ancestry and training separately. However, genetic variation is inherently continuous, and model performance gradually declines as genetic distance from training samples increases. To address this, a recent paper proposes Distribution-Aware In-Context Learning (DA-ICL), which treats ancestry as a continuous variable and leverages in-context learning foundation models to dynamically adapt to distribution shifts along the genetic continuum without updating parameters. The paper provides theoretical proofs and empirical results showing that continuous spectrum modeling outperforms discrete modeling, and has open-sourced the code. This method has potential significance for reducing prediction bias and alleviating health inequalities in precision oncology.
From Discrete Groups to Continuous Spectra: A New Approach to Cancer Outcome Prediction
Machine learning models for cancer outcome prediction based on omics data typically adopt one of two strategies: either train on all samples mixed together without distinguishing ancestry background, or adopt a "discrete ancestry" design that groups samples by ancestry and models each group separately. However, mounting evidence shows that the latter approach has fundamental limitations.
Prediction accuracy declines as the genetic distance from the training samples increases, even within the same ancestral group. The reason is that the data distribution varies continuously rather than jumping between predefined categories. This continuous variation causes model performance to degrade when applied to individuals who are genetically distant.

To address this issue, a recent paper proposes Distribution-Aware In-Context Learning (DA-ICL), which aims to extend traditional discrete ancestry modeling to continuous ancestry spectrum modeling. The method seeks to capture the non-stationary omics-endpoint relationships across the entire genetic continuum and leverages in-context learning foundation models to achieve efficient modeling.
Why Is Discrete Ancestry Modeling Insufficient?
Traditional discrete ancestry modeling implicitly assumes that there are clear boundaries between the data distributions of different ancestral groups, while within-group populations are relatively homogeneous. But this assumption contradicts the true patterns of genetic variation.
Genetic variation is continuous, and ancestry background is not a binary discrete label. When a model is trained on one ancestral group, its predictive ability naturally declines when faced with genetically distant individuals — and this decline is gradual, not sudden at some category boundary. Discrete modeling cannot capture this gradual relationship, leading to poor performance on group edges or individuals of mixed ancestry.
The core insight of DA-ICL is: rather than treating ancestry as discrete categories, treat it as a continuous variable and let the model dynamically adjust predictions based on the distributional characteristics of input samples. This requires the model to have "context-awareness" — the ability to flexibly adjust its internal representations according to the distribution of the current sample.
Genetic distance is a quantitative measure of the degree of genetic difference between two individuals or populations, typically calculated based on markers such as genome-wide single nucleotide polymorphisms (SNPs). In population genetics, it is often characterized using Fst (fixation index) or Euclidean distance in principal component analysis (PCA) space. Greater genetic distance means that two individuals share fewer recent common ancestors, and their genomic structure, allele frequencies, and linkage disequilibrium patterns differ more significantly. For prediction models based on omics data, increased genetic distance between training and test sets leads to covariate shift — that is, the distribution of input features differs between training and testing phases, thereby weakening model generalization. This effect is particularly pronounced in cross-ancestry prediction and is an important motivation for moving from discrete grouping to continuous spectrum modeling.
How Does DA-ICL Achieve Continuous Spectrum Modeling?
DA-ICL builds on in-context learning foundation models. In-context learning allows models to dynamically adapt to new tasks based on examples in the input sequence without updating parameters. In DA-ICL, this mechanism is used to capture distribution shifts along the genetic continuum.
Specifically, the model no longer trains a separate predictor for each ancestral group but instead learns a unified model that can adaptively adjust based on the genetic background and omics features of samples. By incorporating continuous ancestry spectrum information into the context, the model can more accurately estimate the relationship between omics features and cancer outcomes, maintaining good predictive performance even in genetic regions not well covered by training data.
The paper provides theoretical analysis proving that continuous ancestry spectrum modeling outperforms discrete ancestry modeling. Empirical results also support the effectiveness of the framework. The authors have open-sourced the code on GitHub (ai4pm/DA-ICL-Continuum), providing a reproducible foundation for future research.
In-Context Learning (ICL) is one of the core capabilities demonstrated by large-scale foundation models (especially Transformer architectures): the model can infer task patterns and complete predictions for new queries solely through several examples provided in the input sequence (i.e., the "context"), without updating any parameters. Its mechanism relies on the attention layer's dynamic computation of relationships between context examples and queries, essentially performing an implicit task adaptation during the forward pass. In DA-ICL, context examples are no longer randomly selected but organized according to the continuous distribution of genetic background, enabling the model to perceive and adapt to the sample's position along the genetic continuum at inference time. This provides a parameter-efficient modeling paradigm for handling non-stationary omics-endpoint relationships, avoiding the data fragmentation and overfitting risks associated with training separate models for each ancestry interval.
Implications for Precision Oncology
The value of this work lies not only in methodological innovation but also in offering a new pathway to address fairness issues in precision oncology. If models perform worse on genetically distant populations, clinical decisions relying on these models could exacerbate health inequalities.
Through continuous spectrum modeling, DA-ICL has the potential to reduce prediction bias caused by coarse ancestry grouping. It reminds us: when building omics prediction models applicable across populations, a continuous distribution perspective is closer to biological reality than a discrete category perspective. In the future, this approach may be extended to other biomedical prediction tasks involving continuous covariates.
Health inequality in precision oncology is an issue of growing concern. Existing research shows that because genomic reference databases and clinical trials have long been dominated by populations of European descent, prediction models trained on omics data often perform significantly worse on non-European populations. If this performance gap is directly embedded in clinical decision support systems, it could lead to minority groups receiving suboptimal risk stratification or treatment recommendations, thereby amplifying existing healthcare disparities. Discrete ancestry modeling formally acknowledges group differences but obscures within-group heterogeneity and gradual transitions between groups with coarse category boundaries, making it difficult to fundamentally eliminate bias. The significance of continuous spectrum modeling is that it transforms the fairness problem into a generalization problem under distribution shift, giving model evaluation and improvement a more refined quantitative handle.
Key Takeaways
- Discrete ancestry modeling assumes within-group homogeneity, but genetic variation is continuous, causing model performance to decline at greater genetic distances.
- DA-ICL treats ancestry as a continuous spectrum and uses in-context learning foundation models to dynamically adapt to distribution shifts.
- The paper provides theoretical proofs and empirical results supporting that continuous spectrum modeling outperforms discrete modeling.
- The method has potential significance for reducing prediction bias in precision oncology, and the code is open-sourced.
Reference sources: the original paper and the GitHub repository ai4pm/DA-ICL-Continuum.
Related articles

Anthropic Files for IPO at $2 Trillion Valuation, But Prospectus Reveals an $80.7 Billion Loss Puzzle
Anthropic files for a $2 trillion IPO with an $80.7B first-half net loss even as operating profit turns positive. Breaking down loss structure, slowing growth, $800B compute commitments, and founder control to reveal the real risks and capital logic behind the AI giant's IPO.

Decoding Anthropic's S-1: Most of the $80.7B Loss Is Just Accounting
Anthropic's prospectus shows about 90% of its $80.7B H1 net loss is fair value remeasurement and other book items, with real operating loss just $693M and its first quarterly operating profit in Q2. This breakdown covers revenue growth, cash flow, compute contracts, and governance.

Deep Dive into Anthropic's S-1: The $850 Billion Compute Bet and AI's New Valuation Logic
In-depth analysis of Anthropic's S-1: H1 2026 revenue of $16.2B, 85.4% gross margin, the truth behind the $80.7B net loss, the $850B compute commitment, and AI's new valuation logic.