Domain-Invariant Per-Frame Feature Extraction for Cross-Domain Imitation Learning with Visual Observations

Seungyul Han, Minung Kim, Kawon Lee, Sungho Choi, Jeongmo Kim · Submission to ICLR 2026 · Withdrawn

TL;DR

Cross-domain visual imitation learning lets robots mimic expert behaviors across different bodies, dynamics, and appearances using only raw images. DIFF-IL tackles this by first stripping domain-specific artifacts at the individual frame level before assembling features into sequences, paired with a frame-wise time labeling scheme that provides monotonic reward shaping. The result is superior cross-domain policy transfer that trains nearly three times faster than recent dual-encoder methods while remaining robust to sensor resolution shifts and limited data.

What Problem Does This Paper Address?

Imitation from Observation (IfO) aims to teach an agent to mimic expert demonstrations without requiring access to ground-truth actions or states—only visual recordings. However, in cross-domain settings, the source expert and target learner often differ dramatically in morphology (e.g., bipedal walker vs. quadruped cheetah), physics, viewpoint, or visual fidelity.

Existing methods generally feed multi-frame video snippets directly into domain-adaptation networks to capture motion dynamics. But aligning raw multi-frame sequences across distinct domains creates a high-dimensional representation problem: domain-specific details (like background textures, camera angles, and body shapes) easily leak into temporal embeddings, leading to distorted reward signals. Furthermore, when expert and random behaviors have minimal overlap in the source domain, standard adversarial sequence discriminators assign uniformly extreme rewards to minor policy deviations, severely derailing exploration.

Methods

DIFF-IL (Domain-Invariant Per-Frame Feature Extraction for Imitation Learning) resolves this through a staged representation pipeline and temporal reward shaping:

  1. Per-Frame Domain Invariance: A shared visual encoder $p$ maps single frames to latent representations $z_t^d$, which domain-specific decoders ($q^S, q^T$) reconstruct. A frame-level Wasserstein GAN (WGAN) discriminator $D_f$ forces these per-frame latents to be indistinguishable between source and target domains, while a cross-domain feature consistency loss ensures task-relevant details (joint angles, object positions) are retained.
  2. Sequential Matching: Once per-frame features are cleaned of spatial domain artifacts, length-$L$ sequences ($z_{\text{seq},t}^d$) are evaluated. A sequence-level discriminator $D_s$ eliminates temporal domain discrepancies (such as stride rate or gait speed), and an expertise discriminator $F_{\text{label},s}$ labels whether a sequence matches source expert behavior.
  3. Frame-Wise Time Labeling: To guide the learner through sparse or non-overlapping trajectories, expert source frames receive a normalized time label $y_t = \frac{1}{2}(t / H + 1)$ (where $H$ is episode length), while random exploration frames receive $0$. A frame-level classifier $F_{\text{label},f}$ learns these values, naturally rewarding the learner more as it reaches later task stages.
  4. Reward Design & Policy Optimization: The learner policy is optimized using Soft Actor-Critic (SAC) using the combined reward: $$\hat{R}_t = -\log\left(1 - F_{\text{label},s}(z_{\text{seq},t+1}^T) \cdot F_{\text{label},f}(z_{t+1}^T) + \epsilon\right)$$
Single Frames  ──> Shared Encoder ──> Frame WGAN + Consistency Loss (Domain-Free Latents)
                        │
                        ▼
Feature Sequences ──> Sequence WGAN ──> Sequence Label Net (Is it Expert?)
                        │                                  │
                        ▼                                  ▼
                 Frame Time Label Net  ───────────> Combined Shaped Reward ──> SAC Policy Update

Datasets

The authors evaluated their framework across 22 distinct cross-domain transfer tasks built on MuJoCo and the DeepMind Control Suite (DMC):

  • Pendulum Benchmark (8 tasks): Includes Inverted Pendulum to Inverted Double Pendulum (IP-to-IDP / IDP-to-IP), 2-joint vs. 3-joint arms (RE2-to-RE3 / RE3-to-RE2), Cartpole Swingup (CS), Pendulum, and Acrobot.
  • MuJoCo Locomotion Benchmark (6 tasks): High-dimensional morphological transfers across Cheetah, Walker, and Hopper.
  • Robot Manipulation Benchmark (8 tasks): Transfers between a two-finger robotic gripper (R) and a dexterous multi-fingered humanoid hand (H) performing Pusher and Reach tasks. To evaluate sim-to-real visual discrepancies, the authors introduced Resolution-Shifted variants (-Res), downsampling source images to $32 \times 32$ before bicubic upsampling to match high-resolution target inputs.

Key Insights and Ideas

  • Decoupling Space from Time: Attempting to simultaneously remove appearance shift and learn dynamics in sequence space is prone to failure. Purifying single-frame representations before sequence modeling drastically simplifies alignment (as shown in latent t-SNE visualizations).
  • Time as a Continuous Curriculum: Standard adversarial sequence matching behaves like a binary switch (expert vs. non-expert). By supervising frame representations with time-of-episode labels, the reward smoothly scales as the agent reaches advanced goal states, avoiding local optima early in training.
  • Balanced Adversarial Weighting: The WGAN control factor $\alpha$, which balances per-frame vs. sequence-level discriminator losses, demonstrated optimal transfer strictly at $\alpha = 0.5$. Overemphasizing either frame-only or sequence-only adaptation degrades overall performance.

Key Results

DIFF-IL consistently outperformed prior state-of-the-art visual cross-domain methods (TPIL, DeGAIL, D3IL) and metric-based approaches (GWIL, TCN):

  • Locomotion: In Walker-to-Cheetah, DIFF-IL reached an average return of $4.54 \pm 0.86$, outperforming D3IL ($2.78 \pm 0.61$) and TPIL ($1.38 \pm 0.24$), while all other baselines collapsed near zero.
  • Robot Manipulation: In Reach:R-to-H, DIFF-IL attained $-139.18 \pm 2.36$ compared to $-221.27$ for D3IL and $-323.92$ for DeGAIL. Under resolution degradation (Reach-Res:R-to-H), DIFF-IL maintained $-144.8 \pm 10.15$, demonstrating robustness to visual fidelity gaps.
  • Data Efficiency: Training with only 10% of expert demonstration data (5–25 episodes) yielded nearly identical performance (e.g., $4.40$ vs. $4.54$ on Walker-to-Cheetah).
  • Compute Efficiency: Despite learning both frame and sequence networks, DIFF-IL completed an epoch in 61 seconds (requiring 9 GB GPU RAM on Pendulum), almost $3\times$ faster than D3IL (185 seconds).

Limitations and Future Work

  • Alternating Update Sensitivity: If the feature representation model is updated too aggressively before the target policy collects diverse exploratory trajectories, random target poses can accidentally align with expert features, causing training failure.
  • Morphological Ceiling: When the source agent possesses lower physical capability than the target (e.g., Hopper transferring to Cheetah), the target agent plateaus at the source agent's speed limit rather than exploiting its own full physical potential.
  • Future Directions: Incorporating generative models to synthesize diverse target-domain exploratory states and extending the method to real-world visual robotic setups without ground-truth camera calibration.

Summary updated

BibTeX
@misc{han2025domain,
  author = {Seungyul Han and Minung Kim and Kawon Lee and Sungho Choi and Jeongmo Kim},
  title = {{Domain-Invariant Per-Frame Feature Extraction for Cross-Domain Imitation Learning with Visual Observations}},
  year = {2025},
  eprint = {2502.02867},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.02867},
}
Figure