A research team from MIT, IBM, and Red Hat has developed GIFT, a method that converts near misses generated by AI that generates CAD programs from images into new learning data. The main evaluation using the GenCAD code increased the average IoU, a measure of shape agreement, from 0.698 to 0.782. The researchers report that GIFT matched the performance of traditional models, which generate 10 candidates during inference and use only about two candidates to select the best one. However, this does not mean that calculations have disappeared. This is a study that reduces the search burden during use by generating approximately 1 million candidates in advance and paying the cost of filtering them with a CAD kernel in advance.
GIFT is not a new CAD application or basic model. It is a data augmentation framework built on its predecessor CAD-Coder that feeds back correct solutions and failures discovered by the model during inference to supervised learning. MIT announced the research results on July 16, 2026, stating that the research was presented at the International Conference on Machine Learning.
Adding alternative code that generates the same shape as the correct answer
Creating editable CAD from images requires more than just creating 3D shapes. CAD-Coder, the foundation on which GIFT is built, takes a single image and a fixed prompt as input and generates CadQuery Python code. When you run the code, solids are constructed using parameters in B-Rep or STEP format. The main difference from directly outputting a fixed mesh is that the designer can later change the dimensions and processing steps.
Traditional supervised learning is not good at making one-to-one connections between images and correct code. There is more than one way to combine extrusion and cutting, even for the same solid. However, if there is only one reference code, even geometrically correct alternative codes are treated as incorrect. GIFT runs the generated code in OpenCASCADE, makes decisions based on the resulting shape rather than the string of code, and measures IoU for the correct shape.
There are two training signal streams. GIFT-REJECT keeps candidates with IoU between 0.9 and 0.99 as high-quality alternative solutions and treats them as additional correct codes to the original image. This allows us to learn a broader distribution of programs that arrive at the same shape, rather than choosing one exact match and ending up with it.
GIFT-FAIL handles executable failures with an IoU between 0.5 and 0.9. It does not teach the model to remember failing code as correct. Instead, it constructs an incomplete 3D shape from the failing code, converts it back to an image, and combines this “wrong shape image” with the original correct code. The model learns to recover correct codes from input that contains geometric gaps and misalignments. The design separates diversified success stories and recovery from failure as separate teaching signals.
From 0.698 to 0.782: Breakdown of 5th inference candidate
In tests using the GenCAD code, we achieved an average IoU of 0.698 with regular supervised fine-tuning (SFT). Adding common data augmentation only raised it to 0.710. Meanwhile, gift rejection using high-quality alternative solutions reached 0.742. GIFT-FAIL using failure shape reached 0.761. GIFT combining both reached 0.782.
The increase from 0.698 to 0.782 represents an increase of 0.084, a relative improvement of about 1. 12%. Increasing the number of correct alternative solutions and especially learning from recoverable failures are complementary, as combining both mechanisms provides better performance than using either one alone.
Diagram of “reducing inference calculations by about 1/2” 80%“” is not a direct measurement of processing time or total GPU time. In the paper’s inference scaling table, if we generate 10 candidates and select the best one, SFT reaches an IoU of 0.807. GIFT achieved 0.802 with 2 candidates and 0.809 with 3 candidates. The research team describes this as “approximately” because it can reach the same level as 10 candidates with about 2 candidates. 80% The amount of calculation based on the number of candidates is reduced.
This difference also appeared in single-shot production. The “amortization gap” (the difference in performance between generating one candidate and generating 10 candidates) is 15.5% From SFT 5.2% As a gift. It is more accurate to view this as moving toward a model that easily generates high-quality code in fewer trials, rather than a model that searches for the correct answer through repeated trials.
Offline calculation: 1 million candidates pre-generated
GIFT shifts the computational load to pre-training data creation instead of reducing candidates during use. The researchers started with about 80,000 training images and combined five stages of 8 to 128 candidates per image and 29 different generation settings to generate about 1 million raw candidates. By running and comparing geometries with CAD kernels and selecting alternative solutions and recoverable faults, the fine-tuning dataset grew from approximately 163,000 pairs to approximately 370,000 pairs.
8 units used for fine adjustment 80GB A100 GPU, up to 10 epochs configured. According to the paper, actual convergence occurred in 3 to 4 epochs. therefore, 80% The savings do not reflect the total cost reduction, which includes approximately 1 million candidate generation, CAD execution, and IoU calculations. This is a one-time offline payment, and the results are stored in the model weights, making repeated inference cheaper. The more you use the model, the easier it will be to recover your initial costs.
This separation has implementation advantages. Evaluation of CAD code requires a CPU-based geometry kernel, but incorporating it into each step of online reinforcement learning tends to leave the GPU waiting for results. GIFT pre-integrates candidate search and validation and then reverts to regular supervised fine-tuning. It requires no additional manual labeling or specialized architecture, so it can be easily incorporated into existing models for problems where deterministic validation tools are available.
However, it is not possible to construct the same cycle without the ability to match it with the correct shape. GIFT did not discover designs autonomously, using only models (known good CAD and OpenCASCADE functionality as a grader).
High IoU does not guarantee manufacturability
The IoU of 0.782 indicates geometry overlap due to the GenCAD-Code evaluation procedure. For evaluation, the generated and correct shapes are centered, scale normalized, and aligned to the principal axes of inertia to obtain the highest IoU among the permutations of the axes. This is a reasonable approach to comparing the shapes themselves while eliminating differences in absolute dimensions and coordinate systems. However, just because the number is large does not necessarily mean that the dimensions or direction are correct. Materials and load capacity are also not subject to evaluation.
Preliminary evaluations using 400 real-world images showed a significant reduction in absolute IoU compared to standard tests. The percentage of executable code was also lower for GIFT. 96.75% compared to SFT 97.60%. GIFT reduced pure code generation failures, but 1.18% to 0.60%increased execution errors in OpenCASCADE. 1.18% to 2.45%. Feasibility and shape accuracy are different metrics, and improvements in one do not guarantee improvements in the other in real images.
The research team also acknowledges that GIFT requires a deterministic geometry kernel and the correct CAD program. It is not a system that continuously learns by scoring on the spot from photos without correct answers or innovative designs. Manufacturability and real-world performance are positioned as goals for future expansion.
GIFT’s work shows that useful candidates already discovered by CAD-generated AI during inference can be fed back into the model rather than discarded. Conditions for progressing to practical use include measuring accuracy using images with stored scales, and preparing a grader that can automatically verify dimensional tolerances, manufacturing constraints, and physical performance. Once you reach that point, failure turns from a cost of retrying to an asset that improves your next design.
