Rare defect synthesis is the practice of rebuilding scarce, restricted, or unusable manufacturing defect data into a balanced, learnable dataset that preserves the statistical structure of the real production line, so a machine vision inspection model can actually learn to catch the failures that almost never happen.
On a mature production line, a critical defect might show up in fewer than one part in ten thousand. That scarcity is exactly what makes the defect dangerous and exactly what starves the model meant to detect it. The class-imbalance problem is old enough to have a canonical answer: SMOTE, published in JAIR in 2002, corrects imbalance by generating synthetic examples of the minority class. In manufacturing quality, the data is rarely missing. It is imbalanced, locked to the shop floor, or too sparse in the classes that matter.

Why rare defects break machine vision inspection models
A machine vision inspection model learns from what it sees. When 9,999 of every 10,000 images are good parts, the model can score 99.99% accuracy by predicting “pass” every single time and still miss the one failure that triggers a recall. The metric looks excellent. The model is useless.
Class imbalance is the surface problem. Underneath it sit three harder ones. Real defect images are often tied to a specific customer’s product and cannot leave the plant. Historical defect records are thin because good engineering made the defects rare in the first place. And the defects that do appear cluster around specific process conditions, so a model trained on last quarter’s failures does not generalize to a new material lot or a retooled station. That decay is measurable: a Scientific Reports team aged four standard model types on 32 industry datasets and watched 91% of the combinations degrade over time.
Simple fixes fall short. Oversampling the minority class just shows the model the same handful of images repeatedly, which teaches it to memorize rather than generalize. Generic augmentation (rotate, flip, adjust brightness) changes pixels without adding a genuinely new defect. What a quality model needs is more true variation in the rare class, not more copies of what already exists.
What rare defect synthesis actually rebuilds
Rare defect synthesis produces new, plausible examples of the failure modes that are underrepresented, while keeping the relationships that define a real defect intact: the way a crack propagates along a grain boundary, the co-occurrence of a surface scratch with a specific coating thickness, the sensor signatures that accompany a solder void. The point is not to draw more pictures. The point is to give the model examples that behave, statistically, like defects it will meet in production.
This is where DTS, CUBIG’s AI-ready data transformation engine, does its work. DTS treats the rare class as a distribution to be rebuilt, not a folder of images to be copied. It uses Structure-Preserving Synthesis to hold the correlations that make a defect a defect, then applies rare-pattern augmentation to expand the thin class into a range a model can actually learn from. Differential privacy can be applied during synthesis so the rebuilt set does not leak any single real part or customer record, which is what lets the data move beyond the plant at all.

Diagnose, Transform, Rebuild on defect data
DTS runs the same three steps on manufacturing data that it runs anywhere, and the sequence matters because you cannot rebuild well what you have not measured.
Diagnose. Before touching anything, DTS profiles the dataset: which defect classes are present, how badly they are imbalanced, which features carry signal, and where the gaps are. On a real line this is often the first time a quality team sees, in numbers, just how thin their worst classes are.
Transform. DTS then rebuilds the scarce classes using Structure-Preserving Synthesis, so the synthetic defects respect the joint distribution of the originals rather than inventing artifacts a physicist would laugh at. This is a different thing from a generic synthetic data generator that optimizes for realistic-looking pixels; here the target is statistical fidelity to the failure mode.
Rebuild. Finally DTS assembles a balanced, model-ready dataset that combines real good parts, real rare defects, and rebuilt rare defects, ready to hand to your training pipeline. Because DTS uses a non-access architecture, it operates on the structure of the data without pulling raw parts or images out of the controlled environment. The caution fits the territory: a production line is operational technology, which NIST covers with a dedicated security guide, SP 800-82 Rev. 3, built around the performance, reliability, and safety constraints the domain runs under.
Rebuilt synthetic data versus the usual workarounds
Quality teams have tried several ways to feed a starving model. Here is how rare defect synthesis compares to the common alternatives on the things that decide whether a defect model ships.
| Approach | Adds real variation to rare class | Preserves defect structure | Can leave the plant safely |
|---|---|---|---|
| Do nothing (raw imbalanced data) | No | Yes | No |
| Oversample / duplicate minority class | No | Partial | No |
| Generic image augmentation | Partial | Partial | No |
| Generic synthetic data generator | Yes | No | Partial |
| Rare defect synthesis (DTS) | Yes | Yes | Yes |
The column that usually surprises people is the third one. A model that never leaves a single plant is a science project. Because DTS can apply differential privacy during synthesis, the rebuilt defect data can be shared across sites, vendors, or a central AI team without exposing the underlying parts, which is often what turns a pilot into a program.
Is your defect data ready to train on?
Run this quick check against your own quality dataset before you spend another sprint tuning a model that cannot see enough failures.
- Does your worst defect class have fewer than a few hundred genuine examples?
- Would your model score above 99% accuracy simply by predicting “pass” on everything?
- Are your defect images or records locked to one plant because of customer or regulatory constraints?
- Do new material lots or retooled stations produce failures your current model has never seen?
- Are you oversampling or duplicating the minority class to force class balance?
Two or more yes answers means the bottleneck is your data, not your architecture, and no amount of model tuning closes that gap.
Where rare defect synthesis fits in the CUBIG stack
DTS is the engine that rebuilds restricted, scarce, or unusable data into something a model can learn on. Rare defect synthesis is DTS pointed at the hardest version of that problem: a class so thin the model has almost nothing to study. On manufacturing data, DTS diagnoses the imbalance, rebuilds the rare classes with Structure-Preserving Synthesis and rare-pattern augmentation, and hands back a balanced dataset, all under a non-access architecture so raw parts stay where they belong.
DTS runs on the Syntitan platform, which is where the rebuilt data connects to the rest of your AI-ready workflow. If you want the deeper mechanics, start with what DTS is, then read how Structure-Preserving Synthesis keeps the statistics honest, how the Diagnose step measures your gaps first, and how DTS validation confirms the rebuilt set behaves like the real one before you train on it.

A note on expectations: a model trained on rebuilt defect data performs representatively until you reproduce the result on your own line. That is the point of running a proof on your data rather than trusting a benchmark from someone else’s factory.
Try it on your data for free. Run a sample proof and see it on your own workflow.
