Reactive Motion Generation via Phase-varying Neural Potential Functions

Ahmet Tekden, Dimitrios Kanoulas, Aude Billard, Yasemin BekirogluarXiv 2026 · DOI · arXiv

TL;DR

The paper introduces Phase-varying Neural Potential Functions (PNPF), a novel framework for robot Learning-from-Demonstration that effectively handles complex trajectories with intersections (like drawing a figure-8). By conditioning a neural potential function on a closed-loop phase variable estimated directly from the robot's state progress, PNPF achieves highly reactive, stable control that smoothly recovers from external disturbances where traditional methods fail.

What Problem Does This Paper Address?

When teaching robots skills through human demonstrations (Learning-from-Demonstration, or LfD), researchers often model motions as Dynamical Systems (DS). First-order, state-only DS models are highly reactive to perturbations, but they suffer from a fundamental flaw: they cannot handle trajectories that intersect or repeat states (e.g., tying a knot or wiping in a figure-8 pattern), because a single state position cannot map to two different velocities.

To bypass this, common workarounds include:

  1. Second-order DS: Incorporating velocity to disambiguate direction. However, these are highly sensitive to velocity noise near intersections and fail if the approach trajectories are identical but branch into different onward actions.
  2. Open-loop phase/time variables: Using a clock to dictate progress. This handles intersections easily but destroys the robot's reactivity; if you push the robot off course, it cannot gracefully synchronize its "internal clock" back to its physical position.

PNPF resolves this trade-off by creating a system that is both time-invariant (highly reactive) and capable of disambiguating complex, self-intersecting paths.

Methods

The core innovation of PNPF is a scalar potential function $\phi(x | s)$ conditioned on both the robot's state $x$ and a closed-loop phase variable $s$. The robot's policy simply follows the negative gradient of this potential: $\dot{x} = -α \nabla_x \phi(x | s)$.

As illustrated in the architecture diagram below, the potential function is composed of two distinct data-driven energy terms:

Fig. 2: The proposed model architecture: (A) shows how PNPFs ϕ(x | s) are constructed. (B) and (C) shows the neural network architectures utilized for trajectory generation and energy function estimation.
  1. Nominal Energy ($\phi_{\text{nominal}}$): This models the core task behavior. It is calculated based on the remaining arc length of a synthesized "nominal trajectory" derived from demonstrations. Because it decreases monotonically as the robot advances, this energy itself serves as the closed-loop phase variable $s$. If a disturbance pushes the robot, the phase automatically updates based on the new state's proximity to the path, rather than blindly ticking forward in time.
  2. Safety Energy ($\phi_{\text{safety}}$): This acts as a data-driven boundary. Using a learned Signed Distance Function (SDF), it creates a "safe set" around the demonstrated workspace. Inside the zone, the robot can be compliant; if pushed outside, the safety energy generates a strong corrective vector field to pull the robot back.

To ensure the resulting vector fields are perfectly smooth (preventing the robot from getting stuck in local minima or experiencing jerky motions), the authors utilize Neural Fields (MLPs) driven by a HyperNetwork. Crucially, they omit standard positional encodings on the state variable $x$ to leverage the natural low-frequency smoothing bias of MLPs.

Datasets

The authors evaluated their approach on several simulated and real-world benchmarks:

  • Standard Simulated Datasets: LASA (2D handwriting) and LAIR (2D trajectories with intersections), alongside RoboTasks (a 6D position + orientation dataset).
  • New Benchmarks (CHAR & CHAR-Periodic): The authors introduced these 2D datasets specifically to expose the flaws of second-order models. In CHAR, trajectories feature intersections that are preceded by identical position-velocity histories, making disambiguation impossible without a phase variable.
  • Real-Robot Tasks: Evaluated on a UR10 robot across three tasks: point-to-point knotting (6D), pouring beans (joint space), and 3D wiping (periodic figure-8).

Key Insights and Ideas

  • Energy as a Clock: Using the nominal energy function to dynamically index the phase window creates a robust, state-dependent progress tracker. The robot's internal sense of "time" is entirely tied to its spatial progress.
  • Decoupling Safety from Task Dynamics: By separating the nominal task energy from the safety boundary energy, the system allows for modular additions. For instance, obstacle avoidance can be seamlessly injected as an additional repulsive energy term without rewriting the underlying task policy.
  • Architectural Smoothing: Recognizing that coordinate-based neural networks with positional encodings create rough gradient landscapes, the authors cleverly applied positional encoding only to the phase variable $s$ via a HyperNetwork, keeping the state space landscape smooth and safe for gradient-descent control.

Key Results

  • Intersection Superiority: On the challenging new CHAR dataset, PNPF reduced the Dynamic Time Warping (DTW) distance error by around 80% compared to CONDOR, a state-of-the-art second-order baseline.
  • Robustness to Perturbations: In simulation rollouts subjected to spatial disturbances, baseline models frequently skipped or repeated trajectory segments because they relied on velocity to infer progress. PNPF consistently resumed tasks smoothly.
  • Real-World Reactivity: When deployed on a UR10 robot at 50 Hz, PNPF successfully navigated physical obstacles and task frame shifts. Most notably, during the knotting task, if the robot was physically pushed backward—causing the rope to untie—it dynamically realized its loss of progress and looped back to re-tie the rope correctly.
Fig. 1: Reactive motion generation for tasks (6D trajectories) where the robot revisits similar states: (A) point-to-point knotting, with identical motion seg- ments branching into different actions ˙x1, ˙x2 from the same position–velocity state (ambiguous for second-order models), and (B) 8-shaped periodic wiping.

Limitations and Future Work

The primary limitation acknowledged by the authors is a tendency for the potential function to oversmooth sharp corners. This happens due to ambiguities in how the local energy windows are formulated around sharp directional changes.

For future work, the team aims to refine the energy landscape design to better preserve strict directional structures, improve robustness against noisy human demonstration artifacts, and integrate real-time visual and force feedback directly into the potential function.

Summary updated

Abstract

Dynamical systems (DS) methods for Learning-from-Demonstration (LfD) provide stable, continuous policies from few demonstrations. First-order dynamical systems (DS) are effective for many point-to-point and periodic tasks, as long as a unique velocity is defined for each state. For tasks with intersections (e.g., drawing an "8"), extensions such as second-order dynamics or phase variables are often used. However, by incorporating velocity, second-order models become sensitive to disturbances near intersections, as velocity is used to disambiguate motion direction. Moreover, this disambiguation may fail when nearly identical position-velocity pairs correspond to different onward motions. In contrast, phase-based methods rely on open-loop time or phase variables, which limit their ability to recover after perturbations. We introduce Phase-varying Neural Potential Functions (PNPF), an LfD framework that conditions a potential function on a phase variable which is estimated directly from state progression, rather than on open-loop temporal inputs. This phase variable allows the system to handle state revisits, while the learned potential function generates local vector fields for reactive and stable control. PNPF generalizes effectively across point-to-point, periodic, and full 6D motion tasks, outperforms existing baselines on trajectories with intersections, and demonstrates robust performance in real-time robotic manipulation under external disturbances.
BibTeX
@misc{tekden2026reactive,
  author = {Ahmet Tekden and Dimitrios Kanoulas and Aude Billard and Yasemin Bekiroglu},
  title = {{Reactive Motion Generation via Phase-varying Neural Potential Functions}},
  year = {2026},
  eprint = {2604.26450},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.26450},
}

Loading related content...

Figure