Source-linked AI summary
Learning to Search for Executable Patternmaking from Certified Programs
Zhuotao Xu, Chi Zeng, Liying Yang, Xinxing Yu, Yanyan Liang
TL;DR
Pattern archives record edited sewing patterns but not the steps that connect them, and existing generation systems do not model those edits. SemDraft uses bounded search and a deterministic compiler to recover and certify executable edit programs, then trains a ranker on them. On the frozen order-sensitive test, the learned prior certified 63 of 80 cases, compared with 51 for the teacher heuristic.
Problem
Pattern archives preserve before-and-after patterns but not the editing steps, while recent systems generate complete patterns rather than modeling how one pattern is edited into another.
Source: §1 · p. 1Method
SemDraft uses bounded search to recover executable edit programs, certifies them through recompilation, pairwise order checks and independent replay, then trains a prior to rank candidate actions.
Source: §1 · p. 2, §3.2 · p. 4Results
63 of 80 cases were certified by the learned prior, versus 51 by the teacher heuristic on the frozen order-sensitive test.
Source: §1 · p. 2, §5.2 · p. 7Takeaways & Limitations
Certified programs turn pattern archives that contain edit outcomes but not steps into supervision for search.
Source: §7 · p. 9
Abstract
from arXiv · showhide
Recent models generate sewing patterns from images or text, and program-based representations make these patterns executable. These systems produce a finished pattern and do not model how a patternmaker turns one pattern into another. In practice a new style is made by editing an existing pattern: lengthening the bodice, moving a dart, swapping a sleeve. Pattern archives record the results of such edits and none of the steps. We observe that the steps can be recovered by searching over editing actions until one pattern becomes the other. A deterministic compiler makes the recovered steps checkable. To this end, we present SemDraft, the first framework that learns to search for executable patternmaking programs from paired before-and-after sewing patterns without recorded editing steps. Specifically, a bounded search recovers a program of editing actions and certifies it only after three checks: it recompiles from scratch, every pair of its actions is classified as ordered or interchangeable, and an independent replay reaches the same pattern. The certified programs then train a model that ranks candidate actions inside the same search. On two frozen draws of 80 order-sensitive cases, with every other search component fixed, the learned ranker certifies 63 and 64 cases within 1,000 search executions, against at most 53 and 52 for non-learned rankers.
1 INTRODUCTION
SemDraft addresses the lack of recorded editing steps by recovering executable patternmaking programs from before-and-after patterns. It certifies recovered programs and uses them to train a ranker that improves search success under matched conditions.
1 INTRODUCTION
- Recovering edits is difficult because archives omit operation logs, garment actions affect coupled panels, and different action orders can produce different results.A sleeve attachment can resolve against host panels as they exist at attachment time.Source: §1 · p. 1
- Certified programs train a model to rank legal candidate actions inside a unified bounded search that holds the other search components fixed.The program certificate records action dependencies and valid next actions at intermediate states.Source: §1 · pp. 1–2
- 63 of 80 cases were certified by the learned prior, versus 53 by template lookup, 51 by the teacher heuristic and 37.7 by random order.The comparisons used the same cases and search conditions; an independent draw reproduced the gains.Source: §1 · p. 2
- SemDraft is presented as the first framework to learn search for executable patternmaking programs from paired patterns without recorded editing steps.A bounded search accepts programs only after recompilation, pairwise order checking and independent replay.Source: §1 · p. 2
2 RELATED WORK
Related work spans executable pattern generation and alteration, inverse CAD and program reconstruction, and learning from search with verification. SemDraft differs by recovering certified action sequences from paired garment patterns and using the resulting action dependencies to guide search.
Sewing-pattern generation and alteration
- GarmentCode defines executable pattern programs, while garment-generation systems produce or edit patterns from images, text or both.Digital garment alteration edits an existing pattern for a new body shape, while TailorCoPilot records expert operations as explicit sequences; SemDraft recovers sequences from two patterns alone.Source: §2 · pp. 2–3
Recovering construction sequences and programs
- Inverse-CAD methods infer construction sequences or code from geometry, while SemDraft recovers a certified partial order of parameterised actions over coupled garment panels.The related work describes garment actions as affecting several panels and their seams, unlike single-shape reconstruction.Source: §2 · p. 3
Learning from search and verification
- Prior search-guided learning trains models on stronger-search outputs, and SemDraft adds certificates that identify valid next actions among interchangeable action orders.Its compiler tests both execution orders to decide independence, and the prior is trained on the valid next actions supplied by certificates.Source: §2 · p. 3
3 METHOD
SemDraft searches from a base pattern toward a public target, using a deterministic compiler, certified teacher programs and a learned prior to rank candidate edits. Its unified bounded search holds other search components fixed to compare ranking signals.
3.1 DRAFTING ENVIRONMENT: SEMANTIC ACTIONS OVER A DETERMINISTIC COMPILER
- The drafting environment represents patterns as panels, seams, components and darts, with nine semantic actions compiled into geometry.The fixed deterministic compiler rejects invalid transitions and makes execution order matter when a template component is attached to current host panels.Source: §3.1 · pp. 3–4
3.2 TEACHER: BOUNDED SEARCH AND CERTIFICATION
- The teacher uses bounded beam search over candidate edits and accepts a tight endpoint only after recompilation, pairwise order checks and independent replay.Certification yields a dependency DAG and valid next actions for each materialised intermediate state.Source: §3.2 · p. 4
3.3 LEARNED PRIOR: A FACTORISED MODEL TRAINED ON CERTIFIED PROGRAMS
- The learned prior is trained on all valid next actions in certified programs, including STOP where stopping is allowed, rather than only one linear ordering.The method calls this DAG supervision and applies losses to action types, anchors and parameters.Source: §3.3 · p. 5
3.4 UNIFIED BOUNDED SEARCH: ONE SEARCH, FOUR RANKING SIGNALS
- The unified search holds candidate generation, beam, stopping rule, certifier and budget fixed while ranking signals order candidate actions.The teacher heuristic compiles all candidates to rank them, whereas random, template lookup and learned-prior signals compile only selected candidates.Source: §3.4 · p. 5
4 BENCHMARKS: A DEVELOPMENT CORPUS AND FROZEN EVALUATION SETS
The benchmarks use synthetic cases generated from a single patternmaking ontology, with frozen evaluation sets intended to test order-sensitive search and selected shifts. Their construction also makes the limits of generalisation explicit.
4 BENCHMARKS: A DEVELOPMENT CORPUS AND FROZEN EVALUATION SETS
- All corpora use one generator, with cases built from neutral base patterns and templated hidden programs across three tiers of depth.Every Tier-C program includes a detach/attach template swap, whose order relative to host changes is part of the task.Source: §4 · p. 5
- The evaluation varies parameters and templates but keeps the generator, families and action ontology unchanged.In the worked case, attaching the sleeve before lengthening leaves it sized from the earlier armhole and misses the target.Source: §4 · p. 6, Figure 2 · p. 6
- The development corpus contains 300 cases and supplies certified programs for prior training, protocol development and diagnostics.Twenty percent of cases per tier and family are held out from training.Source: §4 · p. 6
- The main frozen test contains 80 held-out Tier-C cases, alongside an easy reference, an independent replication draw and parameter- and template-shift sets.The main comparison and calibration splits were declared before use; the robustness sets were fixed after the main results were read.Source: §4 · p. 6
5 EXPERIMENTS
The experiments evaluate certified-program supervision and compare learned and non-learned ranking signals under matched search conditions. Across two frozen draws, shifted inputs, and the teacher’s reference configuration, the learned prior generally certifies more cases, with results varying by search setting and case family.
5.1 SUPERVISION: CERTIFIED PROGRAMS AND THE TRAINED PRIOR
- The teacher’s development-corpus search certifies 77, 70, and 57 cases in Tiers A, B, and C, while its certified programs provide the training data for the prior.The materialised training states support valid-next-action prediction at 92%, against a 49% majority baseline; the anchor-entity accuracy is 99%.Source: §5.1 · pp. 6–7
5.2 MATCHED-CONDITION COMPARISON ON THE FROZEN EVALUATION SET
- 63 of 80 cases are certified by the learned prior at beam 4, versus 53 for template lookup, 51 for the teacher heuristic, and 37.7 for random order.The gain over the teacher is 12 cases, or 15 percentage points; its bootstrap range is above zero.Source: Figure 3 · p. 7, §5.2 · p. 7
5.4 ROBUSTNESS: A SECOND DRAW, SHIFTED INPUTS AND BEAM DE-DUPLICATION
- On a second draw, the prior certifies 64 cases at beam 4, against 52 for the teacher, 51 for template lookup, and 37.3 for random order.The paired gain over the teacher is again 12 cases; both gains over the teacher and template lookup have bootstrap ranges above zero.Source: Figure 4 · p. 8, §5.4 · p. 8
5.3 WHERE THE GAIN COMES FROM
- The gain over the teacher comes chiefly from depth-7 tee and dress cases: the prior certifies all seven in each family, while the teacher certifies one in each.At depth 8, both certify 10 of 24 cases; the teacher is stronger on pants, certifying 18 of 20 against 11 for the prior.Source: §5.3 · p. 8
5.4 ROBUSTNESS: A SECOND DRAW, SHIFTED INPUTS AND BEAM DE-DUPLICATION
- Under parameter-range and template shifts, the prior certifies 13 and 14 cases, respectively, but its gains over the teacher are not statistically resolved by the bootstrap ranges.The shifts use twenty cases each; the gains over template lookup have bootstrap ranges above zero.Source: §5.4 · p. 8
- With beam de-duplication, the prior rises from 63 to 66 certified cases while the teacher falls from 51 to 43, leaving a 23-case difference.The teacher’s beam contains a median of 12 merged states per case, against 2 for the prior.Source: §5.4 · pp. 8–9
5.5 BEYOND THE TEACHER’S REFERENCE CONFIGURATION
- Among the 50 cases missed by the teacher’s reference configuration, the prior certifies 34 within 1,000 executions, against 21 for the teacher heuristic.The fixed reference configuration certifies 30 of 80 cases and often stops at its wall-clock limit far below the execution cap.Source: §5.5 · p. 9
6 LIMITATIONS
The evaluation uses controlled synthetic identifiability benchmarks from one generator, not evidence of industrial generalisation.
- The development and frozen evaluation corpora are synthetic identifiability benchmarks, so they do not establish industrial generalisation.Their programs use the search’s nine-action ontology, are templated by tier and depth, and use polygonal geometry.Source: §6 · p. 9
- Training and evaluation use corpora from one generator; the shifts vary parameters and templates but not the generator, families, or ontology.Each shift set has twenty cases and wide bootstrap ranges, so the paper claims no transfer to other generators.Source: §6 · p. 9
- Certification checks executability and action-order relations against the compiler, not whether a professional would draft the pattern that way.Source: §6 · p. 9
7 CONCLUSION
The conclusion is that executable patternmaking programs can be recovered and certified from before-and-after sewing patterns. On two frozen draws, the learned prior improves certified success over non-learned rankings in the same bounded search.
- The learned prior certifies 63 of 80 order-sensitive cases, compared with 51 for the teacher heuristic, and certifies more cases than every non-learned ranking on both frozen draws.Source: §7 · p. 9
- On the 50 cases missed by the teacher’s reference configuration within its wall-clock budget, the prior certifies 34, compared with 21 for the heuristic.Source: §7 · p. 9
- Certified programs turn pattern archives’ before-and-after records into supervision for search, despite archives not recording the editing steps.Source: §7 · p. 9
AI USE STATEMENT
The authors used generative AI to assist with manuscript writing and language polishing, and reviewed and revised all AI-assisted text.
- Generative AI tools assisted manuscript writing and language polishing, and the authors reviewed and revised all AI-assisted text.Source: AI USE STATEMENT · p. 9
- The authors verified and tested LLM-generated code for correctness.Source: AI USE STATEMENT · p. 9
- The authors take responsibility for the final content, including AI-assisted text, claims, and artifacts.Source: AI USE STATEMENT · p. 9
REPRODUCIBILITY STATEMENT
The statement directs readers to the sections and appendices documenting the method, protocol, implementation details, and certificate scope.
- Section 3 specifies the drafting environment, teacher search and certification, learned prior, and unified search.Source: REPRODUCIBILITY STATEMENT · p. 9
- Section 4 and Appendix A document corpus construction, frozen splits, budgets, seeds, hardware, software, and protocol deviations.Source: REPRODUCIBILITY STATEMENT · p. 9
- Appendix D gives model and training details, while Appendix E states what a certificate establishes.Source: REPRODUCIBILITY STATEMENT · p. 9
SUPPLEMENTARY MATERIAL
The supplementary material accompanies the paper and follows its numbering and reference-list conventions.
- The supplementary material accompanies “Learning to Search for Executable Patternmaking from Certified Programs”.Source: SUPPLEMENTARY MATERIAL · p. 13
- Its sections, figures, tables, and equations continue the numbering from the main paper.Source: SUPPLEMENTARY MATERIAL · p. 13
- The main paper’s reference list also covers works cited in the supplementary material.Source: SUPPLEMENTARY MATERIAL · p. 13
A PROTOCOL DETAILS
The protocol details document search settings, evaluation construction, run deviations, and post-hoc robustness tests; the tables summarize comparison conditions, paired gains, and results by family and depth.
A PROTOCOL DETAILS
- Tier C uses beam width 96, top-k 8, maximum depth 8, a 20,000-execution cap, and a 1,350-second search budget.A 25% wall-budget reserve supports certification; alternative deterministic tie-break order certifies the same 57 of 80 cases.Source: A PROTOCOL DETAILS · p. 13
- Frozen-evaluation runs, prior training, and development rollouts used a server with two 32-core CPUs, 1 TB RAM, and eight NVIDIA A800 GPUs.Searches ran single-threaded; the prior used one GPU, while H, R, and T used none.Source: A PROTOCOL DETAILS · p. 13
- The protocol history records successive search changes and a v10.4.1 correction to a defect that caused spurious “DAG incomplete” verdicts.The held-out Tier-C run used v10.4.1.Source: A PROTOCOL DETAILS · p. 13
- A ranking-key correction led to reruns of R and T at beam 4 on all four frozen test sets; all reported R and T results use corrected runs.Other logged deviations include reruns of a concurrent-job case and a runner-error case, and five serialisation timeouts whose searches had finished.Source: A PROTOCOL DETAILS · p. 13
- The frozen evaluation set was generated on 2026-09-12, with its configuration and manifest digests recorded before use.The output root was read-only, and the main test contained 80 cases de-duplicated against the development corpus; calibration fixed the protocol before main-test runs.Source: A PROTOCOL DETAILS · pp. 13–14
- Three post-hoc experiments tested beam de-duplication, distribution shifts in parameters and templates, and replication on a second frozen draw.The replication protocol defined in advance when the main conclusion would count as replicated, replicated in direction only, or require rewriting.Source: A PROTOCOL DETAILS · p. 14
B FULL TABLES OF THE FROZEN COMPARISON
- Tables 1 and 2 list comparison conditions and costs, Table 3 gives paired gains, and Table 4 breaks both draws down by family and target depth.Source: B FULL TABLES OF THE FROZEN COMPARISON · p. 14
C DEVELOPMENT-STAGE RESULTS ON THE DEVELOPMENT CORPUS
These development-corpus results examine policy rollouts and the learned prior before the frozen evaluation set existed; they informed the later protocol and are reported for completeness. They also describe the prior, certification behavior, and an export of a certified trajectory to Seamly2D.
C DEVELOPMENT-STAGE RESULTS ON THE DEVELOPMENT CORPUS
- 35 of 36 held-out cases reached a tight endpoint with greedy decoding, and all 35 programs passed the teacher’s three-stage certification unchanged.The policy used a median of 14 engine executions per case, compared with above 1,400 for the teacher on the same Tier-C cases; with a beam of four, it solved the remaining Tier-C case.Source: C DEVELOPMENT-STAGE RESULTS ON THE… · p. 16
- Seven of the 23 Tier-C cases the teacher failed were fully certified by a beam-of-four policy rollout using 279–325 executions each.The 23 cases were outside training data; the rollout used a 20% budget, or 4,000 executions, and the random ranker solved none.Source: C DEVELOPMENT-STAGE RESULTS ON THE… · p. 17
- On held-out families, the policy beat random only for skirts; on a held-out-swap split, it solved 0 of 57 Tier-C cases versus 20 for random.The passage attributes the family-split result to applying orderings from other families where they do not hold, and the composition-split result to never having seen a template swap.Source: C DEVELOPMENT-STAGE RESULTS ON THE… · p. 17
- Of 23 non-certified Tier-C cases, 16 showed beam collapse, three pants cases were wall-clock limited, and four had mixed causes.On Tier A, every held-out case was tight and 77 were certified; on Tier B, adding lookahead and a certification reserve raised certified cases from 51 to 70 without regression.Source: C DEVELOPMENT-STAGE RESULTS ON THE… · p. 17
D DETAILS OF THE LEARNED PRIOR
- The learned prior represents current and target pattern features, darts, and executed actions with tokens, using a four-layer Transformer encoder and heads for action type and anchor prediction.Training also uses numeric and categorical action parameters, with the stated loss combining type and anchor terms, numeric-parameter loss, and categorical-slot loss.Source: D DETAILS OF THE LEARNED PRIOR · pp. 17–18
E CERTIFICATION OF PROGRAMS FOUND WITH THE PRIOR
- Certification requires recompilation, a complete pairwise order check and subset materialisation, and an oracle-isolated independent replay; its partial order can exclude some valid orders.The certificate is conservative because static conflicts and pairs that never become adjacent retain their recovered order without an executed test.Source: E CERTIFICATION OF PROGRAMS FOUND WITH… · pp. 18–19
F EXPORTING CERTIFIED TRAJECTORIES TO A DRAFTING TOOL
- A certified Tier-C trajectory was exported to Seamly2D, where its endpoint passed the public tight criterion while the untouched base and a sleeve shortened by 1 cm were rejected.A 0.3 cm perturbation was accepted, placing the criterion’s tolerance in physical units.Source: F EXPORTING CERTIFIED TRAJECTORIES TO… · p. 20