aiqbench analysis
This research demonstrates that in code LLM fine-tuning for parametric CAD, semantically incorrect design headers actively degrade model performance below the no-header baseline by corrupting the learned mapping between intent and geometry. Using a derangement control method independent of the conditioning metric, the study proves that harm arises specifically from content correlation rather than mere distribution shifts or mechanical artifacts. For AI practitioners building specialized code generators, this highlights the critical need for robust evaluation metrics to avoid circular validation when testing instruction-following capabilities in engineering domains.
Wrong Design Intent Is Worse Than None: A Derangement-Control Diagnosis of Header Conditioning in CAD Program Completion
arXiv:2607.23191v1 Announce Type: new Abstract: Fine-tuned code LLMs can be conditioned on a lightweight design-intent header to steer parametric CAD generation, but whether the model actually reads the header's content has not been tested under a metric independent of the conditioning itself, nor with a causal control. We study CADCON, a five-feature design-intent header prepended to CadQuery-style sketch-extrude programs during LoRA fine-tuning of Qwen2.5-Coder-1.5B, re-scored by executable geometric assertions on the produced B-rep solid, sharing no code with the header-defining regex extractor. Across three seeds and a pre-registered {0%, 40%}-prefix $\times$ {correct, wrong, masked}-header matrix we find: (i) in conditional completion (40% prefix), a semantically wrong header degrades adherence below the no-header baseline (0.43 $\to$ 0.30/0.21 text/token) on design intents the model can render unconditioned -- polygonal and thin geometries; circle and tall intents sit at a baseline generation floor for this checkpoint ($\approx$0 in both compared arms) and are uninformative for this contrast; (ii) a derangement control -- retrained with shuffled ground-truth headers, identical header marginal but destroyed content correlation -- remains competent yet is immune to wrong headers, while the standard model is not (text headers; interaction significant on 3/3 seeds, p $\leq$ $4.2\times10^{-3}$): the harm requires the learned header$\to$program mapping, excluding the marginal/mechanical distribution-shift confound; (iii) the independent metric deflates the apparent benefit of a correct header (token: +0.21 regex $\to$ +0.02 geometry), quantifying metric circularity; (iv) the harm is regime-specific -- at 0% prefix the unconditioned baseline cannot generate valid CAD at all. Wrong intent is not noise: it actively misdirects generation.
Abstract:Fine-tuned code LLMs can be conditioned on a lightweight design-intent header to steer parametric CAD generation, but whether the model actually reads the header's content has not been tested under a metric independent of the conditioning itself, nor with a causal control. We study CADCON, a five-feature design-intent header prepended to CadQuery-style sketch-extrude programs during LoRA fine-tuning of Qwen2.5-Coder-1.5B, re-scored by executable geometric assertions on the produced B-rep solid, sharing no code with the header-defining regex extractor. Across three seeds and a pre-registered {0%, 40%}-prefix $\times$ {correct, wrong, masked}-header matrix we find: (i) in conditional completion (40% prefix), a semantically wrong header degrades adherence below the no-header baseline (0.43 $\to$ 0.30/0.21 text/token) on design intents the model can render unconditioned -- polygonal and thin geometries; circle and tall intents sit at a baseline generation floor for this checkpoint ($\approx$0 in both compared arms) and are uninformative for this contrast; (ii) a derangement control -- retrained with shuffled ground-truth headers, identical header marginal but destroyed content correlation -- remains competent yet is immune to wrong headers, while the standard model is not (text headers; interaction significant on 3/3 seeds, p $\leq$ $4.2\times10^{-3}$): the harm requires the learned header$\to$program mapping, excluding the marginal/mechanical distribution-shift confound; (iii) the independent metric deflates the apparent benefit of a correct header (token: +0.21 regex $\to$ +0.02 geometry), quantifying metric circularity; (iv) the harm is regime-specific -- at 0% prefix the unconditioned baseline cannot generate valid CAD at all. Wrong intent is not noise: it actively misdirects generation.
Machine Learning (cs.LG)
arXiv:2607.23191 [cs.LG]
(or arXiv:2607.23191v1 [cs.LG] for this version)
https://doi.org/10.48550/arXiv.2607.23191 Focus to learn more arXiv-issued DOI via DataCite (pending registration)
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.
Full text under the publisher's open licence · 345 words


