Learning When to Commit: No-Regret Selection of Action-Chunk Length

Many robot and driving controllers do not change their command at every control tick. They pick an action and hold it, or follow a short pre-planned segment, for $h$ steps before deciding again. This is called action chunking, and it keeps actuators from jittering. The cost is that the commitment length $h$ is fixed in advance. A long commitment gives smooth motion but cannot react to a sudden obstacle, and a short one reacts quickly but shakes. We propose to make $h$ an online decision. A small set of controllers, each trained with a different commitment length, is treated as a panel of experts. At each decision point a no-regret learner chooses which expert acts next. The learner pays for every switch, because switching is exactly what creates jitter at chunk seams.

The opportunity is that the best current chunking method already trains a critic (a learned estimate of future reward) that scores whole committed chunks. That critic can score the chunk every expert would have executed from the current state, not just the one that ran. With that extra signal, horizon selection stops being a bandit problem and becomes a full-information experts problem with switching costs. Bandit learners that pay for switches are classically stuck near $T^{2/3}$ regret over $T$ decisions. Full-information learners that update lazily reach roughly $\sqrt{T}$ regret with only about $\sqrt{T}$ switches. The proposal is to build this selector, prove a regret-plus-jitter guarantee whose error term is the critic's estimation error, and test it on the driving and energy benchmarks where fixed-horizon chunking currently sets the bar.

Where this sits

The chunking method we build on is Dual-Window Smoothing. Implicit Action Chunking for Smooth Continuous Control commits to a single continuous action over an execution window of length $h$. It aligns the critic's learning target over the same window and penalizes jumps between consecutive windows. Its authors flag the fixed $h=3$ as a weakness under sudden disturbances. That paper supplies our experts and our critic. It motivates the work, because it identifies the gap. It does not attempt online horizon adaptation and offers no regret guarantee.

On the theory side, the closest work is Online mixed discrete and continuous optimization. It pairs an Exp3.S bandit over discrete choices with an online convex subroutine for continuous parameters and proves sublinear dynamic regret. It is stateless: choices never change a physical state. It also has no notion of switching costs or smoothness, and it uses only bandit feedback. We differ on all three counts. Our discrete choice changes the trajectory, switching is penalized as jitter, and the critic supplies counterfactual feedback.

Online Control of Unknown Time-Varying Dynamical Systems uses a multi-expert predictor to track drifting dynamics. It also proves that drift imposes an unavoidable regret tax. That result constrains us. We can only promise good performance against comparators that switch a bounded number of times, never against an arbitrarily changing oracle. That paper's exploration noise is injected at every step, which is the jitter we want to avoid.

The hybrid-action line, typified by HyAR, could learn $h$ as a discrete action head trained end to end. It provides no online guarantee, and it serves here as a competitor rather than a method we reuse.

Core Claim

Let $N$ experts be fixed chunked policies with commitment lengths $h_1<\dots<h_N$. At decision point $t$ the learner picks expert $i_t$. Let $\ell_t(i)$ be the negated critic value of expert $i$'s chunk from the realized state $s_t$, which is computable for every $i$. We measure

$$ \mathrm{Reg}_S(T)=\sum_{t=1}^{T}\ell_t(i_t)+\lambda\sum_{t=2}^{T}\mathbf{1}[i_t\neq i_{t-1}]-\min_{\sigma\in\Sigma_S}\sum_{t=1}^{T}\ell_t(\sigma_t). $$

Here $\lambda$ is the jitter price of a switch, and $\Sigma_S$ is the set of expert schedules with at most $S$ changes.

We claim that a lazy, fixed-share variant of exponential weights achieves the following. The bound follows from standard switching-cost expert analysis plus an additive bias term for using estimated rather than true losses:

$$ \mathbb{E}[\mathrm{Reg}_S(T)]=O\!\left(\sqrt{(1+\lambda)(S+1)\,T\log(NT)}\right)+O(T\,\bar\varepsilon). $$

The quantity $\bar\varepsilon$ is the average critic error on the chunks being compared. The guarantee also caps the expected number of switches at the same $\sqrt{T}$ order.

One honest limitation must be stated plainly. The comparator is evaluated along the learner's realized states, so this is a local regret notion, not regret against the hindsight-optimal trajectory. Closing that gap would require a bounded-memory assumption of the kind used in nonstochastic control. We will state that assumption and test whether it plausibly holds.

Research Program

The theoretical part has three pieces. The first is proving the bound above, with the critic-bias term made explicit. The second is a matching bandit-feedback version for settings where no trustworthy critic exists; that version should degrade to the $T^{2/3}$ regime. The third is a sufficient condition under which local regret implies regret against the true best schedule. The candidate condition is that the closed-loop effect of an expert switch decays geometrically within a few chunks.

The empirical part has two pieces. The first is training DWS experts at $h\in\{1,2,3,5,8\}$ on each benchmark. The second is running the selector online under scripted non-stationarity. In CARLA we use sudden friction drops, cut-in vehicles during lane-change overtaking, and late-appearing obstacles in emergency braking. In LearningEMS we use abrupt load profile shifts.

To make the regret curves measurable, we compute the hindsight-best $S$-switch schedule by dynamic programming over logged critic values. On short episodes we also compute it by replaying from simulator snapshots, which yields the true counterfactual loss. A fixed-$h$ policy is the special case $S=0$.

Baselines

The naive reference point is step-wise control with $h=1$. It is maximally reactive and maximally jittery, and it shows what chunking buys at all.

The strongest existing method is DWS at its published $h=3$, from Implicit Action Chunking for Smooth Continuous Control. That paper reports a 100% success rate on CARLA lane-change overtaking and emergency braking, an 88.7% steering-jitter reduction relative to LipsNet++ and SmODE, and in LearningEMS a 56.7% cumulative-reward improvement and a 10.6% cost reduction relative to explicit chunking. We will reproduce DWS with its released settings and train every expert with the identical recipe and seeds. The selector therefore adds no training compute, only negligible online computation.

We also report DWS with the best single $h$ chosen per scenario in hindsight. This is an oracle tuning that our method must approach without knowing the scenario.

Beating DWS means three things together. On unperturbed scenarios we must retain its 100% success and stay within a pre-registered 10% of its jitter. Under injected drift we must achieve statistically higher success or reward over at least 20 seeds. Finally, measured regret against the hindsight $S$-switch schedule must grow sublinearly in log-log plots.

Two ablations isolate the key ingredients. A bandit selector in the style of Exp3.S, as in Online mixed discrete and continuous optimization, sees only the executed expert's return. It tests whether critic counterfactuals matter. A critic-greedy selector picks the highest-value expert every decision with no switch penalty. It tests whether laziness, not just counterfactual information, controls jitter.

Why not just…?

Why not just tune $h$ per environment and keep it fixed? Under stationary conditions this may win, and we will report it. The drift lower bound in Online Control of Unknown Time-Varying Dynamical Systems implies that any fixed policy can lose linearly when conditions shift. The DWS authors attribute degraded emergency performance precisely to a fixed horizon. The hindsight-best-fixed-$h$ baseline settles this directly. If it matches our selector under drift, the idea fails.

Why not just replan whenever tracking error or a hazard signal crosses a threshold? This event-triggered rule is the most serious threat, because it is simple and directly targets reaction speed. Its weakness is that the threshold is itself a fixed hyperparameter, and it gives no control over how often it fires. We will tune it with the same budget as our $\lambda$. If it matches our selector on both success and jitter, the contribution reduces to a guarantee rather than a performance gain, and we will say so.

Why not just let a hybrid-action policy output $h$ alongside the action, trained end to end? HyAR shows such hybrid heads can be trained, but it is offline-trained with no adaptation guarantee. LIBERO found that fixed pretraining can hurt later adaptation. We will train a learned-$h$ DWS variant on the same budget and evaluate it on held-out drift schedules not seen in training, where the gap, if any, should appear.

Decisive Checks

Three outcomes would decide the project. First, regret against the hindsight $S$-switch schedule should scale roughly as $\sqrt{T}$ with critic feedback and as $T^{2/3}$ with bandit feedback, which would confirm that the counterfactual critic is doing the work. Second, the switch count should stay sublinear while drift-scenario success exceeds fixed-$h$ DWS. Third, deliberately degrading the critic should degrade regret in line with the $T\bar\varepsilon$ term, which would show that the bound is not vacuous. If critic errors are large enough that the bandit variant matches the full-information one, we will report that the counterfactual route does not pay off in practice.