Safe offline reinforcement learning

UniQ: Unified Conditional Flows for
Offline Safe Reinforcement Learning

The same learned policy driving with budgets 1 and 9, shown side by side. Watch the comparisonMETADRIVE · SAME POLICY, DIFFERENT BUDGETS

01 / Overview

A budget becomes
a behavior.

Different cost budgets can produce different driving decisions from the same learned policy.

UniQ learns a budget-conditioned flow policy from offline data. At evaluation time, the policy takes a cost budget as an additional input. The selected MetaDrive examples below show changes in speed, passing, and spacing around traffic.

Each video compares two runs from the same initial physical state using the same frozen policy. The videos illustrate individual trajectories; the benchmark table reports aggregate performance.

02 / Driving examples

See the budget in action.

Budget 1Budget 9

Speed adapts to the budget

The higher-budget car makes faster progress, while the lower-budget car drives more slowly.

2560 × 1440 · 30 fps · 12 s

03 / MetaDrive benchmark

Reward, with cost in view.

Normalized reward measures performance; normalized cost measures cost relative to the constraint. A mean normalized cost below 1 meets the table's reported mean-cost criterion.

UniQ · Reported averages
0.59normalized reward ↑
0.93normalized cost ↓

Reward–cost comparison

Reported macro-averages over nine tasks. Select a method to inspect its values.

UniQ · reward 0.59 · cost 0.93

Per-task results

UniQ Mean cost ≥ 1 Each pair: reward ↑ / cost ↓

Normalized MetaDrive benchmark results

Ablation study

Budget sampling

Number of budget samples

Number of budget samples per training instance. The sampling ratio is kept fixed. Reward and Cost denote normalized reward and normalized cost, respectively.

Number of budget samples per training instance
Tasknu = 8nu = 16nu = 24
Reward ↑Cost ↓Reward ↑Cost ↓Reward ↑Cost ↓
EasySparse0.490.950.540.910.550.99
EasyMean0.550.970.520.900.500.99
EasyDense0.650.910.600.910.640.92

Budget sampling ratio

A fraction ρ of the budget samples is drawn from [0, 10], and the remaining fraction from u > 10. The total number of budget samples is kept fixed.

Budget sampling ratio: normalized reward and cost
Taskρ = 0.25ρ = 0.6ρ = 0.75
Reward ↑Cost ↓Reward ↑Cost ↓Reward ↑Cost ↓
EasySparse0.510.940.540.910.570.97
EasyMean0.590.960.520.900.560.99
EasyDense0.640.880.600.910.600.84
Normalized reward versus budget sampling ratio for EasySparse, EasyMean, and EasyDense. Values are provided in the table above. Normalized cost versus budget sampling ratio. All nine mean costs remain below the dashed cost threshold of 1. Values are provided in the table above.
EasySparse EasyMean EasyDense
Sensitivity to the budget sampling ratio ρ on three tasks.

Mean normalized costs remain below 1 for all tested ratios on the three Easy tasks. Reward varies by at most 0.07 per task, with ρ = 0.75 achieving the highest reward on EasySparse and ρ = 0.25 on EasyMean and EasyDense.