WildLong: Synthesizing Realistic Long-Context Instruction Data at Scale
Jiaxi Li, Xingxing Zhang, Xun Wang, Xiaolong Huang, Li Dong, Liang Wang, Si-Qing Chen, Wei Lu, Furu Wei
TL;DR
WildLong tackles the scarcity of high-quality long-context instruction data by grounding synthesis in realistic user interactions, constructing document-type-specific meta-information graphs, and adaptively generating instruction–response pairs. The two-stage pipeline combines graph-guided path sampling with GPT-4-driven instruction adaption to produce diverse, multi-document capable data, enabling scalable long-context tuning. Fine-tuning Mistral-7B-Instruct-v0.2 and Llama-3.1-8B-Instruct on 150K synthetic pairs yields substantial gains on long-context benchmarks (e.g., +14.7 on RULER for Mistral; 84.1 on RULER for Llama-3.1-8B) while preserving short-context performance without mixing short-context data. Ablation studies show the graph-based generation, multi-document data, and RoPE scaling interact to enhance performance, establishing WildLong as a practical paradigm for broad, realistic long-context reasoning in LLMs.
Abstract
Large language models (LLMs) with extended context windows enable tasks requiring extensive information integration but are limited by the scarcity of high-quality, diverse datasets for long-context instruction tuning. Existing data synthesis methods focus narrowly on objectives like fact retrieval and summarization, restricting their generalizability to complex, real-world tasks. WildLong extracts meta-information from real user queries, models co-occurrence relationships via graph-based methods, and employs adaptive generation to produce scalable data. It extends beyond single-document tasks to support multi-document reasoning, such as cross-document comparison and aggregation. Our models, finetuned on 150K instruction-response pairs synthesized using WildLong, surpasses existing open-source long-context-optimized models across benchmarks while maintaining strong performance on short-context tasks without incorporating supplementary short-context data. By generating a more diverse and realistic long-context instruction dataset, WildLong enhances LLMs' ability to generalize to complex, real-world reasoning over long contexts, establishing a new paradigm for long-context data synthesis.
