D$^3$: Dynamic Directional Graph-Constrained Data Scheduling for LLM Training

Yuanjian Xu, Jianing Hao, Guang Zhang, Zhong Li

In the development of Large Language Models (LLMs), immense effort is dedicated to data curation—deciding what information the model should learn. However, significantly less attention is paid to when the model should learn it. Most training pipelines treat data as "exchangeable," assuming that as long as the model eventually processes the data, the sequence is irrelevant.

The authors of $D^3$ (Dynamic Directional graph-constrained Data scheduling) challenge this assumption. They argue that data samples exhibit directional influences. Just as a student must learn addition before tackling multiplication, an LLM benefits when foundational "train-units" prime its parameters, making subsequent, complex data more informative. While current scheduling methods rely on static heuristics like "easy-to-hard" curricula, they fail to capture the evolving, complex dependencies between data types as the model learns.

Introducing the Dynamic Influence Graph

To address this, $D^3$ treats LLM training data not as a static pile, but as a dynamic graph of interactions. By calculating how training on one batch prepares the model for another, $D^3$ optimizes the training sequence to accelerate convergence and boost performance on complex reasoning tasks.

The framework operates through several core mechanisms:

  • Influence Prediction: For any two batches of data ($i$ and $j$), $D^3$ estimates how much updating the model on batch $i$ will decrease the loss on batch $j$.
  • Capturing Asymmetry via Curvature: First-order gradient interactions are symmetric, but real-world learning is directional ($i$ might help $j$ more than $j$ helps $i$). $D^3$ captures this asymmetry using second-order curvature (the Hessian matrix).
  • Graph-Constrained Optimization: Batches are represented as nodes in a graph, with edges denoting directional advantages. The system seeks a linear training sequence that violates as few of these directional preferences as possible.
  • Random-Swap Refinement (RSR): Because finding the perfect order among millions of batches is an NP-hard problem, $D^3$ employs a lightweight solver. It starts with a rough sequence and iteratively swaps pairs to minimize "violation costs."
  • Scalability Hacks: To scale to billion-parameter models, $D^3$ utilizes gradient compression (projecting high-dimensional gradients into smaller spaces) and Hutchinson estimation to approximate the Hessian without computing the massive full matrix.

Key Insights into Data Trajectory

The $D^3$ framework reveals several fundamental insights about LLM training dynamics. First, it shifts the focus from static data distribution to data trajectory. Because a model's state is non-stationary, the utility of a data point changes depending on what the model has already learned.

Second, curvature is the secret sauce. Simple gradient alignment (first-order methods) is insufficient for identifying which samples should precede others; second-order information is required to map the learning sequence accurately. Finally, $D^3$ naturally prioritizes foundational knowledge, breaking non-transitive cycles (e.g., A helps B, B helps C, but C helps A) at their weakest links to ensure a stable, catalytic learning path.

Experimental Results

The authors validated $D^3$ across both pre-training and Supervised Fine-Tuning (SFT) phases, using datasets like SlimPajama, The Pile, CodeAlpaca, and GSM8K-RFT.

  • Pre-training Gains: $D^3$ achieved a 4.2% relative reduction in perplexity over the strongest baselines. On specific commonsense tasks like OpenBookQA, it yielded a massive +10.1% improvement.
  • Supervised Fine-Tuning: When applied to Llama-3-8B, $D^3$ significantly outperformed standard Multi-Task Learning (MTL), driving gains in reasoning and coding benchmarks, notably MATH (+11.4%) and HumanEval (+8.0%).
  • The Efficiency Trade-off: $D^3$ introduces an 89% increase in computational overhead per step due to second-order calculations. However, the authors demonstrate that this cost is justified by the substantially higher convergence quality and final model performance.

Limitations and Future Directions

While highly effective, $D^3$ is not without limitations. The 89% computational overhead remains non-trivial, prompting future work into more advanced gradient flow techniques or layer-selective compression. Theoretically, the proof for convergence acceleration is currently grounded in a simplified linear regression proxy; extending these guarantees to the high-dimensional, non-convex landscape of Transformers remains a fundamental challenge. Finally, $D^3$ currently operates on batches for scalability. Achieving true per-sample scheduling for trillion-token datasets remains an open frontier in LLM optimization.

Summary updated

BibTeX
@inproceedings{xu2026d,
  author = {Yuanjian Xu and Jianing Hao and Guang Zhang and Zhong Li},
  title = {{D$^3$: Dynamic Directional Graph-Constrained Data Scheduling for LLM Training}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=gLBxxIwzkB},
}
Figure