Diagnose Before Adapting: Fault Attribution for Decentralized Walking Controllers

Legged robots built from independent per-leg rhythm generators recover from damage in an appealing way. Each leg runs its own oscillator, predicts what its foot sensor should feel, and when reality disagrees it adjusts how strongly it listens to that sensor. After an amputation this blind adaptation finds a new gait within a few steps. The weakness is that the adaptation does not know what went wrong. A broken contact sensor, a weakened motor, a jammed joint and a patch of ice can all look like "the foot felt less load than expected," yet they call for very different, sometimes opposite, responses. Increasing trust in a stuck sensor makes the failure worse. Permanently retuning a gait around a transient slip wastes the tuning.

This note proposes giving each leg a small diagnoser. The diagnoser reads the leg's own prediction errors, plus a compact summary broadcast by its neighbours, and names which leg is at fault and what kind of fault it is. That label then selects one of a few discrete repairs, and each repair is executed only at natural phase-reset moments such as foot touchdown or liftoff. The recipe comes from software agents: inject synthetic faults, train an attribution model on them, and route each diagnosis to a targeted edit instead of a blind retry. The central claim is narrow and testable. On faults that look alike but need different repairs, diagnosis-then-repair beats blind continuous adaptation and beats end-to-end policies trained on randomized faults. It achieves this while each leg's control input stays strictly local.

Where the two directions stand

Decentralized rhythmic control has shown that coordination can emerge without a central planner. General Distributed Neural Control and Sensory Adaptation gives each leg a fully decoupled central pattern generator, meaning a self-oscillating neural circuit that produces rhythmic motor commands without any wiring to the other legs. Gaits emerge from load feedback alone on 4-, 6-, 8- and 20-legged bodies. A forward model predicts foot contact, and a dual-rate learner (one fast process, one slow) retunes the sensory-feedback gain, which yields recovery from leg loss "within a few walking steps." This paper supplies our substrate and our main baseline. It also names the limits we target: there is no mechanism to tell fault types apart, and no posture control, so quadrupeds sag after limb loss.

Phase resetting driven by ground contact, analysed in Simple analytical model reveals the functional role of embodied sensorimotor interaction in hexapod gaits and reviewed in Editorial: Biological and Robotic Inter-Limb Coordination, supplies the method for making discrete repairs safe. Resets at touchdown are already part of how these oscillators normally run. A discrete edit placed at a reset event therefore does not break phase continuity, and the conflict between smooth entrainment and instant plan edits largely goes away. Continuous reflex schemes such as Rhythmic-Reflex Hybrid Adaptive Walking Control of Biped Robot adjust oscillator frequency and posture from balance and torso-tilt feedback. They settle in about three steps, but they only ever change parameters and never choose among structurally different responses.

Learned decentralized policies motivate the design constraint. Hierarchical Decentralized Deep Reinforcement Learning Architecture for a Simulated Four-Legged Agent shows that restricting each leg's controller to its own joints acts as a regularizer. Its semi-decentralized policy reaches 99.6% success on sparse-reward target seeking, where flat centralized and flat decentralized policies both reach 0%. Its commands flow only downward, from planner to legs, so a leg cannot report that it is failing. DMAP similarly processes each joint's sensors separately and matches an oracle given the true body parameters when limb lengths change. However, it adapts to body change implicitly and never reports what changed.

On the recovery side, Aegis supplies the training method. It injects controlled errors into successful multi-agent traces and trains models to attribute both which agent failed and what kind of error it was. A fine-tuned 14B model scores 26.51 against 20.24 for o3. Aegis also reports that "which agent" is much easier than "what kind," and we expect the same asymmetry for legs. $R^3$DAO supplies the repair vocabulary: Refine, Insert and Skip applied to a task graph. On MLE-bench it reports 94.1% success against 53% for R&D-Agent. It also warns that reflection on noisy signals produces hallucinated repairs. ContactGuard constrains the design in two ways. It shows that adding proprioception can let a failure detector take a shortcut instead of learning grounded features, and it can only abort, never repair. These three works operate on code, tool calls or single-arm grasps, not on rhythmic multi-leg bodies.

Core Claim

The claim is that separating the control channel from the diagnosis channel resolves the tension between local isolation and global diagnosis. Each leg's oscillator and feedback loop continue to see only local sensors. What legs share is a low-bandwidth stream of forward-model residuals, a few numbers per step cycle. For leg $i$, the residual is $r_i(t) = s_i(t) - \hat{s}_i(t)$, where $s_i$ is the measured foot load and $\hat{s}_i$ is the forward model's prediction. We summarize it per stride as the mean and the timing of the peak mismatch.

The claim does not rest on residuals alone, because residuals from different faults have distinct cross-leg signatures. A stuck contact sensor produces a large residual on one leg while the neighbours' loads stay normal. A weak motor or a lost leg shifts load onto the neighbours. Ice produces a short mismatch that fades on the next stride. A local diagnoser trained with synthetic fault injection should separate these cases. That label selects one of three repairs, each executed at a phase event:

  • Refine changes a specific leg's feedback gain or stance duty. We use it for motor weakness.
  • Skip takes a leg out of the rhythm or cuts off the corrupted signal. We use it for leg loss, joint lock and sensor faults, where the leg falls back on a joint-torque proxy for contact. For a transient slip, the Skip-type response is instead to throw away the fast learner's temporary adaptation.
  • Insert adds a posture step on the neighbouring stance legs, a small height-regulation term that addresses the documented body sag.

Research Program

We build on the decoupled pattern generator and dual-rate learner in a physics simulator on hexapod and quadruped bodies, with the posture term added. The fault library covers five types, each at several severities and onset phases: leg loss, motor torque weakening, joint lock, a contact sensor stuck high or stuck low, and a low-friction patch under one foot.

Following Aegis, the diagnosers are trained on healthy rollouts with faults injected at random times, labelled by fault type and faulty leg. Each diagnoser is a small temporal classifier over the last few strides of its own residuals and its neighbours' summaries. It outputs a fault type and a confidence, and it defaults to "no action" below a threshold. That default is our guard against the hallucinated-repair failure mode that $R^3$DAO reports.

The mapping from diagnosis to repair is hand-specified first. We then test whether a learned mapping, trained with reinforcement learning on the same fault distribution, finds anything better. Two analyses run alongside the method. One confirms, with an oracle label, that each repair is in fact the right response to its fault. The other maps which fault pairs a leg cannot tell apart from local residuals alone, which tells us how much the neighbour summary is actually needed.

Baselines

The naive reference point is the fixed decoupled pattern generator with no adaptation, run on identical fault episodes. It shows how damaging each fault is when nothing responds.

The main competitor on this question is the dual-rate blind adaptation of General Distributed Neural Control and Sensory Adaptation. It is the published decentralized method that already recovers from damage, and our proposal claims to fix exactly its blindness. We reimplement it on the same bodies, add the same posture term so that posture control is not a confound, and tune its learning rates with the same search budget we give our system. The paper reports only qualitative recovery "within a few walking steps." No reported result was found on Lacuna for fault attribution or multi-fault recovery on decentralized legged controllers, so we will establish the numbers ourselves. Beating it means lower fall rate and fewer strides to recover on the sensor-fault and transient-slip conditions, with no loss on amputation, where it is already good.

The strongest learned competitor is the semi-decentralized hierarchy from Hierarchical Decentralized Deep Reinforcement Learning, retrained with fault randomization over the full library. We use its modified Ant, with 10 times the default mass, and its target-seeking task. Its reported 99.6% success is for healthy flat terrain, not faults. We give it the same number of environment steps that our system uses for diagnoser training plus any repair-policy learning. We run a DMAP-style joint-attention policy under the same protocol, since it is the strongest implicit-adaptation architecture in the file. Beating these means higher post-fault target-seeking success on held-out fault combinations and severities.

Three ablations isolate the key ingredients. A full-state centralized diagnoser measures what decentralization costs in attribution accuracy. An oracle-label variant bounds how much the repair step can deliver when diagnosis is perfect. A local-only diagnoser, with the neighbour summaries removed, tests whether the shared channel is necessary. A final ablation keeps the diagnoser but assigns repairs at random, which confirms that the gain comes from matching the repair to the cause and not merely from intervening.

Why not just…?

Why not just keep blind dual-rate adaptation, which already handles amputation? It adapts one quantity, the gain on a sensor, in one direction. For a stuck sensor, increasing trust in the corrupted signal is the wrong move. For ice, the slow learner keeps an adaptation the robot no longer needs. The file shows success only for amputation, so the sensor-fault and slip conditions are where the confusable-fault test below either shows a clear failure mode or shows that blind adaptation is more robust than we expect. If it matches us on those conditions, the proposal's premise is wrong and we will say so.

Why not just train an end-to-end policy with randomized faults? This is the real threat. Fault-randomized policies can learn implicit diagnosis, and DMAP's oracle-level adaptation to body changes suggests they might. Our bet is that faults which look alike under local observation, and which each leg sees only rarely, get averaged into one hedged response. We settle it by holding out combinations of fault type, leg and severity, and by probing the policy's hidden state for fault identity. If the randomized policy matches us, the contribution shrinks to the interpretable fault labels and the enforced "no action" default. That is still useful for maintenance, but it is a weaker result, and we would report it as such.

Why not just use a centralized fault classifier over all joints? It is likely to be the most accurate diagnoser, and we include it as an upper bound. It reintroduces the dependence on global state that made centralized recovery fragile under estimation noise in Quadruped Capturability and Push Recovery. ContactGuard's shortcut finding also suggests that pooling everything invites spurious features. The question is how close the decentralized diagnoser gets. We also inject state-estimation noise to see whether the ranking between the two flips.

Why not just threshold the prediction error and apply one fixed response? A threshold detects that something is wrong but cannot say which fault it is. The random-repair ablation is effectively this baseline with a trained detector attached, and it shows directly whether knowing the fault type matters.

Decisive Experiments

The first decisive test is the confusable-fault experiment on the hexapod and the quadruped. It compares a stuck-low contact sensor, 40% motor weakening, and a one-stride ice patch, all on the same leg and at matched onset phase. On each fault we measure four things: fault-type and leg attribution accuracy, strides until body height and forward speed return within 5% of healthy values, fall rate, and peak joint torque at the moment of repair. That last measure checks that event-timed repairs cause no torque spikes. The hypothesis fails if blind dual-rate adaptation recovers equally well on all three faults.

The second test is transfer. We train the diagnosers on the hexapod and evaluate them unchanged on the 8- and 20-legged bodies, mirroring the source paper's claim that its controller works across morphologies. Residual signatures that are defined per leg should carry over. Signatures that encode a specific body layout would not.

The third test is downstream task success after a fault on the modified-Ant target-seeking task, against the fault-randomized hierarchical and DMAP-style policies. Throughout, we report "which leg" and "what fault" accuracy separately, to check whether the Aegis asymmetry reappears in bodies.