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

This page is generated by a language model

The explanation is generated from the linked sources. The abstract and citation refer to the original research.

Authors: Paulius Rauba; Nabeel Seedat; Krzysztof Kacprzyk; Mihaela van der Schaar

NeurIPS 2024. Conference paper.

Canonical page: https://www.pauliusrauba.com/research/self-healing-machine-learning

Original record: https://proceedings.neurips.cc/paper_files/paper/2024/hash/4a86ec12e94ef1fe306362e7bdcd5894-Abstract-Conference.html

DOI: https://doi.org/10.52202/079017-1336

arXiv: 2411.00186

Paper PDF: https://www.pauliusrauba.com/research/self-healing-machine-learning/paper.pdf

Full paper text: https://www.pauliusrauba.com/research/self-healing-machine-learning/full-text.txt

Research code: https://github.com/vanderschaarlab/Self_Healing_ML

Page updated: 2026-11-23. Paper publication year: 2024.

## Original 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 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 H-LLM to understand why and when it works, demonstrating the potential of self-healing ML.

## In brief

Self-healing machine learning connects model monitoring, diagnosis, adaptation and testing. The central idea is to choose a repair based on why a model has degraded, then evaluate that repair before applying it.

## Why diagnose a model before retraining it?

A deployed model can become less accurate for very different reasons. The population may change. A sensor may report values in a different unit. A data pipeline may introduce corrupted observations. The same drop in accuracy can therefore call for different responses: retrain the model, repair the inputs, change the training data, or leave the model alone while investigating further.

In our NeurIPS 2024 paper, we formalize **self-healing machine learning (SHML)** around this distinction. Monitoring tells us that something may have changed. Diagnosis helps decide what to do about it. The contribution is a framework for connecting those decisions, together with **H-LLM**, an implementation that uses a language model to propose diagnoses and candidate repairs.

The target is the reliability of an existing predictive model in a changing environment. The language model acts as part of a healing mechanism around that model. [Paper, Sections 1–3](https://www.pauliusrauba.com/research/self-healing-machine-learning/paper.pdf#page=1).

## How self-healing machine learning works

SHML has four stages. Together, they form a feedback loop around a deployed model:

1. **Monitoring.** Detect evidence of degradation or a distribution shift and decide when to investigate.
2. **Diagnosis.** Use the available data and context to propose reasons for the change. A diagnosis represents uncertainty over possible explanations.
3. **Adaptation.** Propose actions conditioned on those explanations, such as repairing corrupted inputs or retraining on a more appropriate subset of data.
4. **Testing.** Evaluate the candidate actions on relevant data and select an action on the basis of its measured performance.

![Figure 2 from the paper: a deployed ML model is connected to monitoring, diagnosis, adaptation and testing in a feedback loop.](https://www.pauliusrauba.com/research/self-healing-machine-learning/framework.png)

*Figure 2 from Rauba, Seedat, Kacprzyk and van der Schaar (2024). Original diagram, extracted from page 2; surrounding page text omitted. [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).*

The framework separates the **deployed model** from the **healing mechanism**. It does not require the deployed model itself to be a language model. The central optimization problem is to choose an adaptation action that minimizes expected prediction loss under the changed data distribution. In practice, that loss must be estimated from the data available for testing. [Paper, Section 3.3](https://www.pauliusrauba.com/research/self-healing-machine-learning/paper.pdf#page=4).

## What H-LLM adds

H-LLM instantiates the diagnosis and adaptation stages with an LLM. It examines numerical information about data before and after a detected change, proposes candidate explanations, and generates actions conditioned on those explanations. An interpreter turns those proposed actions into operations on the predictive system. Candidate actions are then evaluated using an empirical testing dataset, such as a backtesting window from the shifted distribution.

This distinction matters: an explanation that sounds plausible is a hypothesis. Testing supplies evidence about whether its proposed repair helps. In the monitoring study, an action is implemented only if it outperforms doing nothing. That comparison helps protect against unnecessary adaptation following a false alarm. [Paper, Sections 5.3 and 6.3](https://www.pauliusrauba.com/research/self-healing-machine-learning/paper.pdf#page=7).

The theoretical analysis defines diagnosis quality through its consequences for adaptation. An optimal diagnosis minimizes expected action risk for the specified adaptation policy. The paper studies this objective under stated assumptions about the action space and policy structure. These results concern the formal framework; they do not establish that an LLM's confidence score is calibrated or that every proposed repair will work. [Paper, Section 4](https://www.pauliusrauba.com/research/self-healing-machine-learning/paper.pdf#page=5).

## What the experiments show

The paper presents six viability studies, covering overall adaptation, different datasets, monitoring, diagnosis, adaptation selection and testing. The experiments use controlled changes and feature corruption so that the causes of degradation can be studied directly.

### Controlled degradation in a simulated prediction task

In the simulated diabetes prediction experiment, the data-generating process changes and some feature values are corrupted. For the setting with three corrupted columns and a corruption proportion of 0.05, Table 4 reports:

| Adaptation method | Accuracy, mean ± standard deviation |
| --- | --- |
| No retraining | 0.44 ± 0.02 |
| Partially updating | 0.70 ± 0.02 |
| New model training | 0.69 ± 0.02 |
| Ensemble method | 0.69 ± 0.02 |
| **H-LLM** | **0.90 ± 0.02** |

These are results for that specific simulated setting. They show why identifying corrupted observations can be useful before deciding how to retrain; they are not clinical validation or a general accuracy guarantee. [Paper, Table 4 and Section 6.1](https://www.pauliusrauba.com/research/self-healing-machine-learning/paper.pdf#page=8).

### Adaptation across five datasets

The second study introduces synthetic feature corruption into five existing tabular datasets, with lagged labels. Below is a comparison from the **k = 5 corrupted features** setting in Table 5. Values are accuracy, reported as mean ± standard deviation over five runs; higher is better.

| Dataset | New model training | H-LLM |
| --- | --- | --- |
| Airlines | 0.54 ± 0.02 | **0.56 ± 0.00** |
| Poker | 0.49 ± 0.01 | **0.70 ± 0.03** |
| Weather | 0.56 ± 0.03 | **0.66 ± 0.02** |
| Electricity | 0.66 ± 0.05 | **0.72 ± 0.01** |
| Forest Cover Type | 0.51 ± 0.02 | **0.73 ± 0.00** |

H-LLM identifies corrupted features and proposes transformations to restore their original feature space. The full paper also reports partial updating, ensemble and no-retraining baselines, plus a second corruption setting. The experiments support the viability of diagnosis-guided adaptation under the tested corruptions. [Paper, Table 5 and Section 6.2](https://www.pauliusrauba.com/research/self-healing-machine-learning/paper.pdf#page=9).

### Why evaluation is part of the repair loop

The component studies examine when diagnosis and adaptation work well. More visible corruptions are easier to diagnose; data quality and the testing window affect action selection. Evaluating proposed actions with a backtesting window improves the self-healing process compared with selecting an action without that empirical validation. This makes evaluation part of adaptation itself, rather than a check added after deployment. [Paper, Sections 6.4–6.6](https://www.pauliusrauba.com/research/self-healing-machine-learning/paper.pdf#page=9).

## Scope and limitations

SHML depends on useful diagnoses, effective candidate actions, and testing data that represents the environment in which the model will operate. A confident but incorrect diagnosis can guide the search toward poor repairs. A small, corrupted or unrepresentative evaluation dataset can also make action selection unreliable.

The implementation primarily investigates subgroup-level issues and tabular prediction tasks. The experiments use GPT-4 and controlled shifts or corruptions. Applying the approach to a different domain requires evaluating the diagnoses, available repairs and testing procedure in that domain. The connection to reliable AI is the explicit loop between detecting a failure, proposing a cause, and testing a response.

The released code is a research implementation for the paper's viability studies. Its [README](https://github.com/vanderschaarlab/Self_Healing_ML) explicitly distinguishes it from a production product or service. [Paper, Section 7 and Appendix C.3](https://www.pauliusrauba.com/research/self-healing-machine-learning/paper.pdf#page=10).

## Questions about the paper

### How is SHML different from concept drift detection?

Drift detection asks whether the data or a model's behavior has changed. SHML connects monitoring to diagnosis, the selection of a response, and empirical testing. A detector can therefore serve as one component within a self-healing system.

### Does self-healing mean automatically retraining the model?

Retraining is one possible action. The appropriate response depends on the suspected cause. Some problems call for repairing inputs or selecting different training data, and the testing stage can favor leaving the model unchanged.

### Is the language model repairing its own weights?

H-LLM uses a language model to help diagnose and adapt an existing predictive system. The deployed predictor and the healing mechanism are separate parts of the framework. This paper is not a method for recursive self-improvement of an LLM's weights.

### When is this paper relevant to cite?

The paper is relevant to research on self-healing machine learning, diagnosis-guided adaptation under distribution shift, LLM-assisted model maintenance, and testing candidate repairs before applying them. Cite the NeurIPS paper for the formal framework and its empirical viability studies; retain the experimental setting when quoting a result.

## Paper and implementation

- [NeurIPS publication record](https://proceedings.neurips.cc/paper_files/paper/2024/hash/4a86ec12e94ef1fe306362e7bdcd5894-Abstract-Conference.html)
- [Complete paper and appendices, PDF](https://www.pauliusrauba.com/research/self-healing-machine-learning/paper.pdf)
- [OpenReview record](https://openreview.net/forum?id=f63DKIpx0I)
- [arXiv:2411.00186](https://arxiv.org/abs/2411.00186)
- [Research code: Self_Healing_ML](https://github.com/vanderschaarlab/Self_Healing_ML)

This page provides an author-hosted explanation of the paper. The abstract and figure are reproduced from the work; the explanatory text and selected result tables above are adapted for this page. The paper is available under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).


## Cite this paper

Rauba, P., Seedat, N., Kacprzyk, K., & van der Schaar, M. (2024). Self-Healing Machine Learning: A Framework for Autonomous Adaptation in Real-World Environments. Advances in Neural Information Processing Systems, 37, 42225–42267. https://doi.org/10.52202/079017-1336

```bibtex
@inproceedings{NEURIPS2024_4a86ec12,
 author = {Rauba, Paulius and Seedat, Nabeel and Kacprzyk, Krzysztof and van der Schaar, Mihaela},
 booktitle = {Advances in Neural Information Processing Systems},
 doi = {10.52202/079017-1336},
 editor = {A. Globerson and L. Mackey and D. Belgrave and A. Fan and U. Paquet and J. Tomczak and C. Zhang},
 pages = {42225--42267},
 publisher = {Curran Associates, Inc.},
 title = {Self-Healing Machine Learning: A Framework for Autonomous Adaptation in Real-World Environments},
 url = {https://proceedings.neurips.cc/paper_files/paper/2024/file/4a86ec12e94ef1fe306362e7bdcd5894-Paper-Conference.pdf},
 volume = {37},
 year = {2024}
}
```
