TACO: Learning Task Decomposition via Temporal Alignment for Control

Kyriacos Shiarlis, Markus Wulfmeier, Sasha Salter, Shimon Whiteson, Ingmar Posner

In the world of robotics, teaching a machine to perform a complex task—like stacking blocks or navigating a warehouse—usually requires one of two things: a massive amount of data for a "monolithic" policy that learns everything at once, or a human expert painstakingly labeling every single frame of a video to say exactly when one sub-task ends and the next begins.

The first approach is brittle and hard to reuse; the second is a labeling nightmare. TACO (Temporal Alignment for Control) offers a clever middle ground. It allows robots to learn modular, reusable sub-policies using only "weak supervision"—a simple list of steps called a task sketch.

TL;DR

TACO is a framework for modular Learning from Demonstration (LfD) that learns to decompose complex tasks using only high-level "task sketches" (e.g., [pick, move, place]). By simultaneously aligning these sketches to demonstration data and training the underlying sub-policies, TACO achieves performance comparable to fully supervised methods while significantly reducing the human effort required for data annotation.

What Problem Does This Paper Address?

Most Learning from Demonstration (LfD) methods treat a task as one big block of behavior. If you teach a robot to "make coffee," it learns a single, giant policy. But "making coffee" is actually a sequence: grab cup, place under machine, press button. If the robot learns these as distinct modules, it can reuse the "grab cup" skill for a totally different task, like "pour water."

The challenge is segmentation. To learn modules, the algorithm needs to know which parts of a demonstration belong to which sub-task. Usually, humans have to provide "ground truth" timestamps for these transitions. This paper asks: Can we learn these modules if the human only provides the sequence of steps, without telling us exactly when they happen?

Methods

The authors introduce TACO. The key innovation is treating the alignment of the task sketch and the actual robot actions as a joint optimization problem.

  1. Task Sketches: Instead of timestamps, the trainer provides a sketch $\tau = (b_1, b_2, \dots, b_L)$, which is just an ordered list of sub-tasks.
  2. The STOP Action: Each sub-policy is augmented with a special STOP action. When a sub-policy predicts a high probability for STOP, it signals the system to transition to the next sub-task in the sketch.
Illustration of TACO segmenting a continuous trajectory into sub-tasks using the STOP action.
  1. Temporal Alignment (The "Secret Sauce"): Inspired by Connectionist Temporal Classification (CTC)—a technique used in speech recognition to map audio to text—TACO uses dynamic programming to consider all possible ways the sketch could align with the demonstration.
  2. Simultaneous Learning: Unlike a naive approach that might try to segment the data first and then learn the policies, TACO does both at once. The alignment is "informed" by how well the sub-policies are currently performing. If a "pick" policy is getting really good at a certain set of frames, the system is more likely to align the "pick" label to those frames.

Datasets

The researchers evaluated TACO across four increasingly difficult domains:

  • Nav-World: A 2D navigation task where an agent must visit colored waypoints in a specific order.
  • Craft Domain: A grid-world environment where the agent must collect resources and use workbenches.
  • Dial Domain (Joint Space): A simulated 6-DoF JACO robot arm that must dial a PIN on a number pad. The state is represented by joint angles and distances.
  • Dial Domain (Image Space): The same robot arm task, but the agent only sees raw 112x112 RGB images. This is the most challenging "end-to-end" visual control setting.

Key Insights and Ideas

  • The "Aha" Moment on Alignment: The authors found that a two-step process (aligning first, then learning) performs poorly. Why? Because a generic alignment tool might pick a "mathematically likely" split point that is actually very difficult for a neural network to learn as a policy. By learning them together, TACO finds "policy-friendly" segmentations.
  • Zero-Shot Generalization: Because the sub-policies are grounded in specific sub-tasks, TACO can perform zero-shot imitation. At test time, you can give the robot a brand-new, longer sketch it has never seen before (e.g., a 5-digit PIN when it only trained on 3-digit PINs), and it can execute it by chaining its learned modules.
  • Regularization via Distribution: TACO doesn't just pick the one best alignment during training; it optimizes over a distribution of possible alignments. This acts as a powerful regularizer, preventing the model from overfitting to a single, potentially noisy human demonstration.

Key Results

  • Near-Expert Performance: In the Nav-World and Craft domains, TACO's accuracy approached that of GT-BC (the "Gold Standard" baseline that uses perfect, manually segmented data).
  • Superiority over Naive CTC: TACO significantly outperformed "CTC-BC" (the two-step alignment-then-learning approach), which often failed to complete full sequences.
Performance comparison showing TACO approaching ground-truth behavioral cloning (GT-BC) and outperforming CTC baselines.
  • Visual Control Success: In the image-based Dial domain, TACO successfully learned to dial PINs from raw pixels. While the baseline methods struggled to complete even a single full sequence, TACO achieved high task success rates.
  • Alignment Accuracy: TACO achieved over 95% alignment accuracy across most domains, meaning it correctly identified which sub-task was happening at almost every frame, despite never being told the timing.

Limitations and Future Work

  • Fixed Order: TACO assumes the sub-tasks in the sketch occur in the exact order provided. It cannot currently handle tasks where the order might vary or where sub-tasks happen in parallel.
  • Sketch Requirement: While "weakly supervised," it still requires a human to provide the sketch. A "holy grail" for future work would be discovering these sub-tasks entirely from scratch (unsupervised decomposition).
  • Natural Language: The authors suggest that future versions could replace symbolic sketches with natural language instructions, making it even easier for non-experts to program robots.

Summary updated

BibTeX
@inproceedings{shiarlis2018taco,
  author = {Kyriacos Shiarlis and Markus Wulfmeier and Sasha Salter and Shimon Whiteson and Ingmar Posner},
  title = {{TACO: Learning Task Decomposition via Temporal Alignment for Control}},
  booktitle = {International Conference on Machine Learning},
  year = {2018},
}
Figure