Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Lyapunov-Guided Self-Alignment: Test-Time Adaptation for Offline Safe Reinforcement Learning

About

Offline reinforcement learning (RL) agents often fail when deployed, as the gap between training datasets and real environments leads to unsafe behavior. To address this, we present SAS (Self-Alignment for Safety), a transformer-based framework that enables test-time adaptation in offline safe RL without retraining. In SAS, the main mechanism is self-alignment: at test time, the pretrained agent generates several imagined trajectories and selects those satisfying the Lyapunov condition. These feasible segments are then recycled as in-context prompts, allowing the agent to realign its behavior toward safety while avoiding parameter updates. In effect, SAS turns Lyapunov-guided imagination into control-invariant prompts, and its transformer architecture admits a hierarchical RL interpretation where prompting functions as Bayesian inference over latent skills. Across Safety Gymnasium and MuJoCo benchmarks, SAS consistently reduces cost and failure while maintaining or improving return.

Seungyub Han, Hyungjin Kim, Jungwoo Lee• 2026

Related benchmarks

TaskDatasetResultRank
PointPush2Safety Gymnasium
Normalized Reward24
21
PointButton1Safety Gymnasium
Normalized Reward51
21
PointButton2Safety Gymnasium
Normalized Reward51
21
PointGoal2Safety Gymnasium
Normalized Reward65
21
PointPush1Safety Gymnasium
Normalized Reward28
21
PointGoal1Safety Gymnasium
Normalized Reward0.66
21
CarPush1Safety Gymnasium
Reward0.31
19
CarButton1Safety Gymnasium
Reward0.27
19
CarButton2Safety Gymnasium
Reward0.3
19
CarGoal1Safety Gymnasium
Reward67
19
Showing 10 of 33 rows

Other info

Follow for update