Skip to content
Robotics.world

Research

FoldBack: Self-Correcting Masked Generative Policy for Long-Horizon Garment Folding

Garment folding requires a long sequence of pick-and-place actions, and each action changes the cloth configuration that all later actions depend on — so a single missed or slipped grasp can…

The paper’s first page · arXiv:2610.10462
arXiv
2610.10462 · Preprint · not peer-reviewed
Published
2026-10-07
Authors
Lipeng Zhuang, Shiyu Fan, Yingdong Ru, Zhuo He, Florent P. Audonnet, Paul Henderson, Gerardo Aragon Camarasa

In plain words

Garment folding requires a long sequence of pick-and-place actions, and each action changes the cloth configuration that all later actions depend on — so a single missed or slipped grasp can invalidate everything that follows. Existing long-trajectory policies commit executed actions to history unconditionally, meaning they keep going after a failed grasp even though the garment never reached the intended state.

AI summary

Overview

Research area: Robotic manipulation — specifically deformable-object (garment) folding with visuomotor imitation learning, long-horizon trajectory generation, and failure detection/recovery.

Technical level: Advanced. The paper assumes familiarity with masked generative models, VQ-VAE tokenization, action-chunking policies, and bimanual manipulation.

Scope (one sentence): The paper introduces FoldBack, an inference-time self-correction scheme layered on a masked generative policy that lets a dual-arm robot detect a failed grasp, physically undo it, and repair only the affected part of a long folding trajectory — without recovery demonstrations or retraining the base policy.

What This Paper Is About

Garment folding requires a long sequence of pick-and-place actions, and each action changes the cloth configuration that all later actions depend on — so a single missed or slipped grasp can invalidate everything that follows. Existing long-trajectory policies commit executed actions to history unconditionally, meaning they keep going after a failed grasp even though the garment never reached the intended state. FoldBack's goal is to make the trajectory editable: detect that a grasp failed, return the robot to a retryable pre-grasp pose, and regenerate only the broken portion of the plan before execution continues.

Key Contributions

  1. An editable full-trajectory policy with grasp-verified history. Executed tokens from a grasp-critical window are held as tentative rather than committed; they enter the verified history only after the grasp is confirmed successful. The authors state this is the first editable full-trajectory policy to unify the decisions of when to refine/verify, how to roll back, and where/how to retry.
  2. Key-Action-Aligned Inference (KAAI). Trajectory refinement and grasp verification are aligned with pick-and-place events (gripper open-to-closed transitions for Pick, closed-to-open for Place) instead of uniform execution intervals, giving the robot visual servoing at the moments where garment configuration actually changes.
  3. Verified Rollback with a local grasp-outcome monitor. A PointNet-based binary classifier compares pre-pick and post-lift local point clouds in the gripper frame; on failure, the recorded end-effector motion is executed in reverse to restore the pre-grasp configuration, while a successful grasp in an asymmetric bimanual failure stays closed and is preserved.
  4. Structured Trajectory Plan Repair. Distance-guided remasking (masking ratio decays from ρ_near = 0.80 to ρ_base = 0.30 with α = 0.50) plus failure-aware candidate resampling that rejects retries whose pick falls within ε = 0.04 m of a previously failed pick location.

Main Findings

  • Headline result: Across 33 real garments from six categories, FoldBack reaches 75.2% final folding success and 0.837 final-mask IoU, versus 45.7% and 0.689 for the strongest prior baseline (MGP-Long) — a gain of 29.5 percentage points and 0.148 IoU.
  • Per-category dominance: FoldBack has the best final success in all six categories — napkin 90.0% (IoU 0.872), towel 93.3% (0.876), pants 80.0% (0.851), short-sleeved T-shirt 60.0% (0.811), long-sleeved T-shirt 60.0% (0.793), short-sleeved shirt 53.3% (0.782).
  • Each component adds value: KAAI alone lifts average final success from 45.7% to 53.3%; adding rollback and repair ("w/o Structured Repair") reaches 62.9%; full FoldBack reaches 75.2%. Structured repair alone accounts for 62.9% → 75.2%.
  • Gains grow with horizon: Against MGP-Long, stage-completion gains are 13.4–15.0 points on the evaluated two-stage folds but 31.9–37.3 points on the three five-stage garment categories.
  • Monitor quality: On held-out garments (96 failed and 352 successful grasps), the frozen monitor achieves 92.7% failed-grasp recall with a 4.5% arm-wise false-positive rate.
  • Controlled slip recovery: Under one-corner slips FoldBack reaches 85.7% recovery success and 73.3% final success; under two-corner slips, 80.0% and 66.7% — versus 64.3%/53.3% and 53.3%/33.3% for the variant without structured repair. DP3 achieves 6.7% and 0.0% final success on the same perturbations.
  • Rollback and editability both matter: Keeping the failed window editable (rather than fixing it) raises recovery success by 14.3 and 13.3 points for one- and two-corner slips; physical rollback adds 28.6 and 37.1 points over FoldBack without Rollback.
  • Bimanual grasp preservation: FoldBack preserves the successful grasp in 100% of detected asymmetric failures, versus 71.4% when both arms are regenerated jointly.
  • Generalization: On pants at unseen rotations, final success is 80.0% (training orientation), 73.3% (5°–20°) and 60.0% (20°–30°), versus 66.7%, 60.0% and 40.0% for MGP-Long. On held-out garment instances (60 trials per method), FoldBack averages 66.7% versus 36.7% (MGP-Long) and 28.3% (DP3). On non-canonical initial configurations, 80.0% for napkins and 73.3% for towels versus 53.3% and 46.7%.
  • Ablations: KAAI beats fixed-12 and uniform refinement (81.6 stage completion / 73.3 final success vs 73.7/66.7 and 76.3/66.7); distance-guided remasking beats full-future and failed-window-only remasking (85.7% recovery, 93.3% final success); failure-aware resampling beats single-candidate and confidence-ranked selection (71.4% first-retry, 85.7% recovery, 93.3% final success).
  • Latency cost is small: Batched resampling takes 58 ms per recovery event versus 37 ms for a single candidate.

Methodology in Plain English

The system builds on a Masked Generative Policy (MGP), which encodes a whole folding trajectory as a short sequence of discrete tokens produced by a frozen VQ-VAE tokenizer, and fills in masked tokens with a Masked Generative Transformer. Training follows the original two-stage MGP recipe on Flat'n'Fold demonstrations: tokenizer first, then the transformer, which learns to recover tokens that were randomly masked or replaced with wrong codebook entries. No recovery data and no policy retraining are involved.

The novelty is entirely at inference time. The decoded gripper on/off sequence is scanned for pick and place transitions, and each transition defines a small action window (from 4 steps before to 3 steps after the key action) mapped to the smallest set of tokens covering it. Whenever the robot is about to execute or has just executed such a window, the remaining unexecuted tokens are refined with the newest observation, twice per update. Windows containing a Pick are "grasp-critical" and are not committed to history on execution.

After lifting, a small PointNet classifier compares the local point cloud under the fingertips before the grasp with the one after lifting, both expressed in the gripper frame so no garment segmentation is needed. It is trained with positive pairs from successful demonstrations and negatives made by substituting a pre-pick cloud (the garment is still on the table), which simulates a missed grasp without needing real failure data. If the probability is below 0.50, the grasp counts as failed: the robot reverses its recorded motion to the pre-grasp pose, and the window stays editable.

Repair then does two things. First, it fully remasks the failed window and masks a decaying fraction of each subsequent segment, prioritising the tokens the model was least confident about, so edits are heaviest near the failure and taper off further away. Second, it draws eight candidate repairs from the post-rollback observation and rejects any whose pick lands near an already-failed pick location; up to three batches are tried, and the surviving candidates are scored by mean token confidence, with feasibility checks (inverse kinematics, joint limits) applied in the bimanual asymmetric case. If nothing valid appears, the episode is declared unsuccessful and stops at the pre-grasp pose.

Evaluation uses a Baxter dual-arm robot with one ZED2 RGB-D camera, point clouds downsampled to 4,096 points, and 16-D actions (per arm: 3-D position, 4-D quaternion, binary gripper). Trials use 30 napkin trials (15 per size) and 15 per other category; a trial counts as a final success only if every stage completes and final-mask IoU is at least 0.80. The number of training demonstrations is not reported.

Why This Matters

Research impact: The paper reframes failure handling from "learn a recovery policy" to "make the plan editable," showing that a strong prior — executed actions are immutable — was itself a source of failure. Because rollback is policy-agnostic (demonstrated by bolting it onto DP3), the idea transfers beyond masked generative models to action-chunking policies, and it removes the need for recovery demonstrations, base-policy fine-tuning, or LLM/VLM reasoning at test time.

Real-world applications:

  • Home laundry and assistive robotics — folding clothes with occasional bad grasps is the norm, not the exception, and unattended operation requires self-recovery.
  • Apparel and textile manufacturing — automated pick-and-place of cut pieces and finished garments where a dropped or slipped item stalls a line.
  • Commercial laundry and hospitality — high-volume sorting and folding of napkins, towels and linens, the exact categories evaluated here.
  • Warehouse and retail garment handling — bin picking and flattening of soft goods where slip rates are high and supervision is expensive.

Industry relevance: The dominant cost of deployed manipulation systems is not the average case but the tail — a robot that cannot recover needs a human standing by. FoldBack's ~58 ms recovery-time overhead, frozen monitor, and lack of extra training data make the approach attractive for integration into existing pipelines, and the explicit failure memory (excluding previously failed pick locations) directly targets the practical problem of a robot repeatedly attempting the same doomed grasp.

Future Directions

  • Extending to harder initial configurations — the authors explicitly name more challenging starts that require a separate flattening phase before folding can begin as future work.
  • Driving down monitor errors — the 4.5% arm-wise false-positive rate means some successful grasps still trigger unnecessary rollbacks; tightening the classifier or adding temporal evidence is an open question.
  • Broadening beyond the six evaluated categories and strategies — whether grasp-critical window detection and distance-guided remasking scale to longer horizons, more stages, and garment types outside napkins, towels, pants, and shirts remains untested.
  • Generalizing the recovery machinery to other backbones and action representations — only one action-chunking baseline (DP3) was paired with verified rollback here; how structured repair interacts with diffusion policies, VLA models, or other tokenizers is unresolved.

Target Audience

Robotics researchers working on deformable-object manipulation and long-horizon imitation learning; engineers building garment-handling or laundry automation systems who need robust failure recovery without collecting failure data; and graduate students studying generative policy architectures (masked generative models, action chunking) who want a clear worked example of how inference-time plan editing can substitute for additional training.

Authors’ abstract

We present FoldBack, a self-correcting masked generative policy for long-horizon garment folding. Existing long-trajectory policies may continue after a missed or slipped grasp even when the garment has not reached the intended configuration. We structure FoldBack's recovery mechanisms around three inference-time decisions: when to refine and verify, how to roll back, and where and how to retry. FoldBack aligns refinement and grasp verification with pick-and-place events,…

The full abstract on arXiv
Read the original paper

Related papers