Papers
Topics
Authors
Recent
Search
2000 character limit reached

MAML for Imitation: One-Shot Skill Adaptation

Updated 21 January 2026
  • MAML for imitation is a meta-learning paradigm that directly optimizes for rapid gradient-based adaptation from limited demonstrations.
  • It employs deep visuomotor policy networks with convolutional layers, spatial soft-argmax, and bias transformation to enhance inner-loop updates.
  • Empirical evaluations show that MAML-based methods outperform contextual and recurrent approaches in both simulated and real-world robotic manipulation tasks.

Model-agnostic meta-learning (MAML) for imitation is a meta-learning paradigm enabling agents to efficiently acquire new visuomotor skills from limited demonstrations, typically just a single trajectory, by leveraging gradient-based adaptation. In this context, MAML’s bi-level optimization is instantiated in the one-shot imitation learning setting, training deep neural network-based policies that can quickly adapt to previously unseen tasks—from raw sensory input—by a single gradient update on new demonstration data. Differentiated from contextual or recurrent one-shot imitation approaches, MAML for imitation directly meta-optimizes for adaptation capability rather than representational conditioning, resulting in demonstrably superior performance across a variety of simulated and real-world robotic domains.

1. Formalization of Meta-Imitation with MAML

MAML for imitation assumes a distribution over tasks Tp(T)T \sim p(T), each represented by expert demonstrations τ={ot,at}t=1T\tau = \{o_t, a_t\}_{t=1}^T, where oto_t are observations (often pixel images and robot state) and ata_t the corresponding expert actions. The inner-loop adaptation evaluates a behavioral cloning objective (mean squared error for continuous actions):

LTi(fϕ)=t=1Tfϕ(ot)at22\mathcal{L}_{T_i}(f_\phi) = \sum_{t=1}^T \|f_\phi(o_t) - a_t\|_2^2

Given initial meta-parameters θ\theta, a one-step adaptation computes a task-specific parameterization:

θi=θαθLTi(fθ)\theta_i' = \theta - \alpha \nabla_\theta \mathcal{L}_{T_i}(f_\theta)

The meta-objective is constructed to optimize θ\theta such that, after task-specific fine-tuning using a single demonstration, the adapted policy fθif_{\theta_i'} performs well on fresh held-out demonstrations for the new task:

minθTip(T)LTi(fθi)=Tip(T)LTi(fθαθLTi(fθ))\min_\theta \sum_{T_i\sim p(T)} \mathcal{L}_{T_i}(f_{\theta_i'}) = \sum_{T_i\sim p(T)} \mathcal{L}_{T_i}\left(f_{\theta - \alpha \nabla_\theta \mathcal{L}_{T_i}(f_\theta)}\right)

No regularization term is used beyond explicit gradient clipping during both adaptation and meta-optimization stages. This formulation structurally distinguishes MAML-based imitation from approaches relying on explicit context vectors or trajectory concatenation, as it directly meta-learns for rapid gradient-driven task adaptation (Finn et al., 2017).

2. Policy Architecture and Meta-Learning Enhancements

For vision-based meta-imitation, the policy network fθ(o)f_\theta(o) maps observations to continuous actions. The architectural pipeline includes:

  • Convolutional trunk: 3–4 layers, kernels of size 5×5 or 3×3, channels 16–64, with ReLU activations.
  • Spatial feature extraction: output feature map subjected to spatial soft-argmax, yielding 2D keypoints.
  • State concatenation: extracted keypoints concatenated with proprioceptive state (joint angles, velocities, end-effector pose).
  • FC head: 2–4 fully-connected layers (width 100–200), ReLU activations, mapping to actuation commands.

Enhancements critical for meta-learning include:

  • Bias transformation: adding a learned input zz as an extra “input-specific bias,” enriching the adaptation gradient direction at the hidden layers.
  • Two-head output: splitting the final linear layer into “pre-update” (inner loop) and “post-update” (outer loop) heads, ensuring proper task-specific adaptation and evaluation separation.

These model refinements empirically demonstrably improve the effectiveness of meta-learning by providing policy expressivity and improved inner-loop optimization surface (Finn et al., 2017).

3. Optimization Protocols and Meta-Training

The MAML meta-training loop for imitation learning proceeds as follows:

  1. Sample batch of tasks {Ti}\{T_i\} from p(T)p(T).
  2. For each TiT_i:
    • Sample an “adaptation” demonstration τadapt\tau_\text{adapt}.
    • Compute gradient gi=θLTi(fθ)g_i = \nabla_\theta \mathcal{L}_{T_i}(f_\theta) evaluated on τadapt\tau_\text{adapt}.
    • Adapt: θi=θαgi\theta_i' = \theta - \alpha g_i.
    • Sample a “meta-update” demonstration τmeta\tau_\text{meta}.
  3. Meta-gradient: GmetaG_\text{meta} is the sum over ii of θLTi(fθi)\nabla_\theta \mathcal{L}_{T_i}(f_{\theta_i'}) evaluated on τmeta\tau_\text{meta}.
  4. Update meta-parameters: θθβGmeta\theta \gets \theta - \beta G_\text{meta}.

Key practicalities:

  • Gradient clipping (inner updates clipped to [10-10, $10$], meta-gradient to [20-20, $20$]).
  • Task mini-batch sizes of $5$–$15$. This loop is repeated until convergence of the meta-objective (Finn et al., 2017).

4. Empirical Evaluation and Results

MAML-based meta-imitation learning has been evaluated in both simulated and real robotic visuomotor manipulation tasks:

Task Data Demo Count MIL (MAML) Contextual LSTM
Sim. Reaching (vision) ~9,200 1 82–85% 60% 55%
Sim. Pushing (vision) ~9,200 1 85.8% 58.1% 78.4%
Sim. Pushing (no action/state) 1 66.4–72.5% 34.2–37.6%
Real-World Placing 1.3K 1 90% 25% 25%
Real-World Placing (vision) 1 68.3%

These results demonstrate that MAML-based meta-imitation learning with behavioral cloning reliably outperforms both contextual policies (that directly concatenate demonstration and current state) and recurrent (LSTM) architectures in the low-data, one-shot regime. The margin is especially marked in real-robot vision tasks, indicating robust adaptation and data efficiency (Finn et al., 2017).

5. Extensions: Demonstration and Reward Integration

“Watch, Try, Learn” (WTL) extends MAML for imitation to incorporate both demonstrations and sparse reward trials. This algorithm meta-learns two policies per task: a trial policy πθT\pi^T_\theta conditioned with KK demonstrations, and a re-trial policy πϕR\pi^R_\phi conditioned on both KK demonstrations and LL trial trajectories (with reward feedback).

  • Inner (adaptation) stage: πθT\pi^T_\theta trained by maximizing the likelihood of held-out demonstration trajectories, using only demo conditioning.
  • Outer (meta) stage: πϕR\pi^R_\phi trained to imitate held-out demos conditioned on both demos and agent-generated trial trajectories (with reward signals).

Algorithmically, both policies employ CNN+Mixture Density Network architectures, with the context embedding network concatenating features from sampled frames of the demo and trial sets and trial reward labels. Notably, unlike MAML, WTL adaptation at test-time does not use explicit gradient descent; instead a learned context embedding enables off-policy adaptation to demonstration and reward data (Zhou et al., 2019).

Empirical results in vision-based gripper environments show that WTL outperforms monolithic behavioral cloning (BC), demo-only meta-imitation (MIL), and BC+SAC (fine-tuned with hundreds–thousands of reward trials):

  • WTL: 0.42±0.02\approx 0.42 \pm 0.02 success rate after 1 demo and 1 trial
  • MIL: 0.30±0.02\approx 0.30 \pm 0.02
  • BC: 0.09±0.01\approx 0.09 \pm 0.01
  • BC+SAC: requires >2000>2000 trials to match WTL performance

This demonstrates that integrating sparse reward trials with one-shot imitation metrics via meta-learning dramatically reduces the number of real-world interaction steps required for successful skill acquisition (Zhou et al., 2019).

6. Scientific Significance and Context

Model-agnostic meta-learning for imitation provides a principled and effective paradigm for one-shot skill acquisition with high-dimensional sensory observations. By meta-learning through gradient-based adaptation and leveraging deep neural visuomotor architectures, agents can adapt to new manipulation tasks from minimal demonstration data, addressing fundamental sample complexity challenges posed by end-to-end learning from pixels. Architectural refinements, such as bias transformation and two-head variants, further improve adaptability and meta-optimization landscapes. Empirical evidence across diverse robotic domains confirms the superiority of gradient-based meta-imitation over contextual and recurrent one-shot baselines, establishing MAML as a leading methodology in one-shot visual imitation learning (Finn et al., 2017, Zhou et al., 2019).

Recent algorithmic advances such as WTL suggest that extending the MAML framework to integrate trial-and-error experience with sparse rewards enhances robustness to task ambiguity and unmodeled dynamics, offering greater data efficiency and autonomous improvement by unifying meta-imitation and meta-reinforcement learning strategies in high-dimensional vision-based settings.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

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 Model-Agnostic Meta-Learning (MAML) for Imitation.