Scheduling, Not Discarding: A Complexity Curriculum for Mixing Human and Synthetic CAD Programs

Machine learning models can now turn a 3D scan into an editable CAD program, meaning a short piece of executable code that rebuilds the part from sketches and extrusions. The strongest such system, cadrille, reports a revealing failure. It fine-tunes a vision-language model on two kinds of training programs: about a million procedurally generated ones and a smaller set written by human designers. Training on both together made the model worse than training on the synthetic set alone. The authors attribute this to conflicting coding styles. Their fix was to throw away the human-written code and use the human shapes only as targets for reinforcement learning, which rewards the model when its generated program compiles and its output overlaps the target shape. That fix also throws away the most realistic step-by-step supervision available. Human sequences are also the ones that carry multi-loop sketches and real design structure, and they make up the hard tail where current methods break down.

We propose testing a specific alternative explanation of that failure. Our hypothesis is that the human data hurts mainly because of when and in what order the model sees it, not because it is fundamentally incompatible. The plan has two parts. First, rewrite every human-authored program into the same canonical code style as the synthetic programs. Second, introduce the human programs in order of geometric complexity, measured by loop and operation count, and only after the model handles simpler parts. Under these conditions, we expect step-by-step human supervision to help rather than hurt, especially on complex parts. The education literature on "curriculum fragmentation" supplies a design constraint here, not an analogy for decoration. It warns that strictly linear component-then-system teaching leaves learners unable to integrate what they learned. That warning gives a concrete competing schedule to test: a spiral curriculum that keeps revisiting simple parts.

Core Claim

The degradation cadrille observed from mixing synthetic and human programs can be separated into two causes. One is a surface-style conflict, which canonicalization alone should remove. The other is a complexity-ordering conflict, which canonicalization does not remove but a competence-paced curriculum does. If the claim holds, keeping human intermediate code with the right schedule should beat cadrille-style annotation-free reinforcement learning on parts with four or more sketch loops. On that slice, MiCADangelo reports 68.3% intersection-over-union (IoU, the overlap between reconstructed and true solid), against 49.2% for prior methods. If canonicalized data mixed uniformly does just as well, the curriculum claim is false. The paper then reports the simpler result: style was the whole problem.

Relation to Prior Work

Two papers motivate the gap. cadrille uses a staged pipeline: supervised training on the synthetic CAD-Recode programs, then online reinforcement learning with compile and IoU rewards. It also shows that online learning beats offline preference optimization. Its stages are ordered by training method, not by the difficulty of the shapes, and it never retains human code. CReFT-CAD shows that a curriculum helps CAD reasoning. Its curriculum moves from yes/no verification, to multiple choice, to step-by-step parameter deduction, and adds difficulty-aware rewards. With it, accuracy on real industrial drawings rose from 36.15% (supervised only) to 46.67%. That curriculum is defined over task formats and outputs parameter tables, not over the geometric complexity of shapes in code generation.

Our proposal differs from both. It changes neither the reward nor the task format. It changes the order and pacing of the training examples, and it treats human code as something to keep rather than discard.

Two generative papers supply the method intuition that structure should be settled before detail. DTC123 anneals diffusion noise levels from coarse to fine. DecompDreamer first optimizes how objects relate to each other and then refines each object. Both order the steps of fitting a single 3D asset. We instead order the examples used to train a model, which is a different object. DeepCAD supplies the human sketch-and-extrude sequences, and its command format is what we canonicalize.

The education papers act as a constraint. Teaching Reform of Digital Circuit Course argues that strict component-to-system progression isolates parts from systems. Towards connecting discrete mathematics and software engineering argues for projects that are revisited across later courses. Both are qualitative reports, so we use them only to choose the schedules we compare, not as evidence.

Research Program

We first build a deterministic translator from DeepCAD and Fusion 360 Gallery construction sequences into CadQuery. The translator matches the conventions of CAD-Recode: variable naming, ordering of operations, coordinate normalization, and how sketch primitives are expressed. We verify each translation by executing it and requiring near-perfect IoU with the original solid. This canonicalized corpus is the key enabling artifact.

Next we give every training part a complexity score. The score combines the number of sketch loops, the number of extrude operations, and the number of curves. We also track a measure of the model's own current competence: its running IoU on a small held-out sample from each complexity bin. The curriculum admits the next bin only once the current one passes a competence threshold.

We compare two curriculum shapes. A linear schedule moves from synthetic data, to simple human parts, to complex human parts. A spiral schedule always draws a fixed fraction of each batch from earlier bins. The same scheduling applies to the supervised stage, which now uses human code, and to the reinforcement-learning stage, which uses cadrille's reward unchanged. Finally, we analyze where gains appear by stratifying all results by loop count. We also measure forgetting on the simplest bin, which tests whether the spiral schedule protects the basics the way the education literature claims.

Baselines

The naive reference point is the base vision-language model fine-tuned only on CAD-Recode synthetic programs, with no human data and no reinforcement learning. This shows how much any later stage adds.

The main baseline is a full reproduction of cadrille: synthetic supervised training followed by online reinforcement learning on human shapes using only geometry rewards. It is the most direct competitor because it is the existing answer to exactly this mixing problem. The file reports that its RL stage adds 3–9% IoU and keeps the share of scripts that fail to compile below 0.2%. No absolute cadrille IoU on DeepCAD or Fusion 360 Gallery was found on Lacuna, so we will reproduce it ourselves. All variants share the same base model, the same total number of training examples seen, the same RL steps and rollouts, and the same hyperparameter search budget.

As the reference for complex parts we use MiCADangelo. On DeepCAD it reports a median Chamfer distance (average point-to-surface error) of 0.20 against CAD-SIGNet's 0.28, and 68.3% IoU on parts with four or more loops. We count our method as beating the field if it exceeds 68.3% IoU on that slice and our reproduced cadrille's IoU overall, without raising the invalid-script rate above 0.2%.

Three ablations isolate the ingredients. Canonicalized human code mixed uniformly with no schedule isolates the style fix. Raw, uncanonicalized human code under the curriculum isolates ordering without the style fix. A shuffled-bin schedule and a reversed hardest-first schedule control for the possibility that any staging at all, rather than the complexity order, causes the gain.

Why not just…?

Why not just canonicalize the human code and mix uniformly? This is the real threat. It may account for most of cadrille's degradation, since the authors themselves blame style. We treat it as a central ablation, not a strawman. The curriculum claim survives only if the curriculum beats uniform mixing on the four-or-more-loop slice by more than seed variance, measured over three seeds. If it does not, we report that canonicalization suffices. That is still a useful correction to cadrille's decision to discard human code.

Why not just keep cadrille's geometry-only RL and train longer? Reward from final geometry gives sparse credit on long multi-loop programs. CReFT-CAD's gap between plain supervised training and curriculum-based training on real drawings (36.15% vs 46.67%) suggests that structure in the training signal matters beyond raw training. Our comparison at matched RL budget, plus a cadrille variant given double the RL steps, settles whether extra compute alone closes the gap.

Why not just tag each example with its source and train on everything at once? Source tags let the model switch between styles, but they do not teach it to generalize from simple to complex topology. They also leave the model in a "synthetic style" at test time on human parts. We include a tagged-mixing baseline under the same budget. If it matches our method, the conflict was about the model choosing between styles, not about the order of examples.

Proposed Experiments

We train on CAD-Recode plus the DeepCAD training split, and evaluate on the DeepCAD and Fusion 360 Gallery test sets. We also test zero-shot on the noisy real scans of CC3D, where no reported number was found on Lacuna, so all CC3D comparisons use our own reproductions. Inputs are point clouds, following cadrille's point-cloud setting. Metrics are IoU, median Chamfer distance, and invalid-script ratio, all broken down by loop count, plus an IoU-drop measure of forgetting on the simplest bin.

The decisive check is a comparison on the four-or-more-loop slice of DeepCAD and Fusion 360 Gallery. It compares four variants: canonicalized uniform mixing, the linear curriculum, the spiral curriculum, and reproduced cadrille. The results support three possible conclusions. If both curricula beat uniform mixing and the spiral schedule shows less forgetting, ordering matters and the education literature's warning about linear progression applies. If uniform canonicalized mixing ties the curricula, style was the cause. If raw human code under the curriculum still degrades, canonicalization is necessary and ordering alone is not enough.