DART-Math: Difficulty-Aware Rejection Tuning for Mathematical Problem-Solving

Solving mathematical problems requires advanced reasoning abilities and presents notable challenges for large language models. Previous works usually synthesize data from proprietary models to augment existing datasets, followed by instruction tuning to achieve top-tier results. However, our analysis of these datasets reveals severe biases towards easy queries, with frequent failures to generate any correct response for the most challenging queries. Hypothesizing that difficult queries are crucial to learn complex reasoning, we propose Difficulty-Aware Rejection Tuning (DART), a method that allocates difficult queries more trials during the synthesis phase, enabling more extensive training on difficult samples. Utilizing DART, we have created new datasets for mathematical problem-solving that focus more on difficult queries and are substantially smaller than previous ones. Remarkably, our synthesis process solely relies on a 7B-sized open-weight model, without reliance on the commonly used proprietary GPT-4. We fine-tune various base models on our datasets ranging from 7B to 70B in size, resulting in a series of strong models called DART-MATH. In comprehensive in-domain and out-of-domain evaluation on 6 mathematical benchmarks, DART-MATH outperforms vanilla rejection tuning significantly, being superior or comparable to previous arts, despite using much smaller datasets and no proprietary models. Furthermore, our results position our synthetic datasets as the most effective and cost-efficient publicly available resources for advancing mathematical problem-solving.

Paper

References (67)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer quxz4/10 · confidence 5/52024-07-08

Summary

This paper synthesizes a math reasoning dataset with a designed way of rejection sampling. Many base models show performance improvements on math reasoning tasks after instruction-tuning on this dataset. They promise to release the dataset and models.

Strengths

Their curated dataset achieves relatively good instructing-tuning performance with least data amount compared to other baselines. The dataset will be released.

Weaknesses

1. The proposed sampling technique is trivial and incremental, when comparing with previous works, e.g., the uniform method is used in ToRA, and the prop2diff method is used in MARIO. 2. There’s little improvement or even performance drop when tuning Mistral-7B and DeepSeekMath-7B compared to other baselines. As mentioned in the analysis section, this dataset is somehow replaceable by math-specific continual pre-training + supervised fine-tuning (SFT). 3. The major concern is that even the paper claims the proposed dataset is smaller, however, the LLM used to synthesize the smaller dataset is `DeepSeekMath-7B-RL`, which is trained on a larger SFT dataset. An alternative and reasonable response generation method should be leveraging the `DeepSeekMath-7B-Base` with proper prompting, as `DeepSeekMath-7B-Base` has not been supervised fine-tuned.

Questions

1. What’s the query coverage ratio on MATH training set constructed by Prop2Diff? 2. Any figure or statistics to show the difficulty distribution of your DART dataset? 3. Any case studies to show the generated responses of your DART dataset? How do you extract answers in the raw response? Responded texts from the LLM are quite likely not to follow your instruction as you apply such a high temperature in sampling process. It’s not likely that simple pipelines, such as regular expressions can achieve this.

Rating

4

Confidence

5

Soundness

2

Presentation

3

Contribution

1

Limitations

NA

Authorsrebuttal2024-08-10

Thanks for your reply! We would like to note that our work is not about **self** KD, but in general studying how to synthesize the best data from a strong model, which is like distilling from a stronger teacher model to student models, as we experimented with four different student models in the paper with the same teacher model. This setting aligns with many existing works [1,2,3,4,5,6,7], yet we replace their synthesis agent (GPT-4/3.5) with an open-weight model. Regarding the specific concern raised about using DeepSeekMath-7B-Base as the student model, this configuration is not strictly a self-KD setting either, because DeepSeekMath-7B-RL undergoes significant training with SFT+RL from DeepSeekMath-7B-Base on potentially large-scale human data, positioning it more akin to a stronger teacher -> student distillation scenario, therefore, it is not surprising that the student is not significantly better than the stronger teacher, just as the previous works that distill from GPT-4 cannot surpass GPT-4. The self-KD case as in existing works [8,9,10,11] should correspond to `synthesizing from DeepSeekMath-7B-Base and training DeepSeekMath-7B-Base`, or `synthesizing from DeepSeekMath-7B-RL and training DeepSeekMath-7B-RL`. As the reviewer mentioned in the original review, we agree that these self-KD settings are reasonable and meaningful, we didn't adopt this setting simply because self-KD is not the focus of this paper, just as previous works that distill from GPT-4/3.5 [1,2,3,4,5,6,7] never explore the self-KD experiments with other synthesis agents. (A minor correction: the cited “86.7 GSM8K / 58.8 MATH” results by the reviewer is the tool-integrated results that rely on external tools and are not comparable, their CoT results are 88.2 GSM8K / 51.7 MATH). > the SFT model is comparable or even worse than the original DeepSeek-RL. So why not directly use the open-sourced DeepSeek-RL? High-quality synthetic data is of great values for the developers and open-source community, various developers may rely on those data to help strengthen their own models. **Our primary goal is not to create a math model for direct use, but to develop better data synthesis methods** — the roles of data synthesis and the synthetic data are not replaceable by “directly use the open-sourced DeepSeek-RL”, for example, imagine someone wants to boost the math ability of Mistral-7B during post-training while still keeping it as a generic model, they can utilize our approach to synthesize data from another math-specific model, and incorporate the data together with other SFT data as commonly practiced nowadays, but directly using DeepSeek-RL does not fulfill the goal. As the reviewer mentioned above, self-KD is one way to synthesize data for self-improvement, yet distilling from other models is very common as well, and our paper focuses on the later where student models do not need to surpass the teacher. [1] Luo, Haipeng, et al. "Wizardmath: Empowering mathematical reasoning for large language models via reinforced evol-instruct.” Preprint 2023. [2] Yu, Longhui, et al. "MetaMath: Bootstrap Your Own Mathematical Questions for Large Language Models." ICLR 2024. [3] Liu, Haoxiong, and Andrew Chi-Chih Yao. "Augmenting math word problems via iterative question composing." Preprint 2024. [4] Mitra, Arindam, et al. "Orca-math: Unlocking the potential of slms in grade school math.” Preprint 2024. [5] Li, Chen, et al. "Common 7b language models already possess strong math capabilities.” Preprint 2024. [6] Huang, Yiming, et al. "Key-point-driven data synthesis with its enhancement on mathematical reasoning." Preprint 2024. [7] Tang, Zhengyang, et al. "MathScale: Scaling Instruction Tuning for Mathematical Reasoning." ICML 2024. [8] Wang, Yizhong, et al. "Self-Instruct: Aligning Language Models with Self-Generated Instructions.” ACL 2023. [9] Dong, Hanze, et al. "RAFT: Reward rAnked FineTuning for Generative Foundation Model Alignment.” TMLR. [10] Yuan, Weizhe, et al. "Self-Rewarding Language Models.” ICML 2024. [11] Chen, Guoxin, et al. "AlphaMath Almost Zero: process Supervision without process.” Preprint 2024.

Reviewer quxz2024-08-12

Thanks for your reminder that **DeepSeek-Math-RL** can achieve “86.7 GSM8K / 58.8 MATH” and "88.2 GSM8K / 51.7 MATH" for PoT and CoT, respectively. As other partial concerns are addressed, I will increase rating from 3 to 4. However, my main concern still exists based on the 3 following facts. 1. The SFT data is generated by running the **open-sourced DeepSeek-Math-RL**. In addition, the modified reject sampling based data generation method is not a significant innovation, which is widely used in previous works. 2. If **DeepSeek-Math-Base** is used as the base model, the performance of the fine-tuned model is only comparable with **the original DeepSeek-Math-RL**. The improvement is not significant. 3. If a less competitive base model is used, like **Llama** or **Mistral**, the performance of the fine-tuned models are significantly worse than the **original DeepSeek-Math-RL**. The standard reject sampling in the original DeepSeek paper already achieved strong results. In either way, I did not observe any advantage of using the proposed method over the **open-sourced DeepSeek-Math-RL**.

Reviewer M9p34/10 · confidence 4/52024-07-10

Summary

The paper introduces Difficulty-Aware Rejection Tuning (DART), a novel approach for enhancing the mathematical problem-solving capabilities of large language models (LLMs). Traditional methods often produce datasets biased towards easier queries, limiting the models' ability to learn from challenging examples. DART addresses this by allocating more sampling trials to difficult queries during the data synthesis phase. The authors created two strategies, Uniform and Prop2Diff, to ensure a balanced representation of easy and difficult queries. Using only open-weight models, the authors generated new, smaller datasets that prioritize difficult queries.

Strengths

1. The DART method effectively addresses the bias towards easy queries in traditional rejection sampling, which is a significant contribution to the field. 2. The paper provides a thorough analysis of the biases in existing datasets and clearly explains how DART mitigates these issues. 3. The authors plan to make their datasets and models publicly available, contributing valuable resources to the research community.

Weaknesses

1. The success of DART relies heavily on the ability of models to generate correct responses for difficult queries, which may not always be feasible for extremely challenging problems. 2. While the focus on difficult queries is commendable, the quality of the generated responses for these queries needs to be high to truly benefit the training process. The paper does not provide a detailed analysis of the quality of these responses. 3. The approach's reliance on extensive sampling for difficult queries might pose scalability issues, particularly for very large datasets or models with limited computational resources.

Questions

1. How to be aware of difficulty if not labelled 2. How to choose $k_u$。 3. The details of Prop2Diff is missing. How many samples were generated for each difficulty level? What is the equation for generating numbers?

Rating

4

Confidence

4

Soundness

2

Presentation

3

Contribution

2

Limitations

The limitation is mentioned in the conclusion section.

Reviewer neCQ5/10 · confidence 5/52024-07-12

Summary

The paper proposes a rejection sampling pipeline for automatically generating SFT data, emphasizing that harder data requires more trials. The difficulty is heuristically determined using the ratio of incorrect trials for each question. Experiments demonstrate that this method can outperform traditional rejection methods on various math benchmarks.

Strengths

- The experiments are solid, showing significant improvements over traditional rejection methods. - The paper is clearly written and easy to follow.

Weaknesses

The proposed Prop2Diff strategy lacks innovation. Assigning more budget to more complex questions in data synthesis is a common practice. For instance, in [1], which successfully annotated 83.1% of MATH questions, it is evident that harder problems were allocated more budget in rejection sampling. [1] also indicates that fewer and harder data can significantly and efficiently improve performance. The authors should discuss the differences between their approach and the one used in [1] more thoroughly. [1] ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem Solving

Questions

Could you elaborate on how your approach differs from the rejection sampling strategy used in [1]? [1] ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem Solving

Rating

5

Confidence

5

Soundness

2

Presentation

3

Contribution

2

Limitations

Yes

Authorsrebuttal2024-08-13

Dear Reviewer neCQ, Sorry to disturb you for the last time, but only one day is left until the end of the reviewer-author discussion stage. We still do not know if you have received our newest response. To address your concerns, we wrote all the responses in detail and added new experiments to support them, including: 1. **A1**: showing 83.1% coverage mentioned from ToRA is not an exceptionally high number; 2. **A2 & Author Rebuttal**: elaborately designed experiments and detailed explanations to clarify the difference between the sampling strategies between ToRA and DART. Conducting the additional experiments within the limited rebuttal period is challenging. We would like to know whether our responses have addressed your concerns. If you still have other concerns, please give us an opportunity to clarify them. We sincerely hope that you can take a moment to reply, as it is very important for researchers and their efforts on this work. Best regards, The Authors

Reviewer dSs86/10 · confidence 4/52024-07-21

Summary

The paper presents an approach to improving the performance of LLMs in mathematical problem-solving. The authors identify that current datasets synthesized using proprietary models like GPT-4, are biased towards easier queries. To address this, they introduce Difficulty-Aware Rejection Tuning (DART), which allocates more trials to difficult queries during data synthesis. This method generates datasets focusing on difficult queries using an open-weight model, DeepSeekMath-7B-RL, without relying on proprietary models. The authors demonstrate that models fine-tuned on DART-Math datasets significantly those fine-tuned on traditional datasets across various mathematical benchmarks, and beat the best baseline by average of roughly 3-4%

Strengths

- Technically solid paper with state-of-the-art results. - Mostly well-presented and easy to understand. - Comprehensive experiments and analysis. - Decent impact in improving mathematical capabilities of LLMs, with the authors publicly releasing their dataset. - By using an open-weight model, DeepSeekMath-7B-RL, the authors eliminate dependency on proprietary models like GPT-4, making the approach more accessible.

Weaknesses

1. It is unclear how the hyperparameters of the baseline, VRT (vanilla rejection tuning), were tuned. For instance, as mentioned in Appendix A.2, sampling temperature is searched from 0.3 to 1.7 for DART. Was the same procedure used for VRT? Another caveat is the need for extensive hyperparameter tuning compared to baselines. Were similar extensive procedures for tuning performed for other baselines? 2. It is unclear if the improved performance of the proposed method is due to difficulty or the topic of the problem. For instance, LEVEL 5 Math problems may have a higher number of geometry questions (or at least their fail rate is higher, resulting in fewer samples in VRT). An analysis of topic-wise performance comparing DART and baseline methods may clarify this. **Minor Weaknesses: ** 1. It is unclear how much advantage the method would provide in the case of other multi-iteration fine-tuning methods such as STaR and v-STaR. For instance, it is possible that after multiple iterations, VRT performs similarly to DART, since a higher number of samples will be collected from even the hard problems in second or further iterations. 2. The data synthesis is only done using the DeepSeekMATH-7B model. It is unclear why this model was chosen. Previous methods using VRT-like methods typically use the same model for synthesis and generation. Thus, higher results in smaller models such as Llama-8B may partly be due to the use of stronger models' reasoning chains, making it similar to a distillation method.

Questions

1. The authors use "fail rate" as a metric to measure difficulty. However, has any analysis been performed to measure how good an estimate it is of actual model accuracy? 2. In line 138, "we sample till correct responses for each query is proportional to its difficulty score," does it mean linearly proportional? 3. To the best of my knowledge, previous works usually use lower temperatures in the range of 0.7-1. However, the authors found 1.6 to be effective. Do the authors have a comparison of results between using a more standard temperature (e.g., 0.7 or 1) compared to 1.6? 4. In Line 253, the authors state: "We hypothesize that this is due to these models’ extensive pretraining on mathematical content." Do the authors have more points to substantiate this? For instance, it could be partly due to a slightly weaker or similar model being used to generate synthetic data. Further, the hypothesis: "This pretraining likely covers most skills that could be learned from the GSM8K and MATH training queries" may not be correct, since, at least for Llama2-70B, the model capacity should not be a bottleneck to achieving higher scores on MATH (e.g., Qwen models). Can the authors provide a more detailed reasoning behind this hypothesis?

Rating

6

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

Major Limitations are addressed in paper.

Reviewer quxz2024-08-07

Thanks for the feedback from the authors. I'm not arguing that your data generated by DeepSeek-RL should be compared with previous works with GPT generated data. I think such self knowledge distillation (KD) method is fine. My main concern is that you use DeepSeek-RL to create the SFT dataset, then you fine-tune DeepSeek-base on this dataset, but the performance in Table 2 indicates that the the SFT model is comparable or even worse than the original DeepSeek-RL (GSM8K 86.7, MATH 58.8). So why not directly use the open-sourced DeepSeek-RL? The expectation of self-KD method is to significantly improve the model itself. If the self-KD cannot improve the model itself, there should be some technical or practical flaws in the method.

Authorsrebuttal2024-08-12

Urgent Reminder of Rebuttal

Dear Reviewer quxz, Sorry to disturb you for the last time, but only one day is left until the end of the reviewer-author discussion stage. We still do not know if you have received our newest response. To address your concerns, we wrote all the responses in detail and added new experiments to support them, including: 1. **A1 & Author Rebuttal**: elaborately designed experiments and detailed explanations to clarify the difference between the sampling strategies between ToRA&MARIO and DART; 2. **A4 & Follow-up Comment**: doubly checked clarification of our setting as pure distillation instead of self-KD; 3. **A2-3,5-7**: clarifications about the setting/details in the paper. Conducting the additional experiments within the limited rebuttal period is challenging. We would like to know whether our responses have addressed your concerns. If you still have other concerns, please give us an opportunity to clarify them. We sincerely hope that you can take a moment to reply, as it is very important for researchers and their efforts on this work. Best regards, The Authors

Authorsrebuttal2024-08-12

Kind Reminder before the End of Discussion

Dear Reviewers, We sincerely appreciate your feedback. Now, we would like to send you a friendly reminder that the discussion stage will be complete soon. If you have any additional concerns or questions, please do not hesitate to let us know. We are more than willing to discuss any further suggestions or issues you might have. Best regards, The Authors

Reviewer M9p32024-08-12

While I appreciate the authors' efforts in addressing the feedback, I still have a few concerns that impact my overall assessment. 1. > "we have shown that DeepSeekMath-7B-RL is able to generate correct responses for nearly 100% of the queries in the MATH500 test set when sampling more". Even the most advanced closed-source models (GPT-4o or Claude-3) struggle to reach such high accuracy on this challenging dataset. It is unclear how increased sampling alone could lead to such an unprecedented level of accuracy. Thus, this result seems "suspicious", a further clarification on this point is necessary to ensure the results are credible. 2. > "we just use the final answer to filter responses as in most previous works," However, this approach does not address the issue of "reward hacking," where models may generate the correct answer but fail to produce reasonable intermediate steps. This flaw significantly impacts the quality of the generated datasets and, by extension, the paper’s overall contribution. While I understand that the primary focus of this work is on data generation methods (as highlighted by the authors and other reviewers), the evaluation methodology used here undermines the reliability of the findings.

Authorsrebuttal2024-08-12

Thanks for your reply! 1. The phenomenon that increased sampling would greatly improve pass@k accuracy on MATH dataset has been already observed by several previous works as well — for example, [1] reported over 80% MATH accuracy with GPT-4 when k=11, [2] reported 72% MATH accuracy with a weak Llama2-7B model when k=256, [3] reported over 85% MATH accuracy with DeepSeekMath-7B-RL when k=64. We totally understand that the reviewer thought these results were “suspicious”. To further clarify this, a high pass@k accuracy only means the correct answer exists among k responses, and it does not entail the model can solve the problem practically because it is hard to select the correct answer out. Additionally, pass@k accuracy is computed by matching the final answer, where the intermediate steps may be wrong even when the final answer is correct. Therefore, we think this high pass@k accuracy is understandable. 2. For the second point, we agree that the “reward hacking” phenomenon may indeed exist, and almost all rejection-sampling-based data synthesis methods including ours admit this limitation as it is non-trivial to guarantee the correctness of the intermediate steps. While imperfect with flaws, rejection-sampling-based synthetic data is still widely used [4, 5] to improve model’s final accuracy on these benchmarks, as we demonstrated in the paper as well — of course, the “reward hacking” phenomenon may be also present in benchmark evaluation where these models in previous works and our paper yield the correct final answer with wrong intermediate steps, yet how to evaluate math problem solving more faithfully considering intermediate steps is an evaluation problem beyond our scope and still an active research direction [6,7]. [1] Toshniwal, Shubham, et al. "Openmathinstruct-1: A 1.8 million math instruction tuning dataset.” Preprint 2024. [2] Li, Chen, et al. "Common 7b language models already possess strong math capabilities.” Preprint 2024. [3] Shao, Zhihong, et al. "Deepseekmath: Pushing the limits of mathematical reasoning in open language models.” Preprint 2024. [4] Dubey, Abhimanyu, et al. "The Llama 3 Herd of Models.” Preprint 2024. [5] Yuan, Zheng, et al. "Scaling relationship on learning mathematical reasoning with large language models.” Preprint 2023. [6] Xia, Shijie, et al. "Evaluating Mathematical Reasoning Beyond Accuracy.” Preprint 2024. [7] Zeng, Zhongshen, et al. "MR-BEN: A Comprehensive Meta-Reasoning Benchmark for Large Language Models.” Preprint 2024.

Reviewer M9p32024-08-12

I thank the authors' response, but my concerns remain: 1. As the authors noted and as supported by the literature, achieving nearly 100% results by merely increasing sampling is challenging. This is because, regardless of the number of samples, the model may still produce incorrect answers due to its inherent limitations in solving the problem. This outcome aligns with the original performance reported by the DeepSeekMath model, where such results appear unrealistic. 2. The authors have acknowledged that "reward hacking" persists, which impacts the soundness of proposed method and datasets. Given these concerns, I believe the current paper is not yet ready for acceptance, and I have therefore lowered my score.

Authorsrebuttal2024-08-13

Thank you for your feedback! 1. We want to clarify that it is reasonable to expect a high pass@k score and it does not contradict with the numbers from previous literature — all mentioned pass@k results above in the literature are from relatively small $k$, and they did not explore the effect when further increasing $k$. From the DeepSeekMath paper, particularly, their Figure 7 shows the pass@k accuracy trend is not close to convergence and still steadily improving when $k$ reaches 64 and pass@k is already over 85%, and they did not report results from larger $k$. **From the trend the DeepSeekMath paper reported in their Figure 7, a high pass@k like over 90% or 95% is actually quite expected when $k$ is further increased**, thus we don’t find our pass@k accuracy too unrealistic based on these previous studies. In fact, our results with smaller values of $k$ are consistent with them. For instance, as shown in Figure 2 (Right) of our paper, when $k\in[32,64]$, we achieve a pass@k rate of approximately 85-90%, which aligns well with DeepSeekMath's findings. Another point to help explain the high pass@k scores is that pass@k is an overestimated proxy of “complete correctness” that considers intermediate steps, due to the reward hacking issue the reviewer mentioned. 2. The reward hacking issue may exist not only in our method, but also in all rejection-sampling-based approaches for mathematical reasoning tasks. Synthetic datasets from rejection sampling are not completely correct and indeed contain noise due to reward hacking, yet they still help models empirically as evidenced and are being deployed practically in many works. Additionally, we want to note that "reward hacking" is still a difficult open problem, where little progress has been seen to evaluate intermediate steps faithfully — we feel further diving into reward hacking is an important direction for this field in general but a bit beyond the scope of this submission.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC