Data Augmentation for AI Training
Procedural generation means using algorithms to generate data, as opposed to generating it manually, and it is common in gaming for levels, maps, items, and characters.
Why Training Data Is Sometimes Missing
Training an AI model usually depends on data. Sometimes the data you need is scarce, expensive to gather, or missing the cases you care most about. A common response is to create data artificially rather than waiting to collect more of it.
The idea of creating data artificially is older than AI. Data synthesis has a long history in software testing, gaming, and robotics, and the techniques developed in those fields are the foundation for the approaches covered in this article. Before asking how the process is done for AI, it helps to understand the older methods that it builds on.
Data augmentation, as covered here, is the family of methods for generating data artificially. This article follows the three main branches of that family: rule-based, simulation-based, and AI-powered synthesis. Along the way, it also introduces procedural generation, the algorithmic idea that underlies generating data without writing each item by hand.
Making Data by Hand or by Procedure
There are two broad ways to get a set of data items. In manual generation, a person creates each item by hand. Using algorithms to generate data is called procedural generation. In procedural generation, a program produces the items according to a defined procedure, so the same procedure can produce many items without a person writing each one.
The clearest everyday illustration comes from gaming. Procedural generation is commonly used in games to create levels, maps, items, and characters on the fly. The content is produced as the game runs rather than being stored in advance. The source notes that most data generation techniques used in these industries can be applied to AI. That is the bridge: a method that builds game worlds can, in principle, help build training data.
| Question | Manual generation | Procedural generation |
|---|---|---|
| Who creates each item? | A person, by hand | A program, following a defined procedure |
| Where does the work happen? | In each person's effort for each item | In the procedure, which is written once and then run |
| Can it scale to many items? | Only as fast as people can write them | The same procedure can produce many items |
| Typical everyday example | A hand-written list of sample sentences | A game creating levels, maps, items, and characters as it runs |
Manual and procedural generation differ in where the creative work is done. The last row is a generated illustration built on the gaming example from the source.
Rule-Based Synthesis: Rules Come First
Rule-based data synthesis is a traditional approach that produces data from predefined rules. The rules are written before generation begins. The generator does not learn them from examples; it applies them. Each output is therefore a product of the rules, and understanding a rule-based generator means understanding its rules.
Because the rules are explicit, a rule-based approach makes the structure of the output easy to control. If a rule says a value must fall in a certain range, every generated value falls in that range. The same explicitness is also the limit: the generator can only produce what the rules describe. A rule-based generator's output is bounded by its rules, so its structure is predictable, but its coverage is limited to what those rules describe.
Tracing a Rule-Based Generator by Hand
The following example uses rules invented for teaching purposes; the source does not describe these specific rules. Suppose a generator has two rules. Rule one: the next value is the previous value plus 3. Rule two: a value is kept only if it is at most 10. The generator starts at 2 and produces values until a value fails rule two.
Hand-Tracing the Generator Step by Step
Starting at 2, with the rules add 3 and keep only values at most 10, which items does the generator output?
- 1Step 1: starting value
The generator begins at 2. This starting value is kept because it is at most 10.
- 2Step 2: apply rule one
2 plus 3 gives 5. Rule two checks 5, which is at most 10, so 5 is kept.
- 3Step 3: apply rule one again
5 plus 3 gives 8. Rule two checks 8, which is at most 10, so 8 is kept.
- 4Step 4: apply rule one again
8 plus 3 gives 11. Rule two checks 11, which is greater than 10, so 11 is rejected.
- 5Step 5: stop
Because the value failed a rule, the generation stops. Every item in the output was produced by applying the rules, and none was written by hand.
The generator outputs 2, 5, 8. Nothing beyond these values is produced, because the rules define the limit of what can be generated.
Simulation-Based Synthesis: Recording a Run
Simulation-based data synthesis is the second traditional approach. Instead of writing data-producing rules directly, it generates data by running a simulation. The source describes this approach briefly as a traditional technique alongside rule-based synthesis, and it places robotics among the fields where data synthesis has a long history.
A simple way to picture the difference is this. A rule-based generator asks, for each item, what the rules allow. A simulation-based generator lets a modeled process unfold and records what it produces. The data comes out of the run of the model rather than being assembled field by field.
Placing the Three Approaches Side by Side
Traditionally, data synthesis and augmentation have followed two approaches: rule-based and simulation-based. A newer method, made possible by advanced AI models, uses AI itself to synthesize data. The diagram below places these three under the general idea of data synthesis. Read it as a family tree of methods rather than a sequence of steps.
| Approach | Where the generating logic comes from | What produces the data |
|---|---|---|
| Rule-based | Predefined rules written before generation begins | Applying the rules to inputs |
| Simulation-based | A modeled process or simulated environment | Running the simulation and recording what it produces |
| AI-powered | An advanced AI model | The AI model itself synthesizes the data |
The key distinction is where the generating logic comes from: hand-designed rules or simulations on one side, and a learned AI model on the other. The source introduces the AI-powered method only as a preview, and it is developed in the next section.
The first two approaches rely on rules or simulations that a person designs. The third relies on an AI model to produce the data. At the conceptual level, that is the main thing to hold onto before the AI-powered method is examined in detail.
Mistakes Beginners Make With These Approaches
Common mistake Expecting a rule-based generator to produce variety beyond its rules
What it looks likeUsing the rules add 3 and keep values at most 10, then expecting the output to include 11.
Why it failsA rule-based generator's output is bounded by its rules, so coverage is limited to what the rules describe.
Do this insteadTo get a value outside the rules, change the rules themselves and then trace the generator again.
Common mistake Assuming rules and simulations are the same thing
Why it failsRule-based synthesis applies explicit rules to each item, while simulation-based synthesis lets a modeled process unfold and records what it produces.
Do this insteadAsk whether the generator checks rules item by item or runs a process and records the result.
Common mistake Thinking procedural generation and manual generation differ only in speed
Why it failsThe difference is where the creative work happens: in each person's effort for manual generation, or in a procedure that is written once and then run.
Do this insteadLook at who or what defines each item and where that definition lives.
Common mistake Treating the terms data synthesis and data augmentation as interchangeable without checking the context
Practice: Changing the Rules
Using the same style of rule-based generator as before, suppose the rules are changed: the generator starts at 2, the next value is the previous value plus 4, and a value is kept only if it is at most 10. Trace the generator by hand. Which items are output?
Hints
- Apply the add-4 rule to 2 first, then check the result against the at-most-10 rule.
- Keep going until a value fails the check, then stop.
- Write out each step, as in the earlier worked example, so you can explain each output by pointing to a rule.
What do you think happens?
Before reading the answer, predict the output of the add-4 generator described above.
Reveal answer
2, 6, 10
Starting at 2, adding 4 gives 6, which is kept. Adding 4 again gives 10, which is at most 10, so it is kept. Adding 4 once more gives 14, which fails the check, so generation stops.
Key Takeaways
- Procedural generation uses algorithms to produce data according to a defined procedure, while manual generation means a person creates each item by hand.
- Rule-based synthesis applies predefined rules written before generation begins, so its output is predictable but bounded by what the rules describe.
- Simulation-based synthesis runs a simulated process and records what it produces, rather than assembling each data field from rules.
- The traditional approaches rely on rules or simulations that a person designs, while the newer AI-powered approach relies on an AI model to synthesize the data.