Recalibrating Hazard Perception Without Touching Hazards

A robot that has learned which things are dangerous by looking at them will eventually see the world differently. A camera ages, the lighting changes, a new site has differently colored hazards. Its hazard detector then becomes unreliable in the region where it matters most, near the boundary between "safe" and "dangerous." Safe reinforcement learning (RL) usually offers two responses. The first is to keep the detector fixed and add a conservative margin. The second is to relearn from the cost signal, which in practice means relearning by entering hazards. Human listeners face the same problem with speech and solve it without the second route. When a new talker's /s/ drifts toward /f/, listeners hear the ambiguous sound inside a word that makes its identity obvious ("giraffe" cannot end in /s/). They shift their internal category boundary from that context and then apply the shift to words they have never heard from that talker. No error or punishment is needed.

This note proposes to give safe RL agents the same capability, which we call context-guided recalibration. After a shift in perception, the agent updates its hazard categories using drift-stable context that identifies some objects without contact. It lets the update spread only along the directions in feature space where human-style perceptual learning says transfer actually happens. It also makes the update asymmetric: evidence that "this looks more dangerous than I thought" is accepted quickly, and evidence that "this is safer than I thought" must meet a stricter bar. The claim is that this recalibrates the safety boundary while producing far fewer violations than learning from the cost signal. It also sidesteps a known failure of safe RL: as an agent becomes safer it sees fewer violations and its boundary estimate degrades (Breaking Safety Paradox with Feasible Dual Policy Iteration).

Core Claim

Perceptual shift and safe exploration interact badly. If the only teaching signal about where hazards are is the cost incurred on entering them, then fixing a perceptual shift costs violations, and a well-behaved policy starves the fixer of data. Speech research points to a way out. Lexically Guided Perceptual Learning in Mandarin Chinese shows that ambiguous fricatives embedded in disambiguating words shift identification of the whole continuum and carry over to unexposed words. Talker-specific perceptual processing: influences on internal category structure shows that such exposure reshapes the whole internal structure of a category, meaning the range of sounds rated as good examples, and not just the boundary. Two further results constrain the design rather than motivate it. Perceptual Learning in Lexical Tone: Phonetic Similarity vs. Phonological Categories finds that adaptation transfers to acoustically similar sounds even when they belong to a different abstract category. Phonological Symmetry Does Not Predict Generalization of Perceptual Adaptation to Vowels finds that adaptation does not transfer to a structurally parallel but acoustically distant contrast, and that adaptation is asymmetric, with one shift direction on a continuum adapting and the opposite one not.

Our proposal treats safe exploration as the application setting and perceptual learning as the mechanism. The specific new claim is that a hazard perceiver built this way achieves in-deployment safety comparable to a conservative fixed margin while recovering most of the reward that margin gives up, and with fewer violations than cost-driven fine-tuning. The perceiver represents hazard and non-hazard as distributions in a continuous feature space. It is updated from context-labeled objects. Its shifts spread by feature similarity and follow a safety-asymmetric rule.

Research Program

We would build a controlled benchmark that ports the psycholinguistic exposure-test design into safe navigation. We would use the vision-based navigation tasks of Safety Gymnasium: A Unified Safe Reinforcement Learning Benchmark (Goal and Button tasks, where an agent reaches targets while avoiding hazard regions). In these tasks we would render hazards and harmless decoys along a continuous appearance continuum, for example a hue and texture blend, which plays the role of the /f/-/s/ continuum. The agent is trained under clean appearance. At deployment a drift pushes hazards toward the midpoint of the continuum.

In each episode a minority of objects carry drift-stable context that identifies them. This could be a map annotation or a depth-channel signature, and it is the analogue of the disambiguating word. The remaining objects have only their drifted appearance, and they are the analogue of unexposed test words. Safety is scored on the uncontextualized objects, so the agent must transfer what it learns rather than memorize the labeled ones. We would add a transfer layer that mirrors the vowel and tone studies. One held-out hazard class sits close to the drifted class in the frozen feature space. A second held-out class stands in the same abstract relation to its own decoy but sits far away in feature space. This lets us ask whether safety recalibration in RL agents, like human recalibration, follows feature similarity rather than abstract structure. As a realism check we would repeat the perception side on the satellite water- and crater-segmentation data used in Learning to Navigate Under Imperfect Perception: Conformalised Segmentation for Safe Reinforcement Learning (DeepMoon and YTU-WaterNet), under synthetic illumination and sensor drift.

The perceiver borrows its method from A model of generalization in distributional learning of phonetic categories. That work models human category learning with a hierarchical Bayesian model: categories share structure across sound classes, and class-specific offset parameters let a learned distinction carry over when its physical realization is shifted. We would keep this structure over a frozen visual embedding. Each object class is a Gaussian category, and a deployment context contributes a per-context offset estimated online from the context-labeled objects. Unlabeled objects inherit the offset in proportion to their feature similarity to the labeled ones. The one ingredient we add is the asymmetric update. The offset may move freely in the direction that enlarges the hazard category. Movement that shrinks it is capped at a lower conformal bound computed from the labeled objects seen so far, so the agent never becomes more permissive than its evidence supports.

The perceiver's hazard probabilities define an estimated cost field. This field is fed to a standard constrained policy optimizer, the PID-controlled Lagrangian method from the SafePO library (a method that treats the safety budget as a constraint and adjusts its penalty weight with a feedback controller to avoid oscillation). The policy optimizer is held fixed across all conditions, so every difference traces to the perceiver.

Baselines

The naive reference point is the frozen perceiver trained on clean appearance, used unchanged after drift with the same SafePO policy. It shows how large the safety generalization gap is in our benchmark. It is the perceptual counterpart of the gap in Safety Generalization Under Distribution Shift in Safe Reinforcement Learning: A Diabetes Testbed, which reports Time-in-Range falling by more than 10% when policies trained with constrained policy optimization and Lagrangian PPO meet unseen patients.

The strongest existing method for safe RL under imperfect perception is COPPOL, from Learning to Navigate Under Imperfect Perception: Conformalised Segmentation for Safe Reinforcement Learning. It calibrates the segmenter offline so that missed hazards stay below a chosen rate, then thickens hazard regions in the cost field. That paper reports detection of at least 90% of unsafe regions, roughly 50% fewer hazardous violations, and 2 to 3 times greater clearance, which the authors themselves describe as overly cautious in cluttered scenes. We would run COPPOL with the same backbone and calibration set. We would give it two versions: calibration on clean data, and recalibration on the same context-labeled drifted objects our method sees. The second version removes any data advantage for our method. Beating COPPOL means matching its violation rate on uncontextualized hazards while recovering a significant fraction of the reward its buffer sacrifices.

The cost-driven baseline fine-tunes the perceiver from the environment's cost signal after drift. This is the standard route and the one exposed to the safety paradox. It gets the same number of environment steps.

For the policy side, the file supplies reference points but no numbers for our drifted benchmark. Safety Gymnasium reports that Lagrangian PPO cuts violations by 98% relative to unconstrained PPO at a 45% reward cost. First Order Constrained Optimization in Policy Space reports Humanoid-Circle rewards of 1106.1 for its first-order method against 671.0 for constrained policy optimization. We found no reported result on Lacuna for any method on a perceptual-drift variant of Safety Gymnasium, so all numbers in our benchmark will be new.

Three ablations each isolate one ingredient. The first removes context and adapts by self-training on the agent's own confident predictions. The second removes the asymmetry. The third removes the hierarchical offsets and replaces them with a plain linear probe fine-tuned on the context-labeled objects. All methods share tuning budgets, which we will fix in advance as a number of hyperparameter trials on held-out drift types, and all use the same seeds.

Why not just…?

Why not just train with heavy domain randomization so the drift never matters? This is the most serious threat. If the deployment drift lies inside the randomized range, an invariant encoder may simply win. We would therefore randomize generously and evaluate on two kinds of drift: drift inside the randomized family and drift of a different kind (a texture shift when the agent was randomized over hue). Randomization cannot anticipate drift it never sampled, and the diabetes testbed's out-of-distribution collapse is consistent with that. If randomization still matches our method on out-of-family drift, the method's value shrinks to the transfer findings, and we would report exactly that.

Why not just fine-tune a linear head on the context-labeled objects? This is the plain-probe ablation above, and it may do nearly as well on in-class hazards. Our prediction is that it differs in two places. One is the uncontextualized, near-in-feature-space classes, where the offset model says how far a shift should spread. The other is the worst-case violations measured by the asymmetric bound. If the probe ties on both, the contribution is the benchmark and the scientific result, not the perceiver.

Why not just keep a conformal buffer and accept the lost reward? A buffer is safe but, by its authors' own account, overly cautious, and it cannot move as the drift grows. The comparison with COPPOL after recalibration measures what adaptivity buys in reward at an equal violation rate.

Why not just let the agent learn from costs, since constrained RL already handles that? Learning from costs requires violations. Constrained Markov Decision Processes via Backward Value Functions documents that expectation-constrained methods can rack up thousands of violations during training, and the safety paradox predicts the estimate decays as the policy improves. The cost-driven baseline measures this directly.

Proposed Experiments and Decisive Checks

We would report the following metrics. Safety is measured by cumulative cost and by Expected Maximum Consecutive Cost steps, from Revisiting Safe Exploration in Safe Reinforcement learning. That metric counts the longest unbroken run of unsafe steps and so captures how severe violations are, not just how many occur. Both are measured during adaptation, not only after it. Task performance is measured by reward. Finally, following the phonetics work, we would present each perceiver with probe images along the appearance continuum and read off an identification curve, so that boundary shifts and changes in category structure can be seen directly.

Three results would decide the proposal. The first is whether context-guided recalibration reaches COPPOL-level violation rates on uncontextualized hazards with measurably higher reward, and with fewer adaptation-phase violations and shorter violation runs than cost-driven fine-tuning. The second is whether recalibration transfers to the feature-near held-out class but not to the structurally parallel, feature-far one, and whether the offset model's predicted transfer tracks the measured transfer. The third is whether removing the asymmetry raises worst-case consecutive violations under drift toward "looks safe" while barely changing reward. A null on the first result sinks the method. A null on the second means the human analogy does not carry over to learned visual features, which would itself be a useful negative result for the field.