Papers
Topics
Authors
Recent
Search
2000 character limit reached

Variable Horizon Diffuser (VHD)

Updated 11 July 2026
  • The paper introduces VHD, a diffusion planning method that replaces fixed horizons with a learned, instance-specific trajectory length for improved goal achievement.
  • It integrates a Trajectory Length Predictor using randomized Fourier features and an MLP with a variable-horizon diffusion planner that adjusts the initial noise tensor based on the predicted length.
  • Empirical results show that VHD enhances success rates and reduces executed steps across benchmarks, highlighting its robustness and improved path efficiency over fixed-horizon planners.

Variable Horizon Diffuser (VHD), introduced as VH-Diffuser, is a diffusion-based framework for time-aware goal-conditioned trajectory planning that replaces the fixed planning horizon used by most prior diffusion planners with an instance-specific learned horizon. The framework addresses the observation that the optimal trajectory length between a start state and a goal state varies substantially with geometric and dynamical difficulty, so a single pre-specified horizon can induce length mismatch, producing trajectories that are too short or too long. VHD therefore combines a Trajectory Length Predictor with a Variable-Horizon Diffusion Planner: given a start-goal pair, it first estimates a shortest-step length and then generates a trajectory of the desired length by controlling the shape of the initial diffusion noise, while keeping the planner backbone unchanged and training entirely from offline data (Liu et al., 15 Sep 2025).

1. Problem formulation and conceptual basis

VHD is motivated by a structural limitation of diffusion-based planners for long-horizon control: although such planners have shown robustness and strong performance, they are commonly trained and evaluated with a fixed, pre-specified horizon. In settings where trajectory length varies widely across instances, this rigidity can degrade planning quality through under-shooting or over-shooting the goal, and can also make performance brittle when the task difficulty changes from one start-goal pair to another (Liu et al., 15 Sep 2025).

The framework’s central idea is to treat the trajectory horizon as a learned variable rather than a fixed hyperparameter. In the VHD formulation, the target quantity is the shortest-step distance between start and goal, denoted D(s,g)D^\star(s,g), defined as

D(s,g)=inf{kN0τ of length k+1:s0=s,skGϵ(g)},D^{\star}(s,g) = \inf\big\{k \in \mathbb{N}_{\geq 0} \mid \exists \tau \text{ of length } k+1: s_0=s, s_k \in \mathcal{G}_\epsilon(g)\big\},

where Gϵ(g)\mathcal{G}_\epsilon(g) is a goal region. This quantity serves as the semantic notion of horizon: it is not merely a rollout length selected for computational convenience, but an estimate of the minimal number of steps needed to reach the goal under the task geometry.

A useful way to situate VHD is to regard it as a goal-conditioned horizon adaptation mechanism for diffusion planning. The planner does not alter the denoising backbone, inject explicit length tokens, or add special embeddings for horizon control. Instead, it converts a start-goal pair into a predicted horizon and uses that prediction to determine the length of the trajectory to be denoised.

2. Trajectory Length Predictor

The Trajectory Length Predictor estimates the minimal number of steps between a start state ss and a goal state gg using only observations, not actions or rewards (Liu et al., 15 Sep 2025). Its architecture begins by encoding both ss and gg with randomized Fourier features (RFF):

Φ(x)=[sin(2πxB),cos(2πxB),x],\Phi(x) = \bigl[ \sin(2\pi xB),\, \cos(2\pi xB),\, x \bigr],

where BB is a fixed random Gaussian matrix. The joint feature is then

z(s,g)=[Φ(s),Φ(g),Φ(s)Φ(g)].z(s,g) = [\Phi(s),\,\Phi(g),\,\Phi(s)-\Phi(g)].

This feature vector is processed by a multilayer perceptron with normalization and ReLU layers, and the scalar output is passed through a softplus:

D(s,g)=inf{kN0τ of length k+1:s0=s,skGϵ(g)},D^{\star}(s,g) = \inf\big\{k \in \mathbb{N}_{\geq 0} \mid \exists \tau \text{ of length } k+1: s_0=s, s_k \in \mathcal{G}_\epsilon(g)\big\},0

The model predicts a normalized step distance

D(s,g)=inf{kN0τ of length k+1:s0=s,skGϵ(g)},D^{\star}(s,g) = \inf\big\{k \in \mathbb{N}_{\geq 0} \mid \exists \tau \text{ of length } k+1: s_0=s, s_k \in \mathcal{G}_\epsilon(g)\big\},1

placing the target in D(s,g)=inf{kN0τ of length k+1:s0=s,skGϵ(g)},D^{\star}(s,g) = \inf\big\{k \in \mathbb{N}_{\geq 0} \mid \exists \tau \text{ of length } k+1: s_0=s, s_k \in \mathcal{G}_\epsilon(g)\big\},2.

A central technical difficulty is that offline datasets rarely cover all possible D(s,g)=inf{kN0τ of length k+1:s0=s,skGϵ(g)},D^{\star}(s,g) = \inf\big\{k \in \mathbb{N}_{\geq 0} \mid \exists \tau \text{ of length } k+1: s_0=s, s_k \in \mathcal{G}_\epsilon(g)\big\},3 pairs, particularly cross-trajectory pairs. VHD addresses this with a hybrid supervision scheme comprising three components. First, it uses exact intra-trajectory anchors, where two states appearing in the same trajectory provide an observed step distance. Second, it imposes dynamic programming upper bounds through

D(s,g)=inf{kN0τ of length k+1:s0=s,skGϵ(g)},D^{\star}(s,g) = \inf\big\{k \in \mathbb{N}_{\geq 0} \mid \exists \tau \text{ of length } k+1: s_0=s, s_k \in \mathcal{G}_\epsilon(g)\big\},4

which yields a normalized target of D(s,g)=inf{kN0τ of length k+1:s0=s,skGϵ(g)},D^{\star}(s,g) = \inf\big\{k \in \mathbb{N}_{\geq 0} \mid \exists \tau \text{ of length } k+1: s_0=s, s_k \in \mathcal{G}_\epsilon(g)\big\},5. Third, it enforces relay-based triangle inequalities across trajectories:

D(s,g)=inf{kN0τ of length k+1:s0=s,skGϵ(g)},D^{\star}(s,g) = \inf\big\{k \in \mathbb{N}_{\geq 0} \mid \exists \tau \text{ of length } k+1: s_0=s, s_k \in \mathcal{G}_\epsilon(g)\big\},6

where the relay state D(s,g)=inf{kN0τ of length k+1:s0=s,skGϵ(g)},D^{\star}(s,g) = \inf\big\{k \in \mathbb{N}_{\geq 0} \mid \exists \tau \text{ of length } k+1: s_0=s, s_k \in \mathcal{G}_\epsilon(g)\big\},7 may be sampled from on-trajectory successors such as D(s,g)=inf{kN0τ of length k+1:s0=s,skGϵ(g)},D^{\star}(s,g) = \inf\big\{k \in \mathbb{N}_{\geq 0} \mid \exists \tau \text{ of length } k+1: s_0=s, s_k \in \mathcal{G}_\epsilon(g)\big\},8 or from off-trajectory states in a minibatch or global pool.

The full training objective is a weighted sum of a pointwise Huber regression term, one-sided hinge penalties for dynamic-programming and triangle-inequality consistency, and boundary and clipping regularizers:

D(s,g)=inf{kN0τ of length k+1:s0=s,skGϵ(g)},D^{\star}(s,g) = \inf\big\{k \in \mathbb{N}_{\geq 0} \mid \exists \tau \text{ of length } k+1: s_0=s, s_k \in \mathcal{G}_\epsilon(g)\big\},9

The paper also specifies that an EMA (Exponential Moving Average) of the predictor parameters is used to stabilize targets, and that training follows a curriculum: it begins with anchor-only supervision and gradually increases the dynamic-programming and triangle terms for harder, longer-range pairs (Liu et al., 15 Sep 2025).

3. Variable-horizon control within diffusion planning

The planner side of VHD implements variable horizon control without architectural changes to the diffusion backbone. The key mechanism is that the predicted length Gϵ(g)\mathcal{G}_\epsilon(g)0 determines the shape of the initial Gaussian noise tensor, Gϵ(g)\mathcal{G}_\epsilon(g)1, and therefore the length of the denoised trajectory (Liu et al., 15 Sep 2025).

At inference time, the horizon is obtained from the predictor as

Gϵ(g)\mathcal{G}_\epsilon(g)2

where Gϵ(g)\mathcal{G}_\epsilon(g)3 is a scaling factor providing a safety margin and clipping ensures a valid length range. The diffusion planner then denoises a trajectory of that length while clamping the first and last state to the start and goal at each denoising step.

This design has several important properties that distinguish VHD from approaches that encode horizon through explicit architectural conditioning. The planner backbone—examples given include Diffuser and Decision Diffuser—is unchanged. There are no extra input channels, conditioning tokens, or special embeddings for length. Horizon control is delegated entirely to two procedural choices: training on variable-length crops and choosing the initial noise shape at test time.

A recurrent misconception in diffusion planning is that variable-length generation necessarily requires a new decoder, a hierarchical controller, or bespoke conditioning machinery. VHD provides a counterexample: the model retains the standard planner structure and instead makes the trajectory tensor itself the locus of horizon control. This suggests that, in diffusion-based planning, output-length adaptation can be handled at the level of training data exposure and sampling geometry rather than network architecture.

4. Training and inference procedures

VHD is trained by sampling random-length sub-trajectories from offline demonstrations. For each training trajectory, a random starting index is selected, together with a random length

Gϵ(g)\mathcal{G}_\epsilon(g)4

and the corresponding crop is used as the training target (Liu et al., 15 Sep 2025). The diffusion objective remains the standard Gϵ(g)\mathcal{G}_\epsilon(g)5-prediction loss, namely mean squared error between predicted and injected noise.

This cropping procedure serves three functions stated in the paper. It exposes the planner to a range of horizon lengths during training, prevents overfitting to a single fixed horizon, and supports generalization to unseen trajectory lengths at test time. During inference, the process is correspondingly simple: predict Gϵ(g)\mathcal{G}_\epsilon(g)6 from the start-goal pair, sample noise of shape Gϵ(g)\mathcal{G}_\epsilon(g)7, run the standard denoising process with boundary conditioning, and return a trajectory of length Gϵ(g)\mathcal{G}_\epsilon(g)8.

The training and sampling workflow is therefore modular. The predictor learns an approximate geodesic or shortest-step length from offline state observations; the diffusion planner learns to denoise sub-trajectories of varying length; and the two components are composed at test time through the initial noise tensor. The paper characterizes this as keeping training simple and offline-only (Liu et al., 15 Sep 2025).

An important empirical and methodological point is that variable-length inference alone is not sufficient. The reported ablation “FH+LP,” described as a fixed-horizon-trained model given variable lengths at test time, could not match VHD’s performance. This establishes that the random-crop training distribution is not an implementation detail but a core ingredient of the method.

5. Empirical evaluation

VHD is evaluated on five goal-conditioned benchmarks: D4RL Maze2d-{umaze, medium, large}, AntMaze (OGBench variant; 8-DoF ant robot), and Cube robot arm control (6-DoF UR5e end-effector positioning) (Liu et al., 15 Sep 2025). Two evaluation protocols are used: Single-Shot (SS), where the plan is generated once and executed directly, and Replan-on-Deviation (RP), where replanning is triggered when tracking error exceeds a threshold. The reported metrics are Success Rate (SR) and Average Executed Steps (AES).

Across these benchmarks, the main comparison is against the best fixed-horizon baseline, denoted FH-H_best. In Single-Shot, VHD obtains 97.1% success with 112.7 AES on Maze2d-umaze, 93.1% with 230.0 AES on Maze2d-medium, 91.0% with 245.8 AES on Maze2d-large, 82.2% with 152.8 AES on AntMaze, and 86.9% with 50.9 AES on Cube. The corresponding FH-H_best figures are 96.0% (140.6), 94.5% (243.8), 93.8% (319.3), 79.9% (307.3), and 87.0% (111.1) (Liu et al., 15 Sep 2025).

In Replan-on-Deviation, VHD reports 100% (140.0) on Maze2d-umaze, 98.7% (320.0) on Maze2d-medium, 99.6% (285.7) on Maze2d-large, 95.7% (518.3) on AntMaze, and 98.2% (77.5) on Cube. FH-H_best reports 99.4% (163.2), 97.2% (372.1), 99.6% (427.0), 91.6% (994.6), and 97.9% (87.5), respectively (Liu et al., 15 Sep 2025).

The paper’s own summary is that VHD consistently achieves either the best or second-best success rates and executed steps, and that its gains are particularly clear in Replan-on-Deviation, where horizon mismatch is likely to recur as the residual distance changes over time. The AntMaze RP result is especially illustrative: 95.7% versus 91.6% for the best fixed-horizon model, with nearly half the executed steps. The qualitative interpretation offered in the paper is that VHD adapts its planned segment length to the residual distance, whereas fixed-horizon planners can detour, dither, or fail when the horizon is ill-suited to the current phase of the task.

These results support a specific conclusion: VHD’s benefit is not only higher terminal success, but also improved path efficiency, as reflected by lower AES in many settings. This suggests that adaptive horizon selection changes not just whether the goal is reached, but how directly the agent reaches it.

6. Relation to other horizon-flexible diffusion planners

Within diffusion planning, VHD occupies a distinct position relative to other methods that address long-horizon or variable-resolution planning. HM-Diffuser addresses extendable long-horizon planning by combining Progressive Trajectory Extension (PTE), hierarchical planning across multiple temporal scales, Adaptive Plan Pondering (APP), and a Recursive HM-Diffuser that collapses hierarchical levels into a single level-conditioned model (Chen et al., 25 Mar 2025). By contrast, VHD does not introduce a hierarchical temporal abstraction or synthetic long-trajectory stitching pipeline; its intervention is narrower and more local, namely instance-specific horizon selection for a standard diffusion backbone.

A second nearby line is Mixed Density Diffuser (MDD), which introduces non-uniform temporal resolution through a tunable vector of per-step jumps Gϵ(g)\mathcal{G}_\epsilon(g)9 and is implemented as a single, non-hierarchical (flat) diffusion policy (Stambaugh et al., 27 Oct 2025). The MDD summary explicitly notes that it can be viewed as a special case of a Variable Horizon Diffuser in the sense that it provides per-step user control over which parts of a trajectory are modeled densely or sparsely. VHD, however, is formulated around a different control variable: it predicts the overall trajectory length ss0 from the start-goal pair rather than fixing a mixed-density schedule as a hyperparameter.

These distinctions matter because “variable horizon” can refer to at least three different ideas in the diffusion-planning literature. One is extendability beyond training lengths, emphasized by HM-Diffuser. Another is non-uniform temporal density within a trajectory, emphasized by MDD. VHD is centered on predicting an appropriate total horizon for each planning instance. A plausible implication is that these mechanisms are complementary rather than mutually exclusive: a planner could, in principle, combine instance-specific total length selection with hierarchical decomposition or mixed-density allocation. The provided materials, however, do not report such a hybrid system.

7. Significance, limitations, and interpretation

VHD’s main significance lies in showing that horizon adaptivity can be introduced into diffusion planning with minimal code modifications and without altering the planner architecture (Liu et al., 15 Sep 2025). The framework reduces the dependence on a fixed horizon hyperparameter, improves robustness to horizon mismatch and unseen lengths, and preserves compatibility with existing diffusion planners through boundary conditioning and initial noise shaping.

Its design also sharpens the separation between two learning problems that are often conflated: estimating how long a plan should be, and generating what sequence should realize that plan. VHD assigns the first problem to the Length Predictor and the second to the diffusion model. This decomposition is technically consequential because it allows the diffusion model to remain standard while still producing variable-length outputs.

At the same time, the paper does not claim that the predictor computes an exact geodesic; it describes the target as a per-instance shortest-step distance or an approximate geodesic length learned from offline data. The use of dynamic-programming and triangle-inequality upper bounds, together with EMA-stabilized targets and a curriculum, indicates that horizon estimation is itself a nontrivial approximation problem under limited coverage. This suggests that VHD’s performance depends not only on the diffusion planner but also on the quality of this learned distance surrogate.

More broadly, VHD contributes to a reorientation of diffusion-based planning away from treating horizon as a static experimental setting and toward treating it as a state- and goal-dependent planning variable. In that sense, it reframes horizon selection from a hyperparameter-tuning issue into part of the learned planning problem itself.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Variable Horizon Diffuser (VHD).