Self-Healing Machine Learning: A Framework for Autonomous Adaptation in Real-World Environments

Authors: paulius  rauba
nabeel  seedat
krzysztof  kacprzyk
mihaela  van der schaar
Venue: NeurIPS_cc_2024_Conference
Published: 2024-05-15 16:36:33

Abstract: Real-world machine learning systems often encounter model performance degradation due to distributional shifts in the underlying data generating process (DGP). Existing approaches to addressing shifts, such as concept drift adaptation, are limited by their *reason-agnostic* nature. By choosing from a pre-defined set of actions, such methods implicitly assume that the causes of model degradation are irrelevant to what actions should be taken, limiting their ability to select appropriate adaptations. In this paper, we propose an alternative paradigm to overcome these limitations, called *self-healing machine learning* (SHML). Contrary to previous approaches, SHML autonomously diagnoses the reason for degradation and proposes diagnosis-based corrective actions. We formalize SHML as an optimization problem over a space of adaptation actions to minimize the expected risk under the shifted DGP.  We introduce a theoretical framework for self-healing systems and build an agentic self-healing solution *$\mathcal{H}$-LLM* which uses large language models to perform self-diagnosis by reasoning about the structure underlying the DGP, and self-adaptation by proposing and evaluating corrective actions. Empirically, we analyze different components of *$\mathcal{H}$-LLM* to understand *why* and *when* it works, demonstrating the potential of self-healing ML.

Main paper: 
 related work: 
 SHML is most closely related to concept drift adaptation or specialized drift handling methods. We provide an extended discussion on related work within each component in Appendix A.Concept drift adaptation. The field of concept drift adaptation focuses on developing algorithms to maintain the performance of machine learning models in changing environments. Such algorithms are predominantly proposed within the setting of tabular data. Most common adaptation techniques are re-training models on new data [1] [2] [3] [4] [5] [21] [22] [23] [24] , re-using stored models [1, [6] [7] [8] [9] or obtaining new data altogether [25, 26] . These approaches can be implicit, like continuous retraining, or explicit, based on drift detection in data or model error [5, 23, 27] . Because these approaches do not explicitly relevant sections and serving as a navigation guide for the paper. 
model degradation over time: 
 Preliminaries. Let X and Y denote the input and output spaces, respectively, and let P t denote the data distribution over X × Y at time step t ∈ [T ]. At each t, we observe a batch of dataD t = {(x (i) t , y (i) t )} nti=1 ∼ P nt t , where n t = 1 in the streaming setting and n t > 1 in the batch setting. We will drop the superscripts where clear from context.The goal is to learn a sequence of functions {f t ∈ F} T t=1 that minimize the cumulative risk:EQUATIONwhere F is a function class and ℓ ∶ Y × Y → R ≥0 is a loss function.In the time-invariant setting where P t = P ∀t ∈ [T ], the goal reduces to learning a single function f * ∈ F that minimizes the risk R(f ) = E P [ℓ(f (x), y)]. When P is unknown, f * is often approximated by minimizing the empirical risk on a training set {(x (i) , y (i) )} n i=1 ∼ P n . However, when P t evolves over time, the optimal predictor f * t ∈ arg min f ∈F E Pt [ℓ(f (x), y)] changes across time steps 1 . Failing to adapt f t in this time-varying setting leads to model degradation, as the learned function becomes increasingly suboptimal w.r.t. the current data distribution.Maintaining stable model performance in the presence of a changing environment poses unique challenges. As the optimal predictor f * t evolves over time, the estimated predictor should also adapt. Ideally, we could obtain a large batch of data D t+1 = {(x(i) t+1 , y (i) t+1 )} nt+1i=1 and minimize the empirical risk over this dataset. However, this is often impractical due to constraints such as (i) ground-truth labels not being immediately available [38] ; (ii) the streaming setting, where each new batch contains only one data point [39] ; (iii) gradual shifts, where past data remains relevant [40] ; or (iv) the presence of corrupted data in new batches [41] .To address this, the research community has developed specialized methods determining the appropriate corrective actions in such drifts. As discussed in Sec. 2, these methods primarily execute pre-defined actions upon detecting a change, such as model retraining [1] [2] [3] [4] [5] , re-using old models [1, [6] [7] [8] , or other more specialized methods [6, 7, [9] [10] [11] [12] . However, such methods are reason-agnostic, disregarding valuable information that inform better adaptation actions. Consider an illustrative example: suppose a batch of new data arrives, but due to a sensor malfunction [42] , 80% of the labels become corrupted and are independent of the input for that batch only. Naively retraining the model on this noisy batch would degrade its performance. This is because this strategy implicitly assumes:E (x,y)∼Pt+1 [ℓ(f t+1 (x), y)] < E (x,y)∼Pt+1 [ℓ(f t (x), y)].(EQUATIONwhere f t+1 is a model trained on D t+1 . Relying on this assumption results in worse performance than doing nothing. Similarly, re-using old models assumes that the past data distribution is still relevant:EQUATIONfor some k > 0. Similarly, this might result in suboptimal performance due to the nature of the shift. Each adaptation method discussed in Sec. 2 has such implicit assumptions about the model or DGP.By not taking into account the reason for the model degradation (such as corrupted data), the adaptation strategy is defaulting to suboptimal corrective actions. While any adaptation strategy inherently involves some assumptions about the relationship between the predictor and the data, we would like to prioritize making informed assumptions. As we discuss in Sec. 3.3, a key source of such information is diagnosing why the model's performance has dropped.To address the reason-agnostic nature of such adaptation methods, we propose a paradigm shift called self-healing machine learning (SHML), where deployed models autonomously diagnose the reason for degradation and take diagnosis-guided corrective actions.Takeaway. Existing adaptation methods make implicit, pre-defined assumptions about the nature of model degradation. Neglecting its reason can lead to poorly chosen actions.Self-healing machine learning is a framework for autonomously detecting, diagnosing, and correcting performance degradation in deployed ML models. It aims to maintain model performance in changing environments without constant human intervention. The motto of self-healing ML is "understanding your problem is half the solution" (and the most important half). A SHML system is defined by a tuple ⟨H, f ⟩, where f ∶ X → Y is the deployed machine learning model we aim to heal (i.e., the function that makes predictions on input data), and H is a healing mechanism that interacts with the environment and acts upon the model f by proposing and implementing actions, such as selecting when to retrain a model, what data to use or how to change the input data before making predictions. Thus, H can modulate the behavior of the deployed model f .Self-Healing Machine Learning in a nutshell.Self-healing ML contains four components: monitoring, diagnosis, adaptation, and testing. After these steps, the best action is implemented on the ML model, illustrated in Fig. 2 . I. Monitoring. The first step is the detection of degradation, potentially due to a shift in the data distribution. We formalize this as a monitoring component H M that takes as input the sequence of data batches {Di} t i=1 , up to time t, and outputs st ∈ [0, 1], indicating the likelihood of model degradation. Formally, EQUATIONEQUATIONZ represents the finite space of possible reasons of the shift and ζ is a stochastic vector. III. Adaptation. The adaptation component is a policy π that outputs a distribution over actions. Given a diagnosis vector ζ, actions a ∈ A are selected from a finite space A by: a ∼ π(⋅|ζ), where π ∶ ∆(Z) → ∆(A).(6) Each action a modifies f . We denote the model used at time t, selected by action a, as f t a . IV. Testing. The testing component H T evaluates each action a ∈ A on a relevant distribution and outputs a performance measure:H T ∶ A × P → R.(7) Objective. The goal of self-healing ML is to select the optimal action a * that minimizes the expected loss E[ℓ(f a t (x), y)] on the data distribution Pt:EQUATIONwhere ℓ ∶ Y × Y → R≥0 is a loss function, and f a t denotes the model selected by action a to be used at time t. The action a is selected according to the adaptation policy π(⋅|ζ), which maps the diagnosis vector ζ (a distribution over possible reasons for degradation) to a distribution over actions. The primary insight of SHML is that the action a ∼ π(⋅|ζ) should be based on the diagnosis ζ, which is a distribution over possible reasons z ∈ Z for model degradation. In contrast, standard approaches (Sec. 3.2) assume that π ⊥ ⊥ ζ. SHML formalizes this as an optimization problem over a space of adaptation actions-we aim to find the optimal actions to take each time the model f degrades, with these actions chosen by the policy π of the self-healing system H (Fig. 3 ). Different policies π 1 and π 2 might propose different actions in response to the same performance drop. While the diagnosis ζ informs the policy, we do not assume it is necessarily useful. Since ζ ∈ ∆(Z) is a probability distribution, it can encode no knowledge by being uniform over the diagnosis space:ζ(z) = 1|Z| , ∀z ∈ Z. These components and their interactions between two time points t and t + 1 are shown in Fig. 3 .The effectiveness of the adaptation actions depends on the diagnosis, i.e. how well can we identify the root cause. Therefore, we turn to the diagnosis component next.Takeaway. SHML is a framework which selects actions based on the reason for model degradation. It contains four stages: monitoring, diagnosis, adaptation, and testing.Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?Answer: [Yes] Justification: In order to establish the relationship between diagnosis and the actions, we define the certainty diagnosis (Def. 1) and the optimal diagnosis (Def. 2). Furthermore, we assume independent actions (Assumption 1). Under this, we establish two propositions about the entropy of an optimal diagnosis (Proposition 1) and its existence (Proposition 2). One of the proofs is in the main paper and the other one can be found in Appendix E.Guidelines:• The answer NA means that the paper does not include theoretical results.• All the theorems, formulas, and proofs in the paper should be numbered and crossreferenced. • All assumptions should be clearly stated or referenced in the statement of any theorems.• The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch to provide intuition. • Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material. • Theorems and Lemmas that the proof relies upon should be properly referenced. 
an analysis of the properties of self-healing diagnosis: 
 Self-healing systems have the unique property of having a diagnosis stage. But what constitutes a good diagnosis? In this section, we analyze the properties of self-healing diagnosis and establish its connection to the performance of adaptation actions.To effectively use diagnosis information to guide the search for adaptation actions, we require a way to quantify the usefulness of a diagnosis. We propose three desirable properties for such a measure: (i) concentration: it should favor diagnoses that provide more information, i.e. assign higher probabilities to fewer possible reasons; (ii) sensitivity: it should be sensitive to changes in the diagnosis distribution, such that small changes in probabilities would result in small changes in the measure; (iii) maximum uncertainty: it should reach its maximum value when the diagnosis distribution is uniform, indicating no knowledge about the reason for degradation. Therefore, we propose using the entropy of the diagnosis vector as a useful proxy for quality which satisfies all three properties. Because entropy measures uncertainty, we refer to this as the certainty of the diagnosis. Definition 1 (Certainty of the Diagnosis). Let Z be the finite space of possible reasons for degradation and ∆(Z) be the diagnosis space. The certainty of a diagnosis ζ ∈ ∆(Z) in a self-healing machine learning system is measured by its entropy H(ζ), defined as:EQUATIONwhere ζ(z) is the probability of reason z under the distribution ζ.The link between diagnosis quality and adaptation performance highlights the importance of obtaining informative diagnoses in SHML. Building upon these concepts, we define the optimal diagnosis: Definition 2 (Optimal Diagnosis). The optimal diagnosis ζ * is defined as:EQUATIONwhere ∆(Z) is the diagnosis space, π(⋅|ζ) is the conditional distribution over actions induced by diagnosis vector ζ, and R(a) denotes the risk of f a t associated with action a ∈ A.This formalizes the intuition that the best diagnosis is the one that leads to the best adaptation actions, on average. To characterize the properties of this optimal diagnosis, we introduce an assumption about the structure of the adaptation policy: Assumption 1 (Independent actions). We assume that π(⋅|ζ) has a hierarchical structure. First, a reason z ∈ Z is sampled according to the diagnosis ζ: z ∼ ζ. Then, an action is sampled conditioned on this reason, a ∼ π(⋅|z † ), where z † ∈ ∆(Z) such that z † (z) = 1. π(⋅|ζ) can then be described as the following mixture.EQUATIONζ are the mixture weights and {π(⋅|z † ) | z ∈ Z} are the mixture components.Under this hierarchical structure, we can prove a useful property of the optimal diagnosis: Proposition 1. Under Assumption 1, the optimal diagnosis ζ * has a zero entropy, i.e., H(ζ * ) = 0.Proof in Appendix E. To ensure that the optimal diagnosis is well-defined, we also prove its existence under mild assumptions: Proposition 2 (Existence of Optimal Diagnosis). Suppose that the action space A is a compact subspace of R n and R is continuous. Then there exists at least one optimal diagnosis ζ * .Proof. The expected risk E a∼π(⋅|ζ) [R(a)] is a continuous function of ζ by the continuity of R and the compactness of A. Since the diagnosis space ∆(Z) is also compact (being a probability simplex), the extreme value theorem guarantees the existence of a minimizer ζ * .Takeaway. The existence of an optimal diagnosis establishes a foundation for designing algorithms that can accurately approximate it in practice. By identifying the underlying reasons for performance degradation, a high-quality diagnosis enables a self-healing system to take the most effective adaptation actions.Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?Answer: [Yes] Justification: We provide all the required information to reproduce our algorithm H-LLM (Appendix. B) as well as the full detail on experiments, including dataset generation, parameters, etc. (Appendix. C). We provide an additional appendix section with supplementary experiments that can aid the reviewers where we discuss the setups within each experiment (Appendix. D). The code can be found at: https://github.com/pauliusrauba/Self_ Healing_ML or https://github.com/vanderschaarlab/Self_Healing_ML Guidelines:• The answer NA means that the paper does not include experiments.• If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not. • If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable. • Depending on the contribution, reproducibility can be accomplished in various ways.For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.• While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example (a) If the contribution is primarily a new algorithm, the paper should make it clear how to reproduce that algorithm. (b) If the contribution is primarily a new model architecture, the paper should describe the architecture clearly and fully. (c) If the contribution is a new model (e.g., a large language model), then there should either be a way to access this model for reproducing the results or a way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset). (d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility.In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results. • Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted. 
building self-healing systems: h-llm: 
 This section outlines the challenges of building SHML systems (Sec. 5.1), describes how LLMs can address these challenges (Sec. 5.2), and introduces the first self-healing system, H-LLM (Sec. 5.3).Implementing SHML systems (Sec. 3.3) poses unique challenges in diagnosis and adaptation.Discovering the reasons for model degradation poses significant practical challenges because: (i) the space of possible reasons Z is often poorly defined or intractable toConfidence (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) There are outliers in the data The maximum values for many variables in the new dataset are significantly higher than in the old dataset, suggesting the presence of outliers 9The mean values for many variables in the new dataset are significantly higher than in the old dataset, suggesting that the data may have been incorrectly transformed 8There are data entry errors The minimum value for Insulin in the new dataset is negative, which is not possible in a real-world context 10Table 2 : Example diagnoses suggested by H-LLM. The system proposes diagnoses and suggests evidence for the diagnosis. A post-hoc relative confidence score, constructed using the "evidence" column, helps to guide which diagnoses to pay most attention to while designing adaptation policies.specify exhaustively in real-world scenarios; and (ii) assigning well-calibrated probabilities to reasons for model degradation is difficult due to both the epistemic and aleatoric uncertainty that exists in real-world environments. This makes it difficult to approximate the optimal diagnosis (Def. 2).Challenges in adaptation. The adaptation policy π (Eq. 6) requires selecting optimal adaptation actions a based on the diagnosis ζ. This is challenging because (i) it requires reasoning about how actions interact with diagnoses; and (ii) the space of adaptation actions may be extremely large in practice, making it difficult to find the optimal action (Eq. 8).We posit that LLMs have the potential to satisfy many of the required properties of self-healing components because of the following capabilities: (i) Hypothesis proposers. LLMs are known to be "phenomenal hypotheses proposers" [43] which are required to hypothesizing diagnoses of ML model performance degradation; (ii) Contextual understanding. LLMs have been pretrained with a vast corpus of information and hence have extensive prior knowledge around different contexts and settings [44, 45] ; (iii) Language model agents. Language models can work as agents within a larger system [46, 47] which is required to actively interact with a deployed model, trigger and implement changes. We therefore see LLMs as capable proxies for different self-healing components.We instantiate the healing mechanism H with an LLM l, using its useful properties (Sec. 5.2) to address the practical challenges of designing SHML systems (Sec. 5.1).H-LLM in a nutshell.H-LLM is the first SHML algorithm that modulates the behavior of f following Fig. ) (Def. 6). The actions sampled from l are textual representations, so we use an interpreter function to execute each a on f . IV. Testing. The sampled actions are evaluated on an empirical dataset (Def. 7), and the empirically optimal action â * = arg min j∈[m] R(a) is implemented. Limited access to the shifted DGP complicates evaluating R(a), but it can be approximated with empirical data Dtest by using a backtesting window, continuously incoming data, or historical data (Appendix B.4).Goal. This procedure aims to approximate the optimal action (Def. 8). These actions are orchestrated by an orchestrator component in H-LLM which can navigate between these steps.Appendix B provides an extended discussion of H-LLM, including the algorithm, prompts, examples, and outputs. The following table links H-LLM with the theoretical framework. Table 3 : A comparison of the theoretical components, their implementation, and their approximations. 
experimental viability studies: 
 The previous sections constituted the primary contribution of our paper-establishing SHML as a framework. The goal of this section is to provide a viability study by analyzing different components of SHML. We conduct six viability studies. 2Experimental setup. We desire to meet two properties: (i) have full control of the DGP to vary experimental parameters; and (ii) we need to benchmark against existing adaptation methods (Sec.2) which are predominantly tabular-based. Therefore, we simulate a diabetes prediction task [49] [50] [51] based on the setup in Sec. 3.1. We predict diabetes Y t ∈ {0, 1} at each time point t for a set of n observations, generated according to a (changing) pre-specified DGP log ( P (Yt=1|Xt)P (Yt=0|Xt) ) = α t + ∑ k∈K β t,k X t,k + ϵ t ,where K includes relevant parameters such as Age or BMI, β t,k are timevarying covariates and ϵ t ∼ N (0, σ 2 ) is a noise component. For evaluating H-LLM actions, we use a backtesting window-a representative sample of the shifted distribution obtained after detecting the change but before deploying the adapted model (Sec. B.4). Details provided in Appendix C.Setup. We aim to empirically demonstrate the limitations of existing approaches in adapting to changing environments (Sec. 3.2). We benchmark H-LLM against four common drift adaptation methods: (i) new model retraining on post-drift data, (ii) partially updating models with new data; (iii) Ensemble methods by re-using old models, and (iv) No retraining of the models [1] . At time t, we introduce a sudden, single intervention by changing the DGP parameters and corrupting a percentage τ of k columns. Table 4 shows the performance of different methods across τ and k. No retraining 0.44 ± 0.02 0.44 ± 0.02 0.45 ± 0.02 0.45 ± 0.02 0.43 ± 0.02 0.44 ± 0.02 0.44 ± 0.02 0.45 ± 0.02 0.46 ± 0.02 Partially Updating 0.71 ± 0.02 0.69 ± 0.02 0.67 ± 0.02 0.54 ± 0.06 0.74 ± 0.03 0.72 ± 0.02 0.70 ± 0.02 0.66 ± 0.02 0.62 ± 0.02 New model training 0.70 ± 0.02 0.69 ± 0.02 0.67 ± 0.02 0.50 ± 0.02 0.77 ± 0.02 0.74 ± 0.02 0.69 ± 0.02 0.66 ± 0.02 0.61 ± 0.02 Ensemble Method 0.70 ± 0.02 0.69 ± 0.02 0.67 ± 0.02 0.50 ± 0.02 0.77 ± 0.02 0.74 ± 0.02 0.69 ± 0.02 0.66 ± 0.02 0.61 ± 0.02 H-LLM 0.93 ± 0.01 0.87 ± 0.01 0.79 ± 0.02 0.68 ± 0.02 0.95 ± 0.01 0.94 ± 0.01 0.90 ± 0.02 0.82 ± 0.02 0.70 ± 0.02 Table 4 : Accuracy of a deployed model f upon an intervention which changes the DGP and corrupts τ percentage of k columns. Error represents standard deviation. ↑ is better.Discussion. The performance of f degrades if the corrupted columns are not handled appropriately, such as removing or inputting the corrupted data. Defaulting to standard techniques of adapting to a changed environment results in poor performance. H-LLM diagnoses issues by observing that some values have drifted too much from their original values and the DGP has changed. One of the proposed adaptation strategies is to remove samples which were estimated to be corrupted, and re-training the model on the remainder of the data. This results in superior performance.Takeaway 1. Diagnosing the root cause of degradation can guide better adaptation actions.Setup. We aim to empirically analyze whether SHML can provide benefits across different datasets. We cover five different datasets: Airlines [52] , Poker [53] , Weather [54] , Electricity [55] , Forest Type [56] . We simulate real-world unexpected degradations by assuming lagged labels and corrupting features at test time and evaluating models for different datasets (Table 5 ).Discussion. Ground-truth labels are often not immediately available [38] , a core feature of many streaming settings. We evaluate how H-LLM compares to existing approaches in such scenarios. Across five datasets with different characteristics, H-LLM consistently outperforms traditional adaptation methods by adapting f a t at each time point t. Therefore, SHML's ability to identify and decorrupt features provides a robust adaptation strategy across varied data distributions and schemas.Takeaway 2. Identifying the root cause and restoring features dacn provide consistent benefits across datasets.Accuracy when τ = Setup. We use the same setup as experiment I and vary the drift detection threshold which influences the sensitivity of a detection system to changes in the DGP. Low values mean high sensitivity, and high values mean low sensitivity [57] . We measure average recovery time for H-LLM to return recover from degradation and post-intervention accuracy, H-LLMs average performance after intervention. Fig. 4 shows this relationship.Discussion. Intuitively, one might expect earlier drift detection (lower threshold) to consistently yield faster recovery and higher accuracy. In reality, concept drift algorithms often struggle with false positives which can result in worse model performance because of unnecessary re-training [5, 58] . Self-healing ML exhibits greater robustness to these false positives, as any action will be implemented only if it outperforms doing nothing. This contrasts with traditional systems which would automatically trigger the selected action. In Fig. 4 , this represents the higher post-intervention accuracy with smaller thresholds.Takeaway 3. SHML has greater robustness to implementing poor adaptation actions. Setup. We evaluate how well self-healing systems identify the root causes of problems. We corrupt a proportion of observations (corruption coefficient) by multiplying their values by a factor (outlier factor) and see if the H-LLM detects issues related to these factors. We output a probability distribution over diagnoses of which variable is corrupted. Knowing the true corrupted variable, we measure the difference between the distributions using KL-Divergence, with lower values indicating closer matches to true corruption. A uniform diagnosis baseline represents random guessing. Fig. 5 shows these differences.Discussion. As the outlier factor and corruption coefficient increase, making data issues more apparent, H-LLM assigns higher probabilities to the corrupted variables. Thus, the diagnosis accuracy improves as the problem becomes more evident.Takeaway 4. The quality of the diagnosis improves when the issues become more apparent. Setup. We study the importance of the testing component (Eq. 7) by evaluating H-LLM suggested actions with and without the testing phase (backtesting window) and comparing their accuracies. Fig. 7 shows this relationship.Discussion. Having a dataset to evaluate actions significantly improves the self-healing process. We see that better data quality results in more reliable adaptation policies.Takeaway 6. The testing component is important to effectively evaluate the proposed actions.We provide further experiments in Appendix D. Our framework shows strong performance with lower warm-start parameters and increasing benefit as data degradation becomes more severe (Sec. D.4). A component-wise ablation analysis (Sec. D.6) reveals each stage of SHML is essential. Extended benchmarks (Sec. D.5) and model agnostic evaluations (Sec. D.7) demonstrate consistent improvements across different adaptation approaches and ML architectures.Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?Answer: [Yes] Justification: All details are provided in Appendix. C. The experimental setting is presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them. Full details provided in the appendix.Guidelines:• The answer NA means that the paper does not include experiments.• The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them. • The full details can be provided either with the code, in appendix, or as supplemental material. 
discussion: 
 Algorithms hold significant decision-making power in high-stakes applications, yet little has been done to ensure their optimal performance. This work presents a major leap towards that goal. By enabling systems to autonomously diagnose and adapt to new environments, we aim to create a wave of self-healing systems beneficial to both the ML community and society. Our theoretical framework (Sec. 3.3, 4) builds the foundation for the development of self-healing theory, such as optimal adaptation or diagnosis methods, and our viability study shows the potential benefits of SHML. Our largest contribution is formalizing this field-we hope to spur new theoretical developments and encourage the adoption of such systems in critical domains like medicine [13] [14] [15] [16] [17] [18] and finance [20] .Limitations. SHML's success relies on accurate root cause identification and finding effective adaptation policies which could pose challenges in some complex, real-world settings (Sec. 5.1). Furthermore, the prioritization of adaptation strategies is also not trivial. Currently, H-LLM primarily looks for subgroup-level issues. We see future work tackling all areas of self-healing ML: finding better diagnosis strategies, improving adaptation selection, and enabling better testing of actions in the presence of changing environments.Broader impact. Because SHML could empower many positive technologies, it could also be misused to amplify the impact of more problematic systems, such as surveillance technologies.Appendix: Self-Healing Machine Learning: A framework for autonomous adaptation in real-world environments In this section, we describe and contrast our work with other related areas.Concept drift adaptation. Concept drift adaptation algorithms, a key component of self-healing ML systems, primarily handle drifts by re-training models on new data [1] [2] [3] [4] [5] or older, pre-trained stored models [1, [6] [7] [8] . These approaches can be implicit, like continuous retraining, or explicit, based on drift detection in data or model error [5, 23, 27] . Drift detection methods compare distributions, analyze data sequentially, or use statistical process control [59] . For instance, the DDM algorithm [23] has in-control, warning, and out-of-control states.Specialized drift handling. Techniques have been developed for various drift scenarios. For recurring drifts, methods store and reuse historical models [6, 7, 9] . Streaming data is handled by blind approaches, like sliding windows [10] or adaptive decision trees [11] , and informed approaches with explicit drift detection [21] [22] [23] [24] . Resampling can repair adaptation errors [27] , while dynamic classifier selection finds the best model for each input [60] . Methods have been proposed for robustness to noise [12] , specific drift types [61] , and other issues [62, 63] . Recent work explores understanding distribution shifts through latent variable models [34] and other techniques [35] . Some adaptive methods of re-training the model also include adding more hidden layer to a learner upon detection of a drift [62, 63] . Another area of research closely linked within the field is dynamic selection which attempts to find the most suitable classifier conditional on the covariates [60] .On "repairing concept drift". There have been other methods propose that implicitly try to adapt by detecting changes [27] . However, these adaptations are still based on the observed empirical distributions as opposed to observing the reason for degradation. By periodically sampling the accuracy of inactive classifers, the authors identify cases where change was missed or misclassifed. However, this falls under the broader umbrella of trying out many pre-determined actions without directly reasoning about the reason for model degradation.Continual learning. One might get the impression that self-healing machine learning might bear close resemblance to continual learning. Continual learning focuses on developing models that learn continuously from a stream of data, acquiring, retaining, and transferring knowledge across tasks over time [64] . This contrasts strongly with self-healing machine learning. Below, we outline seven criteria by which self-healing machine learning and continual learning differ.Differences between continual learning and self-healing machine learning.Objective. The objectives of the two fields are different. Continual learning aims to learn sequentially from a stream of tasks while mitigating catastrophic forgetting. SHML focuses on autonomously diagnosing and recovering from performance degradation within a single task due to distribution shifts.2. Knowledge retention. A core goal of continual learning is to preserve previously acquired knowledge while learning new tasks. SHML does not explicitly aim to retain prior knowledge or acquire new knowledge, but rather to maintain stable performance on the current task by adapting to the reason for degradation.3. Stability-Plasticity Dilemma. Continual learning grapples with the trade-off between being plastic enough to learn new tasks and stable enough to remember old ones. In contrast, there is no such dilemma within SHML.4. Task expansion. Continual learning seeks to expand the model's capabilities by increasing the number of tasks it can perform. In contrast, SHML operates on a single well-defined task-ensuring the optimal performance of a model, typically by minimizing empirical risk-and does not aim to increase the number of tasks. Instead, the focus is on ensuring optimal performance under a single task.5. Adaptation mechanism. The underlying logic or mechanism of adaptation is different. Continual learning typically adapts by modifying model architecture, updating parameters via constrained optimization, using memory replay. In contrast, SHML explicitly adapts by diagnosing the root cause of performance drops and conditioning an adaptation action on the basis of that diagnosis. This explicit mechanism which is conditioned on is not a part of a continual learning system.6. Shift assumptions. Continual learning primarily handles shifts across distinct tasks, where the input or output distribution changes between tasks. In contrast, SHML considers shifts within the same task, where the joint distribution might change.7. Theoretical formalism. Continual learning is often formalized as a sequence of constrained optimization problems to mitigate interference between tasks. In contrast, SHML is formalized as finding an optimal policy that can propose actions on the basis of diagnoses.Here, we focus on some related work within each sub-component. Diagnosis. The diagnosis component is a core component of SHML. Two primary works are closely related. The first work, "why did the distribution change?" [36] , attempts to factorize the change of the joint distribution into conditional distributions of each variable and attribute some changes to one of the marginals. This is achieved by modeling the change and relationship between variables as a causal mechanism. The second work, "why did the model fail?" [37] attributes model performance degradation via a causal mechanism. They assume that distribution shifts are induced due to an intervention in the causal mechanism which results in model performance changes, and uses Shapley values to attribute changes to specific distributions. These two methods are fundamentally different from SHML in multiple respects. First and most important, these works do not propose any actions on the basis of these failures or shifts. The primary goal of both works is to understand why a distribution has changed or a model has failed, attributing it to a causal mechanism, instead of adapting the model to perform optimally. Second, the theoretical formalism introduced is substantially different and comes with different properties. Both works operate within the directed acyclic graph (DAG) framework, whereas we operate under a diagnosis component which is defined as a vector over a space of possible reasons. Other key differences relate to the adaptation mechanism, shift assumptions, adaptation assumptions, level of granularity of the diagnosis, level of granularity of the adaptation, or testing.Recent work has already started coming out on understanding distribution shifts [35] . It is known that understanding why a distribution shift happens is important for mitigating that shift [35] . Some other people have looked at modeling shifts via latent variable models without relying on access to labels at test time [34] . However, as before, these methods do not share the objective of finding optimal actions for adaptation.Self-healing systems outside ML. Self-healing systems have been proposed outside of machine learning [68] [69] [70] [71] [72] . We view these as inspirations for our work but consider them disparate and separate because none of them touch upon the core problem of machine learning model degradation, and have not been applied in practice.The core of self-healing machine learning revolves around two primary components: the deployed ML model f and the healing system H. Here, we provide additional clarity on these components and their interactions:Definition of the Deployed Model f The model f represents the deployed machine learning model that we aim to heal. It is the function that makes predictions on input data and whose performance we're trying to maintain and improve. In our viability studies, we demonstrate this framework using logistic regression models as f , though the approach generalizes to any predictive model.Relationship Between f and π While f is the model making predictions, π is the adaptation policy-a function that determines what actions to take to modify f based on the diagnosed reasons for its performance degradation. The healing system H follows policy π to output actions a (such as a 1 : retrain a model or a 2 : remove corrupted features) which are then implemented onto f . Therefore, H follows policy π which helps to determine optimal actions a that change/modulate the deployed ML model f .In our viability studies with H-LLM, the policy π is instantiated with an LLM (GPT-4) which uses the diagnosed reasons for model failures (also achieved with an LLM) to propose concrete actions. For instance, if f is a diabetes prediction model and π diagnoses that f 's performance has degraded due to concept drift, π might suggest an action to retrain f with more recent data or to adjust feature weights.This section provides more details on H-LLM.The algorithm of H-LLM is presented in Algorithm 1.Algorithm 1: H-LLM Require :f, H M , H D , H A , H T , τ, m, k t ← 1 t * ← null while t ≤ T do s t ← H M ({(x i , y i )} t i=1 ) if s t > τ and t * = null then t * ← t if t * ≠ null and t -t * > Detection Window then t ′ ← t v ← E((x, y) ∼ P t * , c ∈ C) for i = 1 to k do z i ∼ l(⋅|v) ζ ← {z i } k i=1 for j = 1 to m do a j ∼ l(⋅| ζ) â * ← arg min j∈[m] H T (f aj , D[t * ,t ′ ] ) f ← f â * t * ← null t ← t + 1Extended discussion. I. Monitoring. We use statistical drift detection algorithms to monitor model degradation from k previous time points [29, 39, 48] . Diagnosis is triggered if a shift is detected. For our practical implementation, we use the Drift Detection Method, a popular method for binary drift detection classification.extractor function E ∶ D * → D c to transform the dataset information into an information vector v. This extractor function is a mapping from the dataset to information about the dataset. It takes information before the shift happened and calculates summary statistics, such as the mean, average, standard deviation, percentiles, etc., within each column, as well as the performance of a deployed model f under various data slices. For instance, this would also involve looping over all variables, binning them into 10 discrete values and calculating the average model performance across each bin. This is done to ensure that the information contained within the information vector are both summary statistics, i.e. how the data has changed, as well as specific performance metrics within data slices. The information is used to generate specific diagnoses as to what has happened. We observe, for instance, that summary statistics are extremely helpful if there are any larger deviations from average, as the diagnosis module within H-LLM picks up on these clues. This information is provided as textual information to the next step which is the diagnosis phase.The information vector is used as a textual representation within the next LLM call to generate concrete hypotheses / diagnoses about the reason for the f failure. This is where additional context c could be added, if available, such as the presence of any particular exogeneous events that could have affected model performance and could guide the diagnosis search. In the future, we envision that the additional context could be acquired by the system itself. This is used in a chain-of-thought module with self-reflection, where k candidates for degradation are generated along with associated scores. We employ different "diagnosis" modules within H-LLM. For instance, there is a specific diagnosis module that only attempts to find which covariates are responsible for degradation. The system level instruction could be as follows: "Find covariates that are responsible for the model degrading". However, we also supplement this with more broader reasons for degradation, such as "Find and hypothesize reasons that could have resulted in model degradation , given the information provided". We provide three prompt templates used to hypothesize issues in Section B.2.1. We sample such prompts m times using MC sampling. The chain-of-thought and self-reflection is implemented by calling H-LLM multiple times to re-consider the evidence and hypotheses. Table 2 illustrates diagnoses generated by H-LLM. Generic adaptation actions. The first attempt is to find generic adaptation actions that the diagnosis module suggests on the basis of the identified evidence. These are often quite generic, for instance, "add new covariates that could control for the seasonality". In many such cases, within the confines of our experiments, we do not have the ability to resolve the issues on the basis of the proposed solutions. Therefore, we add two more directly actionable adaptation actions that are also attempted by H-LLM after the generic adaptation actions have been attempted.Adaptation actions by removing corrupted data. Another concrete adaptation action is that we instruct H-LLM to hypothesize specific data slices that might have been corrupted. This could be, for instance, biologically implausible values (negative insulin, age > 200, implausible hba1c levels), mismatches (e.g. height, weight do not match BMI), sudden shifts in the data (ages change from averages of 30 to 60), and other. The adaptation module then proposes which data slices to remove to achieve superior performance. These suggested data slices are then removed and re-trained in the next batch.Adaptation actions by training multiple models. The final concrete adaptation action is to propose specific data slices where the model might have drifted within that slice. This is done because instead of global drifts, models sometimes drift locally and require complete re-training of the new dataset.Example outputs of such strategies are presented in Appendix B.3. We note, however, that, in reality, there might be many possible adaptation actions, such as re-training the model on combinations of old and historical data, re-using old models, re-using parts of old models, creating custom ensembles, changing models altogether, changing hyperparameters or adding regularization terms, building different models for different samples based on their difficulty, switching between symbolic and predictive ML models in the face of high uncertainty, and many more. Our approach is to introduce only the primary few ways with the hope of extending this in the future.As before, because the actions sampled from l are textual representations, we use an interpreter function to execute each a on f . IV. Testing. The sampled actions are evaluated on an empirical dataset (Def. 7), and the empirically optimal action â * = arg min j∈[m] R(a) is implemented. Limited access to the shifted DGP complicates evaluating R(a), but it can be approximated with empirical data Dtest by using a backtesting window, continuously incoming data, or historical data. In all of our experiments, we use a backtesting window. However, other strategies could be attempted. The different strategies are explained in greater detail in Appendix B.4.Goal. This procedure aims to approximate the optimal action (Def. 8). We remark that there might be better adaptation policies that could be suggested on the basis of evidence. Likewise, there might be better diagnosis modules available. We see H-LLM as a first attempt to integrate self-healing into ML.The following are some of the primary prompt templates used within H-LLM. Review each existing covariate and provide a hypothesis on whether it might have changed and resulted in the model underperforming . Provide evidence for each hypothesis and the strength of belief for each covariate .Covariate : < covariate >; Hypothesis : ...; Evidence : ...; Strength of belief : ... After reviewing all the covariates , assign a confidence score for each covariate indicating your confidence level that the covariate has issues . Use the following confidence levels : extremely confident , confident , somewhat confident , unsure , completely unsure . Only use ' extremely confident ' if you have overwhelming evidence for your decision . Prioritize making more confident beliefs . Avoid being uncertain . Use the available inputs as well as the data to make the best possible decision . Your goal is to be correct while reducing entropy of the probabilities ( be confidently correct ) .Code Listing 1: Generic diagnosis prompt Your probabilities should be reflective of the evidence and data . Uniform probabilities (10% each ) implies no knowledge . 100% probability on one covariate implies certain belief . Prioritize making more confident beliefs . Avoid being uncertain . Use the available inputs as well as the data to make the best possible decision . Your goal is to be correct while reducing entropy of the probabilities ( be confidently correct ) .Format each hypothesis and its probability as follows :Hypothesis : [ < covariate1 > , < covariate2 > , ...]; Probability : < probability > """ Self-healing relies on a testing phase, i.e. the ability to test whether the proposed actions perform well on a test dataset. However, given that the distribution has shifted and the historical data no longer represents the new distribution, one might ask: how can we test models on this new distribution? The primary alternative used in our experiments is a backtesting window which we define formally below. Definition 3 (Backtesting Window). Let {P t } t∈T be a sequence of probability measures on X × Y, and suppose a distributional shift occurs at time t * ∈ T, i.e., P t * ≠ P t * -1 . Let t ′ > t * be the time at which the self-healing system detects the shift. The backtesting window is the time interval [t * , t ′ ] satisfying the following properties:∀t ∈ [t * , t ′ ] ∶ (x t , y t ) ∼ P t * , ∀t ∈ [t * , t ′ ] ∶ (x t , y t ) / ∼ P t * -1 .We notice that the backtesting window is a unique property that arises uppon sudden shifts in the data generating process. Specifically, because we assume only two data generating processes and a transition between them at time point t, then all points k where k > t will be from the new DGP and all points k < t will be from the old DGP. Since a drift detection algorithm requries some time to detect the drift, by the time a drift has been detected, we have some collected data from the new distribution which we call the backtesting window. We can therefore optimize our actions on this specific window of the dataset.Clearly, this does not hold when the assumptions about the nature of the shift change. In such a case, we could always use continuously incoming streaming data. Upon the arrival of each new batch, we can test each proposed action and validate it, consistently upgrading and using the actions that perform well on the most recent batch of data. This strategy assumes that the labels are almost immediately available at prediction time. If not, another strategy employed could be to test such actions on the mot recent available data with labels.Other approaches could include generating synthetic data to imitate the new shift with labels or using historical data by de-biasing it. However, these are experimental approaches which need further validation.Computational overhead. SHML methods have larger overhead than reason-agnostic approaches due to the self-healing system (LLM pipeline) identifying model failure reasons. Practically, it takes 20-40 seconds to implement a full pipeline and correct a model upon drift detection. This overhead is negligible for real-world systems given the benefits. Overhead may vary across systems.Sample efficiency. No differences exist as failure detection doesn't depend on sample size, but on self-healing pipeline complexity.Code can be found at: https://github.com/pauliusrauba/Self_Healing_ML or https:// github.com/vanderschaarlab/Self_Healing_ML C.1 Details on the experimental setup Experimental setup. To evaluate the performance of self-healing systems, we require to manipulate the data generating process (DGP) and ask "what-if" questions. Real-world datasets, while valuable, do not offer control over the DGP and come with pre-embedded biases that can implicitly affect detection systems [73] . In contrast, by using synthetic data to control the DGP, we can run controlled in silico experiments and perform viability studies [74] . Furthermore, the overwhelming majority of model adaptation methods are designed for tabular data (refer to Sec. 2 and Sec. A) which includes our benchmarks (see Sec. 6.1). Therefore, we simulate a diabetes prediction task [49] [50] [51] . We perfectly mimic the introduced setup in Sec. 3.1. Our goal is to predict the presence of diabetes Y t ∈ {0, 1} at each time point t for a set of n observations, generated according to a (changing) pre-specified DGP log ( P (Yt=1|Xt)P (Yt=0|Xt) ) = α t + ∑ k∈K β t,k X t,k + ϵ t ,where K includes relevant covariates such as Age or BMI, β t,k are time-varying covariates and ϵ t ∼ N (0, σ 2 ) is a noise component.We generated synthetic data for the diabetes prediction task. Each feature is sampled from a normal distribution with specified parameters:• Hemoglobin A1c (HbA1c) levels are sampled from a normal distribution: HbA1c ∼ N (5.7, 0.5 2 ). • Fasting Glucose levels are sampled from a normal distribution: Fasting Glucose ∼ N (100, 15 2 ). • Age is sampled from a normal distribution: Age ∼ N (50, 12 2 ).• Body Mass Index (BMI) is sampled from a normal distribution: BMI ∼ N (25, 4 2 ).• Blood Pressure is sampled from a normal distribution: Blood Pressure ∼ N (120, 15 2 ).• Cholesterol levels are sampled from a normal distribution: Cholesterol ∼ N (200, 40 2 ).• Insulin levels are sampled from a normal distribution: Insulin ∼ N (85, 45 2 ).• Physical Activity is sampled from a normal distribution: Physical Activity ∼ N (3, 1 2 ).The observations X are constructed as a matrix where each row is an instance of the generated features. The outcomes are then determined by running the model through a logistic regression and obtaining a binary outcome value.Viability Study I. To simulate covariate shift and introduce data corruption, we follow these steps:1. Generate two datasets with different coefficients and noise parameters:• The first dataset with n 1 = 100, 000 samples, coefficients β 1 = [0.3, 0.0075, -0.01, 0.05, 0.04, -0.03, -0.02, -0.1], and noise ϵ 1 ∼ N (0, 0.2 2 ).• The second dataset with n 2 = 100, 000 samples, coefficients β 2 = [-0.3, -0.0075, 0.2, -0.05, -0.015, -0.001, 0.02, -2], and noise ϵ 2 ∼ N (0, 0.2 2 ). 2. Split the first dataset into training and testing sets, using a 70/30 split.3. Combine the testing set of the first dataset with the entire second dataset to form the complete testing set. The second testing set therefore contains a shift where the transitions between the DGPs happen.4. In addition to the shift in the DGP, we introduce outliers in the second dataset by multiplying selected features by an outlier factor that control. By default, it is set toThis section provides a few additional experiments or more detail regarding the experiments presented in the main paper. Setup. We vary the warm-star criterion within drift detection methods to evaluate the recovery time and post-intervention accuracy of H-LLM.The warm start parameter is the minimum number of samples required to conclude that a drift has been detected and trigger re-training or selfhealing.Discussion. Fig. 8 showcases the relationship between the warm-start parameter and the average recovery tiem and post-intervention accuracy.You see the massive increase in average covery time that jumps when the warm-start is set at a relatively high threshold. This results from a drift detection algoritihm detecting a false positive drift just before the actual drift. However, given the wwarm-star parameter, there was a significant delay in re-triggering the self-healing system. This suggests self-healing systems benefit from lower warm-start parameters in case the drift detection algorithms are sensitive to false positives. This corresponds with a relative drop in the post-intervention accuracy because of the longer time it took to trigger self-healing.Takeaway. Self-healing systems benefit from lower warm-start parameters in case drift detection systems are sensitive to false positive drifts.-intervention accuracy with smaller thresholds. Setup. In this experiment, instead of corrupting a single variable which is responsible for model degradation, we corrupt n variables to evaluate how well H-LLM can diagnose multiple corrupted values at once. With each corrupted columns, the true corrupted probability changes. For instance, if there are four columns and there is a single corrupted column, the true corruption vector is [1, 0, 0, 0]. If there are four corrupted columns, then it is [0.25, 0.25, 0.25, 0.25]. We use these probabilities and compare them to the corruption probabilities outputted by H-LLM. This is shown in Fig. 9 . Discussion. This showcases that the more columns are corrupted, the better the predictive diagnosis becomes. For instance, once all columns are corrupted, H-LLM outputs a uniform diagnosis because it has no information given the evidence observed. This exactly corresponds to the true corruption probability, outputting a KL of 0. We notice that the KL generally decreases with the number of corrupted columns for this reason.Takeaway. Greater uncertainty results in more uniform diagnosis. However, less uncertainty can make it difficult to directly pinpoint the exact cause, causing more uncertainty.This section expands on the adaptation experiments by providing more variables and values by corruption coefficient and the number of columns corrupted. We systematically analyze how self-healing effectiveness varies with corruption levels across our five datasets (Airlines, Poker, Weather, Electricity, and Forest Type). For each dataset, we vary both the corruption value τ and the number of corrupted columns k, measuring accuracy with and without the self-healing mechanism. Figure 10 shows that self-healing's impact grows with corruption severity. Specifically, as either τ or k increases, the gap between baseline and self-healed performance widens. This pattern holds consistently across all datasets, though with varying magnitudes. These results demonstrate that self-healing becomes more crucial as data degradation becomes more severe, providing a safety mechanism for maintaining model performance under challenging conditions. We extend our comparison on the diabetes prediction task to include additional adaptation methods and adaptive algorithms. Here, we prove that under the stated assumptions, the optimal diagnosis has zero entropy. EQUATIONAs A is finite, we write the expected value as follows.EQUATIONBy Assumption 1, this can be rewritten as:EQUATIONWe change the order of summation to arrive at the following.EQUATIONThe inner sum can now be rewritten as an expectation.EQUATIONThus we can rewrite the minimization problem as follows.EQUATIONLetEQUATIONThenEQUATIONThereforeEQUATIONand by the definition of entropy and (z * ) † we getEQUATION• While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?Answer: [Yes] Justification: All appropriate experiments report error bars.Guidelines:• The answer NA means that the paper does not include experiments.• The authors should answer "Yes" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper. • The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions). • The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.) • The assumptions made should be given (e.g., Normally distributed errors). • It should be clear whether the error bar is the standard deviation or the standard error of the mean. • It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified. • For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates). • If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text. 
experiments compute resources: 
 Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?Answer: [Yes] Justification: Yes, all relevant information is provided.Guidelines:• The answer NA means that the paper does not include experiments.• The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage. • The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute. • The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make it into the paper). 
code of ethics: 
 Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines?Answer: [Yes] Justification: Yes.• Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters. • Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images. • We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort. 12. Licenses for existing assets Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected? Answer: Justification: We cite and refer to all appropriate codebases that are employed as benchmarks.Guidelines:• The answer NA means that the paper does not use existing assets.• The authors should cite the original paper that produced the code package or dataset.• The authors should state which version of the asset is used and, if possible, include a URL. • The name of the license (e.g., CC-BY 4.0) should be included for each asset.• For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided. • If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset. • For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided. • If this information is not available online, the authors are encouraged to reach out to the asset's creators. 
new assets: 
 Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets? Answer: [Yes] Justification: The core assets, including the framework and the algorithm, are clearly described.Guidelines:• The answer NA means that the paper does not release new assets.• Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc. • The paper should discuss whether and how consent was obtained from people whose asset is used. • We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution. • For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.38th Conference on Neural Information Processing Systems (NeurIPS 2024).Three primary mechanisms through which Pt varies are covariate shift: Pt(x) ≠ Pt+1(x) ∧ Pt(y|x) = Pt+1(y|x), label shift: Pt(y) ≠ Pt+1(y) ∧ Pt(x|y) = Pt+1(x|y), and concept drift: Pt(y|x) ≠ Pt+1(y|x).Code can be found at: https://github.com/pauliusrauba/Self_Healing_ML or https://github. com/vanderschaarlab/Self_Healing_ML 
: 
 Consider the following scenario: You are tasked with monitoring the performance of a black-box model f deployed in production. After some time, you notice that the predictive performance of f has started to degrade. What would be the appropriate action a you should take to ensure that the model's performance returns to its prior performance levels: a 1 : re-train the model on a subset of the data; a 2 : change the type of the model used; a 3 : remove discovered corrupted values; a 4 : add new covariates?Clearly, the answer to this question is "it depends". Different actions might result in different behavior of the model over time, as illustrated in Fig. 1 . If we could pinpoint why the performance of the model has degraded, it could help us understand what actions are most promising, since we could select an action which would directly address the root cause of the problem.While we take this intuition for granted, state-of-the-art techniques for handling model degradation do not reflect this line of reasoning and rely on pre-determined actions, such as model retraining [1] [2] [3] [4] [5] , re-using old models [1, [6] [7] [8] , or other specialized methods [6, 7, [9] [10] [11] [12] . Such approaches share a common, implicit assumption -the reason for the degradation in model performance is irrelevant. We refer to this as reason-agnostic methods.Has the performance of the model decreased?If yes, thenWhat are the reasons for the decrease in performance?What adaptation strategies can help heal the model?Which of the strategies are the most effective?Self-Healing Components The practical implications of methods being reason-agnostic are quite concerning. By not considering the causes for drop in performance, the corrective actions are, essentially, shots in the dark. In high-stakes applications like healthcare, finance, or policing, misguided adaptations can lead to real-world harms, such as inaccurate diagnoses, financial losses, or system failures. In some industries-such as healthcare-this has resulted in avoiding automated model retraining altogether [13] .We propose self-healing machine learning (SHML) to overcome the limitations of reason-agnostic approaches. SHML equips ML models with the ability to diagnose the reasons for performance degradation and take targeted corrective actions. We define a self-healing system as a tuple ⟨H, f ⟩, where f is a black-box model and H is a healing mechanism that can modulate the behavior of f . An example of H modulating f is by deciding what data to use to re-train f , as illustrated in our introductory example. H contains four components: monitoring, diagnosis, adaptation, and testing (Fig. 2 ). The goal of H is to decide what actions to take in response to model degradation which are chosen based on an adaptation policy that provides a mapping from diagnoses to actions. We therefore formalize the goal of H as finding optimal actions under the shifted data generating process (DGP) which are sampled from an adaptation policy conditioned on a diagnosis (Sec. 3.3). In our introductory example, the optimal action is taking action a 1 (Fig. 1 ). Building upon these insights, we propose the first self-healing ML algorithm, H-LLM (Sec. 5) which generates diagnoses behind model degradation and suggests diagnosis-based adaptation strategies.Significance beyond technical contributions. By enabling systems to autonomously diagnose and adapt to model degradation, we lay the groundwork for a new class of self-healing algorithms. We envision self-healing systems as crucial for high-stakes applications where optimal model performance is essential. We also believe this work has immediate practical relevance in high-stakes areas where model degradation is common, such as medicine [13] [14] [15] [16] [17] [18] , fraud detection [19] or finance [20] .⃝ We identify fundamental limitations in existing reason-agnostic adaptation approaches that do not consider the reason for model degradation (Sec. 3.2). 2 ⃝ We introduce the paradigm of self-healing machine learning and establish a theoretical foundation for finding adaptation actions with diagnosis-guided action sampling (Sec. 3.3 -4) . 3 ⃝ We propose the first self-healing ML algorithm H-LLM which reasons about the causes of degradation and modulates the behavior of ML models (Sec. 5). 4 ⃝ We demonstrate the viability of SHML by studying why and when it works (Sec. 6). 
 
 Appendix:  


Decision: This paper introduces a new approach to the problem of drift adaptation in ML models called Self-Healing Machine Learning (SHML). The strengths of the paper include: (1) high novelty in addressing an important problem - the SHML approach to drift adaptation starts from the assumption that drift adaption must be driven by the reasons (root causes) of the shift in the first place, in contrast to prior work on this problem; and (2) significant technical contributions - a solid theoretical framework is provided, along with compelling proof of principle experimental results to demonstrate the viability of the approach (particularly with the expanded comparative results that show the approach to outperform existing "reason-agnostic" approaches); The paper opens up several interesting possibilities for future research.

The main weaknesses of the paper relate to various problems with aspects of the presentation, including such issues as aspects of the approach being unclear, the fact that in other places the information needed to properly understand aspects of the work are buried in the supplementary material, that the paper could do a better job of motivating the approach and highlighting its novelty from prior work upfront, and that the writing could be made more concise in some places. The authors in their rebuttal propose changes that largely address these deficiencies and correct various reviewer misconceptions and concerns caused by these problems. Please include all of these changes in the final version of the paper, along with the expanded comparative performance results mentioned above.

Reviews: review: paper_summary: paper_summary: Model performance degradation on unseen data is a classic problem. Existing approaches solve the problem through a deterministic strategy: change model, retraining, etc. This paper proposes an adaptive way to decide the action after model degradation automatically and introduces a self-healing framework. The evaluation thoroughly analyzes the intuition of SHML and its limitations.
strength_weakness: strength_weakness: 1. The writing is hard to follow in section 3. What is the practical meaning of f? How is it related to the policy? 
2. The assumption of the requirement for optimal adaptation actions is strong. Is there any practical case to support this assumption?
questions: questions: Please refer to the weaknesses
limitations: limitations: Limitations are well-discussed in the main text.
paper_summary: paper_summary: The paper presents a self-healing framework for machine learning models called Self-Healing Machine Learning (SHML). Unlike previous methods, SHML autonomously diagnoses the causes of model degradation and suggests corrective actions based on these diagnoses. The authors formalize SHML as an optimization problem, aiming to minimize expected risk by adapting to changes in the data-generating process (DGP).
A theoretical framework for self-healing systems is introduced, exemplified by H-LLM, which leverages large language models for self-diagnosis and self-adaptation. Empirical analyses of SHML's components demonstrate its potential and effectiveness.
The paper underscores the importance of ensuring optimal performance in algorithms used in high-stakes applications. By enabling systems to autonomously adapt to new environments, SHML aims to advance self-healing systems, benefiting both the machine learning community and society. The theoretical framework lays the groundwork for developing optimal adaptation and diagnosis methods. The authors hope this work will stimulate further theoretical developments and encourage the adoption of self-healing systems in critical fields such as medicine and finance.
strength_weakness: strength_weakness: The main weakness of this paper is its tendency to use overly long sentences and complex phrases, which can hinder readability and clarity. Another significant weakness lies in the viability section; many crucial details have been relegated to the appendix. This makes it difficult to fully understand and trust the framework based on the main text alone. Additionally, while the concept of "self-healing machine learning" is compelling, the section dedicated to it could be more concise and focused. Overall, improving the clarity of these sections would greatly enhance the paper's impact.
questions: questions: 1. Is the diagnostic step continuously operational during the entire period of model usage?
2. How does the performance of the framework compare to benchmarks when applied to large-scale models?
limitations: limitations: Authors mention a limitation in section "SHML’s success relies on accurate root cause identification and finding effective adaptation policies which could pose challenges in some complex, real-world settings" (Sec. 5.1).
This could be further explored.
paper_summary: paper_summary: This paper proposes a new concept of self-healing machine learning, or SHML. The idea is based on understanding and addressing the reasons of performance drops in ML systems, thereby going beyond most common approaches that are labelled as reason-agnostic. The approach is based on a pipeline well illustrated in Fig 2 that includes four steps: monitoring, diagnosis, adaptation and testing. Formal definitions are provided. Experimental support is provided to demonstrate some aspects of the new idea and its potential advantages.
strength_weakness: strength_weakness: I have identified the following weaknesses: 
1. While the main assumption is move on from reason-agnostic methods to a system that attempts to understand the reasons, the paper does not offer a good classification of such reasons, mainly because it main a meta-level approach, in which reasons are to be learned. This could be less effective than pre-defining monitoring and diagnosis methods according to known causes.  
2. As a follow-up from the previous point, the diagnostic part that generates hypotheses via a LLM may or may not be correct and the adaptation may or may not be effective. I find it hard to get a feeling of how well the system would work on a large set of benchmarks and problems from the evidence and experiments presented in the paper. 
3. Most of the interesting details of the paper are actually in the appendix.
4. I disagree that this is the first non-reason-agnostic method, as the authors overview and list other approaches that do focus on the causes of performance drop. I agree that this may be the first approach to tackle the issue comprehensively. Nevertheless, the novelty, knowledge gap, and improvements of the approach with respect to existing approaches is not well summarised in the introduction/related work, which is rather short and it refers to the appendix for further detail.
questions: questions: 1. Is it possible to define a medium to large set of conditions in known benchmarks that could be use to extensively test the SHML?
2. One challenge in a system with multiple sequential steps is that the failure of one component affects all the following. E.g. failure in diagnosis will affect adaptation and testing.  How can we assess how well the system work when failure in one component compromises the correct functioning of others?
limitations: limitations: I find that the limitation part (before the conclusion and in 5.2)  is too short . Yes, I agree that the correct identification of the root causes of performance drop is challenging in real work scenarios, but the issue needs to be expanded and discussed more. For example, why is it difficult? Are some reasons that are more difficult than others to identify? Monitoring could also be challenging. Adaptation could be challenging. 

The impact is sufficient covered.
paper_summary: paper_summary: The paper titled "Self-Healing Machine Learning: A Framework for Autonomous Adaptation in Real-World Environments" introduces the concept of self-healing machine learning (SHML). This framework aims to address performance degradation in machine learning models due to distributional shifts. Unlike traditional concept drift adaptation methods, SHML focuses on diagnosing the reasons for model degradation and proposing targeted corrective actions. The paper presents a theoretical foundation for SHML, an algorithm (H-LLM) that uses large language models for diagnosis and adaptation, and empirical evaluations demonstrating the effectiveness of the approach.
strength_weakness: strength_weakness: 1. While the paper demonstrates promising results, the empirical evaluation is limited to a simulated diabetes prediction task. Additional experiments in diverse real-world environments would strengthen the claims.
2. The comparison with existing concept drift adaptation methods is not exhaustive. A broader set of baseline comparisons would provide a clearer picture of the advantages and limitations of SHML.
3. The paper lacks detailed information on the implementation of H-LLM, especially regarding the practical challenges of deploying such a system in real-world scenarios.
4. Although the authors mention the availability of the code upon acceptance, more details on the experimental setup and data used would help in reproducing the results.
questions: questions: 1. Can you provide more detailed results and analysis of SHML in a wider range of real-world environments beyond the simulated diabetes prediction task?
2. How does SHML compare to other state-of-the-art concept drift adaptation methods in terms of computational overhead and sample efficiency?
3. Can you elaborate on the specific contributions of each component of the SHML framework to the overall performance improvement?
limitations: limitations: The authors acknowledge the limitations of SHML, including the challenges in accurately diagnosing the root causes of performance degradation and the potential computational overhead of the approach. They also discuss the need for sufficient parallel processing capacity to handle the increased demands of multiple diagnostic and adaptation actions. The broader societal impact of SHML, including potential misuse in high-stakes applications, is also briefly addressed.

Comments: comment: Dear reviewer 4TYN,

Thank you for your thorough review of our work. As the discussion period is coming to a close, we'd like to follow up on your prior concerns.

Have our responses and clarifications addressed your main questions and concerns? If so, we kindly ask that you consider increasing your score to better reflect this. If not, please let us know what specific issues remain, and we'll promptly provide additional information to resolve them.

We appreciate your reconsideration and look forward to your feedback.
Dear reviewer LnCp,

Thank you for your thorough review of our work. As the discussion period is coming to a close, we'd like to follow up on your prior concerns.

Have our responses and clarifications addressed your main questions and concerns? If so, we kindly ask that you consider increasing your score to better reflect this. If not, please let us know what specific issues remain, and we'll promptly provide additional information to resolve them.

We appreciate your reconsideration and look forward to your feedback.
Dear reviewer xkmy,

We are glad our response was helpful and would like to thank you for raising your score! Thanks again for your time and suggestions which have helped us to improve the paper.

Regards

Paper Authors
Hello,

Sorry for my late response. I am satisfied with your answers, therefore I am increasing my assessment..

Regards,
Shadab
Dear reviewer xkmy,

We thank you once again for the effort put into reviewing our paper. As there are only a couple working days left in the discussion period, we would like to ask if our response has satisfied your concerns. If so, we hope you consider revising your assessment of the paper's impact and the corresponding evaluation for NeurIPS. If any concerns remain, we are happy to discuss them further here.
Dear reviewer 4TYN,

We thank you once again for the effort put into reviewing our paper. As there are only a couple working days left in the discussion period, we would like to ask if our response has satisfied your concerns. If so, we hope you consider revising your assessment of the paper's impact and the corresponding evaluation for NeurIPS. If any concerns remain, we are happy to discuss them further here.
Dear reviewer LnCp,

We thank you once again for the effort put into reviewing our paper. As there are only a couple working days left in the discussion period, we would like to ask if our response has satisfied your concerns. If so, we hope you consider revising your assessment of the paper's impact and the corresponding evaluation for NeurIPS. If any concerns remain, we are happy to discuss them further here.
Dear reviewer vweT,

We are glad our response was helpful and would like to thank you for raising your score! Thanks again for your time and suggestions which have helped us to improve the paper.

Regards

Paper Authors
I appreciate the careful response and effort to address my concern. I believe the paper has improved as a consequence, and I'm happy to increase my assessment.