arXiv:2610.03249cs.NEOct 2026

Manuscript Offprint

arXiv:2610.03249

Self-Repairing Recurrent Ensembles for Real-Time Recovery from Distribution Shift

Julian Lemmel, Pedro D. Wendel Garcia, Taisuke Kobayashi, Radu Grosu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Deploying a pretrained controller exposes it to conditions that are absent from its training data. Sensor drift, outright sensor failure and accumulating measurement noise all induce a distribution shift that can collapse an otherwise competent policy – typically at a point in time where no expert is available to supply corrective labels. We present a method that lets a policy recover from such shifts online and without supervision. Our controller is an ensemble of recurrent networks, each of which observes a randomly masked subset of the observation vector, and whose Gaussian outputs are combined through sequential Kalman fusion so that confident members dominate the consensus action. At deployment, we treat this consensus as a self-supervised label and fine-tune each member towards it, scaling each member's contribution proportional to the complement of its squared Kalman gain. Gradients are computed using RFLO, an efficient and biologically plausible approximation of Real-Time Recurrent Learning, so that a parameter update follows every environment step and the policy reacts to a shift as it unfolds. On a range of simulated continuous control tasks, our approach recovers close to the original performance after a sensor shift, while ensembles that see the full observation are unable to recover. The same framework subsumes fully online interactive imitation learning: when an expert is present, the consensus label is replaced by the expert action and the identical update rule refines the policy during teleoperation.

Introduction

A controller learned from data is only as good as the conditions it was trained under. Once it leaves the training distribution, its behavior is unconstrained – and in a physical system, leaving the training distribution is not an edge case but an expectation. A joint encoder reads a constant offset after a hard impact or a failed homing procedure. A sensor stops reporting altogether and its channel is pinned to zero. Thermal drift and mechanical wear raise the noise floor gradually over hours of operation. In each case the policy continues to receive an observation vector of the expected shape, containing values it has never been trained on, and a controller that solved the task at deployment time can lose the ability to act entirely.

The established remedy is to bring an expert back into the loop. Interactive imitation learning (IIL), and the DAgger family of algorithms in particular (Ross, Gordon, and Bagnell 2011), addresses distribution shift by letting the novice act, having the expert label the states it visits, and retraining on the aggregated dataset. Safety-aware variants gate the novice's authority on a learned estimate of its own competence (Zhang and Cho 2017; Kelly et al. 2019; Menda, Driggs-Campbell, and Kochenderfer 2019). These methods are effective, but they rest on an assumption that deployment rarely satisfies: that an expert is available at the moment the shift occurs. A robot that has been running unattended for a week has no expert on hand. Even when a human operator is present, providing a corrective label means specifying a continuous vector of joint commands – something humans do poorly through a teleoperation interface, and cannot do at control-loop rates at all. Recovering from distribution shift, we argue, should not require supervision.

Figure

Figure 1: Each member of the ensemble receives a different, randomly masked observation. If a sensor failure appears, some of the members don’t experience it and are therefore not confused in their action prediction.

Our starting point is the observation that a sufficiently diverse ensemble contains its own supervision. If each member of an ensemble is trained to solve the task from a different random subset of the observation dimensions, see Figure 1, then a shift that corrupts one dimension corrupts only those members that depend on it. The remaining members are unaffected and continue to predict sensible actions. What is needed is a way to identify them at runtime and to move the affected members back towards them.

We obtain both from the same mechanism. Each member is a stochastic policy predicting a Gaussian over actions, and we combine the members through sequential Kalman-gain fusion, following Valencia et al. (2025), so that the fused action is dominated by members that are confident and discounts members whose predicted variance is high. Members confused by a corrupted input are precisely the ones that report high variance, so the fused distribution is already the ensemble's best available estimate under the shift. We then close the loop: the mean of the fused distribution serves as a self-supervised label, and each member is fine-tuned towards it, weighted by the complement of its own contribution to the fusion. This is a follow-the-leader scheme in which the leader is the consensus, and it is related in spirit to the majority-voting objective Zuo et al. (2025) use for test-time adaptation of language models, transposed from discrete votes to a continuous action distribution.

Applying this correction while the policy runs is what makes it useful, and it is where the recurrent structure of the policy becomes a constraint. Our members are recurrent neural networks, which are necessary because the shifted observation must be interpreted in the context of the history that preceded it. Training recurrent networks conventionally means backpropagation through time (BPTT), which requires buffering a sequence, halting, and replaying it – incompatible with a controller that must react within a control cycle. We therefore compute gradients with Random Feedback Local Online Learning (RFLO) (Murray 2019), a biologically plausible approximation of Real-Time Recurrent Learning (RTRL) (Williams and Zipser 1989) that maintains a Jacobian trace alongside the hidden state. A parameter update is available at every environment step, at no additional latency beyond the forward pass, and the policy adapts as the shift unfolds rather than after the episode has ended.

The resulting algorithm requires no expert and no separate training phase, and the same update rule serves both regimes: substituting an expert action for the consensus label recovers a fully online interactive imitation learning method, which we call RTR-IIL, and which we evaluate as well.

Our contributions are as follows.

• We introduce a recurrent ensemble policy with random observation masking, combined through Kalman-gain fusion, whose members are individually robust to the failure of any single observation dimension.

• We propose a self-supervised follow-the-leader loss that uses the fused consensus action as a training label, enabling recovery from distribution shift with no expert supervision.

• We show how to optimize this objective in real time using RFLO, yielding a controller that applies a parameter update at every environment step during operation.

• We evaluate on simulated continuous control tasks under three distinct distribution shifts – a shifted sensor reading, a failed sensor, and gradually increasing measurement noise – and show that random observation masking is necessary for recovery: ensembles with full observation visibility fail to recover.

The remainder of the paper is structured as follows. Section 2 reviews interactive imitation learning and online gradient computation for recurrent networks. Section 3 introduces the ensemble architecture, the Kalman fusion rule and the self-supervised objective. Section 4 presents our experimental evaluation, and Section 5 concludes.