Demystifying Data Organization for Enhanced LLM Training

Yalun Dai, Yangyu Huang, Tongshen Yang, Yonghan Wang, Xin Zhang, Wenshan Wu, Qihao Zhao, Hao Li, Yuanyuan Gao, Kim-Hui Yap, Scarlett LiarXiv 2026

TL;DR

While data selection filters what an LLM learns, this paper reveals that how data is ordered during training drastically impacts final performance. By recycling pre-computed data quality scores, the authors introduce four core guidelines for data organization and propose two novel ordering strategies, STR and SAW, which significantly boost LLM performance and training stability with zero added computational overhead.

What Problem Does This Paper Address?

Modern Large Language Models (LLMs) are massive data guzzlers, but they are typically trained for only one or two epochs. In this "one-pass" training regime, the chronological order in which data samples are presented to the model becomes a first-order factor shaping its learning trajectory.

Standard practices usually rely on random shuffling. While Curriculum Learning (CL)—sorting data from easy to hard—seems like an intuitive alternative, it often backfires in LLM training. As the model transitions exclusively to complex data late in training, it suffers from catastrophic forgetting of the fundamental knowledge it learned early on. This paper addresses the underexplored challenge of strategically organizing training sequences to maximize knowledge retention and optimization stability without introducing expensive data-replay or re-scoring overhead.

Methods

The authors propose a framework that reuses pre-computed, sample-level quality or difficulty scores (originally generated during data selection steps) to permute the training sequence. They formalize four foundational guidelines for data organization:

  1. Boundary Sharpening (G1): Start training with low-score (simpler) data to stabilize early optimization, and finish with high-score (complex) data to maximize downstream reasoning capabilities.
  2. Cyclic Scheduling (G2): Periodically revisit the entire score spectrum so the model regularly reviews foundational concepts while progressing to harder ones.
  3. Curriculum Continuity (G3): Avoid abrupt drops or spikes in data difficulty that can shock the optimizer and cause training instability.
  4. Local Diversity (G4): Maintain high sample heterogeneity within individual mini-batches to prevent overfitting and ensure robust gradient diversity.

To put these principles into practice, they introduce two cross-guidance strategies:

  • Stair Ordering (STR): Maintains a global progression while injecting local "folding" mechanisms to facilitate periodic knowledge review.
  • Saw Ordering (SAW): An advanced variant that replaces abrupt folding transitions with smooth "zig-zag" patterns, satisfying all four guidelines simultaneously.
Figure 2: Visualization of score-index distribution under different data organization strategies. For clear compar- ison, L = 3 is used for FO, ZIG, STR, and SAW.

Datasets

The strategies were rigorously evaluated across both pre-training and Supervised Fine-Tuning (SFT) stages using the following datasets:

  • General Pre-training: FineWeb-Edu (1.3T tokens, sampled at 1B and 50B scales) and QuRatedPajama (260B tokens).
  • Math SFT: DeepMath-103K, a dataset built on reasoning paths using Chain-of-Thought (CoT) strategies.
  • Code SFT: OpenCodeInstruct, a large-scale instruction dataset graded by algorithmic complexity.
  • Evaluation: Downstream benchmarks included ARC, Hellaswag, MMLU, HumanEval, MBPP, and language modeling loss on a DCLM subset.

Key Insights and Ideas

  • The Perplexity Rebound: The authors proved that strict Curriculum Learning causes severe forgetting. Tracking the model's perplexity on simple data ($D_e$) showed that under a standard curriculum, the model's error on basic concepts spikes dramatically in the latter half of training. Cyclic scheduling completely mitigates this rebound.
  • Optimizer Shocks: Drastic shifts in data attributes cause massive spikes in the global gradient norm. By utilizing a continuous triangle-wave pattern (Zig-zag ordering), SAW stabilizes gradient magnitudes and ensures smoother optimization dynamics.
  • Flatter Minima: Injecting local jittering (JIT) into strictly sorted data acts as an implicit regularizer. Weight perturbation analysis revealed that models trained with local diversity develop broader, flatter minima, leading to superior robustness and generalization.

Key Results

  • Consistent Performance Gains: The proposed SAW strategy consistently outperformed both Random shuffling and vanilla Curriculum Learning across all evaluated model scales (160M to 1.7B parameters).
Figure 1: Performance comparison of different data or- ganization strategies. Bottom: Average accuracy (%) un- der increasing model sizes (160M–1.7B). Our proposed SAW consistently outperforms Random and Curricu- lum Learning (CL) across all scales, with larger gains at higher capacities. Top: Score–index distributions of training data organized by different strategies. Com- pared to Random and CL, SAW induces more structured and progressive score patterns, revealing increasingly organized curricula.
  • Pre-training & SFT Excellence: On FineWeb-Edu pre-training, SAW achieved the highest average benchmark accuracy. In SFT tasks, it significantly boosted performance on complex reasoning benchmarks like HumanEval and AIME.
  • Scalability to Frontier Models: Using the Chinchilla Scaling Law to extrapolate test losses, the authors demonstrated that the performance gains achieved by STR and SAW are highly scalable and are projected to persist for massive models like GPT-3 (175B) and Llama 3.1 (405B).

Limitations and Future Work

The primary limitation acknowledged by the authors is the dependency on pre-existing data-scoring metrics. If the initial sample-level scores are noisy, inaccurate, or irrelevant to the target task, the efficacy of the downstream STR and SAW sorting mechanisms will naturally degrade. Additionally, this study focused exclusively on text-based language modalities; exploring how these data organization principles translate to multimodal training (e.g., vision-language models) remains an open direction for future research.

Summary updated

BibTeX
@misc{dai2026demystifying,
  author = {Yalun Dai and Yangyu Huang and Tongshen Yang and Yonghan Wang and Xin Zhang and Wenshan Wu and Qihao Zhao and Hao Li and Yuanyuan Gao and Kim-Hui Yap and Scarlett Li},
  title = {{Demystifying Data Organization for Enhanced LLM Training}},
  year = {2026},
  eprint = {2605.30334},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.30334},
}
Figure