Action-Constrained Imitation Learning

Chia-Han Yeh, Tse-Sheng Nan, Risto Vuorio, Wei Hung, Hung Yen Wu, Shao-Hua Sun, Ping-Chun Hsieh

Abstract

Standard Imitation Learning (IL) frameworks operate under the assumption that the learning agent and the expert demonstrator possess identical physical capabilities and action spaces. In practice, however, an imitator may be subject to stricter constraints—such as lower torque limits, safety boundaries, or reduced power—than the expert. This discrepancy leads to "occupancy measure distortion," where small projection errors in action space compound into large deviations in state space. This paper presents Action-Constrained Imitation Learning (ACIL) and introduces Dynamic Time Warping Imitation Learning (DTWIL). DTWIL leverages Model Predictive Control (MPC) and Dynamic Time Warping (DTW) to generate feasible surrogate trajectories that faithfully follow the expert's path despite physical limitations. Our approach demonstrates superior performance across multiple benchmarks, effectively decoupling constraint satisfaction from policy learning.

Introduction: The Capability Gap in Imitation Learning

Imitation Learning has seen remarkable success in training agents to perform complex tasks by mimicking expert behavior. Yet, a fundamental challenge arises when the learner's action space is a subset of the expert's. For instance, a low-cost robot arm might attempt to learn from a high-performance industrial counterpart. When the "weak" imitator cannot execute the "strong" expert's actions, simple strategies like action clipping or projection fail. These methods ignore the temporal and spatial consequences of restricted movement, causing the agent to drift away from the expert's state distribution—a phenomenon known as occupancy measure distortion.

Figure 1: (a) Illustration of the expert-imitator performance gap where the imitator's action space is a subset of the expert's. (b-d) Qualitative comparison in a maze environment showing how standard BC fails while the proposed method (Ours) successfully navigates constraints.

The ACIL Framework and Occupancy Measure Distortion

The core issue in Action-Constrained Imitation Learning (ACIL) is that the expert's optimal policy may be physically unreachable for the learner. If the learner tries to match the expert's actions at every timestep, the resulting state trajectory will inevitably diverge. Furthermore, a weaker agent often requires more time (more steps) to achieve the same state transition as a stronger expert. This breaks the standard one-to-one timestep alignment assumed by most IL algorithms, such as Behavior Cloning (BC) or Generative Adversarial Imitation Learning (GAIL).

Methodology: Dynamic Time Warping Imitation Learning (DTWIL)

To overcome these hurdles, the authors propose Dynamic Time Warping Imitation Learning (DTWIL). The key idea is to generate a surrogate dataset of feasible actions that achieve the expert's state-level goals.

1. Surrogate Generation via MPC

DTWIL treats trajectory alignment as a planning problem. It first learns a forward dynamics model of the environment. Then, it uses Model Predictive Control (MPC) to find a sequence of actions that are strictly within the learner's constraints while minimizing the distance to the expert's state trajectory.

2. Temporal Alignment with Dynamic Time Warping (DTW)

Because of the capability gap, the learner might need to "slow down" or take multiple small steps to match one large expert step. Standard $L_2$ distance metrics are sensitive to these temporal shifts. DTWIL incorporates Dynamic Time Warping (DTW) into the MPC objective. DTW allows for non-linear alignment in time, effectively "warping" the learner's timeline to match the expert's progress.

Figure 6: The DTWIL pipeline. Expert demonstrations are used as alignment targets. MPC plans feasible actions using a learned model, optimized via DTW to handle temporal mismatches.

3. Expert Regularized Control (ERC)

To improve the efficiency of the MPC planner in high-dimensional or precision-critical tasks, the authors introduce Expert Regularized Control (ERC). This technique blends the sampled candidate actions with the expert's original actions during the planning rollouts, providing a better search heuristic.

Experimental Evaluation

The effectiveness of DTWIL was tested on several continuous control benchmarks modified with various constraints (box constraints, power limits, and $L_2$ constraints):

  • Maze2d: A navigation task requiring precise maneuvering.
  • HalfCheetah & Hopper: Locomotion tasks where power limits directly affect stability and speed.
  • Robosuite Table-Wiping: A manipulation task involving contact forces.

The experiments were conducted in a sample-efficient regime, utilizing only 1 to 100 expert demonstrations and limiting environment interactions to 50,000 steps.

Results and Key Insights

DTWIL consistently outperformed a wide range of baselines, including GAIL, BCO, and specialized methods like SAIL.

  • Quantitative Performance: In the HalfCheetah environment with box constraints, DTWIL achieved a return of 2669, more than double the performance of the next best baseline (SAIL at 1222). Similar dominance was observed in the Hopper environment.
  • Qualitative Navigation: In Maze2d, visualizations reveal that while standard BC policies crash into walls because they cannot turn sharply enough, DTWIL-trained agents learn to decelerate and adjust their path well in advance, respecting their physical limits while reaching the goal.
  • Decoupling is Key: A major takeaway is that separating the constraint satisfaction (via surrogate generation) from the policy learning (via standard BC on the surrogate data) is highly effective. It allows the use of simple, robust IL algorithms on "cleaned" data.

Conclusion

Action-Constrained Imitation Learning addresses a critical gap in deploying IL to heterogeneous robotic systems. By combining MPC-based planning with the temporal flexibility of Dynamic Time Warping, DTWIL enables weak agents to learn effectively from strong experts. While the computational cost of per-step planning remains a challenge, the significant gains in performance and safety make DTWIL a promising framework for real-world applications where hardware constraints are unavoidable.

Summary updated

BibTeX
@inproceedings{yeh2025action,
  author = {Chia-Han Yeh and Tse-Sheng Nan and Risto Vuorio and Wei Hung and Hung Yen Wu and Shao-Hua Sun and Ping-Chun Hsieh},
  title = {{Action-Constrained Imitation Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=NYi9B34E1e},
}
Figure