Introduction
Predicting drug response and understanding the corresponding pharmacogenomic biology is crucial for precision oncology, drug discovery, and clinical strategy. However, data heterogeneity in dynamic environments is ubiquitous in practice, with data distributions for drugs, cancer, or institutions continually changing over time, and historical data may become inaccessible due to privacy restrictions. Such changing dynamics undermine the reliability of drug response prediction and interpretation, severely misleading the exploration of cancer treatment mechanisms. Here, we propose a novel interpretable multi-contextual self-alignment framework (MCSA) that enables continual learning and alignment of drug response knowledge across multiple contexts, effectively mining pharmacogenomic biomarkers from dynamic task streams. MCSA initially performs continual adversarial self-supervised learning to achieve local alignment, transferring drug response knowledge from the representation context of previous tasks into the current representation. It then leverages interpretability-consistency regularization to perform interpretability context alignment, guiding the learning of the model and the plug-in pharmacogenomic interpretable module (PIPGIM) to continually explore pharmacogenomic biology. Finally, using prototype-aware interactive learning, MCSA further mitigates mutual interference between tasks in the global alignment of model contexts, improving the framework performance and knowledge diversity. Experiments across multiple continual learning and static scenarios show that MCSA outperforms state-of-the-art baselines, effectively alleviates catastrophic forgetting, prevents interpretable concept drift, and enhances drug response prediction. Furthermore, MCSA demonstrates superior overall performance in drug response biomarker discovery, clinical chemotherapy response prediction, and prognosis analysis, consistent with clinical findings and highlighting its potential to advance precision oncology and reveal pharmacogenomic biology in changing dynamics.

Figure 1. The model architecture of MCSA. MCSA is a continual learning framework designed to adopt changing dynamics in drug response data, and it can be mainly divided into three parts: local alignment interpretability alignment, and global alignment.