Abstract
While large language models (LLMs) have excelled in mathematics and coding, the scientific domain has historically lagged behind due to data quality and evaluation challenges. Researchers from Shanghai Jiao Tong University introduce MegaScience, a 1.25-million-instance dataset designed to bridge this "science gap." By leveraging a dual-standard extraction pipeline from over 12,000 university textbooks and implementing rigorous decontamination, MegaScience-tuned models significantly outperform official instruct versions in reasoning accuracy and inference efficiency.
Introduction: The Scientific Reasoning Bottleneck
Despite the rapid advancement of open-source LLMs, scientific reasoning remains a difficult frontier. The authors identify four primary bottlenecks hindering progress: unreliable multiple-choice evaluations that are easily gamed, weak decontamination methods that allow test data to leak into training sets, low-quality web-scraped content prone to hallucinations, and "superficial distillation." The latter often involves prompting models to generate excessively long Chain-of-Thought (CoT) responses that increase token costs without improving actual reasoning depth.
Methodology: Beyond Naive Distillation
To address these issues, the researchers developed a sophisticated data pipeline focused on high-quality textbook extraction rather than simple web scraping.
Dual QA Extraction and Refinement
Instead of generic prompting, the team used a dual-standard approach to extract question-answer pairs from 12.8k university-level textbooks. "High-standard" criteria targeted multi-step reasoning, while "low-standard" ensured broad disciplinary coverage. These pairs were then refined using DeepSeek-V3 to ensure they were self-contained and logically sound, filtering out defective instances that referenced missing external figures.
Rigorous Decontamination
To maintain benchmark integrity, the authors moved beyond standard n-gram checks. They utilized embedding similarity to identify potential overlaps and employed Llama-3.3-70B to manually judge if training instances were paraphrases of test questions, ensuring that performance gains were genuine and not the result of data leakage.
The MegaScience Dataset
The project resulted in two primary resources:
- TEXTBOOKREASONING: 650k reasoning questions across seven disciplines (Physics, Biology, Chemistry, Medicine, CS, Math, and Economics).
- MEGASCIENCE: A 1.25-million-instance mixture combining the best subsets of TEXTBOOKREASONING with other high-quality sources like NaturalReasoning and Nemotron-Science.
Experimental Results
Evaluation across 15 comprehensive benchmarks—including MMLU-Pro, GPQA-Diamond, and SciBench—demonstrates the superiority of the MegaScience approach. Models fine-tuned on this dataset consistently surpassed official "Instruct" versions. For example, Qwen2.5-7B-MegaScience achieved an average score of 61.01%, a significant jump from the official Qwen2.5-7B-Instruct's 58.80%.
Key Insights: Efficiency and the "Overthinking" Penalty
A critical finding of the study is the negative correlation between excessive training response length and downstream performance. Many open-source datasets rely on long-form distillation that leads to "overthinking"—long, inefficient responses that do not necessarily improve accuracy.
In contrast, MegaScience models achieved state-of-the-art results with much shorter responses (averaging 410–721 tokens). This suggests that textbook-derived data provides a superior trade-off between performance and inference speed. Furthermore, the study noted a "capacity threshold" for mathematical reasoning, where models only began to significantly surpass official versions once they reached a parameter count of 7B or higher.
Conclusion
MegaScience demonstrates that high-quality, textbook-derived data is a goldmine for scientific post-training. By focusing on reasoning depth and data integrity rather than response length, the researchers have provided a blueprint for creating more efficient and capable scientific LLMs. Future work will explore using these datasets for reinforcement learning (RL) signals to further push the boundaries of automated scientific discovery.
Summary updated