LLM-Enhanced Stochastic Generation of Class Diagram Datasets
Large language models (LLMs) excel at code-centric and algorithmic tasks, but their software design and modeling capabilities remain limited. Unlike abundant code that enables strong generation performance, the scarcity of high-quality design corpora in the training data restricts their software modeling comprehension. A practical solution is to automatically build large-scale, task-specific datasets for training and evaluating software modeling neural networks. This paper introduces CDGen, a neuro-symbolic pipeline for synthesizing large-scale Text-Class Diagram (TXT-CD) datasets. The pipeline consists of five core phases plus one optional augmentation step: first, a stochastic generator produces CD skeletons with random structures and identifiers; second, an LLM grounds skeletons to business domains by replacing random identifiers with domain concepts; third, CDs are refined via a hybrid LLM and rule-based fixing approach to improve quality; fourth, an LLM generates CD-aligned textual descriptions via few-shot prompting; fifth, alignment validation filters valid description-CD pairs for dataset storage. The optional augmentation step injects controlled noise into texts to mimic real-world description-model inconsistencies. Using this pipeline, we constructed CDSyn10K—a large-scale TXT-CD dataset with 10,000 description-model pairs across 2,000 business domains. Evaluations show CDSyn10K diagrams are highly diverse and comparable to expert-made artifacts. To demonstrate the effectiveness, we fine-tuned Qwen3-0.6B and Qwen3-8B on CDSyn10K to build Qw-OOD-0.6B and Qw-OOD-8B, which surpass the same-size generic LLMs on class diagram modeling tasks.
- Link
- https://www.semanticscholar.org/paper/9436894be6b283b14d2ba26847f89ee9495d4d41
- Found by
- Semantic Scholar
- Authors
- Xiao He, Jing-Wei Shen, Ru Chen
- Categories
- evaluation, dataset
- Published
- 2026-10-03
- Last seen by the radar
- 2026-10-05
- Citations
- 0
- Influential citations
- 0
- Radar score
- 37.25 / 100 (how it is scored)
- Why it scored so
- Matched: corpora$, dataset, evaluat; Primary record: Semantic Scholar
- Related links
- https://doi.org/10.1145/3822455.3830323