Introduction
In the domain of creative AI, data scarcity presents a significant hurdle. For specialized tasks like composing in the style of J.S. Bach, researchers are restricted to a finite historical corpus—specifically, the 351 extant chorales. This limited data often leads to rapid overfitting, where models memorize specific patterns rather than internalizing the underlying musical grammar. To address this, we introduce AUG-GEN (Augmentative Generation), a framework that enables models to "self-augment" their training data using an external, music-theory-based critic.
The AUG-GEN Framework
AUG-GEN employs a "generate-grade-train" loop to iteratively expand the training set with high-quality synthetic examples. The process consists of four primary stages:
- Generation: A Transformer model with relative attention generates new musical sequences.
- Grading: An external grading function evaluates these sequences based on 18th-century counterpoint rules. This non-differentiable "critic" acts as an objective gatekeeper.
- Filtering: Only unique generations that meet a specific quality threshold ($t$) are added to the training set.
- Training: The model is retrained on the augmented dataset, effectively learning from its own validated successes.
Comparative Performance
The effectiveness of AUG-GEN was evaluated against several baselines: a model with no augmentation (Baseline-none) and a model that added all generations regardless of quality (Baseline-all). Results indicate that AUG-GEN significantly outperforms both baselines in terms of output quality.
As shown in Figure 1, AUG-GEN achieved a median grade of 8.02, substantially closer to the original Bach chorales (median 4.91) than the Baseline-none (10.62) or the noisy Baseline-all (24.10). This confirms that the grading function serves as a vital "low-pass filter," preventing the degradation of model performance by excluding low-quality synthetic data.
Training Dynamics
A key advantage of AUG-GEN is its ability to delay overfitting. While the baseline model reached its lowest validation loss at epoch 16, the AUG-GEN model continued to improve until epoch 19. By this point, synthetic examples constituted approximately 12% of the training data.
The training progression (Figure 2) illustrates a clear downward trend in error scores over time. The model progressively learns to generate sequences that satisfy the music-theory constraints, with the median grade eventually approaching the third quartile ($Q_3$) of the original Bach dataset.
Conclusion and Future Work
AUG-GEN demonstrates that incorporating domain-specific expert knowledge into the training loop can mitigate the limitations of small datasets. By using an external critic to curate self-generated data, models can achieve better generalization and higher output quality. Future research will focus on expanding the grading function to include global musical structures, such as rhythmic diversity and harmonic modulation, and exploring the framework's applicability to other rule-based domains like code generation.
Summary updated