Datasets:
Add files using upload-large-folder tool
Browse files- parse/test/6M5G5hNiAU/6M5G5hNiAU.md +436 -0
- parse/test/7oLshfEIC2/7oLshfEIC2.md +0 -0
- parse/test/7oLshfEIC2/7oLshfEIC2_content_list.json +0 -0
- parse/test/7oLshfEIC2/7oLshfEIC2_middle.json +0 -0
- parse/test/7oLshfEIC2/7oLshfEIC2_model.json +0 -0
- parse/test/82A2EfMu3e/82A2EfMu3e.md +581 -0
- parse/test/82A2EfMu3e/82A2EfMu3e_content_list.json +0 -0
- parse/test/82A2EfMu3e/82A2EfMu3e_middle.json +0 -0
- parse/test/82A2EfMu3e/82A2EfMu3e_model.json +0 -0
- parse/test/IW1PR7vEBf/IW1PR7vEBf.md +0 -0
- parse/test/IW1PR7vEBf/IW1PR7vEBf_content_list.json +0 -0
- parse/test/IW1PR7vEBf/IW1PR7vEBf_middle.json +0 -0
- parse/test/IW1PR7vEBf/IW1PR7vEBf_model.json +0 -0
- parse/test/jh7wH2AzKK/jh7wH2AzKK.md +0 -0
- parse/test/jh7wH2AzKK/jh7wH2AzKK_content_list.json +0 -0
- parse/test/jh7wH2AzKK/jh7wH2AzKK_middle.json +0 -0
- parse/test/jh7wH2AzKK/jh7wH2AzKK_model.json +0 -0
- parse/test/lifLHzadgr/lifLHzadgr.md +790 -0
- parse/test/lifLHzadgr/lifLHzadgr_content_list.json +0 -0
- parse/test/lifLHzadgr/lifLHzadgr_model.json +0 -0
parse/test/6M5G5hNiAU/6M5G5hNiAU.md
ADDED
|
@@ -0,0 +1,436 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# HOW ABILITIES IN LARGE LANGUAGE MODELS ARE AFFECTED BY SUPERVISED FINE-TUNING DATA COMPOSITION
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Large language models (LLMs) with enormous pre-training tokens and parameter amounts emerge abilities, including math reasoning, code generation, and instruction following. These abilities are further enhanced by supervised fine-tuning (SFT). The open-source community has studied on ad-hoc SFT for each ability, while proprietary LLMs are versatile for all abilities. It is important to investigate how to unlock them with multiple abilities via SFT. In this study, we specifically focus on the data composition between mathematical reasoning, code generation, and general human-aligning abilities during SFT. From a scaling perspective, we investigate the relationship between model abilities and various factors including data amounts, data composition ratio, model parameters, and SFT strategies. Our experiments reveal that different abilities exhibit different scaling patterns, and larger models generally show superior performance with the same amount of data. Mathematical reasoning and code generation improve as data amounts increase consistently, while the general ability is enhanced with about a thousand samples and improves slowly. We find data composition results in various abilities improvements with low data amounts, while conflicts of abilities with high data amounts. Our experiments further show that composition data amount impacts performance, while the influence of composition ratio is insignificant. Regarding the SFT strategies, we evaluate sequential learning multiple abilities are prone to catastrophic forgetting. Our proposed Dual-stage Mixed Fine-tuning (DMT) strategy learns specialized abilities first and then learns general abilities with a small amount of specialized data to prevent forgetting, offering a promising solution to learn multiple abilities with different scaling patterns.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Recent research has demonstrated the remarkable and versatile proficiency of large language models (LLMs) in dealing with a variety of real-world tasks expressed in natural languages (Ouyang et al., 2022a; Anil et al., 2023; OpenAI, 2023). Among the tasks, LLMs especially emerge with three outstanding abilities in reasoning (Cobbe et al., 2021; Wei et al., 2022), coding (Chen et al., 2021), and aligning general human intentions (Ouyang et al., 2022a), which have drawn much attention from the LLM research community. In order to further incentivize such abilities, it necessitates supervised fine-tuning (SFT) stages on annotated task data. However, existing research has mostly conducted separate SFT investigations on each of the three tasks, where reasoning and coding abilities require SFT on in-domain human-annotated or augmented data (Yuan et al., 2023b; Luo et al., 2023) while diverse and complex human instructions are applauded for aligning human intentions (Wang et al., 2023c; Taori et al., 2023; Xu et al., 2023; Zhou et al., 2023; Wang et al., 2023a; Lu et al., 2023). As shown by the strong performance of proprietary LLMs such as GPT-4 (OpenAI, 2023) and Claude, LLMs have the potential to master all the tasks in one model. Therefore, it is of paramount importance to investigate the versatile performance of SFT with composite task data, and understanding and addressing the challenges posed by the data composition problem in the SFT stage is crucial for further enhancing the capabilities of LLMs in a comprehensive manner.
|
| 12 |
+
|
| 13 |
+
In essence, the tasks of reasoning, coding, and aligning human intentions are of different characteristics. Reasoning and coding tasks require ad-hoc abilities of complex and detailed logic in decomposing task instructions and dealing with non-linguistic and symbolic features (Chen et al., 2021; Huang & Chang, 2023), whereas aligning human intentions requires versatility and understanding obscure intentions expressed in human instructions (Lu et al., 2023). Given the fundamental difference among the tasks, multi-task learning with composite data fine-tuning for small-scaled pre-trained language models is prone to catastrophic forgetting (De Lange et al., 2022), hindering the fine-tuned performance of one model on separate tasks. Many efforts have been made to compensate for the phenomenon (Liang et al., 2021; Xu et al., 2021; Yuan et al., 2023a). There has also been research discovering that scaling up the pre-trained language model scale and the fine-tuning data scale are beneficial for zero-shot out-of-domain generalization on various linguistic tasks while leaving out the assessment of in-domain performance (Sanh et al., 2022; Chung et al., 2022a; Longpre et al., 2023). Given the increased capacity of LLMs, the multi-task performance by SFT on composite data of essentially different downstream tasks is less studied. Understanding the SFT performance with composite data and corresponding scaling patterns is of great utility in practice.
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
Figure 1: The illustration of four different training strategies in this paper.
|
| 17 |
+
|
| 18 |
+
In this study, we focus on the data composition problem among mathematical reasoning, code generation, and general human-aligning abilities in SFT. We aim to comprehensively investigate the relationship between model performance and different factors including data amount, data composition ratio, model scales, and SFT training strategies. We also investigate how the relationship varies under different scales. Specifically, we focus on the following four research questions:
|
| 19 |
+
|
| 20 |
+
1. How do math reasoning, coding, and general abilities scale with SFT data amounts?
|
| 21 |
+
2. Are there performance conflicts when combining these three abilities in SFT?
|
| 22 |
+
3. What are the key factors that induce the performance conflicts?
|
| 23 |
+
4. What are the impacts of different SFT strategies for composite data?
|
| 24 |
+
|
| 25 |
+
To answer these questions, we conduct experiments on three benchmarks, which are GSM8K (Cobbe et al., 2021) for mathematical reasoning, HumanEval (Chen et al., 2021) for coding, and MT-Bench (Zheng et al., 2023) for general human alignment. We fine-tune LLMs on the related training data to activate these abilities. Furthermore, we conduct extensive analysis regarding model parameter scales ranging from LLaMA 7B to 33B (Touvron et al., 2023) and explore four different SFT strategies shown in Figure 1: multi-task learning, sequential training, mixed sequential training, and dual-stage mixing fine-tuning (DMT), providing empirical guidance for learning a versatile LLM with composite SFT. The key findings of this paper can be summarized as follows:
|
| 26 |
+
|
| 27 |
+
• Different SFT abilities exhibit distinct scaling patterns, while larger models show better performances with the same data amount generally.
|
| 28 |
+
|
| 29 |
+
• Compared to single ability learning, multi-task learning multiple abilities exhibits improvement in low-resource and decline in high-resource. Additionally, as the model size increases, there is a greater performance gain in low-resource settings for math and general abilities. • Data amounts directly influence each ability, while the data ratio is insignificant. • Multi-task learning lead to conflicts, while sequential training results in catastrophic forgetting. Our proposed DMT effectively alleviates both performance conflicts and catastrophic forgetting in the SFT phrase, achieving a balance between general and specialized abilities.
|
| 30 |
+
|
| 31 |
+
# 2 RELATED WORKS
|
| 32 |
+
|
| 33 |
+
Supervised fine-tuning in Large Language Models Large language models (LLMs) undergo the SFT stage to further unlock the performance in task solving and aligning human instruction. We slightly abuse the term SFT to refer to general sequence-to-sequence fine-tuning, including but not limited to SFT for human alignment, instruction fine-tuning, and downstream task fine-tuning. Recent research explored multi-task instruction fine-tuning of pre-trained LLMs to enable better zero-shot performance on various downstream NLP tasks (Sanh et al., 2022). (Chung et al., 2022a; Longpre et al., 2023) attempted to exhaust existing NLP tasks and curated a massive dataset, FLAN, for instruction fine-tuning. Open-sourced (Chung et al., 2022b) and proprietary LLMs (Singhal et al., 2022) fine-tuned on FLAN exhibited improved zero-shot downstream performance on various held-out NLP tasks. However, the influence of multi-task training of LLMs on in-domain performance is less studied. With the success of proprietary LLMs, especially ChatGPT, there has been increasing attention on SFT to align LLMs to human intentions (Ouyang et al., 2022b). Instead of generating SFT data from crowd-resourcing, recent research explored to generate data from proprietary LLM user logs (Chiang et al., 2023; Wang et al., 2023a), prompting proprietary LLM (Wang et al., 2023c; Taori et al., 2023; Lei et al., 2023; Xu et al., 2023). Various analyses and methods have also been proposed to increase the SFT data quality (Zhou et al., 2023; Wang et al., 2023b; Lu et al., 2023) to achieve better alignment of open-resourced LLMs with humans. Besides, LLMs can also benefit from SFT for mathematical reasoning (Cobbe et al., 2021; Hendrycks et al., 2021; Yuan et al., 2023b; Yue et al., 2023) and code generation tasks (Chaudhary, 2023; Luo et al., 2023).
|
| 34 |
+
|
| 35 |
+
Scaling Laws in Large Language Models The exceptional performance of LLMs comes from scaling up model sizes, data amounts, and computational costs to massive scales. Therefore, it is crucial to explore the model performance across an exponential range of scales. Many endeavors have been made to discuss the scaling laws for pre-training (Anil et al., 2023; Hoffmann et al., 2022), transfer learning (Chronopoulou et al., 2019), preference modeling (Gao et al., 2022) and mathematical reasoning (Yuan et al., 2023b). In this paper, we also explore the SFT performance with composite data from the perspective of different scales of model sizes and data amounts.
|
| 36 |
+
|
| 37 |
+
# 3 EXPERIMENTS
|
| 38 |
+
|
| 39 |
+
We have SFT datasets $\{ D _ { 1 } , D _ { 2 } , . . . , D _ { k } \}$ where each $D _ { i } = \{ q _ { i , j } , r _ { i , j } \} _ { j }$ contains queries and responses from one source. We consider each SFT dataset to correspond to one ability and we also have $k$ in-domain metrics to measure them. We investigate the performances of in-domain metrics with different dataset compositions $( D \subset \cup _ { 1 \leq i \leq k } D _ { i } )$ and training strategies on different sizes of LLMs.
|
| 40 |
+
|
| 41 |
+
# 3.1 EXPERIMENT SETUP
|
| 42 |
+
|
| 43 |
+
We collect three SFT datasets $\{ D _ { 1 } , D _ { 2 } , D _ { 3 } \}$ including GSM8K RFT (Yuan et al., 2023b), Code Alpaca (Chaudhary, 2023), and ShareGPT (Chiang et al., 2023) to represent math reasoning, coding, and general human-aligning ability SFT dataset respectively. We will integrate a new SFT dataset $D$ by these three datasets to investigate how data composition affects the model performances. We use GSM8K test set (Cobbe et al., 2021), HumanEval (Chen et al., 2021), and MT-Bench (Zheng et al., 2023) to measure abilities including math reasoning, coding, and general human-aligning. We use LLaMA (Touvron et al., 2023) series as our pretrained language models and use FastChat framework (Zheng et al., 2023) for fine-tuning. We fine-tune models with 3 epochs and a peak of 2e-5 learning rate. The batch size during SFT is 16. More details about SFT datasets, evaluation metrics and implementations can be found in Appendix A, B and C.
|
| 44 |
+
|
| 45 |
+

|
| 46 |
+
Figure 2: The scaling curve of different sizes of LLaMA in three individual domains.
|
| 47 |
+
|
| 48 |
+
3.2 RQ1. INDIVIDUAL ABILITY PERFORMANCE VS. DATA AMOUNT
|
| 49 |
+
|
| 50 |
+
The instruction following ability can be activated via SFT on datasets like ShareGPT which contain around 100 thousand samples. However, Zhou et al. (2023) demonstrates that strong base models can achieve human alignment with just 1000 samples. Specialized abilities such as math reasoning require a large amount of data (Cobbe et al., 2021; Yuan et al., 2023b), unlike general abilities. Therefore, it is crucial to investigate how each ability improves as the data amount increases.
|
| 51 |
+
|
| 52 |
+
Experimental Design: We conduct SFT on LLaMA of various sizes using $\{ 1 , 1 / 4 , 1 / 1 6 , 1 / 6 4 , 1 / 2 5 6 \}$ proportions of the training set obtained from GSM8K RFT, Code Alpaca, and ShareGPT seperately. This allowed us to evaluate each ability with various data sizes and model sizes.
|
| 53 |
+
|
| 54 |
+
Results and Analysis. Figure 2 shows the individual data scaling curves for different abilities after SFT. We find that: Different abilities exhibit different scaling curves. To be more specific, mathematical reasoning capability shows a positive correlation with the data amount across various model sizes which is consistent with Yuan et al. (2023b). Similarly, general human-aligning ability demonstrates an almost monotonically increasing scaling curve. However, it is noteworthy that general ability emerges with only around 1k data samples (ranging from 1/256 to 1/64), and after reaching a certain threshold (1/64), their performances improve slowly. This further supports Zhou et al. (2023), indicating that a small amount of high-quality SFT data is possible for the emergence of general human-aligning ability in LLMs. On the other hand, code ability exhibits an irregular scaling curve when the model’s parameter count is small (7B & 13B). However, when the parameter count increases to 33B, its coding performance shows an approximately log-linear trend with the data amount. One possible explanation is that Code Alpaca and the samples in HumanEval have different distributions. Larger models can capture shared knowledge across code data distributions in the in-domain samples, which enables them to exhibit some level of generalization to out-of-distribution (OOD) samples. Another observation is larger models show better performances with the same data amount generally. The outlier is with very little data (1/256), smaller models may outperform larger models. If there is enough data, larger models have stable better performances.
|
| 55 |
+
|
| 56 |
+
# 3.3 RQ2. PERFORMANCE DIFFERENCE VS. MIXED DATA AMOUNT
|
| 57 |
+
|
| 58 |
+
We should deliver a versatile model that requires us to mix various SFT datasets and apply SFT. We want to ask how each ability varies due to SFT dataset mixtures. We investigate it with different amounts of mixed data and compare them with individual ability performance.
|
| 59 |
+
|
| 60 |
+
Experimental Design: For the individual source setting, consistent with the setup in RQ1, we performed fine-tuning on LLaMA models of different sizes using $\{ 1 , 1 / 4 , 1 / 1 6 , 1 / 6 4 , 1 / 2 5 6 \}$ amounts of training data from GSM8K, Code Alpaca, and ShareGPT separately. For the mixed source setting, we sampled $\{ 1 , 1 / 4 , 1 / 1 6 , 1 / 6 4 , 1 / 2 5 6 \}$ amounts of training data from GSM8K, Code Alpaca, and ShareGPT, and directly mixed them according to the corresponding proportions. In this way, we constructed datasets with fixed proportions of different ability domains, while varying the total data amount. These datasets are then used for fine-tuning the LLaMA models.
|
| 61 |
+
|
| 62 |
+
Results and Analysis. Figure 3 presents results of LLaMA of different sizes on three benchmarks under the individual source and mixed source settings. The following observations are made: Abilities are improved with low-resource and are decreased with high-resource compared to individual source abilities. In the case of LLaMA-7B, compared to the data scaling curve of the individual source setting, the models fine-tuned with mixed source data consistently demonstrated performance conflicts among the three ability domains at high resources $( 1 0 0 \% )$ . However, as the data volume decreased, a turning point in performance is observed between the two settings in the data range of 1/64 to 1/16. Notably, the models fine-tuned with mixed source data exhibited performance gains at low resources (1/256), indicating that SFT data from different sources benefit each other in a low-resource setting. However, when there is enough data, data from other sources could be viewed as noise for in-domain generalization. As the model size increases, the performance gain in low-resource settings also increases for math and general abilities. In the case of the 13B and 33B models, it is obvious that the scaling curve for the mix source setting follows a similar trend observed in previous analyses, with the presence of performance intersection points as the data volume scales. However, a crucial distinction arises, whereby larger models exhibit more pronounced performance gains under low resources as the size of model parameters increases. The outlier is the LLaMA-7B (code only, 1/256). A possible reason is the introduction of a small amount of unseen code data easily disrupts the original code ability of the pretrained model, as supported by its low HumanEval score (less than 6). In conclusion, our finding implies that larger language models excel in acquiring general and specialized abilities from diverse data sources under low-resource conditions.
|
| 63 |
+
|
| 64 |
+

|
| 65 |
+
Figure 3: Comparative experiments between mix domains and individual domains for LLaMA.
|
| 66 |
+
|
| 67 |
+
# 3.4 RQ3. PERFORMANCE DIFFERENCE VS. DATA COMPOSITION RATIO
|
| 68 |
+
|
| 69 |
+
We observe ability conflicts under high-resource settings, and we want to investigate the reason causes conflicts. Two possible factors are the data amount of other abilities is too high or the data ratio of other abilities is too high. Here we conduct experiments to investigate the data ratio factor.
|
| 70 |
+
|
| 71 |
+
Experimental Design: We consider coding and mathematics as a combined specialized data source, and the ShareGPT as the general data source. We designed three setups as follows which control the amount of one source of data and vary the ratio between general and specialized data.:
|
| 72 |
+
|
| 73 |
+
1. Fixed general data, scaling specialized data: We use a full training set of ShareGPT and sampled different proportions $\{ 1 , 1 / 4 , \bar { 1 / 1 6 } , 1 / 6 4 , 1 / 2 5 6 \}$ of GSM8K RFT and Code Alpaca as a mixture.
|
| 74 |
+
|
| 75 |
+

|
| 76 |
+
Figure 4: Different data ratio $\mathrm { ( k ) }$ between specific abilities and general abilities on three benchmarks.
|
| 77 |
+
|
| 78 |
+
2. Fixed specialized data, scaling general data: We use a full training set of GSM8K RFT and Code Alpaca and sample different proportions of ShareGPT as a mixture.
|
| 79 |
+
|
| 80 |
+
3. Fixed 1/64 general data, scaling specialized data: Motivated by LIMA’s setup (Zhou et al., 2023), we used a 1/64 ShareGPT set (about 1500 examples) and sampled different proportions of GSM8K RFT and Code Alpaca as a mixture.
|
| 81 |
+
|
| 82 |
+
Results and Analysis. Does the performance of the model vary with different ratios of general and specialized data? As illustrated in the top three graphs of Figure 3, we conduct ablation studies of the data ratio $( k )$ between specialized and general abilities. To be noticed ratio is normalized by data amount, for example, $k = 1$ means specialized use data amount $=$ specialized all data amount . We general use data amount
|
| 83 |
+
utilize a fixed specialized data setting (directly mixing $100 \%$ code & math data for training) and a fixed general data setting ( $100 \%$ general data for training) as the baseline and observe: (1) With the increase in the ratio of general data from 1/256 to 1/1, Fixed specialized data, scaling general data setup exhibits similar performance to the setup that Fixed specialized abilities in terms of math reasoning. This suggests that variations in the data ratio $k$ have minimal impact on math ability. We consider the reason that math and general abilities are non-conflict since they are too different in the semantic space. However, when considering HumanEval, the Fixed specialized data, scaling general data setup displays noticeable fluctuations compared to the baseline. We attribute this to the inclusion of a certain proportion of code data in ShareGPT. Due to the differences in data format and distribution, the presence of similar data features exacerbates the performance conflicts between abilities when the data ratio $k$ increases. Further analysis of the distribution of different abilities is discussed in Section 4.1. (2) With the increase in the ratio of specialized data from 1/256 to $1 / 1$ , the setup that Fixed general data, scaling specialized data displayed no significant performance changes compared to the baseline. This echoes our hypothesis that when there are significant differences in task formats and data distributions between different SFT abilities, the impact of data ratio is minimal. However, when there is some degree of similarities, the data ratio can lead to noticeable performance fluctuations.
|
| 84 |
+
|
| 85 |
+
Under extremely limited general data resources, does the ratio of specialized data have an impact on the model’s performance? We further explore the impact of different ratios of specialized data when the model has just acquired a certain level of general human-aligning ability $\bar { \boldsymbol { k } } = 1 / 6 4 )$ . The bottom 3 graphs of Figure 4 present comparative experiments between two settings. We observe that regardless of whether the data amount for general capabilities is abundant $k = 1 ,$ ) or scarce $( k = 1 / 6 4 )$ , the performance on MT-Bench shows no significant fluctuations with varying proportions of specialized data. Furthermore, in mathematical reasoning, 1/64 general data setup exhibited a scaling trend that is almost identical to the full general data setup. However, for coding ability, with the same amount of code data and different ratios, code abilities are different in the two settings. We still consider the reason is code data are partly related to ShareGPT data and cause the performance difference and provide an analysis in Discussion 4.2.
|
| 86 |
+
|
| 87 |
+
# 3.5 RQ4. PERFORMANCE DIFFERENCE VS. TRAINING STRATEGY
|
| 88 |
+
|
| 89 |
+
We could feed these SFT datasets into models with different training strategies. In this section, We experiment with these settings and investigate how they influence each ability’s performance.
|
| 90 |
+
|
| 91 |
+
Experimental Design: Firstly, we introduce three kinds of naive training strategies as follows:
|
| 92 |
+
|
| 93 |
+
1. Multi-task learning: We directly mix different SFT data sources $D = \cup _ { 1 \leq i \leq k } D _ { i }$ and applying SFT. If we view each data source as a different task, this can be viewed as multi-task learning.
|
| 94 |
+
|
| 95 |
+
2. Sequential Training: We sequentially apply SFT on each dataset. Specifically, we sequentially trained on coding, math reasoning, and the general ability dataset. Since the general ability is the most important one for human alignment, we put ShareGPT as our last dataset.
|
| 96 |
+
|
| 97 |
+
3. Mixed Sequential Training: We apply multi-task learning on specialized datasets(code, math) first and apply SFT on the general ability dataset. These three approaches are presented in Figure 1.
|
| 98 |
+
|
| 99 |
+
Results and Analysis: Table 15 presents performances under different training strategies in terms of mathematical reasoning, code generation, and general human-aligning ability. Multi-task learning preserves specialized abilities among these strategies while hurting the general ability most among them. Sequential training and mixed sequential training preserve general ability while losing too many specialized abilities. The observed outcome is in accordance with our expectations, as during the final fine-tuning phase, the mixed sequential training strategy remains unaffected by specialized data sources, thereby effectively preserving its generalization capability. However, an inherent drawback of multi-stage training is the occurrence of catastrophic forgetting of prior knowledge, which motivates us to further explore methods that can alleviate catastrophic forgetting of specialized abilities while maximizing the preservation of general capability.
|
| 100 |
+
|
| 101 |
+
4. Dual-stage Mixed Fine-tuning (DMT): Based on our observation from RQ1 to RQ4, we propose a new training strategy that can reduce the ability conflict during multi-task learning and relieve the issue of catastrophic forgetting during sequential training. From RQ1, the model needs large data amounts to activate specialized abilities. From RQ2, multi-task learning with all amounts of specialized data and general data will hurt each ability. From RQ3, a small amount of specialized data will not affect the general ability performance. From RQ4, (mixed) sequential training forgets specialized abilities. So the model needs to learn large amounts of specialized data and should not forget them during learning general ability. A natural choice is to learn full amounts of specialized data first and add a small amount of specialized data to general data during the last stage of sequential training to prevent forgetting. As shown in Figure 1, we first apply SFT on the specialized dataset which is same as the first stage of the mixed sequential training strategy. For the second stage, we perform SFT with a mixed data source comprising a combination of the general data and varying proportions $k$ (1, 1/2, 1/4, 1/8, 1/16, 1/32) of code and math data. Adding code and math data in the second stage helps models to recall the specialized ability. The results of DMT $\left( k = 1 / 2 5 6 \right)$ are presented in Table 2 and the detailed scaling analysis of proportion $k$ can be found in the discussion.
|
| 102 |
+
|
| 103 |
+
Model Accuracy vs. DMT Strategies. In Table 15, LLaMA-7B with DMT $k = 1 / 2 5 6 )$ strategy perform significant improvement in mathematical reasoning (32.6 to 41.92) and code generation (15.24 to 17.68) compared to the mixed sequential training strategy, which indicates a significant alleviating effect of mixing specialized capability data in the last fine-tuning stage on catastrophic forgetting. Surprisingly, DMT $( k = 1 / 2 5 6 )$ even exhibits a slight improvement on MT-Bench, further highlighting its ability to alleviate catastrophic forgetting while effectively preserving general capability.
|
| 104 |
+
|
| 105 |
+
Regarding the 13B and 33B models, DMT $( k = 1 / 2 5 6 )$ demonstrates noticeable alleviation of catastrophic forgetting in mathematical reasoning (13B: 40.48 to 46.47 / 33B: 44.24 to 56.36) and code generation (13B: 18.3 to 19.5 / 33B: 24.4 to 25.5) compared to the mixed sequential training strategy. Additionally, it significantly retains its general capability (13B: 5.93 to 6.03 / 33B 6.43 to
|
| 106 |
+
|
| 107 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="3">LLaMA -7B</td><td colspan="3">LLaMA -13B</td><td colspan="3">LLaMA -33B</td></tr><tr><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td></tr><tr><td colspan="10">Individual domain</td></tr><tr><td>General only</td><td>11.10</td><td>10.42</td><td>5.88</td><td>14.02</td><td>16.40</td><td>6.13</td><td>26.06</td><td>24.30</td><td>6.63</td></tr><tr><td>Math only</td><td>49.10</td><td>6.71</td><td>2.53</td><td>51.40</td><td>12.8</td><td>2.54</td><td>57.91</td><td>15.5</td><td>3.18</td></tr><tr><td>Code only</td><td>4.51</td><td>18.40</td><td>4.30</td><td>5.15</td><td>17.1</td><td>3.53</td><td>6.06</td><td>26.82</td><td>4.18</td></tr><tr><td colspan="10">Diferent Training Strategies</td></tr><tr><td>Multi-task learning</td><td>47.53</td><td>14.63</td><td>5.76</td><td>50.94</td><td>19.50</td><td>5.73</td><td>56.69</td><td>18.9</td><td>6.07</td></tr><tr><td>Sequential Training</td><td>31.39</td><td>15.85</td><td>5.72</td><td>39.12</td><td>20.12</td><td>5.93</td><td>47.27</td><td>24.80</td><td>6.73</td></tr><tr><td>Mixed Sequential Training</td><td>32.60</td><td>15.24</td><td>6.02</td><td>40.48</td><td>18.30</td><td>5.93</td><td>44.24</td><td>24.4</td><td>6.43</td></tr><tr><td>DMT(k=1/256)</td><td>41.92</td><td>17.68</td><td>6.08</td><td>46.47</td><td>19.50</td><td>6.03</td><td>56.36</td><td>25.00</td><td>6.69</td></tr></table>
|
| 108 |
+
|
| 109 |
+
Table 1: The results of LLaMA-7B, 13B, 33B under different training strategies on three benchmarks.
|
| 110 |
+
The top two results across different strategies are marked with bold and underlined.
|
| 111 |
+
|
| 112 |
+
6.69). Therefore, these results serve as additional validation of the efficacy of DMT in mitigating catastrophic forgetting while maintaining general capability.
|
| 113 |
+
|
| 114 |
+
# 4 DISCUSSION
|
| 115 |
+
|
| 116 |
+
# 4.1 VISUALIZATION OF SEMANTIC REPRESENTATION OF DIFFERENT ABILITIES
|
| 117 |
+
|
| 118 |
+
In the aforementioned analysis of data composition, we observed a significant performance degradation when different data sources are directly mixed. In this section, our aim is to explore the potential mutual influence of semantic representation distributions among different data sources. Specifically, we randomly sampled 100 queries from CodeAlpaca, GSM8k RFT, and ShareGPT datasets and extracted the hidden layer representations located in the 15th layer of the model. Subsequently, we employed the t-SNE toolkit Van der Maaten & Hinton (2008) to visualize the representations of the three types of capabilities. The results in Figure 5 illustrate a notable collapse phenomenon in the semantic representations of both the original LLaMA-13b and LLaMA-13b with DMT $( \mathbf { k } { = } 1 / 2 5 6 )$ ). While both models exhibit a certain level of separation in the mathematical data representations, there remains a certain degree of overlap between the representations of code and general samples.
|
| 119 |
+
|
| 120 |
+
# 4.2 ABLATION OF THE SPECIALIZED DOMAINS IN SHAREGPT
|
| 121 |
+
|
| 122 |
+
In RQ2, we observe using mixed data sources resulted in improved abilities under low-resource conditions but diminished abilities under high-resource conditions when compared to single data sources. However, the presence of coding and mathematical samples within the ShareGPT introduces uncertainty regarding whether the performance gain under low resources is solely attributed to these specific coding & mathematical data or other orthogonal samples in the general dataset (e.g., translation or extraction). Hence, the objective of this section is to investigate whether the conclusions drawn in Section 3.3 remain valid after removing the code and math samples within ShareGPT.
|
| 123 |
+
|
| 124 |
+

|
| 125 |
+
Figure 5: The left two figures show the t-SNE of LLaMA-13B and LLaMA-13B with DMT $\mathrm { k } { = } 1 / 2 5 6 )$ ) stategy. The right figure shows performances of LLaMA-13B with DMT under different $k$ .
|
| 126 |
+
|
| 127 |
+

|
| 128 |
+
Figure 6: The scaling curve after ablating code and math-related samples from ShareGPT.
|
| 129 |
+
|
| 130 |
+
Experimental Design: We employed an open-set tagger InsTag (Lu et al., 2023) to annotate samples in ShareGPT. To filter out data related to coding and mathematical abilities, we conduct regular expression matching to eliminate instances where the tags contain keywords “code” or “math”. Finally, we obtain a ShareGPT dataset devoid of any code or math-related information (reducing from 86K to 63K). In alignment with the settings in Section 3.3, we sampled different proportions of training data (1, 1/4, 1/16, 1/64, 1/256) from GSM8K, Code Alpaca, and the modified ShareGPT dataset (without code math). These samples were directly mixed according to the corresponding proportions. Subsequently, the LLaMA models were fine-tuned by using this mixed dataset.
|
| 131 |
+
|
| 132 |
+
Analysis. Figure 6 shows the results of our experiment. Removing the code and math from ShareGPT not only mitigates the performance conflicts among different abilities to some extent under highresource conditions but also maintains stable gains in low-resource settings. We propose that the potential reason behind these findings lies in the differences in the distribution of code and math data between ShareGPT, CodeAlpaca, and GSM8K RFT datasets. This distribution gap introduces an extra noise during the SFT phrase, while its removal enables the model to better generalize coding and mathematical abilities. Furthermore, in low-resource scenarios, this phenomenon indicates that the code and math samples in ShareGPT are not the key factor contributing to performance improvements, but rather the diversity and variability of the data (Longpre et al., 2023). In summary, the presence of code math data within ShareGPT does not emerge as a key factor impacting the performance gains identified in Section 3.3, highlighting the generalization of our conclusions.
|
| 133 |
+
|
| 134 |
+
# 4.3 SPECIALIZED DATA AMOUNT IN DUAL-STAGE MIXING FINE-TUNING
|
| 135 |
+
|
| 136 |
+
We investigate how different values of $k$ influence model performance and results shown in figure 5. When we adjust $k$ from 0 to 1/256 ( $k = 0$ is equal to mixed sequential training), the SFT models show significant improvements in both specialized ability and general human-aligning ability. On the contrary, as $k$ increased from 1/4 to 1, the model exhibited a decline in general ability. We believe this is in line with the findings in RQ2, which concluded that high-resource settings lead to conflicts while low-resource settings lead to gains in mixed sources. Furthermore, as $k$ increased from 1/256 to $1 / 4$ , we observe a linear inverse trend between general ability and specialized ability, especially an increase in general ability coincided with a decrease in specialized ability. This suggests $k$ needs to be tuned based on specific requirements in order to achieve a balance between multiple abilities.
|
| 137 |
+
|
| 138 |
+
# 5 CONCLUSION
|
| 139 |
+
|
| 140 |
+
We explore the data composition in the SFT phase, focusing on mathematical reasoning, code generation, and general human-aligning abilities. We formulate four research questions to guide our investigation and analyze the scaling trends between different abilities and factors (e.g. data amount, data ratio, model parameters, and training strategies). Our findings reveal distinct scaling patterns among different abilities, with larger models demonstrating superior performance when trained with the same amount of data. Moreover, we observe that mixing data sources in the SFT phase improves performance in low-resource scenarios but diminishes in high-resource scenarios. Interestingly, the phenomenon of low-resource gain becomes more prominent as the model parameter size increases. Furthermore, our observations indicate that data amount directly influences performance conflicts, whereas the impact of data ratio is insignificant within our experimental setup. Finally, regarding the SFT strategies, we demonstrate our proposed DMT strategy effectively alleviates performance conflicts, offering a promising solution to activate multiple abilities.
|
| 141 |
+
|
| 142 |
+
# REFERENCES
|
| 143 |
+
|
| 144 |
+
Rohan Anil, Andrew M Dai, Orhan Firat, Melvin Johnson, Dmitry Lepikhin, Alexandre Passos, Siamak Shakeri, Emanuel Taropa, Paige Bailey, Zhifeng Chen, et al. Palm 2 technical report. arXiv preprint arXiv:2305.10403, 2023.
|
| 145 |
+
|
| 146 |
+
Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, et al. Program synthesis with large language models. arXiv preprint arXiv:2108.07732, 2021.
|
| 147 |
+
|
| 148 |
+
Mauro Cettolo, Jan Niehues, Sebastian Stuker, Luisa Bentivogli, and Marcello Federico. Report¨ on the 11th IWSLT evaluation campaign. In Marcello Federico, Sebastian Stuker, and Fran ¨ c¸ois Yvon (eds.), Proceedings of the 11th International Workshop on Spoken Language Translation: Evaluation Campaign, pp. 2–17, Lake Tahoe, California, December 4-5 2014. URL https: //aclanthology.org/2014.iwslt-evaluation.1.
|
| 149 |
+
|
| 150 |
+
Sahil Chaudhary. Code alpaca: An instruction-following llama model for code generation. https: //github.com/sahil280114/codealpaca, 2023.
|
| 151 |
+
|
| 152 |
+
Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, Alex Ray, Raul Puri, Gretchen Krueger, Michael Petrov, Heidy Khlaaf, Girish Sastry, Pamela Mishkin, Brooke Chan, Scott Gray, Nick Ryder, Mikhail Pavlov, Alethea Power, Lukasz Kaiser, Mohammad Bavarian, Clemens Winter, Philippe Tillet, Felipe Petroski Such, Dave Cummings, Matthias Plappert, Fotios Chantzis, Elizabeth Barnes, Ariel Herbert-Voss, William Hebgen Guss, Alex Nichol, Alex Paino, Nikolas Tezak, Jie Tang, Igor Babuschkin, Suchir Balaji, Shantanu Jain, William Saunders, Christopher Hesse, Andrew N. Carr, Jan Leike, Josh Achiam, Vedant Misra, Evan Morikawa, Alec Radford, Matthew Knight, Miles Brundage, Mira Murati, Katie Mayer, Peter Welinder, Bob McGrew, Dario Amodei, Sam McCandlish, Ilya Sutskever, and Wojciech Zaremba. Evaluating large language models trained on code. 2021.
|
| 153 |
+
|
| 154 |
+
Wei-Lin Chiang, Zhuohan Li, Zi Lin, Ying Sheng, Zhanghao Wu, Hao Zhang, Lianmin Zheng, Siyuan Zhuang, Yonghao Zhuang, Joseph E. Gonzalez, Ion Stoica, and Eric P. Xing. Vicuna: An open-source chatbot impressing gpt-4 with $9 0 \% *$ chatgpt quality, March 2023. URL https: //lmsys.org/blog/2023-03-30-vicuna/.
|
| 155 |
+
|
| 156 |
+
Alexandra Chronopoulou, Christos Baziotis, and Alexandros Potamianos. An embarrassingly simple approach for transfer learning from pretrained language models. arXiv preprint arXiv:1902.10547, 2019.
|
| 157 |
+
|
| 158 |
+
Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Alex Castro-Ros, Marie Pellat, Kevin Robinson, Dasha Valter, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Zhao, Yanping Huang, Andrew Dai, Hongkun Yu, Slav Petrov, Ed H. Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei. Scaling instruction-finetuned language models, 2022a.
|
| 159 |
+
|
| 160 |
+
Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Alex Castro-Ros, Marie Pellat, Kevin Robinson, Dasha Valter, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Zhao, Yanping Huang, Andrew Dai, Hongkun Yu, Slav Petrov, Ed H. Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei. Scaling instruction-finetuned language models, 2022b.
|
| 161 |
+
|
| 162 |
+
Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, et al. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021.
|
| 163 |
+
|
| 164 |
+
Matthias De Lange, Rahaf Aljundi, Marc Masana, Sarah Parisot, Xu Jia, Ales Leonardis, Gregory ˇ Slabaugh, and Tinne Tuytelaars. A continual learning survey: Defying forgetting in classification tasks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44(7):3366–3385, 2022. doi: 10.1109/TPAMI.2021.3057446.
|
| 165 |
+
|
| 166 |
+
Leo Gao, John Schulman, and Jacob Hilton. Scaling laws for reward model overoptimization, 2022.
|
| 167 |
+
|
| 168 |
+
Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. Measuring mathematical problem solving with the math dataset. arXiv preprint arXiv:2103.03874, 2021.
|
| 169 |
+
|
| 170 |
+
Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, Tom Hennigan, Eric Noland, Katie Millican, George van den Driessche, Bogdan Damoc, Aurelia Guy, Simon Osindero, Karen Simonyan, Erich Elsen, Jack W. Rae, Oriol Vinyals, and Laurent Sifre. Training compute-optimal large language models, 2022.
|
| 171 |
+
|
| 172 |
+
Jie Huang and Kevin Chen-Chuan Chang. Towards reasoning in large language models: A survey. In Findings of the Association for Computational Linguistics: ACL 2023, pp. 1049–1065, Toronto, Canada, July 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.findings-acl. 67. URL https://aclanthology.org/2023.findings-acl.67.
|
| 173 |
+
|
| 174 |
+
Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361, 2020.
|
| 175 |
+
|
| 176 |
+
Shanglin Lei, Guanting Dong, Xiaoping Wang, Keheng Wang, and Sirui Wang. Instructerc: Reforming emotion recognition in conversation with a retrieval multi-task llms framework, 2023.
|
| 177 |
+
|
| 178 |
+
Xiaobo Liang, Lijun Wu, Juntao Li, Yue Wang, Qi Meng, Tao Qin, Wei Chen, Min Zhang, and Tie-Yan Liu. R-drop: Regularized dropout for neural networks, 2021.
|
| 179 |
+
|
| 180 |
+
Hunter Lightman, Vineet Kosaraju, Yura Burda, Harri Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. Let’s verify step by step. arXiv preprint arXiv:2305.20050, 2023.
|
| 181 |
+
|
| 182 |
+
Shayne Longpre, Le Hou, Tu Vu, Albert Webson, Hyung Won Chung, Yi Tay, Denny Zhou, Quoc V Le, Barret Zoph, Jason Wei, et al. The flan collection: Designing data and methods for effective instruction tuning. arXiv preprint arXiv:2301.13688, 2023.
|
| 183 |
+
|
| 184 |
+
Keming Lu, Hongyi Yuan, Zheng Yuan, Runji Lin, Junyang Lin, Chuanqi Tan, and Chang Zhou. # instag: Instruction tagging for diversity and complexity analysis. arXiv preprint arXiv:2308.07074, 2023.
|
| 185 |
+
|
| 186 |
+
Ziyang Luo, Can Xu, Pu Zhao, Qingfeng Sun, Xiubo Geng, Wenxiang Hu, Chongyang Tao, Jing Ma, Qingwei Lin, and Daxin Jiang. Wizardcoder: Empowering code large language models with evol-instruct. arXiv preprint arXiv:2306.08568, 2023.
|
| 187 |
+
|
| 188 |
+
OpenAI. Gpt-4 technical report, 2023.
|
| 189 |
+
|
| 190 |
+
Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, and Ryan Lowe. Training language models to follow instructions with human feedback, 2022a.
|
| 191 |
+
|
| 192 |
+
Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, and Ryan Lowe. Training language models to follow instructions with human feedback, 2022b.
|
| 193 |
+
|
| 194 |
+
Jeff Rasley, Samyam Rajbhandari, Olatunji Ruwase, and Yuxiong He. Deepspeed: System optimizations enable training deep learning models with over 100 billion parameters. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, KDD $^ { , } 2 0$ , pp. 3505–3506, New York, NY, USA, 2020. Association for Computing Machinery. ISBN 9781450379984. doi: 10.1145/3394486.3406703. URL https: //doi.org/10.1145/3394486.3406703.
|
| 195 |
+
|
| 196 |
+
Victor Sanh, Albert Webson, Colin Raffel, Stephen H. Bach, Lintang Sutawika, Zaid Alyafeai, Antoine Chaffin, Arnaud Stiegler, Teven Le Scao, Arun Raja, Manan Dey, M Saiful Bari, Canwen Xu, Urmish Thakker, Shanya Sharma Sharma, Eliza Szczechla, Taewoon Kim, Gunjan Chhablani, Nihal Nayak, Debajyoti Datta, Jonathan Chang, Mike Tian-Jian Jiang, Han Wang, Matteo Manica, Sheng Shen, Zheng Xin Yong, Harshit Pandey, Rachel Bawden, Thomas Wang, Trishala Neeraj, Jos Rozen, Abheesht Sharma, Andrea Santilli, Thibault Fevry, Jason Alan Fries, Ryan Teehan, Tali Bers, Stella Biderman, Leo Gao, Thomas Wolf, and Alexander M. Rush. Multitask prompted training enables zero-shot task generalization, 2022.
|
| 197 |
+
|
| 198 |
+
Karan Singhal, Shekoofeh Azizi, Tao Tu, S. Sara Mahdavi, Jason Wei, Hyung Won Chung, Nathan Scales, Ajay Tanwani, Heather Cole-Lewis, Stephen Pfohl, Perry Payne, Martin Seneviratne, Paul Gamble, Chris Kelly, Nathaneal Scharli, Aakanksha Chowdhery, Philip Mansfield, Blaise Aguera y Arcas, Dale Webster, Greg S. Corrado, Yossi Matias, Katherine Chou, Juraj Gottweis, Nenad Tomasev, Yun Liu, Alvin Rajkomar, Joelle Barral, Christopher Semturs, Alan Karthikesalingam, and Vivek Natarajan. Large language models encode clinical knowledge, 2022.
|
| 199 |
+
|
| 200 |
+
Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. Stanford alpaca: An instruction-following llama model. https://github.com/tatsu-lab/stanford_alpaca, 2023.
|
| 201 |
+
|
| 202 |
+
Erik F. Tjong Kim Sang and Fien De Meulder. Introduction to the CoNLL-2003 shared task: Language-independent named entity recognition. In Proceedings of the Seventh Conference on Natural Language Learning at HLT-NAACL 2003, pp. 142–147, 2003. URL https:// aclanthology.org/W03-0419.
|
| 203 |
+
|
| 204 |
+
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee´ Lacroix, Baptiste Roziere, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand \` Joulin, Edouard Grave, and Guillaume Lample. Llama: Open and efficient foundation language models, 2023.
|
| 205 |
+
|
| 206 |
+
Laurens Van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 9(11), 2008.
|
| 207 |
+
|
| 208 |
+
Guan Wang, Sijie Cheng, Xianyuan Zhan, Xiangang Li, Sen Song, and Yang Liu. Openchat: Advancing open-source language models with mixed-quality data, 2023a.
|
| 209 |
+
|
| 210 |
+
Yizhong Wang, Hamish Ivison, Pradeep Dasigi, Jack Hessel, Tushar Khot, Khyathi Raghavi Chandu, David Wadden, Kelsey MacMillan, Noah A Smith, Iz Beltagy, et al. How far can camels go? exploring the state of instruction tuning on open resources. arXiv preprint arXiv:2306.04751, 2023b.
|
| 211 |
+
|
| 212 |
+
Yizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu, Noah A. Smith, Daniel Khashabi, and Hannaneh Hajishirzi. Self-instruct: Aligning language models with self-generated instructions, 2023c.
|
| 213 |
+
|
| 214 |
+
Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. Chain-of-thought prompting elicits reasoning in large language models. Advances in Neural Information Processing Systems, 35:24824–24837, 2022.
|
| 215 |
+
|
| 216 |
+
Can Xu, Qingfeng Sun, Kai Zheng, Xiubo Geng, Pu Zhao, Jiazhan Feng, Chongyang Tao, and Daxin Jiang. Wizardlm: Empowering large language models to follow complex instructions, 2023.
|
| 217 |
+
|
| 218 |
+
Runxin Xu, Fuli Luo, Zhiyuan Zhang, Chuanqi Tan, Baobao Chang, Songfang Huang, and Fei Huang. Raise a child in large language model: Towards effective and generalizable finetuning. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pp. 9514–9528, Online and Punta Cana, Dominican Republic, November 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.emnlp-main.749. URL https://aclanthology.org/2021.emnlp-main.749.
|
| 219 |
+
|
| 220 |
+
Wen-tau Yih, Matthew Richardson, Chris Meek, Ming-Wei Chang, and Jina Suh. The value of semantic parse labeling for knowledge base question answering. In Katrin Erk and Noah A. Smith (eds.), Proceedings of the 54th Annual Meeting of the Association for Computational
|
| 221 |
+
|
| 222 |
+
Linguistics (Volume 2: Short Papers), pp. 201–206, Berlin, Germany, August 2016. Association for Computational Linguistics. doi: 10.18653/v1/P16-2033. URL https://aclanthology. org/P16-2033.
|
| 223 |
+
|
| 224 |
+
Hongyi Yuan, Zheng Yuan, Chuanqi Tan, Fei Huang, and Songfang Huang. HyPe: Better pretrained language model fine-tuning with hidden representation perturbation. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 3246–3264, Toronto, Canada, July 2023a. Association for Computational Linguistics. doi: 10.18653/v1/2023.acl-long.182. URL https://aclanthology.org/2023.acl-long. 182.
|
| 225 |
+
|
| 226 |
+
Zheng Yuan, Hongyi Yuan, Chengpeng Li, Guanting Dong, Chuanqi Tan, and Chang Zhou. Scaling relationship on learning mathematical reasoning with large language models, 2023b.
|
| 227 |
+
|
| 228 |
+
Xiang Yue, Xingwei Qu, Ge Zhang, Yao Fu, Wenhao Huang, Huan Sun, Yu Su, and Wenhu Chen. Mammoth: Building math generalist models through hybrid instruction tuning. arXiv preprint arXiv:2309.05653, 2023.
|
| 229 |
+
|
| 230 |
+
Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric. P Xing, Hao Zhang, Joseph E. Gonzalez, and Ion Stoica. Judging llm-as-a-judge with mt-bench and chatbot arena, 2023.
|
| 231 |
+
|
| 232 |
+
Chunting Zhou, Pengfei Liu, Puxin Xu, Srini Iyer, Jiao Sun, Yuning Mao, Xuezhe Ma, Avia Efrat, Ping Yu, Lili Yu, et al. Lima: Less is more for alignment. arXiv preprint arXiv:2305.11206, 2023.
|
| 233 |
+
|
| 234 |
+
# A SFT DATASETS
|
| 235 |
+
|
| 236 |
+
We investigate the data composition issues of mathematical reasoning, coding, and general capabilities in the SFT stage from the following SFT datasets.
|
| 237 |
+
|
| 238 |
+
• Code Alpaca (Chaudhary, 2023) aims to build and share an instruction-following LLaMA model for code generation. which is fully based on Stanford Alpaca and contains 20K data used for fine-tuning the model. GSM8K RFT (Yuan et al., 2023b) is a mathematical dataset enhanced by integrating multiple reasoning paths based on the original GSM8K dataset (Cobbe et al., 2021) through the rejection sampling. It contains $7 . 5 \mathrm { K }$ questions and 110K responses in the training set. • ShareGPT refers to the multi-turn chatting histories used by Vicuna Chiang et al. (2023). ShareGPT includes 86K human queries and responses from ChatGPT and other chatbots.
|
| 239 |
+
|
| 240 |
+
The following table presents the statistics of three datasets at different subset proportion $( \mathbf { k } )$ .
|
| 241 |
+
|
| 242 |
+
<table><tr><td>Data Statistics</td><td>GSM8K RFT</td><td>Code Alpaca</td><td>ShareGPT</td></tr><tr><td>K=1/1</td><td>110142</td><td>20022</td><td>86060</td></tr><tr><td>K=1/4</td><td>27535</td><td>5005</td><td>21515</td></tr><tr><td>K=1/16</td><td>6883</td><td>1251</td><td>5378</td></tr><tr><td>K=1/64</td><td>1720</td><td>312</td><td>1344</td></tr><tr><td>K=1/256</td><td>430</td><td>78</td><td>336</td></tr></table>
|
| 243 |
+
|
| 244 |
+
Table 2: Data statistics of three datasets at different subset proportion (k).
|
| 245 |
+
|
| 246 |
+
# B EVALUATION METRICS
|
| 247 |
+
|
| 248 |
+
We use the following metrics to measure the aligned large language models.
|
| 249 |
+
|
| 250 |
+
• HumanEval (Chen et al., 2021) consists of 164 original programming problems, with an average of 9.6 test cases allocated to each problem. To ensure a thorough assessment of the
|
| 251 |
+
functional correctness of LLM-synthesized code, HumanEval+ extends the number of test
|
| 252 |
+
cases significantly, averaging at 774.8 test cases per problem. We use the same method as
|
| 253 |
+
Chen et al. (2021)to obtain unbiased estimates of the pass $@ \mathbf { k }$ under greedy decoding.
|
| 254 |
+
• GSM8K (Cobbe et al., 2021) is a math word problem dataset used to measure large language model math reasoning ability. We use the default test set to measure the model. We calculate the score based on greedy decoding accuracy $( \mathrm { m a j } @ 1 )$ .
|
| 255 |
+
• MT-Bench (Zheng et al., 2023) is a significant benchmark that contribute to the evaluation and advancement of chatbot models and LLMs in different contexts. MT-Bench evaluates
|
| 256 |
+
LLMs on multi-turn dialogues using comprehensive questions tailored to handling conversations. It provides a comprehensive set of questions specifically designed for assessing the capabilities of models in handling multi-turn dialogues.
|
| 257 |
+
|
| 258 |
+
We also supplement more benchmark evaluation results in the appendix to verify the generalization of our conclusions:
|
| 259 |
+
|
| 260 |
+
• MATH (Hendrycks et al., 2021) is a dataset with challenging high-school math problems. Problems are classified into the following topics: Prealgebra, Algebra, Number Theory, Counting and Probability, Geometry, Intermediate Algebra, and Precalculus. Problems in MATH are harder and more diverse than in GSM8K. We use 500 test problems from Lightman et al. (2023) as out-of-domain math benchmark.
|
| 261 |
+
|
| 262 |
+
• MBPP (Austin et al., 2021) consists of around 1,000 crowd-sourced Python programming problems, designed to be solvable by entry-level programmers, covering programming fundamentals, standard library functionality, and so on. Each problem consists of a task description, code solution and 3 automated test cases.
|
| 263 |
+
|
| 264 |
+
# C IMPLEMENTATION DETAILS
|
| 265 |
+
|
| 266 |
+
We fine-tune all the SFT datasets with 3 epochs and a batch size of 16 on NVIDIA A100 GPUs. We use 8 GPUs for 7B and 13B models, 16 GPUs for 33B models during fine-tuning. We use a peak learning rate of 2e-5 with a $3 \%$ learning rate warmup. We evaluate the results on the final epoch. We use greedy decode to calculate $\mathrm { P a s s } @ 1$ and maj $@ 1$ . Since the scores of MT-bench will fluctuate, we conducted three experiments and took the average.
|
| 267 |
+
|
| 268 |
+
All experiments are conducted using the default template of the FastChat framework (Zheng et al., 2023), as shown in the figure below:
|
| 269 |
+
|
| 270 |
+
# Prompt Template
|
| 271 |
+
|
| 272 |
+
A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user’s questions. USER: {Query} ASSISTANT:
|
| 273 |
+
|
| 274 |
+
# D ESTIMATING FLOPS OF SFT
|
| 275 |
+
|
| 276 |
+
Training FLOPs We mainly follow the notations of (Kaplan et al., 2020) here.
|
| 277 |
+
|
| 278 |
+
For each input sample of length $n _ { c t x }$ in SFT dataset (GSM8K, CodeAlpaca, ShareGPT), we can split it into two parts:
|
| 279 |
+
|
| 280 |
+
$$
|
| 281 |
+
n _ { c t x } = n _ { Q } + n _ { R }
|
| 282 |
+
$$
|
| 283 |
+
|
| 284 |
+
$$
|
| 285 |
+
C _ { \mathrm { t r a i n } } \approx 6 N n _ { c t x } N _ { s }
|
| 286 |
+
$$
|
| 287 |
+
|
| 288 |
+
where $n _ { Q } , n _ { R }$ denotes the length of question and generated answers respectively. $N , N _ { s }$ denotes the non-embedding parameters and the numbers of samples.
|
| 289 |
+
|
| 290 |
+
Therefore, We estimate the SFT FLOPs following (Kaplan et al., 2020) and GPU times in Table 3.
|
| 291 |
+
|
| 292 |
+
# E VALIDATION EXPERIMENTS IN MORE SFT ABILITIES
|
| 293 |
+
|
| 294 |
+
To validate the generalization of our conclusions, we selected representative datasets to evaluate the capabilities of large models across different dimensions. These dimensions include World Knowledge : WebQuestionsSP (Yih et al., 2016), Language Understanding: CoNLL 2003 (Tjong Kim Sang & De Meulder, 2003), and Translation: IWSLT14 (Cettolo et al., 2014)
|
| 295 |
+
|
| 296 |
+
Experimental Design: Align the settings of RQ1 and RQ2, we introduce two settings as follows:
|
| 297 |
+
|
| 298 |
+
1. Individual Domain: We conduct SFT on LLaMA of various sizes using $\{ 1 , 1 / 2 , 1 / 4 , 1 / 8 \}$ proportions 1 of the training set obtained from WebQSP, CoNLL 2003, and IWSLT14 seperately. This allowed us to evaluate each ability with various data sizes and model sizes.
|
| 299 |
+
|
| 300 |
+
2. Mixed Domain: We sampled $\{ 1 , 1 / 2 , 1 / 4 , 1 / 8 \}$ amounts of training data from WebQSP, CoNLL 2003, and IWSLT14, and directly mixed them according to the corresponding proportions. In this way, we constructed datasets with fixed proportions of different ability domains, while varying the total data amount. These datasets are then used for fine-tuning the LLaMA models.
|
| 301 |
+
|
| 302 |
+
Table 3: The statistics of FLOPs and GPU hours required for SFT. For 33B, we use DeepSpeed ZeRO3 (Rasley et al., 2020) for distributed training. All the GPU hours are based on NVIDIA A100 80GB GPU. Note we use non-embedding parameters to compute FLOPs in our experiments.
|
| 303 |
+
|
| 304 |
+
<table><tr><td>Model size</td><td>7B</td><td>13B</td><td>33B</td></tr><tr><td colspan="4">GSM8k RFT</td></tr><tr><td>SFT FLOPs</td><td>2.4×1018</td><td>4.3 × 1018</td><td>1.1 × 1019</td></tr><tr><td>SFT GPI hrs</td><td>6.1</td><td>12.1</td><td>37.4</td></tr><tr><td colspan="4"> Code Alpaca</td></tr><tr><td>SFT FLOPs</td><td>4.7 × 1017</td><td>7.8 × 1017</td><td>2.0×1018</td></tr><tr><td>SFT GPI hrs</td><td>1.2</td><td>2.5</td><td>8.2</td></tr><tr><td colspan="4">ShareGPT</td></tr><tr><td>SFT FLOPs</td><td>2.2 × 1018</td><td>3.9 ×1018</td><td>9.7× 1019</td></tr><tr><td>SFT GPI hrs</td><td>5.4</td><td>10.9</td><td>34.0</td></tr></table>
|
| 305 |
+
|
| 306 |
+
Table 4: Results in other domains for single and mixed source settings based on Llama-7B.
|
| 307 |
+
|
| 308 |
+
<table><tr><td rowspan="2">Datasets</td><td colspan="3">CONIL03</td><td colspan="2">WebQSP</td><td colspan="2">IWSLT14</td></tr><tr><td>P</td><td>R</td><td>F1</td><td>F1</td><td>Hits@1</td><td>de-en</td><td>en-de</td></tr><tr><td>Single Domain(1/1)</td><td>91.89</td><td>89.33</td><td>90.59</td><td>33.5</td><td>64.12</td><td>50</td><td>52</td></tr><tr><td>Single Domain(1/2)</td><td>90.59</td><td>87.15</td><td>88.83</td><td>27.10</td><td>61.87</td><td>46</td><td>43</td></tr><tr><td>Single Domain(1/4)</td><td>85.24</td><td>79.46</td><td>82.25</td><td>22.56</td><td>61.38</td><td>42</td><td>40</td></tr><tr><td>Single Domain(1/8)</td><td>63.22</td><td>60.42</td><td>61.79</td><td>13.63</td><td>49.05</td><td>41</td><td>40</td></tr><tr><td>Mixed Domains(1/1)</td><td>91.74</td><td>87.79</td><td>89.72</td><td>32.10</td><td>63.70</td><td>46</td><td>49</td></tr><tr><td>Mixed Domains(1/2)</td><td>90.69</td><td>86.93</td><td>88.77</td><td>29.98</td><td>62.29</td><td>45</td><td>45</td></tr><tr><td>Mixed Domains(1/4)</td><td>88.81</td><td>85.62</td><td>87.18</td><td>25.42</td><td>58.02</td><td>43</td><td>43</td></tr><tr><td>Mixed Domains(1/8)</td><td>86.47</td><td>81.18</td><td>83.74</td><td>21.36</td><td>56.86</td><td>45</td><td>45</td></tr></table>
|
| 309 |
+
|
| 310 |
+
As shown in Table 4, we have following observations.
|
| 311 |
+
|
| 312 |
+
For the individual domain, the performance (P, R, F1) of the model in the language understanding (NER) task shows a positive correlation with the scaling curve of data volume. These two abilities exhibit similar scaling curve trends as the mathematical ability performance in RQ1. In the case of world knowledge (WebQSP), a similar positive correlation trend is observed in terms of F1 and Hits $@ 1$ . However, when the data ratio is reduced from 1/4 to $1 / 8$ , there is a significant performance fluctuation, particularly in the performance of translation ability, which shows a relatively irregular trend. These conclusions further support the core conclusion of RQ1 that different data exhibit different scaling curves.
|
| 313 |
+
|
| 314 |
+
For the mixed domains, the findings align with the conclusions in RQ2, where abilities are improved with low-resource and decreased with high-resource compared to individual source abilities. This consistent conclusion holds for world knowledge, language understanding, and translation abilities.
|
| 315 |
+
|
| 316 |
+
# F RESULTS ON MORE BENCHMARKS IN MATH AND CODE
|
| 317 |
+
|
| 318 |
+
To validate the generalization of our findings on other benchmarks, we utilized GSM8K and Code Alpaca as the training sets. We further evaluated the results on the individual domain, mixed domain, and different training strategies on other specialized ability benchmark, including MATH and MBPP, which is illustrated in Table 5.
|
| 319 |
+
|
| 320 |
+
Table 5: The detailed results of LLaMA-7B, 13B with different training strategies on three benchmarks.
|
| 321 |
+
|
| 322 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="2">Math Benchmarks</td><td colspan="2">Code Benchmarks</td></tr><tr><td>GSM8K</td><td>MATH</td><td>HumanEval</td><td>MBPP</td></tr><tr><td colspan="5">Individual domain (Scaling)</td></tr><tr><td>Single Domain(k=1/1)</td><td>49.10</td><td>4.4</td><td>18.4</td><td>21.6</td></tr><tr><td>Single Domain(k=1/4)</td><td>43.37</td><td>3.9</td><td>11.58</td><td>18.8</td></tr><tr><td>Single Domain(k=1/16)</td><td>35.90</td><td>3.2</td><td>12.19</td><td>16.6</td></tr><tr><td>Single Domain(k=1/64)</td><td>22.71</td><td>3.2</td><td>9.14</td><td>15.8</td></tr><tr><td>Single Domain(k=1/256)</td><td>12.7</td><td>2.0</td><td>5.48</td><td>15.8</td></tr><tr><td colspan="5">Mixed domain (Scaling)</td></tr><tr><td>Mixed Domain(k=1/1)</td><td>47.53</td><td>3.6</td><td>14.63</td><td>19.4</td></tr><tr><td>Mixed Domain(k=1/4)</td><td>41.98</td><td>3.2</td><td>9.14</td><td>20.6</td></tr><tr><td>Mixed Domain(k=1/16)</td><td>32.97</td><td>2.4</td><td>9.16</td><td>18.4</td></tr><tr><td>Mixed Domain(k=1/64)</td><td>25.77</td><td>2.4</td><td>14.63</td><td>17.2</td></tr><tr><td>Mixed Domain(k=1/256)</td><td>14.78</td><td>3.0</td><td>11.37</td><td>16.6</td></tr><tr><td colspan="5">Individual domain</td></tr><tr><td>General only</td><td>11.1</td><td>2.9</td><td>10.4</td><td>1.0</td></tr><tr><td>Math only</td><td>49.10</td><td>4.4</td><td>6.71</td><td>9.0</td></tr><tr><td>Code only</td><td>4.51</td><td>1.0</td><td>18.40</td><td>21.6</td></tr><tr><td colspan="5">Different Training Strategies</td></tr><tr><td>Multi-task learning</td><td>47.53</td><td>3.6</td><td>14.63</td><td>19.4</td></tr><tr><td>Sequential Training</td><td>31.39</td><td>2.0</td><td>15.85</td><td>15.8</td></tr><tr><td>Mixed Sequential Training</td><td>32.6</td><td>2.5</td><td>15.24</td><td>16.6</td></tr><tr><td>DMT (k=1/256)</td><td>41.92</td><td>3.4</td><td>17.68</td><td>18.8</td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 323 |
+
|
| 324 |
+
We have the following findings:
|
| 325 |
+
|
| 326 |
+
1. In the individual domain, Llama shows a positive correlation between performance in MATH and MBPP and the data volume (consistent with RQ1).
|
| 327 |
+
2. Comparing the individual and mixed domains, Llama-7B exhibits a trade-off between high-resource performance conflict and low-resource performance gain in both MATH and MBPP (consistent with RQ2).
|
| 328 |
+
3. Considering the general ability results shown in Table 1, we can observe that DMT maintains competitive results in MATH and MBPP while prioritizing general abilities. This further validates the effectiveness of DMT (consistent with RQ4).
|
| 329 |
+
|
| 330 |
+
# G VISUALIZATION OF DIFFERENT LAYERS
|
| 331 |
+
|
| 332 |
+
In this section, we compared the visualization results of the baseline model of Llama-13B and DMT $\left( \mathrm { k } { = } 1 / 2 5 6 \right)$ ) in the starting layer (Layer1), middle layer (Layer15), and ending layer (Layer31) in Figure 7 and 8.
|
| 333 |
+
|
| 334 |
+
The visualization result of the starting layer are relatively chaotic, while the visualization results of the middle layer and the ending layer are clearer. And the results of the middle layer and the last layer are consistent in pointing out that both base model and model with DMT strategy exhibit a
|
| 335 |
+
|
| 336 |
+

|
| 337 |
+
Figure 7: From left to right are the visualization results of starting layer (Layer1), middle layer (Layer15), and ending layer (Layer31) on Llama-7B.
|
| 338 |
+
|
| 339 |
+

|
| 340 |
+
Figure 8: From left to right are the visualization results of starting layer (Layer1), middle layer (Layer15), and ending layer (Layer31) on Llama-7B with DMT $\mathrm { k } { = } 1 / 2 5 6$ ) strategy.
|
| 341 |
+
|
| 342 |
+
certain level of separation in the mathematical data representations, there remains a certain degree of overlap between the representations of code and general samples.
|
| 343 |
+
|
| 344 |
+
# H EQUAL DATA AMOUNT VS. EQUAL DATA PROPORTION
|
| 345 |
+
|
| 346 |
+
In a realistic SFT phrase for training general LLM, the data amount for different abilities is likely to differ. Therefore, instead of controlling the same amount of data, we select to mix datasets with the same proportion of subsets to better simulate real-world scenarios in all experiments. In addition, We further supplement the experimental results using different abilities mixed with the equal data amount and compare them with the results using the equal subset proportion in Table 6.
|
| 347 |
+
|
| 348 |
+
Equal Data amount Setting: we utilize the data amount of GSM8k RFT as the baseline. We sampled data with proportions of 1/16, 1/64, 1/256, and mixed samples of the same data amount from Code alpaca and ShareGPT.
|
| 349 |
+
|
| 350 |
+
Equal Proportion Setting: we sampled data with proportions of 1/16, 1/64, 1/256 according to the subset proportions of each dataset and mixed them, which is aligned with the setup in RQ2.
|
| 351 |
+
|
| 352 |
+
It can be observed that there is not a significant difference in the results of the three benchmark tests between the two settings. Therefore, these findings do not significantly impact the main experimental conclusions presented in the paper.
|
| 353 |
+
|
| 354 |
+
# I COMPARISON EXPERIMENT OF DIFFERENT TRAINING SEQUENCES
|
| 355 |
+
|
| 356 |
+
Thank you for your suggestion. In this paper, we trained the models in the order of code $ \mathrm { m a t h } $ general abilities. However, to investigate the impact of training order on different SFT abilities, we have conducted additional experiments with six different training orders. The results and analysis of these experiments are provided in Table 7:
|
| 357 |
+
|
| 358 |
+
Table 6: Comparative experiment between equal data amounts and equal subset proportions of different SFT abilities on Llama-7B
|
| 359 |
+
|
| 360 |
+
<table><tr><td>Methods</td><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td></tr><tr><td> Mixed Domain(k=1/16, Equal Amount)</td><td>34.49</td><td>9.14</td><td>5.49</td></tr><tr><td>Mixed Domain(k=1/64, Equal Amount)</td><td>25.02</td><td>13.54</td><td>5.21</td></tr><tr><td>Mixed Domain(k=1/256, Equal Amount)</td><td>16.7</td><td>11.54</td><td>4.63</td></tr><tr><td>Mixed Domain(k=1/16, Equal Proportion)</td><td>32.97</td><td>9.16</td><td>5.52</td></tr><tr><td>Mixed Domain(k=1/64,Equal Proportion)</td><td>25.77</td><td>14.63</td><td>5.24</td></tr><tr><td>Mixed Domain(k=1/256,Equal Proportion)</td><td>14.78</td><td>11.37</td><td>4.41</td></tr></table>
|
| 361 |
+
|
| 362 |
+
Table 7: Results of different sequential training for Llama-7B
|
| 363 |
+
|
| 364 |
+
<table><tr><td>Methods</td><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td></tr><tr><td>Code→Math →General</td><td>31.39</td><td>15.85</td><td>5.72</td></tr><tr><td>Math → Code →General</td><td>29.71</td><td>15.85</td><td>5.65</td></tr><tr><td>Code→General →Math</td><td>48.21</td><td>9.75</td><td>4.7</td></tr><tr><td>General → Code →Math</td><td>48.21</td><td>7.9</td><td>4.59</td></tr><tr><td>General →→Math→Code</td><td>37.60</td><td>15.85</td><td>3.79</td></tr><tr><td>Math →General -→Code</td><td>26.45</td><td>16.46</td><td>3.68</td></tr></table>
|
| 365 |
+
|
| 366 |
+
Based on our findings, we conclude the following:
|
| 367 |
+
|
| 368 |
+
1. The SFT ability trained in the final stage tend to retain relatively good performance.
|
| 369 |
+
|
| 370 |
+
2. If general and code abilities are trained in the first two stages, there is a noticeable performance decrease in code capability, while math capability does not show significant impact. One possible reason is that the task format of code generation and general ability exhibits similar data distributions (as discussed in RQ3 and Discussion1). This can result in a more severe catastrophic forgetting phenomenon during continuous fine-tuning.
|
| 371 |
+
|
| 372 |
+
# J DETAILED RESULTS OF EXPERIMENTS
|
| 373 |
+
|
| 374 |
+
# J.1 RESULTS OF DIFFERENT RANDOM SEEDS
|
| 375 |
+
|
| 376 |
+
For each dataset, we employed random selection by utilizing a random function with three distinct seeds for sampling. Subsequently, we conducted a comparative analysis of the results obtained from different subsets on the three benchmark tests. The specific details are presented in Table 8. It can be observed that DMT maintains its superiority under three different random seed settings. The influence of different subsets on experimental results is not a key factor and does not affect the overall trend.
|
| 377 |
+
|
| 378 |
+
# J.2 RESULTS OF SINGLE SOURCE AND MIXED SOURCE
|
| 379 |
+
|
| 380 |
+
In Table 9 and Table 10, we report the detailed comparative results between mix domains and individual domains for LLaMA-7B, 3B and 33B, as the supplemental results in RQ2.
|
| 381 |
+
|
| 382 |
+
# J.3 RESULTS OF DATA RATIO (K)
|
| 383 |
+
|
| 384 |
+
In Table 11, we report The detailed results of the data ratio (k) between specific abilities and general abilities on three benchmarks, as the supplemental results in RQ3.
|
| 385 |
+
|
| 386 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="3">LLaMA -7B</td><td colspan="3">LLaMA -13B</td><td colspan="3">LLaMA -33B</td></tr><tr><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td></tr><tr><td>Diferent Training Strategies</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Multi-task learning</td><td>47.53</td><td>14.63</td><td>5.76</td><td>50.94</td><td>19.50</td><td>5.73</td><td>56.69</td><td>18.9</td><td>6.07</td></tr><tr><td>Sequential Training</td><td>31.39</td><td>15.85</td><td>5.72</td><td>39.12</td><td>20.12</td><td>5.93</td><td>47.27</td><td>24.80</td><td>6.73</td></tr><tr><td>Mixed Sequential Training</td><td>32.60</td><td>15.24</td><td>6.02</td><td>40.48</td><td>18.30</td><td>5.93</td><td>44.24</td><td>24.4</td><td>6.43</td></tr><tr><td>DMT(k=1/256,random seed=1)</td><td>41.92</td><td>17.68</td><td>6.08</td><td>46.47</td><td>19.50</td><td>6.03</td><td>56.36</td><td>25.00</td><td>6.69</td></tr><tr><td>DMT(k=1/256,random seed=2)</td><td>41.31</td><td>17.68</td><td>6.02</td><td>45.85</td><td>18.90</td><td>6.08</td><td>55.64</td><td>24.80</td><td>6.71</td></tr><tr><td>DMT(k=1/256,random seed=3)</td><td>42.03</td><td>18.21</td><td>6.13</td><td>46.22</td><td>20.52</td><td>6.10</td><td>56.12</td><td>25.30</td><td>6.73</td></tr></table>
|
| 387 |
+
|
| 388 |
+
Table 8: The results of LLaMA-7B, 13B, 33B under different training strategies on three benchmarks. The top two results across different strategies are marked with bold and underlined. We tested the results of DMT on randomly sampling k proportion of specified data under three random seeds.
|
| 389 |
+
|
| 390 |
+
# J.4 RESULTS OF SPECIALIZED DATA AMOUNT OF DMT
|
| 391 |
+
|
| 392 |
+
In Table 12, we report The detailed results of LLaMA-7B, 13B, 33B with different training strategies on three benchmarks, as the supplemental results in RQ4.
|
| 393 |
+
|
| 394 |
+
# J.5 RESULTS OF MT-BENCH
|
| 395 |
+
|
| 396 |
+
In Figure 9, we report detailed results of LLaMA-7B, 13B, 33B with different training strategies on MT-Bench, which include coding, extraction, humanities, math, reasoning, roleplay, stem and writing abilities.
|
| 397 |
+
|
| 398 |
+
# J.6 SUPPLEMENTAL RESULTS FOR DICUSSION
|
| 399 |
+
|
| 400 |
+
In Figure 10, we report the t-SNE visualizations of LLaMA-7B and LLaMA-7B with DMT $\mathrm { k } { = } 1 / 2 5 6 )$ strategy. What’s more, the bottom figure represents the scaling relationship of LLaMA-7B with DMT $\mathrm { k } { = } 1 / 2 5 6 )$ ) under different values of K.
|
| 401 |
+
|
| 402 |
+
Moreover, in Table 13, we report The detailed results of LLaMA-7B, 13B, 33B with different training strategies on three benchmarks, as the supplemental results in RQ4.
|
| 403 |
+
|
| 404 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="3">LLaMA-7B</td><td colspan="3">LLaMA-13B</td></tr><tr><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td></tr><tr><td>Single(k=1)</td><td>49.10</td><td>18.4</td><td>5.88</td><td>51.4</td><td>18.4</td><td>6.13</td></tr><tr><td>Single(k=1/4)</td><td>43.37</td><td>11.58</td><td>5.85</td><td>48.59</td><td>13.41</td><td>6.03</td></tr><tr><td>Single(k=1/16)</td><td>35.90</td><td>12.19</td><td>5.61</td><td>43.00</td><td>12.80</td><td>5.66</td></tr><tr><td>Single(k=1/64)</td><td>22.71</td><td>9.14</td><td>5.11</td><td>27.40</td><td>12.20</td><td>5.24</td></tr><tr><td>Single(k=1/256)</td><td>12.70</td><td>5.48</td><td>4.00</td><td>18.40</td><td>10.36</td><td>2.95</td></tr><tr><td>Mix(k=1)</td><td>47.53</td><td>14.63</td><td>5.76</td><td>50.49</td><td>17.10</td><td>5.73</td></tr><tr><td>Mix(k=1/4)</td><td>41.98</td><td>9.14</td><td>5.48</td><td>48.52</td><td>14.00</td><td>5.61</td></tr><tr><td>Mix(k=1/16)</td><td>32.97</td><td>9.16</td><td>5.22</td><td>40.63</td><td>14.60</td><td>5.52</td></tr><tr><td>Mix(k=1/64)</td><td>25.77</td><td>14.63</td><td>5.27</td><td>33.2</td><td>17.68</td><td>5.24</td></tr><tr><td>Mix(k=1/256)</td><td>14.78</td><td>11.37</td><td>4.11</td><td>24.94</td><td>12.19</td><td>4.4</td></tr></table>
|
| 405 |
+
|
| 406 |
+
Table 9: Comparative experiments between mix domains and individual domains for LLaMA-7B, 13B.
|
| 407 |
+
|
| 408 |
+
Table 10: Comparative experiments between mix domains and individual domains for LLaMA-33B.
|
| 409 |
+
|
| 410 |
+
<table><tr><td>Methods</td><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td></tr><tr><td>Single(k=1)</td><td>57.91</td><td>26.82</td><td>6.63</td></tr><tr><td>Single(k=1/4)</td><td>56.10</td><td>25.61</td><td>6.66</td></tr><tr><td>Single(k=1/16)</td><td>54.60</td><td>21.95</td><td>6.17</td></tr><tr><td>Single(k=1/64)</td><td>44.60</td><td>18.59</td><td>5.99</td></tr><tr><td>Single(k=1/256)</td><td>29.21</td><td>14.02</td><td>2.3</td></tr><tr><td>Mix(k=1)</td><td>56.69</td><td>18.9</td><td>6.07</td></tr><tr><td>Mix(k=1/4)</td><td>54.54</td><td>22.56</td><td>5.92</td></tr><tr><td>Mix(k=1/16)</td><td>53.33</td><td>26.82</td><td>6.26</td></tr><tr><td>Mix(k=1/64)</td><td>46.66</td><td>18.6</td><td>5.73</td></tr><tr><td>Mix(k=1/256)</td><td>36.54</td><td>17.68</td><td>4.58</td></tr></table>
|
| 411 |
+
|
| 412 |
+
Table 11: The detailed results of the data ratio (k) between specific abilities and general abilities on three benchmarks.
|
| 413 |
+
|
| 414 |
+
<table><tr><td>Model size</td><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td></tr><tr><td>Mix[(code,math),1 general]</td><td>47.53</td><td>14.63</td><td>5.76</td></tr><tr><td>Mix[(code,math),1/4 general]</td><td>48.44</td><td>15.85</td><td>5.73</td></tr><tr><td>Mix[(code,math),1/16 general]</td><td>47.99</td><td>15.24</td><td>5.27</td></tr><tr><td>Mix[(code,math),1/64 general]</td><td>47.23</td><td>14.63</td><td>5.16</td></tr><tr><td>Mix[(code,math),1/256 general]</td><td>48.52</td><td>16.46</td><td>4.69</td></tr><tr><td>Mix[1(code,math),general]</td><td>47.53</td><td>14.63</td><td>5.76</td></tr><tr><td>Mix[1/4(code,math),general]</td><td>41.31</td><td>10.97</td><td>5.81</td></tr><tr><td>Mix[1/16(code,math),general]</td><td>33.20</td><td>11.58</td><td>5.76</td></tr><tr><td>Mix[1/64(code,math),general]</td><td>25.17</td><td>12.19</td><td>5.84</td></tr><tr><td>Mix[1/256(code,math),general]</td><td>16.52</td><td>9.14</td><td>5.82</td></tr><tr><td>Mix[1(code,math),1/64general]</td><td>47.68</td><td>14.63</td><td>5.09</td></tr><tr><td>Mix[1/4(code,math),1/64general]</td><td>43.29</td><td></td><td></td></tr><tr><td>Mix[1/16(code,math),1/64general]</td><td>33.81</td><td>12.19</td><td>5.07</td></tr><tr><td>Mix[1/64(code,math),1/64general]</td><td>26.23</td><td>12.19</td><td>5.17</td></tr><tr><td>Mix[1/256(code,math),1/64general]</td><td>18.27</td><td>12.19 10.36</td><td>5.12 5.12</td></tr></table>
|
| 415 |
+
|
| 416 |
+
<table><tr><td rowspan="3">Methods</td><td colspan="3">LLaMA-7B</td><td colspan="3">LLaMA-13B</td></tr><tr><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td></tr><tr><td>Individual domain</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>General only</td><td>11.1</td><td>10.4</td><td>5.88</td><td>14.02</td><td>16.4</td><td>6.13</td></tr><tr><td>Math only</td><td>49.1</td><td></td><td>1</td><td>51.4</td><td></td><td></td></tr><tr><td>Code only</td><td>1</td><td>18.4</td><td></td><td>1</td><td>17.1</td><td>1</td></tr><tr><td>Different Training Strategies</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Multi-task learning</td><td>47.53</td><td>14.63</td><td>5.76</td><td>50.94</td><td>19.5</td><td>5.73</td></tr><tr><td>Sequential Training</td><td>31.39</td><td>15.85</td><td>5.72</td><td>39.12</td><td>20.12</td><td>5.93</td></tr><tr><td>Mixed Sequential Training</td><td>32.6</td><td>15.24</td><td>6.02</td><td>40.48</td><td>18.30</td><td>5.93</td></tr><tr><td>DMT (k=1)</td><td>45.79</td><td>14.02</td><td>5.63</td><td>50.49</td><td>16.46</td><td>5.76</td></tr><tr><td>DMT (k=1/4)</td><td>48.37</td><td>13.41</td><td>5.69</td><td>50.18</td><td>18.9</td><td>5.83</td></tr><tr><td>DMT (k=1/16)</td><td>43.3</td><td>15.24</td><td>5.78</td><td>48.59</td><td>18.9</td><td>5.96</td></tr><tr><td>DMT (k=1/64)</td><td>42.53</td><td>15.85</td><td>6.01</td><td>47.61</td><td>15.24</td><td>6.03</td></tr><tr><td>DMT (k=1/256)</td><td>41.92</td><td>17.68</td><td>6.08</td><td>46.47</td><td>19.5</td><td>6.03</td></tr></table>
|
| 417 |
+
|
| 418 |
+
Table 12: The detailed results of LLaMA-7B, 13B with different training strategies on three benchmarks.
|
| 419 |
+
|
| 420 |
+
Table 13: The scaling curve after ablating code and math-related samples from ShareGPT
|
| 421 |
+
|
| 422 |
+
<table><tr><td>Model size</td><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td></tr><tr><td>1/1 Mix(code,math,general(w/o code math))</td><td>49.05</td><td>17.68</td><td>5.80</td></tr><tr><td>1/4 Mix(code,math,general(w/o code math))</td><td>43.13</td><td>15.85</td><td>5.71</td></tr><tr><td>1/16 Mix(code,math,general(w/o code math))</td><td>36.23</td><td>10.36</td><td>5.38</td></tr><tr><td>1/64 Mix(code,math,general(w/o code math))</td><td>25.62</td><td>10.97</td><td>5.21</td></tr><tr><td>1/256 Mix(code,math,general(w/o code math))</td><td>15.31</td><td>11.37</td><td>4.38</td></tr></table>
|
| 423 |
+
|
| 424 |
+

|
| 425 |
+
Figure 9: The detailed results of LLaMA-7B, 13B, 33B with different training strategies on MTBench.
|
| 426 |
+
|
| 427 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="3">LLaMA -7B</td><td colspan="3">LLaMA -13B</td><td colspan="3">LLaMA -33B</td></tr><tr><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td></tr><tr><td colspan="10">Individual domain</td></tr><tr><td>General only</td><td>11.10</td><td>10.42</td><td>5.88</td><td>14.02</td><td>16.40</td><td>6.13</td><td>26.06</td><td>24.30</td><td>6.63</td></tr><tr><td>Math only</td><td>49.10</td><td>6.71</td><td>2.53</td><td>51.40</td><td>12.8</td><td>2.54</td><td>57.91</td><td>15.5</td><td>3.18</td></tr><tr><td>Code only</td><td>4.51</td><td>18.40</td><td>4.30</td><td>5.15</td><td>17.1</td><td>3.53</td><td>6.06</td><td>26.82</td><td>4.18</td></tr><tr><td colspan="10">Diferent Training Strategies</td></tr><tr><td> Multi-task learning</td><td>47.53</td><td>14.63</td><td>5.76</td><td>50.94</td><td>19.50</td><td>5.73</td><td>56.69</td><td>18.9</td><td>6.07</td></tr><tr><td>Sequential Training</td><td>31.39</td><td>15.85</td><td>5.72</td><td>39.12</td><td>20.12</td><td>5.93</td><td>47.27</td><td>24.80</td><td>6.73</td></tr><tr><td>Mixed Sequential Training</td><td>32.60</td><td>15.24</td><td>6.02</td><td>40.48</td><td>18.30</td><td>5.93</td><td>44.24</td><td>24.4</td><td>6.43</td></tr><tr><td>DMT(k=1/256)</td><td>41.92</td><td>17.68</td><td>6.08</td><td>46.47</td><td>19.50</td><td>6.03</td><td>56.36</td><td>25.00</td><td>6.69</td></tr></table>
|
| 428 |
+
|
| 429 |
+
Table 14: The results of LLaMA-7B, 13B, 33B under different training strategies on three benchmarks. The top two results across different strategies are marked with bold and underlined.
|
| 430 |
+
|
| 431 |
+

|
| 432 |
+
Figure 10: The upper two figures show the t-SNE visualizations of LLaMA-7B and LLaMA-7B with DMT $\mathrm { k } { = } 1 / 2 5 6 )$ stategy. The bottom figure represents the scaling relationship of LLaMA-7B with DMT under different values of K.
|
| 433 |
+
|
| 434 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="3">LLaMA -7B</td><td colspan="3">LLaMA -13B</td><td colspan="3">LLaMA -33B</td></tr><tr><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td><td>GSM8K</td><td>HumanEval</td><td>MT-Bench</td></tr><tr><td>Individual domain</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>General only</td><td>11.10</td><td>10.42</td><td>5.88</td><td>14.02</td><td>16.40</td><td>6.13</td><td>26.06</td><td>24.30</td><td>6.63</td></tr><tr><td>Math only</td><td>49.10</td><td>6.71</td><td>2.53</td><td>51.40</td><td>12.8</td><td>2.54</td><td>57.91</td><td>15.5</td><td>3.18</td></tr><tr><td>Code only</td><td>4.51</td><td>18.40</td><td>4.30</td><td>5.15</td><td>17.1</td><td>3.53</td><td>6.06</td><td>26.82</td><td>4.18</td></tr><tr><td>Diferent Training Strategies</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Multi-task learning</td><td>47.53</td><td>14.63</td><td>5.76</td><td>50.94</td><td>19.50</td><td>5.73</td><td>56.69</td><td>18.9</td><td>6.07</td></tr><tr><td>Sequential Training</td><td>31.39</td><td>15.85</td><td>5.72</td><td>39.12</td><td>20.12</td><td>5.93</td><td>47.27</td><td>24.80</td><td>6.73</td></tr><tr><td>Mixed Sequential Training</td><td>32.60</td><td>15.24</td><td>6.02</td><td>40.48</td><td>18.30</td><td>5.93</td><td>44.24</td><td>24.4</td><td>6.43</td></tr><tr><td>DMT(k=1/256)</td><td>41.92</td><td>17.68</td><td>6.08</td><td>46.47</td><td>19.50</td><td>6.03</td><td>56.36</td><td>25.00</td><td>6.69</td></tr></table>
|
| 435 |
+
|
| 436 |
+
Table 15: The results of LLaMA-7B, 13B, 33B under different training strategies on three benchmarks. The top two results across different strategies are marked with bold and underlined.
|
parse/test/7oLshfEIC2/7oLshfEIC2.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/7oLshfEIC2/7oLshfEIC2_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/7oLshfEIC2/7oLshfEIC2_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/7oLshfEIC2/7oLshfEIC2_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/82A2EfMu3e/82A2EfMu3e.md
ADDED
|
@@ -0,0 +1,581 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# EFFICIENT DISCRETE PHYSICS-INFORMED NEURAL NETWORKS FOR SOLVING EVOLUTIONARY PARTIAL DIFFERENTIAL EQUATIONS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Physics-informed neural networks (PINNs) have shown promising potential for solving partial differential equations (PDEs) using deep learning. However, PINNs face training difficulties for evolutionary PDEs, particularly for dynamical systems whose solutions exhibit multi-scale or turbulent behavior over time. The reason is that PINNs may violate the temporal causality property since all the temporal features in the PINNs loss are trained simultaneously. This paper proposes to use implicit time differencing schemes to enforce temporal causality, and use transfer learning to sequentially update the PINNs in space as surrogates for PDE solutions in different time frames. The evolving PINNs are better able to capture the varying complexities of the evolutionary equations, while only requiring minor updates between adjacent time frames. Our method is theoretically proven to be convergent if the time step is small and each PINN in different time frames is well-trained. In addition, we provide state-of-the-art (SOTA) numerical results for a variety of benchmarks for which existing PINNs formulations may fail or be inefficient. We demonstrate that the proposed method improves the accuracy of PINNs approximation for evolutionary PDEs and improves efficiency by a factor of 4–40x. All code and data can be found in the supplemental materials.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Evolutionary partial differential equations (PDEs) are representative of the real world, such as the Navier–Stokes equation, Cahn–Hilliard equations, wave equation, Korteweg–De Vries equation, etc., which arise from physics, mechanics, material science, and other computational science and engineering fields Dafermos & Pokorny (2008). Due to the inherent universal approximation capability of neural networks and the exponential growth of data and computational resources, neural network PDE solvers have recently gained popularity Raissi et al. (2017); Han et al. (2018); Khoo et al. (2021); Yu & E (2018); Sirignano & Spiliopoulos (2018); Long et al. (2018). The most representative approach among these neural network PDE solvers is Physics-Informed Neural Networks (PINNs) Raissi et al. (2019). PINNs have been utilized effectively to solve PDE problems such as the Poisson equation, Burgers equation, and Navier-Stokes equation Raissi et al. (2019); Lu et al. (2021a); Mishra & Molinaro (2023). Many variants of PINNs include loss reweighting Wang et al. (2021a; 2022b;a); Krishnapriyan et al. (2021), novel optimization targets Jagtap et al. (2020); Kharazmi et al. (2021), novel architectures Jagtap et al. (2020); Jagtap & Karniadakis (2021); Wang et al. (2021b) and other techniques such as transfer learning and meta-learning Goswami et al. (2020); Liu et al. (2022b), have also been explored to enhance training and test accuracy.
|
| 12 |
+
|
| 13 |
+
When we apply neural networks to solve evolutionary PDEs, the most ubiquitously used PINN implementation at present is the meshless, continuous-time PINN in Raissi et al. (2019). However, training (i.e., optimization) is still the primary challenge when employing this approach, particularly for dynamical systems whose solutions exhibit strong non-linearity, multi-scale features, and high sensitivity to initial conditions, such as the Kuramoto-Sivashinsky equation and the Navier-Stokes equations in the turbulent regime. Recently Wang et al. Wang et al. (2022a) revealed that continuoustime PINNs can violate the so-called temporal causality property, and are therefore prone to converge to incorrect solutions. Temporal causality requires that models should be sufficiently trained at time $t$ before approximating the solution at the later time $t + \Delta t$ , while continuous-time PINNs are trained for all time $t$ simultaneously. To enhance the temporal causality in the training process, they proposed a simple re-formulation of PINNs loss functions as shown in equation 1, i.e., a clever weighting technique that is inversely exponentially proportional to the magnitude of cumulative residual losses from prior times. This casual PINN method has been demonstrated to be effective for some difficult problems. However their method is sensitive to the new causality hyper-parameter $\epsilon$ , and the training time is substantially longer than vanilla PINNs.
|
| 14 |
+
|
| 15 |
+
$$
|
| 16 |
+
\mathcal { L } ( \boldsymbol { \theta } ) = \frac { 1 } { N _ { t } } \sum _ { i = 1 } ^ { N _ { t } } w _ { i } \mathcal { L } ( t _ { i } , \boldsymbol { \theta } ) , \quad \mathrm { w i t h } \quad w _ { i } = \exp \left( - \epsilon \sum _ { k = 1 } ^ { i - 1 } \mathcal { L } ( t _ { k } , \boldsymbol { \theta } ) \right) .
|
| 17 |
+
$$
|
| 18 |
+
|
| 19 |
+
In this paper, we introduce a new PINN implementation technique for efficiently and precisely solving evolutionary PDEs. Our technique relies on two key elements: (a) using discrete-time PINNs instead of continuous-time PINNs to satisfy the principle of temporal causality, thereby making the training process stable and accurate; and (b) utilizing transfer learning to accelerate PINN training in later time frames. The time-differencing schemes such as forward/backward Euler, Crank-Nicolson, and Runge-Kutta enable solutions to be learned from earlier times to later times, therefore satisfying the temporal causality principle. Moreover, the errors from time differencing can be theoretically controlled Ascher (2008), making the training procedure stable and accurate. We accelerate PINN training naturally by initializing the PINN parameters at the next time frame with the trained PINN parameters at the current time frame. In the following sections, we will show that our transfer learning enhanced discrete physics-informed neural networks (TL-DPINN) method is theoretically and numerically stable, accurate, and efficient.
|
| 20 |
+
|
| 21 |
+
Following is a summary of the contribution of the paper.
|
| 22 |
+
|
| 23 |
+
• Implicit time differencing with the transfer-learning tuned PINN provides more accurate and robust predictions of evolutionary PDEs’ solutions while retaining a low computational cost.
|
| 24 |
+
• We prove theoretically the error estimation result of our TL-DPINN method, indicating that TL-DPINN solutions converge as long as the time step is small and each PINN in different time frames is well trained.
|
| 25 |
+
• Through extensive numerical results, we demonstrate that our method can attain state-of-theart (SOTA) performance among various PINN frameworks in a trade-off between accuracy and efficiency.
|
| 26 |
+
|
| 27 |
+
# 2 RELATED WORKS
|
| 28 |
+
|
| 29 |
+
Discrete PINN. Raissi et al. Raissi et al. (2019) have applied the general form of Runge–Kutta methods with arbitrary $q$ stages to the evolutionary PDEs. However, only an implicit Runge-Kutta scheme with $q = 1 0 0$ stages and a single large time step $\Delta t = 0 . 8$ are computed. Low-order methods cannot retain their predictive accuracy for large time steps. In our research, we demonstrate the capability of discrete PINNs both theoretically and experimentally, indicating that robust low-order implicit Runge-Kutta combined with PINN can obtain high-precision solutions with multiple smallsized time steps. Jagtap and Karniadakis Jagtap & Karniadakis (2021) propose a generalized domain decomposition framework that allows for multiple sub-networks over different subdomains to be stitched together and trained in parallel. However, it is not causal and has the same training issues as conventional PINNs. The implicit Runge-Kutta scheme combined with PINN has been used to solve simple ODE systems Stiasny et al. (2021); Moya & Lin (2023), but not dynamic PDE systems with multi-scale or turbulent behavior over time.
|
| 30 |
+
|
| 31 |
+
Temporal decomposition. Diverse strategies have been studied for enhancing PINN training by splitting the domain into numerous small “time-slab”. Wight and Zhao L. Wight & Zhao (2021) propose an adaptive time-sampling strategy to learn solutions from the previous small time domain to the whole time domain. However, collocation points are costly to add, and the computational cost rises. This time marching strategy has been enhanced further in Krishnapriyan et al. (2021); Mattey & Ghosh (2022); McClenny & Braga-Neto (2023). Nevertheless, causality is only enforced on the scale of the time slabs and not inside each time slab, thus the convergence can not be theoretically guaranteed. A unified framework for causal sweeping strategies for PINNs is summarized in Penwarden et al. (2023). Wang et al. Wang et al. (2022a) introduced a simple causal weight in the form of equation 1 to naturally match the principle of temporal causality with high precision. However, this significantly increased computational costs and did not guarantee convergence Penwarden et al. (2023). Our methods can attain the same level of precision, are theoretically convergent, and are 4 to 40 times quicker.
|
| 32 |
+
|
| 33 |
+
Transfer learning. Transfer-learning has been previously combined with various deep-learning models for solving PDEs problems, such as PINN for phase-field modeling of fracture Goswami et al. (2020), DeepONet for PDEs under conditional shift Goswami et al. (2022), DNN-based PDE solvers Chen et al. (2021), PINN for inverse problems Xu et al. (2023), one-shot transfer learning of PINN Desai et al. (2022), and training of CNNs on multi-fidelity data Song & Tartakovsky (2022). Xu et al. Xu et al. (2022) proposed a transfer learning enhanced DeepONet for the long-term prediction of evolution equations. However, their method necessitates a substantial amount of training data from traditional numerical methods. In contrast, our methods are physics-informed and do not require additional training data.
|
| 34 |
+
|
| 35 |
+
# 3 NUMERICAL METHOD
|
| 36 |
+
|
| 37 |
+
Problem set-up Here we consider the initial-boundary value problem for a general evolutionary parabolic differential equation. The extension to hyperbolic equations are straightforward.
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
\left\{ \begin{array} { l l } { u _ { t } = \mathcal { N } ( u ) , \quad x \in \Omega , t \in [ 0 , T ] , } \\ { u ( 0 , x ) = u _ { 0 } ( x ) , \quad x \in \Omega , } \\ { u ( t , x ) = g ( t , x ) , \quad t \in [ 0 , T ] , x \in \partial \Omega , } \end{array} \right.
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
where $u ( t , x )$ denotes the hidden solution, $t$ and $x$ represent temporal and spatial coordinates respectively, $\dot { \mathcal { N } } ( u )$ denotes a differential operator (for example, $\mathcal { N } \bar { ( } u ) = u _ { x x }$ for the simplest Heat equation), and $\Omega \subset \mathbb { R } ^ { D }$ is an open, bounded domain with smooth boundary $\partial \Omega$ . This study assumes that the equations are dissipative in the sense that $\begin{array} { r } { \int _ { \Omega } u \cdot \mathcal { N } ( u ) d x \leq 0 \mathrm { ~ } \mathrm { X } } \end{array}$ u et al. (2022).
|
| 44 |
+
|
| 45 |
+
Our goal is to learn $u ( t , x )$ by neural network approximation. We briefly mention the basic background of PINN in Section 3.1 and then describe our TL-DPINN method in Section 3.2.
|
| 46 |
+
|
| 47 |
+
# 3.1 PHYSICS-INFORMED NEURAL NETWORKS
|
| 48 |
+
|
| 49 |
+
In the original study of PINNs Raissi et al. (2019), it approximates $u ( t , x )$ to equation 2 using a deep neural network $u _ { \theta } ( t , x )$ , where $\theta$ represents the neural network’s parameters (e.g., weights and biases). Consequently, the objective of a vanilla PINN is to discover the $\theta$ that minimizes the physics-based loss function:
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
\begin{array} { r } { \mathcal { L } ( \boldsymbol { \theta } ) = \lambda _ { b } \mathcal { L } _ { b } ( \boldsymbol { \theta } ) + \lambda _ { u } \mathcal { L } _ { u } ( \boldsymbol { \theta } ) + \lambda _ { r } \mathcal { L } _ { r } ( \boldsymbol { \theta } ) , } \end{array}
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
where $\begin{array} { r } { \mathcal { L } _ { b } ( \theta ) = \frac { 1 } { N _ { b } } \sum _ { i = 1 } ^ { N _ { b } } \| u _ { \theta } ( t _ { b } ^ { i } , x _ { b } ^ { i } ) - g ( t _ { b } ^ { i } , x _ { b } ^ { i } ) \| ^ { 2 } , \mathcal { L } _ { u } ( \theta ) = \frac { 1 } { N _ { u } } \sum _ { i = 1 } ^ { N _ { u } } \| u _ { \theta } ( 0 , x _ { t } ^ { i } ) - u _ { 0 } ( x _ { t } ^ { i } ) \| ^ { 2 } } \end{array}$ and $\begin{array} { r } { \mathcal { L } _ { r } ( \theta ) = \frac { 1 } { N _ { r } } \sum _ { i = 1 } ^ { N _ { r } } \| \mathcal { R } ( u _ { \theta } ( t _ { r } ^ { i } , x _ { r } ^ { i } ) \| ^ { 2 } } \end{array}$ . The $t _ { b } ^ { i } , x _ { b } ^ { i } , x _ { t } ^ { i }$ u represent the boundary and initial sampling data for $u _ { \theta } ( t , x )$ , whereas $t _ { r } ^ { i } , x _ { r } ^ { i }$ represent the data points utilized to calculate the residual term $\mathcal { R } ( u ) =$ $u _ { t } - \mathcal { N } ( u )$ . The coefficients $\lambda _ { b }$ , $\lambda _ { u }$ , and $\lambda _ { r }$ in the loss function are utilized to assign a different learning rate, which can be specified by humans or automatically adjusted during trainingWang et al. (2021a; 2022b). We note that the $\mathcal { L } _ { b }$ term can be further omitted if we apply hard constraint in the PINN’s design Lu et al. (2021b); Liu et al. (2022a); Sukumar & Srivastava (2022).
|
| 56 |
+
|
| 57 |
+
As demonstrated in Wang et al. (2022a), the vanilla PINN may violate the principle of temporal causality, as the residual loss at the later time may be minimized even if the predictions at previous times are incorrect. Figure 1 demonstrates the training result for solving the Allen-Chan equation, confirming this phenomenon. For conventional PINN, the residual loss $\mathcal { L } _ { r }$ is quite large near the initial state and decays quickly to a small value when the learned solution is incorrect. Comparatively, our method’s residual remains small for all $t \in [ 0 , 1 ]$ and captures the solution with high precision.
|
| 58 |
+
|
| 59 |
+
# 3.2 TRANSFER LEARNING ENHANCED DISCRETE PINN
|
| 60 |
+
|
| 61 |
+
Discrete PINN Since the continuous-time PINN violates temporal causality, we shift to numerical temporal differencing schemes that naturally respect temporal causality. Given a time step $\Delta t$ , assume
|
| 62 |
+
|
| 63 |
+

|
| 64 |
+
Figure 1: Allen-Cahn equation: (a)reference solution. (b)PINN solution. (c)TL-DPINN solution. (d)PINN’s temporal residual loss $\mathcal { L } _ { r } ( t _ { n } , \theta )$ . (e)TL-DPINN’s temporal residual loss $\mathcal { L } _ { r } ( t _ { n } , \theta )$ .
|
| 65 |
+
|
| 66 |
+
we have computed $u ^ { n } ( x )$ to approximate the solution $u ( n \Delta t , x )$ to equation 2, then we consider finding $u ^ { n + 1 } ( x )$ by the Crank-Nicolson time differencing scheme:
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\frac { u ^ { n + 1 } ( x ) - u ^ { n } ( x ) } { \Delta t } = \ N \left[ \frac { u ^ { n + 1 } ( x ) + u ^ { n } ( x ) } { 2 } \right] .
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
Instead of solving equation 2 in the whole space-temporal domain directly, our goal is to solve equation 4 from one step to the next in the space domain: $u _ { 0 } ( x ) \mapsto u ^ { 1 } ( \bar { x ) } \mapsto \bar { \cdot \cdot \cdot } \mapsto u ^ { n } ( x ) \mapsto$ $u ^ { \bar { n } + 1 } ( x ) \mapsto \cdot \cdot \cdot$ , so that the evolutionary dynamics can be captured over a long time horizon.
|
| 73 |
+
|
| 74 |
+
Next, we apply PINN to solve equation 4. It is also called discrete PINN in Raissi et al. (2019) when the Crank-Nicolson scheme is replaced by implicit high-order Runge-Kutta schemes. Assuming we have obtained a neural network $u _ { \theta ^ { n } } ( x )$ to approximate $u ( n \Delta t , x )$ in equation 2, we compute $u _ { \theta ^ { n + 1 } } ( x )$ by finding another new $\theta ^ { n + 1 }$ that minimize the loss functions
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\begin{array} { r l r } { { \mathcal { L } ^ { n + 1 } ( \theta ^ { n + 1 } ) = \frac { \lambda _ { b } } { N _ { b } } \sum _ { i = 1 } ^ { N _ { b } } | u _ { \theta ^ { n + 1 } } ( x _ { b } ^ { i } ) - g ( x _ { b } ^ { i } ) | ^ { 2 } } } \\ & { } & { \quad + \frac { \lambda _ { r } } { N _ { r } } \sum _ { i = 1 } ^ { N _ { r } } | \frac { u _ { \theta ^ { n + 1 } } ( x _ { r } ^ { i } ) - u _ { \theta ^ { n } } ( x _ { r } ^ { i } ) } { \Delta t } - \mathcal { N } [ \frac { u _ { \theta ^ { n + 1 } } ( x _ { r } ^ { i } ) + u _ { \theta ^ { n } } ( x _ { r } ^ { i } ) } { 2 } ] | ^ { 2 } . } \end{array}
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
These multiple PINNs $u _ { \theta ^ { n } } ( x )$ take $x$ as input and output the solution values at different timestamps.
|
| 81 |
+
|
| 82 |
+
Remark 3.1. We remark that there exist alternative options for time differencing beyond the secondorder Crank-Nicolson scheme. Several implicit Runge-Kutta schemes, including the first-order backward Euler scheme and the fourth-order Gauss-Legendre scheme, have been found to be effective. The second-order Crank-Nicolson scheme is favored due to its optimal trade-off between computational efficiency and numerical accuracy. A comprehensive exposition of these techniques is available in Appendix A.2.
|
| 83 |
+
|
| 84 |
+
Transfer learning The transfer learning methodology is utilized to expedite the training procedure between two adjacent PINNs. All the PINNs $u _ { \theta ^ { n } } ( x )$ share the same neural network architectures with different parameters $\theta ^ { n }$ . For a small time step $\Delta t$ , there are little difference between the two adjacent PINNs $u _ { \theta ^ { n } } ( x )$ and $u _ { \theta ^ { n + 1 } } ( x )$ . So the parameters $\theta ^ { n + 1 }$ to be trained are very close to the trained parameters $\theta ^ { n }$ . The approach involves freezing a significant portion of the well-trained $u _ { \theta ^ { n } } ( x )$
|
| 85 |
+
|
| 86 |
+
and solely updating the weights in the last hidden layer through the application of a comparable physics-informed loss function equation 5.
|
| 87 |
+
|
| 88 |
+
To be more precise, we first approximate the initial condition $u _ { 0 } ( x )$ by the neural network $u _ { \theta ^ { 0 } } ( x )$ , then learn $u _ { \theta ^ { 1 } } ( \bar { x } ) , u _ { \theta ^ { 2 } } ( x ) , . . .$ sequentially by transfer learning. The general structure of our TL-DPINN method is illustrated in Algorithm 1.
|
| 89 |
+
|
| 90 |
+
# Algorithm 1: The training procedure of our TL-DPINN method
|
| 91 |
+
|
| 92 |
+
Input :Target evolutionary PDE equation 2; initial network $u _ { \theta }$ ; end time $T$ Output :The predicted model $u _ { \theta ^ { n } } ( x )$ at each timestamp $t _ { n }$ 1 Set hyper-parameters: timestamps number $N _ { t }$ , number of maximum training iterations $M _ { 0 } , M _ { 1 }$ , learning rate $\eta$ , threshold value $\epsilon$ ; 2 Step (a): learn $u _ { \theta ^ { 0 } } ( x )$ by PINN ; 3 for $i = 1 , 2 , . . . , M _ { 0 }$ do 4 Compute the mean square error loss ${ \mathcal { L } } ^ { 0 } ( \theta ^ { 0 } )$ ; 5 Update the parameter $\theta ^ { 0 }$ via gradient descent $\theta _ { i + 1 } ^ { 0 } = \theta _ { i } ^ { 0 } - \eta \nabla \mathcal { L } ^ { 0 } ( \theta _ { i } ^ { 0 } )$ ; 6 Step (b): denote $\theta _ { * } ^ { 0 } = \theta _ { M _ { 0 } } ^ { 0 }$ and learn $u _ { \theta ^ { 1 } } ( x ) , . . . , u _ { \theta ^ { n } } ( x ) , . . .$ sequentially by transfer learning ; $^ { 7 }$ for $n = 0 , 1 , 2 , . . . , N _ { t } - 1$ do 8 for $i = 1 , 2 , . . . , M _ { 1 }$ do 9 10 Compute loss Update the pa $\mathcal { L } _ { i } ^ { n + 1 } ( \boldsymbol { \theta } _ { i } ^ { n + 1 } )$ $\theta ^ { n + 1 }$ by equation 5 ;via gradient descent $\theta _ { i + 1 } ^ { n + 1 } = \theta _ { i } ^ { n + 1 } - \eta \nabla \mathcal { L } ^ { n + 1 } ( \theta _ { i } ^ { n + 1 } )$ ; 11 if $| { \mathcal { L } } ^ { n + 1 } ( \theta _ { i + 1 } ^ { n + 1 } ) - { \mathcal { L } } ^ { n + 1 } ( \theta _ { i } ^ { n + 1 } ) | < \epsilon$ then 12 denote $\dot { \theta } _ { * } ^ { n + 1 } = \theta _ { i } ^ { n + 1 }$ and break ;
|
| 93 |
+
|
| 94 |
+
13 Return the optimized neural network parameters $\theta _ { * } ^ { 1 } , \theta _ { * } ^ { 2 } , . . . , \theta _ { * } ^ { N _ { t } }$
|
| 95 |
+
|
| 96 |
+
# 4 THEORETICAL RESULT
|
| 97 |
+
|
| 98 |
+
In this section, we analyze the TL-DPINN method and give an error estimate result to approximate the evolutionary differential equation 2. We have two reasonable assumptions as follows.
|
| 99 |
+
|
| 100 |
+
Assumption 4.1. The equation equation 2 is dissipative, i.e. $\textstyle \int _ { \Omega } u \cdot { \mathcal { N } } ( u ) d x \leq 0$ for all $u ( t , x )$ . Moreover, if N is nonlinear, then $\begin{array} { r } { \int _ { \Omega } ( u _ { 1 } - u _ { 2 } ) \cdot ( \mathcal { N } ( u _ { 1 } ) - \mathcal { N } ( u _ { 2 } ) ) \ddot { d x } \le 0 } \end{array}$ for all $u _ { 1 } ( t , x )$ and $u _ { 2 } ( t , x )$ . Assumption 4.2. The solution $u ( t , x )$ to equation 2 and the neural network solution $u _ { \theta ^ { n } } ( x )$ to equation 5 are all smooth and bounded, as well as their high order derivatives.
|
| 101 |
+
|
| 102 |
+
The first assumption is to guarantee that the solution is not increasing over time. Consider the $L ^ { 2 }$ norm $\begin{array} { r } { \left\| u ( t , \cdot ) \right\| ^ { 2 } = \bar { \int _ { \Omega } u } ( t , x ) ^ { 2 } \bar { d } x } \end{array}$ , we multiply equation 2 by $u$ and integrate in $x$ to get $\begin{array} { r l } { \frac { 1 } { 2 } \frac { d } { d t } \left\| u \right\| ^ { 2 } ( t ) = } & { { } } \end{array}$ $\begin{array} { r } { \int _ { \Omega } u \cdot \mathcal { N } u d x \leq 0 , \mathrm { s o } \left\| u ( t , \cdot ) \right\| \leq \left\| u _ { 0 } \right\| } \end{array}$ for all $t > 0$ . For the simplest Heat equation with $\mathcal { N } ( u ) = u _ { x x }$ , it is easy to verify that $\begin{array} { r } { \int _ { \Omega } u \cdot \mathcal { N } ( u ) d x = - \int _ { \Omega } | u _ { x } | ^ { 2 } d x \leq 0 } \end{array}$ , satisfying Assumption 4.1.
|
| 103 |
+
|
| 104 |
+
The second assumption can be verified by the standard regularity estimate result of PDEs Evans (2022), and we omit it here for brevity.
|
| 105 |
+
|
| 106 |
+
Denote the symbol $\tau = \Delta t$ and $t _ { n } = n \tau$ , we show that the error can be strictly controlled by the time step $\tau$ , the training loss value ${ \mathcal { L } } ^ { n }$ and the collocation points number $N _ { r }$ .
|
| 107 |
+
|
| 108 |
+
Theorem 4.1. With the assumptions equation 4.1 and equation 4.2 hold, then the error between the solution $u ( t _ { n } , x )$ to equation 2 and the neural network solution $u _ { \theta ^ { n } } ( x )$ to equation 5, i.e., $e ^ { n } ( x ) = u ( t _ { n } , x ) - u _ { \theta ^ { n } } ( x ) ,$ , can be estimated in the $L ^ { 2 }$ norm by
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\| e ^ { n } \| \leq C \sqrt { 1 + t _ { n } } ( \tau ^ { 2 } + \operatorname* { m a x } _ { 1 \leq i \leq n } \sqrt { \mathscr { L } ^ { i } } + N _ { r } ^ { \frac { 1 } { 4 } } ) , \quad n = 1 , . . . , N _ { t } ,
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
where $C$ is a bounded constant depend on $u ( t _ { n } , x )$ and $u _ { \theta ^ { n } } ( x )$ .
|
| 115 |
+
|
| 116 |
+
The proof of Theorem 4.1 can be found in Appendix A.3.
|
| 117 |
+
|
| 118 |
+
Table 1: A comparison of the relative $L ^ { 2 }$ error and training time (seconds) for different PDEs.
|
| 119 |
+
|
| 120 |
+
<table><tr><td rowspan="2">Method</td><td colspan="2">L2RDEqtime</td><td colspan="2">L² ACEqtime</td><td colspan="2">L2KS Eqime</td><td colspan="2">L2 NS Eq time</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Original PINN</td><td>4.17e-02</td><td>1397</td><td>8.23e-01</td><td>1412</td><td>1.00e+00</td><td>1</td><td>1.32e+00</td><td>1</td></tr><tr><td>Adaptive sampling</td><td>1.65e-02</td><td>1561</td><td>8.64e-03</td><td>1460</td><td>9.98e-01</td><td>6901</td><td>8.45e-01</td><td>25385</td></tr><tr><td>Self-attention</td><td>1.14e-02</td><td>1450</td><td>1.05e-01</td><td>1770</td><td>8.22e-01</td><td>5415</td><td>9.28e-01</td><td>21296</td></tr><tr><td>Time marching</td><td>3.98e-03</td><td>3215</td><td>2.01e-02</td><td>3715</td><td>8.02e-01</td><td>5527</td><td>8.85e-01</td><td>26200</td></tr><tr><td>Causal PINN</td><td>3.99e-05</td><td>7358</td><td>1.66e-03</td><td>9264</td><td>4.16e-02</td><td>22029</td><td>4.73e-02</td><td> 5 days</td></tr><tr><td>TL-DPINN1 (ours)</td><td>1.82e-05</td><td>1463</td><td>5.92e-04</td><td>2328</td><td>7.17e-03</td><td>5050</td><td>3.44e-02</td><td>12440</td></tr><tr><td>TL-DPINN2 (ours)</td><td>9.34e-05</td><td>748</td><td>9.82e-04</td><td>1100</td><td>3.55e-02</td><td>5171</td><td>3.66e-02</td><td>56875</td></tr></table>
|
| 121 |
+
|
| 122 |
+
# 5 COMPUTATIONAL RESULTS
|
| 123 |
+
|
| 124 |
+
This section compares the accuracy and training efficiency of the TL-DPINN approach to existing PINN methods using various key evolutionary PDEs, including the Reaction-Diffusion (RD) equation, Allen-Cahn (AC) equation, Kuramoto–Sivashinsky (KS) equation, Navier-Stokes (NS) equation. All the code is implemented in JAX Bradbury et al. (2018), a framework that is gaining popularity in scientific computing and deep learning. In all examples, the activation function is $\operatorname { t a n h } ( { \cdot } )$ and the optimizer is Adam Kingma & Ba (2014). Appendix A.4.1 discusses the Fourier feature embedding and modified fully-connected neural networks used in Wang et al. (2022a). Appendix A.4.2 details the error metric, neural network hyper-parameters, and training approach.
|
| 125 |
+
|
| 126 |
+
The Crank-Nicolson time differencing is denoted as TL-DPINN1, while the Gauss-Legendre time differencing is denoted as TL-DPINN2. Our study involves a comparison of these methods with several robust baselines: 1) original PINN Raissi et al. (2019); 2) adaptive sampling L. Wight & Zhao (2021); 3) self-attention McClenny & Braga-Neto (2023); 4) time marching Mattey & Ghosh (2022) and 5) causal PINN Wang et al. (2022a) Table 1 summarizes a comparison of the relative $L ^ { 2 }$ error and running time (seconds) for different equations by different methods. We note that all neural networks are trained on an NVIDIA GeForce RTX 3080 Ti graphics card.
|
| 127 |
+
|
| 128 |
+
# 5.1 REACTION-DIFFUSION EQUATION
|
| 129 |
+
|
| 130 |
+
This study begins with the Reaction-Diffusion (RD) equation, which is significant to nonlinear physics, chemistry, and developmental biology. We consider the one-dimensional Reaction-Diffusion equation with the following form:
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\begin{array} { r } { \left\{ \begin{array} { l c c } { u _ { t } = d _ { 1 } u _ { x x } + d _ { 2 } u ^ { 2 } , \quad t \in [ 0 , 1 ] , x \in [ - 1 , 1 ] , } \\ { u ( 0 , x ) = \sin ( 2 \pi x ) \big ( 1 + \cos ( 2 \pi x ) \big ) , } \\ { u ( t , - 1 ) = u ( t , 1 ) = 0 , } \end{array} \right. } \end{array}
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
where $d _ { 1 } = d _ { 2 } = 0 . 0 1$ . The solution changes slowly over time, and Table 1 demonstrates that all methods succeed with small relative $L ^ { 2 }$ norm error in this instance. Our methods enhance accuracy by 2 3 orders of magnitude compared to other PINN frameworks Raissi et al. (2019); L. Wight & Zhao (2021); McClenny & Braga-Neto (2023); Mattey & Ghosh (2022) even with less training time. We see that our method TL-DPINN1 is more accurate than causal PINN Wang et al. (2022a) with much less computational time. We acknowledge that our methods TL-DPINN2 may be slightly less accurate than causal PINN, but the training time is only nearly $1 / 1 0$ of their method. In fact, the casual PINN can only achieve a relative $L ^ { 2 }$ error of $1 . 1 3 e \mathrm { ~ - ~ } 0 1$ if we stop early at the training time of our methods ( 748 seconds). Figure 2 shows the predicted solution against the reference solution, and our proposed method achieves a relative $L ^ { 2 }$ error of $1 . 8 2 e \mathrm { ~ - ~ } 0 5$ . More computational results of the RD equation are provided in Appendix A.4.3.
|
| 137 |
+
|
| 138 |
+

|
| 139 |
+
Figure 2: Comparison between the reference and predicted solutions for the Reaction-Diffusion equation, and the $L ^ { 2 }$ error is $1 . 8 2 e \mathrm { ~ - ~ } 0 5$ .
|
| 140 |
+
|
| 141 |
+

|
| 142 |
+
Figure 3: Training results for the Allen-Cahn equation.
|
| 143 |
+
|
| 144 |
+
# 5.2 ALLEN-CAHN EQUATION
|
| 145 |
+
|
| 146 |
+
We consider the one-dimensional Allen-Cahn (AC) equation, a benchmark problem for PINN training L. Wight & Zhao (2021); Mattey & Ghosh (2022); Wang et al. (2022a):
|
| 147 |
+
|
| 148 |
+
$$
|
| 149 |
+
\left\{ \begin{array} { l } { u _ { t } = \gamma _ { 1 } u _ { x x } + \gamma _ { 2 } u ( 1 - u ^ { 2 } ) , \quad t \in [ 0 , 1 ] , x \in [ - 1 , 1 ] , } \\ { u ( x , 0 ) = u _ { 0 } ( x ) , } \\ { u ( t , - 1 ) = u ( t , 1 ) , \quad u _ { x } ( t , - 1 ) = u _ { x } ( t , 1 ) . } \end{array} \right.
|
| 150 |
+
$$
|
| 151 |
+
|
| 152 |
+
where $\gamma _ { 1 } = 0 . 0 0 0 1$ , $\gamma _ { 2 } = 5$ and $u _ { 0 } ( x ) = x ^ { 2 } \cos ( \pi x )$ . For the original PINN, the Allen-Cahn equation is hard to solve, but our approach performs well in accuracy and training efficiency. Figure 1 compares the predicted solution to the reference solution. Our technique achieves a relative $L ^ { 2 }$ error of $5 . 9 2 e - 0 4$ . Figure 3 shows how the $L ^ { 2 }$ error evolves and how many training epochs are needed at different timestamps. The $L ^ { 2 }$ error increases as the AC equation develops more complicated. Each timestamp’s training epoch is small across the time domain, reducing training time. More computational results of the AC equation are provided in Appendix A.4.4.
|
| 153 |
+
|
| 154 |
+
# 5.3 KURAMOTO–SIVASHINSKY EQUATION
|
| 155 |
+
|
| 156 |
+
The Kuramoto-Sivashinsky (KS) equation is used to model the diffusive–thermal instabilities in a laminar flame front. Existing PINN frameworks are challenging to solve the KS equation as the solution exhibits fast transit and chaotic behaviors Raissi (2018). The KS equation takes the form
|
| 157 |
+
|
| 158 |
+
$$
|
| 159 |
+
\left\{ \begin{array} { l l } { u _ { t } + \alpha u u _ { x } + \beta u _ { x x } + \gamma u _ { x x x x } = 0 , } \\ { u ( 0 , x ) = u _ { 0 } ( x ) , } \end{array} \right.
|
| 160 |
+
$$
|
| 161 |
+
|
| 162 |
+
with periodic boundary conditions. Here $\alpha = 5$ , $\beta = 0 . 5$ , $\gamma = 0 . 0 0 5$ , and the initial condition $u _ { 0 } ( x ) = - \sin ( \pi x )$ . Figure 4 visualizes the predicted solution against the reference solution, and our proposed method achieves a relative $L ^ { 2 }$ error of $7 . 1 7 e \mathrm { ~ - ~ } 0 3$ . From $t = 0 . 4$ , the reference solution begins to quickly transition, and our method is able to capture this feature. More computational results of the KS equation are provided in Appendix A.4.5.
|
| 163 |
+
|
| 164 |
+

|
| 165 |
+
Figure 4: Comparison between the reference and predicted solutions for the Kuramoto–Sivashinsky equation, and the $L ^ { 2 }$ error is $7 . 1 7 e \mathrm { ~ - ~ } 0 3$ .
|
| 166 |
+
|
| 167 |
+

|
| 168 |
+
Figure 5: Comparison between the reference and predicted solutions of $w ( t , x , y )$ for the NavierStokes equation at $t = 1 . 0$ , and the $L ^ { 2 }$ error is $3 . 4 4 e \mathrm { ~ - ~ } 0 2$ .
|
| 169 |
+
|
| 170 |
+
# 5.4 NAVIER-STOKES EQUATION
|
| 171 |
+
|
| 172 |
+
We consider the 2D Navier-Stokes (NS) equation in the velocity-vorticity form Wang et al. (2022a)
|
| 173 |
+
|
| 174 |
+
$$
|
| 175 |
+
\begin{array} { r } { \left\{ \begin{array} { l l } { w _ { t } + u \cdot \nabla w = \frac { 1 } { \mathrm { R e } } \Delta w , \quad \mathrm { i n } \ [ 0 , \mathrm { T } ] \times \Omega , } \\ { \nabla \cdot \pmb { u } = 0 , \quad \mathrm { i n } \ [ 0 , \mathrm { T } ] \times \Omega , } \\ { w ( 0 , x , y ) = w _ { 0 } ( x , y ) , \quad \mathrm { i n } \ \Omega . } \end{array} \right. } \end{array}
|
| 176 |
+
$$
|
| 177 |
+
|
| 178 |
+
with periodic boundary conditions. Here, $\mathbf { u } = ( u , v )$ represents the flow velocity field, $w = \nabla \times u$ represents the vorticity, and $\mathrm { R e }$ is the Reynolds number. In addition, $\Omega$ is set to $[ 0 , 2 \pi ] ^ { 2 }$ and Re is set to 100. Figure 5 presents the predicted solution of $w ( t , x , y )$ compared to the reference solution. Our proposed method can obtain a result similar to that in Wang et al. (2022a), while the training time is only 1/58 of their method. More computational results of the NS equation are provided in Appendix A.4.6.
|
| 179 |
+
|
| 180 |
+
# 5.5 ABLATION STUDY
|
| 181 |
+
|
| 182 |
+
We conduct ablation studies on the relatively simpler RD Eq. and AC Eq. to ablate the main designs in our algorithm.
|
| 183 |
+
|
| 184 |
+
Time differencing scheme study. Numerous time differencing schemes have been developed in the last decades. We list some commonly used schemes in Appendix A.2. We do experiments on different time differencing schemes to validate that implicit time differencing schemes (2nd Crank-Nicolson or 4th Gauss-Legendre) are more stable and lead to better performance. The results are given in Table 2.
|
| 185 |
+
|
| 186 |
+
Transfer learning study. To see weather the transfer learning part is effective, we do ablation studies without using transfer learning. Besides, since our strategy of transfer learning is to fine tune all the network parameters, we also do experiments to fine tune the last 1/2/3 layers of the network. The results are given in Table 3. We can see that transfer learning is effective both in the efficiency and accuracy of our method.
|
| 187 |
+
|
| 188 |
+
Table 2: Time differencing scheme study
|
| 189 |
+
|
| 190 |
+
<table><tr><td rowspan="2">Method</td><td colspan="2">L2RDEqime</td><td colspan="2">L2 AC Eqtime</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>Forward Euler</td><td>1.32e-03</td><td>208</td><td>9.57e-03</td><td>304</td></tr><tr><td>Backward Euler</td><td>2.74e-03</td><td>206</td><td>1.64e-02</td><td>444</td></tr><tr><td>2nd RK</td><td>1.97e-03</td><td>761</td><td>1.17e-03</td><td>1054</td></tr><tr><td>4th RK</td><td>2.11e-03</td><td>1187</td><td>1.31e-03</td><td>1779</td></tr><tr><td>TL-DPINN1</td><td>1.82e-05</td><td>1463</td><td>5.92e-04</td><td>2328</td></tr><tr><td>TL-DPINN2</td><td>9.34e-05</td><td>748</td><td>9.82e-04</td><td>1100</td></tr></table>
|
| 191 |
+
|
| 192 |
+
Table 3: Transfer learning study
|
| 193 |
+
|
| 194 |
+
<table><tr><td rowspan="2">Method</td><td colspan="2">L2RDEqtime</td><td colspan="2">L AC Eqime</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>Without TL</td><td>4.01e-04</td><td>5880</td><td>1.35e-02</td><td>9170</td></tr><tr><td>last layer</td><td>3.31e-04</td><td>638</td><td>1.01e-02</td><td>3624</td></tr><tr><td>last 2 layers</td><td>3.22e-04</td><td>221</td><td>1.01e-02</td><td>4029</td></tr><tr><td>last 3 layers</td><td>4.08e-04</td><td>232</td><td>1.01e-02</td><td>4685</td></tr><tr><td>TL-DPINN1</td><td>1.82e-05</td><td>1463</td><td>5.92e-04</td><td>2328</td></tr><tr><td>TL-DPINN2</td><td>9.34e-05</td><td>748</td><td>9.82e-04</td><td>1100</td></tr></table>
|
| 195 |
+
|
| 196 |
+
Repeated test. To further demonstrate the well-performance of our TL-DPINN method through accuracy and efficiency, we do 5 random runs for RD and AC Eq. by casual PINN and our method for comparison. The results are given in Table 4.
|
| 197 |
+
|
| 198 |
+
Table 4: Repeated test.
|
| 199 |
+
|
| 200 |
+
<table><tr><td rowspan="2">Method</td><td colspan="2">L2 rrRD Eq.</td><td colspan="2">L² rrAC Eq.</td></tr><tr><td></td><td>time</td><td></td><td>time</td></tr><tr><td>Causal PINN</td><td>3.73e-05 ± 4.66e-06</td><td>7207± 219</td><td>1.51e-03 ± 2.12e-04</td><td>9060± 341</td></tr><tr><td>TL-DPINN1</td><td>1.76e-05 ± 1.06e-06</td><td>1463 ± 53</td><td>6.08e-04 ± 3.06e-05</td><td>2328±89</td></tr><tr><td>TL-DPINN2</td><td>9.89e-05 ± 8.94e-06</td><td>811 ± 122</td><td>9.29e-04 ± 8.06e-05</td><td>1291 ± 178</td></tr></table>
|
| 201 |
+
|
| 202 |
+
# 5.6 TRAINING EFFICIENCY
|
| 203 |
+
|
| 204 |
+
Table 5 illustrates how the computation efficiency is affected by different time discretization methods on different equations. In addition, the casual PINN method is also compared. All neural networks are trained on an NVIDIA GeForce RTX 3080 Ti graphics card. We note that the total training epochs of our methods are not fixed due to the stopping criterion (see Algorithm 1). The training efficiency in Table 5 is consistent with the training time in Table 1.
|
| 205 |
+
|
| 206 |
+
Table 5: A comparison of training efficiency for different equations.
|
| 207 |
+
|
| 208 |
+
<table><tr><td rowspan="2">Method</td><td colspan="4">rn</td></tr><tr><td>Reaction-Diffusion</td><td></td><td></td><td>Navier-Stokes</td></tr><tr><td>Casual PINN</td><td>61.70</td><td>52.33</td><td>26.24</td><td>2.77</td></tr><tr><td>TL-DPINN1</td><td>439.37</td><td>384.47</td><td>259.20</td><td>8.32</td></tr><tr><td>TL-DPINN2</td><td>276.40</td><td>239.52</td><td>127.55</td><td>6.37</td></tr></table>
|
| 209 |
+
|
| 210 |
+
# 6 CONCLUSION
|
| 211 |
+
|
| 212 |
+
In this paper, we propose a method for solving evolutionary partial differential equations via transferlearning enhanced discrete physics-informed neural networks (TL-DPINN). The discrete PINNs were thought to be time-consuming and seldom applied in the PINNs literature. We contribute to the PINN community by rediscovering the good performance of the discrete PINNs applied to solve evolutionary PDEs, both theoretically and numerically. Our method first employs a classical numerical implicit time differencing scheme to produce a series of stable propagation equations in space, and then applies PINN approximation to sequentially solve. Transfer learning is used to reduce computational costs while maintaining precision. We demonstrate the convergence property, accuracy, and computational effectiveness of our TL-DPINN method both theoretically and numerically. Our proposed method achieves state-of-the-art results among different PINN frameworks while significantly reducing the computational cost.
|
| 213 |
+
|
| 214 |
+
# REFERENCES
|
| 215 |
+
|
| 216 |
+
Uri M Ascher. Numerical methods for evolutionary differential equations. SIAM, 2008.
|
| 217 |
+
James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman-Milne, and Qiao Zhang. JAX: composable transformations of Python+NumPy programs, 2018. URL http://github.com/google/jax.
|
| 218 |
+
John Butcher. Runge-Kutta methods. Scholarpedia, 2(9):3147, 2007.
|
| 219 |
+
Xinhai Chen, Chunye Gong, Qian Wan, Liang Deng, Yunbo Wan, Yang Liu, Bo Chen, and Jie Liu. Transfer learning for deep neural network-based partial differential equations solving. Advances in Aerodynamics, 3(1):1–14, 2021.
|
| 220 |
+
Constantine M Dafermos and Milan Pokorny. Handbook of differential equations: evolutionary equations. Elsevier, 2008.
|
| 221 |
+
Shaan Desai, Marios Mattheakis, Hayden Joy, Pavlos Protopapas, and Stephen J Roberts. One-shot transfer learning of physics-informed neural networks. In ICML 2022 2nd AI for Science Workshop, 2022.
|
| 222 |
+
Lawrence C Evans. Partial differential equations, volume 19. American Mathematical Society, 2022.
|
| 223 |
+
Somdatta Goswami, Cosmin Anitescu, Souvik Chakraborty, and Timon Rabczuk. Transfer learning enhanced physics informed neural network for phase-field modeling of fracture. Theoretical and Applied Fracture Mechanics, 106:102447, 2020.
|
| 224 |
+
Somdatta Goswami, Katiana Kontolati, Michael D Shields, and George Em Karniadakis. Deep transfer operator learning for partial differential equations under conditional shift. Nature Machine Intelligence, pp. 1–10, 2022.
|
| 225 |
+
Jiequn Han, Arnulf Jentzen, and Weinan E. Solving high-dimensional partial differential equations using deep learning. Proceedings of the National Academy of Sciences, 115(34):8505–8510, 2018.
|
| 226 |
+
Ameya D Jagtap and George E Karniadakis. Extended Physics-informed Neural Networks (XPINNs): A generalized space-time domain decomposition based deep learning framework for nonlinear partial differential equations. In AAAI Spring Symposium: MLPS, pp. 2002–2041, 2021.
|
| 227 |
+
Ameya D Jagtap, Ehsan Kharazmi, and George Em Karniadakis. Conservative physics-informed neural networks on discrete domains for conservation laws: Applications to forward and inverse problems. Computer Methods in Applied Mechanics and Engineering, 365:113028, 2020.
|
| 228 |
+
Ehsan Kharazmi, Zhongqiang Zhang, and George Em Karniadakis. hp-VPINNs: Variational physicsinformed neural networks with domain decomposition. Computer Methods in Applied Mechanics and Engineering, 374:113547, 2021.
|
| 229 |
+
Yuehaw Khoo, Jianfeng Lu, and Lexing Ying. Solving parametric PDE problems with artificial neural networks. European Journal of Applied Mathematics, 32(3):421–435, 2021.
|
| 230 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 231 |
+
Aditi Krishnapriyan, Amir Gholami, Shandian Zhe, Robert Kirby, and Michael W Mahoney. Characterizing possible failure modes in physics-informed neural networks. Advances in Neural Information Processing Systems, 34:26548–26560, 2021.
|
| 232 |
+
Colby L. Wight and Jia Zhao. Solving Allen-Cahn and Cahn-Hilliard equations using the adaptive physics informed neural networks. Communications in Computational Physics, 29(3):930–954, 2021.
|
| 233 |
+
Songming Liu, Hao Zhongkai, Chengyang Ying, Hang Su, Jun Zhu, and Ze Cheng. A unified hardconstraint framework for solving geometrically complex PDEs. Advances in Neural Information Processing Systems, 35:20287–20299, 2022a.
|
| 234 |
+
Xu Liu, Xiaoya Zhang, Wei Peng, Weien Zhou, and Wen Yao. A novel meta-learning initialization method for physics-informed neural networks. Neural Computing and Applications, 34(17): 14511–14534, 2022b.
|
| 235 |
+
Zichao Long, Yiping Lu, Xianzhong Ma, and Bin Dong. PDE-Net: Learning PDEs from data. In International Conference on Machine Learning, pp. 3208–3216. PMLR, 2018.
|
| 236 |
+
Lu Lu, Xuhui Meng, Zhiping Mao, and George Em Karniadakis. DeepXDE: A deep learning library for solving differential equations. SIAM review, 63(1):208–228, 2021a.
|
| 237 |
+
Lu Lu, Raphael Pestourie, Wenjie Yao, Zhicheng Wang, Francesc Verdugo, and Steven G Johnson. Physics-informed neural networks with hard constraints for inverse design. SIAM Journal on Scientific Computing, 43(6):B1105–B1132, 2021b.
|
| 238 |
+
Revanth Mattey and Susanta Ghosh. A novel sequential method to train physics-informed neural networks for Allen Cahn and Cahn Hilliard equations. Computer Methods in Applied Mechanics and Engineering, 390:114474, 2022.
|
| 239 |
+
Levi D McClenny and Ulisses M Braga-Neto. Self-adaptive physics-informed neural networks. Journal of Computational Physics, 474:111722, 2023.
|
| 240 |
+
Siddhartha Mishra and Roberto Molinaro. Estimates on the generalization error of physics-informed neural networks for approximating PDEs. IMA Journal of Numerical Analysis, 43(1):1–43, 01 2023. ISSN 0272-4979. doi: 10.1093/imanum/drab093. URL https://doi.org/10.1093/ imanum/drab093.
|
| 241 |
+
Christian Moya and Guang Lin. DAE-PINN: A physics-informed neural network model for simulating differential algebraic equations with application to power networks. Neural Computing and Applications, 35(5):3789–3804, 2023.
|
| 242 |
+
Michael Penwarden, Ameya D Jagtap, Shandian Zhe, George Em Karniadakis, and Robert M Kirby. A unified scalable framework for causal sweeping strategies for Physics-Informed Neural Networks (PINNs) and their temporal decompositions. arXiv preprint arXiv:2302.14227, 2023.
|
| 243 |
+
Maziar Raissi. Deep hidden physics models: Deep learning of nonlinear partial differential equations. The Journal of Machine Learning Research, 19(1):932–955, 2018.
|
| 244 |
+
Maziar Raissi, Paris Perdikaris, and George Em Karniadakis. Physics informed deep learning (part i): Data-driven solutions of nonlinear partial differential equations. arXiv preprint arXiv:1711.10561, 2017.
|
| 245 |
+
Maziar Raissi, Paris Perdikaris, and George E Karniadakis. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational physics, 378:686–707, 2019.
|
| 246 |
+
Justin Sirignano and Konstantinos Spiliopoulos. DGM: A deep learning algorithm for solving partial differential equations. Journal of computational physics, 375:1339–1364, 2018.
|
| 247 |
+
Dong H Song and Daniel M Tartakovsky. Transfer learning on multifidelity data. Journal of Machine Learning for Modeling and Computing, 3(1), 2022.
|
| 248 |
+
Jochen Stiasny, Samuel Chevalier, and Spyros Chatzivasileiadis. Learning without data: Physicsinformed neural networks for fast time-domain simulation. In 2021 IEEE International Conference on Communications, Control, and Computing Technologies for Smart Grids (SmartGridComm), pp. 438–443. IEEE, 2021.
|
| 249 |
+
N Sukumar and Ankit Srivastava. Exact imposition of boundary conditions with distance functions in physics-informed deep neural networks. Computer Methods in Applied Mechanics and Engineering, 389:114333, 2022.
|
| 250 |
+
Matthew Tancik, Pratul Srinivasan, Ben Mildenhall, Sara Fridovich-Keil, Nithin Raghavan, Utkarsh Singhal, Ravi Ramamoorthi, Jonathan Barron, and Ren Ng. Fourier features let networks learn high frequency functions in low dimensional domains. Advances in Neural Information Processing Systems, 33:7537–7547, 2020.
|
| 251 |
+
|
| 252 |
+
Sifan Wang, Yujun Teng, and Paris Perdikaris. Understanding and mitigating gradient flow pathologies in physics-informed neural networks. SIAM Journal on Scientific Computing, 43(5):A3055–A3081, 2021a.
|
| 253 |
+
|
| 254 |
+
Sifan Wang, Hanwen Wang, and Paris Perdikaris. On the eigenvector bias of Fourier feature networks: From regression to solving multi-scale PDEs with physics-informed neural networks. Computer Methods in Applied Mechanics and Engineering, 384:113938, 2021b.
|
| 255 |
+
|
| 256 |
+
Sifan Wang, Shyam Sankaran, and Paris Perdikaris. Respecting causality is all you need for training physics-informed neural networks. arXiv preprint arXiv:2203.07404, 2022a.
|
| 257 |
+
|
| 258 |
+
Sifan Wang, Xinling Yu, and Paris Perdikaris. When and why PINNs fail to train: A neural tangent kernel perspective. Journal of Computational Physics, 449:110768, 2022b.
|
| 259 |
+
|
| 260 |
+
Chen Xu, Ba Trung Cao, Yong Yuan, and Günther Meschke. Transfer learning based physicsinformed neural networks for solving inverse problems in engineering structures under different loading scenarios. Computer Methods in Applied Mechanics and Engineering, 405:115852, 2023.
|
| 261 |
+
|
| 262 |
+
Wuzhe Xu, Yulong Lu, and Li Wang. Transfer learning enhanced DeepONet for long-time prediction of evolution equations. arXiv preprint arXiv:2212.04663, 2022.
|
| 263 |
+
|
| 264 |
+
Bing Yu and Weinan E. The deep Ritz method: A deep learning-based numerical algorithm for solving variational problems. Communications in Mathematics and Statistics, 6(1):1–12, 2018.
|
| 265 |
+
|
| 266 |
+
A APPENDIX
|
| 267 |
+
|
| 268 |
+
A.1 TABLE OF NOTATIONS
|
| 269 |
+
|
| 270 |
+
A table of notations is given in Table 1.
|
| 271 |
+
|
| 272 |
+
A.2 TIME DIFFERENCING SCHEMES
|
| 273 |
+
|
| 274 |
+
A.2.1 EXPLICIT SCHEMES
|
| 275 |
+
|
| 276 |
+
First-order forward Euler scheme:
|
| 277 |
+
|
| 278 |
+
$$
|
| 279 |
+
\frac { \boldsymbol { u } ^ { n + 1 } ( \boldsymbol { x } ) - \boldsymbol { u } ^ { n } ( \boldsymbol { x } ) } { \Delta t } = \mathcal { N } \left[ \boldsymbol { u } ^ { n } ( \boldsymbol { x } ) \right] .
|
| 280 |
+
$$
|
| 281 |
+
|
| 282 |
+
Second-order explicit Runge-Kutta (2nd RK) scheme:
|
| 283 |
+
|
| 284 |
+
$$
|
| 285 |
+
\frac { u ^ { n + 1 } ( x ) - u ^ { n } ( x ) } { \Delta t } = \mathcal { N } \left[ u ^ { n } ( x ) + \frac { \Delta t } { 2 } \mathcal { N } [ u ^ { n } ( x ) ] \right] .
|
| 286 |
+
$$
|
| 287 |
+
|
| 288 |
+
Fouth-order explicit Runge-Kutta (4th RK) scheme:
|
| 289 |
+
|
| 290 |
+
$$
|
| 291 |
+
\begin{array} { l } { \displaystyle \frac { u ^ { n + 1 } ( x ) - u ^ { n } ( x ) } { \Delta t } = \frac { 1 } { 6 } \left[ k _ { 1 } ( x ) + 2 k _ { 2 } ( x ) + 2 k _ { 3 } ( x ) + k _ { 4 } ( x ) \right] , } \\ { \displaystyle k _ { 1 } ( x ) = \mathcal { N } [ u ^ { n } ( x ) ] , } \\ { \displaystyle k _ { 2 } ( x ) = \mathcal { N } \left[ u ^ { n } ( x ) + \frac { \Delta t } { 2 } \mathcal { N } [ k _ { 1 } ( x ) ] \right] , } \\ { \displaystyle k _ { 3 } ( x ) = \mathcal { N } \left[ u ^ { n } ( x ) + \frac { \Delta t } { 2 } \mathcal { N } [ k _ { 2 } ( x ) ] \right] , } \\ { \displaystyle k _ { 4 } ( x ) = \mathcal { N } \left[ u ^ { n } ( x ) + \Delta t \mathcal { N } [ k _ { 3 } ( x ) ] \right] . } \end{array}
|
| 292 |
+
$$
|
| 293 |
+
|
| 294 |
+
Table 6: Table of notations
|
| 295 |
+
|
| 296 |
+
<table><tr><td>Notation</td><td>Meaning</td></tr><tr><td>PINN</td><td>Physics-informed neural network</td></tr><tr><td>PDE</td><td>Partial differential equation</td></tr><tr><td>TL-DPINN</td><td>Transfer learning enhanced discrete PINN</td></tr><tr><td>TL-DPINN1</td><td>Crank-Nicolson time differencing in TL-DPINN</td></tr><tr><td>TL-DPINN1</td><td>Gauss-Legendre time differencing in TL-DPINN</td></tr><tr><td>Lor Ln</td><td>Physics-informed loss function</td></tr><tr><td></td><td>Differential operator, such as N(u) = Ucr</td></tr><tr><td>R</td><td>The residual term of the evolutionary PDE, for example R(u) = ut - Uxx</td></tr><tr><td>Ω</td><td>Spatial domain</td></tr><tr><td>8</td><td>The boundary of the spatial domain</td></tr><tr><td>T</td><td>End time</td></tr><tr><td>Nt</td><td>Timestamps number</td></tr><tr><td>Nb</td><td>The collocation points number on ∂Ω</td></tr><tr><td>Nu,Nr</td><td>The collocation points number in Ω or Ω × [0,T]</td></tr><tr><td>u(t,x)</td><td>The exact solution to the evolutionary PDE</td></tr><tr><td>un(x)</td><td>The time differencing scheme solution to the evolutionary PDE</td></tr><tr><td>ugn(x)</td><td>The discrete PINN solution to the evolutionary PDE</td></tr><tr><td>hj</td><td>The j component in the output of the last hidden layer of the neural network</td></tr><tr><td>x,xr,xb tortn</td><td>Spatial coordinate</td></tr><tr><td>0 or 0n,Wn,wn</td><td>Temporal coordinate Neural network parameters</td></tr><tr><td>△t or T</td><td>Time step, the interval time between two adjacent timestamps</td></tr><tr><td>Mo,M1</td><td></td></tr><tr><td></td><td>Number of maximum iterations in different training stages</td></tr><tr><td>n</td><td>The learning rate in gradient descent methods</td></tr><tr><td>E</td><td>The threshold value</td></tr><tr><td>I-</td><td> The L² norm of a function, defined by |lfll = (Jo If(x)|²dx)²</td></tr></table>
|
| 297 |
+
|
| 298 |
+
# A.2.2 IMPLICIT SCHEMES
|
| 299 |
+
|
| 300 |
+
First-order backward Euler scheme:
|
| 301 |
+
|
| 302 |
+
$$
|
| 303 |
+
\frac { u ^ { n + 1 } ( x ) - u ^ { n } ( x ) } { \Delta t } = \mathcal { N } \left[ u ^ { n + 1 } ( x ) \right] .
|
| 304 |
+
$$
|
| 305 |
+
|
| 306 |
+
Second-order Trapezoidal scheme:
|
| 307 |
+
|
| 308 |
+
$$
|
| 309 |
+
\frac { u ^ { n + 1 } ( x ) - u ^ { n } ( x ) } { \Delta t } = \frac { \mathcal { N } [ u ^ { n + 1 } ( x ) ] + \mathcal { N } [ u ^ { n + } ( x ) ] } { 2 } .
|
| 310 |
+
$$
|
| 311 |
+
|
| 312 |
+
Second-order Crank-Nicolson scheme (used in TL-DPINN1):
|
| 313 |
+
|
| 314 |
+
$$
|
| 315 |
+
\frac { u ^ { n + 1 } ( x ) - u ^ { n } ( x ) } { \Delta t } = \mathcal { N } \left[ \frac { u ^ { n + 1 } ( x ) + u ^ { n + } ( x ) } { 2 } \right] .
|
| 316 |
+
$$
|
| 317 |
+
|
| 318 |
+
Forth-order Gauss-Legendre scheme (used in TL-DPINN2):
|
| 319 |
+
|
| 320 |
+
$$
|
| 321 |
+
\begin{array} { l } { \displaystyle \frac { u ^ { n + 1 } ( x ) - u ^ { n } ( x ) } { \Delta t } = \frac { k _ { 1 } ( x ) + k _ { 2 } ( x ) } { 2 } , } \\ { \displaystyle k _ { 1 } ( x ) = \mathcal { N } \left[ u ^ { n } ( x ) + \frac { 1 } { 4 } \Delta t k _ { 1 } ( x ) + \left( \frac { 1 } { 4 } + \frac { \sqrt { 3 } } { 6 } \right) \Delta t k _ { 2 } ( x ) \right] , } \\ { \displaystyle k _ { 2 } ( x ) = \mathcal { N } \left[ u ^ { n } ( x ) + \left( \frac { 1 } { 4 } - \frac { \sqrt { 3 } } { 6 } \right) \Delta t k _ { 1 } ( x ) + \frac { 1 } { 4 } \Delta t k _ { 2 } ( x ) . \right] } \end{array}
|
| 322 |
+
$$
|
| 323 |
+
|
| 324 |
+
The general form of Runge–Kutta schemes with $q$ stages:
|
| 325 |
+
|
| 326 |
+
$$
|
| 327 |
+
\begin{array} { l } { \displaystyle \frac { u ^ { n + 1 } ( { \boldsymbol { x } } ) - u ^ { n } ( { \boldsymbol { x } } ) } { \Delta t } = \sum _ { i = 1 } ^ { q } b _ { i } k _ { i } ( { \boldsymbol { x } } ) , } \\ { \displaystyle k _ { i } ( { \boldsymbol { x } } ) = \mathcal { N } \left[ u ^ { n } ( { \boldsymbol { x } } ) + \Delta t \sum _ { j = 1 } ^ { q } a _ { i j } k _ { j } ( { \boldsymbol { x } } ) \right] , i = 1 , . . . , q . } \end{array}
|
| 328 |
+
$$
|
| 329 |
+
|
| 330 |
+
where the coefficients $\{ a _ { i j } , b _ { i } \}$ are determined. Since there are no significant differences for PINN approximation of explicit schemes (i.e. $a _ { i j } = 0$ for all $j \geq i$ ) and implicit schemes (i.e. not all $a _ { i j } = 0$ for $j \geq i$ ), we prefer implicit schemes as they possess the A-stable property to make the time-marching process stable Butcher (2007).
|
| 331 |
+
|
| 332 |
+
# A.3 THEORETICAL ANALYSIS
|
| 333 |
+
|
| 334 |
+
# A.3.1 PROOF OF THEOREM 4.1
|
| 335 |
+
|
| 336 |
+
Proof. We split the error $e ^ { n } ( x ) = u ( t _ { n } , x ) - u _ { \theta ^ { n } } ( x )$ into two parts:
|
| 337 |
+
|
| 338 |
+
$$
|
| 339 |
+
e ^ { n } ( x ) \ = \ { \frac { u ( t _ { n } , x ) - u ^ { n } ( x ) } { { \underline { { \circ } } } \varepsilon ^ { n } ( x ) } } + { \underline { { u ^ { n } ( x ) - u _ { \theta ^ { n } } ( x ) } } }
|
| 340 |
+
$$
|
| 341 |
+
|
| 342 |
+
The first term $\xi ^ { n } ( x )$ estimates the error from the Crank-Nicolson time differencing schemes. From Lemma A.1 we have $\| \xi ^ { n } \| \le C \tau ^ { 2 }$ . The second term $\eta ( x )$ estimates the error from the PINN approximation in space and the cumulative effect of time. From Lemma A.2 we have $\| \eta ^ { n } \| \leq$ $C \sqrt { t _ { n } } ( \operatorname* { m a x } _ { 1 \leq i \leq n } \sqrt { \mathscr { L } ^ { i } } + N _ { r } ^ { \frac { 1 } { 4 } } )$ . Then by the triangular inequality, we finish the proof. □
|
| 343 |
+
|
| 344 |
+
# A.3.2 SOME LEMMAS IN THE PROOF OF THEOREM 4.1
|
| 345 |
+
|
| 346 |
+
Lemma A.1. Denote $\xi ^ { n } ( x ) = u ( t _ { n } , x ) - u ^ { n } ( x )$ , where $u ( t _ { n } , x )$ is the exact solution to evolutionary PDEs and $u ^ { n } ( x )$ is the Crank-Nicolson time differencing discrete solution, then we have the estimate
|
| 347 |
+
|
| 348 |
+
$$
|
| 349 |
+
\| \xi ^ { n } \| \leq C \tau ^ { 2 } ,
|
| 350 |
+
$$
|
| 351 |
+
|
| 352 |
+
for some constant $C$ independent of time step $\tau$ , collocation points number $N _ { r }$ and trained loss value ${ \mathcal { L } } ^ { n }$ .
|
| 353 |
+
|
| 354 |
+
Proof. Firstly, we replace $u ^ { n } ( x )$ in the Crank-Nicolson time differencing scheme by the evolutionary PDE’s solution $u ( t _ { n } , x )$ and compare the difference. This can be achieved by the standard Taylor expansion techniques. We do Taylor expansion at the point $\begin{array} { r } { t _ { n + \frac { 1 } { 2 } } = ( n + \frac { 1 } { 2 } ) \tau } \end{array}$ to get
|
| 355 |
+
|
| 356 |
+
$$
|
| 357 |
+
\frac { u ( t _ { n + 1 } , x ) - u ( t _ { n } , x ) } { \tau } = u _ { t } ( t _ { n + \frac { 1 } { 2 } } , x ) + \mathcal { O } ( \tau ^ { 2 } ) ,
|
| 358 |
+
$$
|
| 359 |
+
|
| 360 |
+
and
|
| 361 |
+
|
| 362 |
+
$$
|
| 363 |
+
\mathcal { N } \left[ \frac { u ( t _ { n + 1 } , x ) + u ( t _ { n } , x ) } { 2 } \right] = \mathcal { N } \left[ u ( t _ { n + \frac { 1 } { 2 } } , x ) \right] + \mathcal { O } ( \tau ^ { 2 } ) .
|
| 364 |
+
$$
|
| 365 |
+
|
| 366 |
+
Noticing that $u ( t , x )$ is satisfied with the evolutionary PDE $u _ { t } = \mathcal { N } [ u ]$ , we have
|
| 367 |
+
|
| 368 |
+
$$
|
| 369 |
+
\frac { u ( t _ { n + 1 } , x ) - u ( t _ { n } , x ) } { \tau } = \mathcal { N } \left[ \frac { u ( t _ { n + 1 } , x ) + u ( t _ { n } , x ) } { 2 } \right] + \mathcal { O } ( \tau ^ { 2 } ) .
|
| 370 |
+
$$
|
| 371 |
+
|
| 372 |
+
Now subtracting equation 28 from the Crank-Nicolson scheme, we obtain the relation of the propagation error $\xi ^ { n } ( x ) = \bar { u } ( t _ { n } , x ) - u ^ { n } ( x )$ as
|
| 373 |
+
|
| 374 |
+
$$
|
| 375 |
+
\frac { \xi ^ { n + 1 } ( x ) - \xi ^ { n } ( x ) } { \tau } = \mathcal { N } \left[ \frac { u ( t _ { n + 1 } , x ) + u ( t _ { n } , x ) } { 2 } \right] - \mathcal { N } \left[ \frac { u ^ { n + 1 } ( x ) + u ^ { n } ( x ) } { 2 } \right] + \mathcal { O } ( \tau ^ { 2 } ) ,
|
| 376 |
+
$$
|
| 377 |
+
|
| 378 |
+
Secondly, we estimate the $L ^ { 2 }$ norm error estimate of $\xi ^ { n } ( x )$ . This can be achieved by the standard Ho¨der inequality estimate techniques. We multiply equation 29 by $\begin{array} { r } { \frac 1 2 ( \xi ^ { n + 1 } ( x ) + \xi ^ { n } ( x ) ) } \end{array}$ and integrate for $x$ on the domain $\Omega$ . With Assumption 4.1 holds, we have
|
| 379 |
+
|
| 380 |
+
$$
|
| 381 |
+
\begin{array} { r l r } { { \frac { \| \xi ^ { n + 1 } \| ^ { 2 } - \| \xi ^ { n } \| ^ { 2 } } { 2 \tau } \leq \int _ { \Omega } \mathcal { O } ( \tau ^ { 2 } ) \cdot \frac { \xi ^ { n + 1 } ( x ) + \xi ^ { n } ( x ) } { 2 } } } \\ & { } & { \leq C _ { 0 } \tau ^ { 4 } + \frac { 1 } { 2 } \| \xi ^ { n + 1 } \| ^ { 2 } + \frac { 1 } { 2 } \| \xi ^ { n } \| ^ { 2 } , } \end{array}
|
| 382 |
+
$$
|
| 383 |
+
|
| 384 |
+
for some constant $C _ { 0 }$ only depends on $u ( t , x )$ and its derivatives. We rearrange it to the following form
|
| 385 |
+
|
| 386 |
+
$$
|
| 387 |
+
\left\| \xi ^ { n + 1 } \right\| ^ { 2 } \leq \frac { 1 + \tau } { 1 - \tau } \left\| \xi ^ { n } \right\| ^ { 2 } + \frac { 2 C _ { 0 } } { 1 - \tau } \tau ^ { 5 } .
|
| 388 |
+
$$
|
| 389 |
+
|
| 390 |
+
Since $\xi ^ { 0 } ( x ) = 0$ , we apply Lemma A.3 to get
|
| 391 |
+
|
| 392 |
+
$$
|
| 393 |
+
\begin{array} { l } { \displaystyle { \| \xi ^ { n } \| ^ { 2 } \leq \frac { 2 C _ { 0 } \tau ^ { 5 } } { 1 - \tau } \cdot \frac { \Big ( \frac { 1 + \tau } { 1 - \tau } \Big ) ^ { n } - 1 } { \frac { 1 + \tau } { 1 - \tau } - 1 } } } \\ { \leq 6 C _ { 0 } t _ { n } \tau ^ { 4 } . } \end{array}
|
| 394 |
+
$$
|
| 395 |
+
|
| 396 |
+
So we have $\| \xi ^ { n } \| \le C \sqrt { t _ { n } } \tau ^ { 2 }$ for some constant $C = \sqrt { 6 C _ { 0 } }$ and we finish the proof.
|
| 397 |
+
|
| 398 |
+
Lemma A.2. Denote $\eta ^ { n } ( x ) = u ^ { n } ( x ) - u _ { \theta ^ { n } } ( x )$ , where $u ^ { n } ( x )$ is the Crank-Nicolson time differencing discrete solution and $u _ { \theta ^ { n } } ( x )$ is the discrete PINN solution, then we have the estimate
|
| 399 |
+
|
| 400 |
+
$$
|
| 401 |
+
\| \eta ^ { n } \| \leq C \sqrt { t _ { n } } \big ( \operatorname* { m a x } _ { 1 \leq i \leq n } \sqrt { \mathscr { L } ^ { i } } + N _ { r } ^ { \frac { 1 } { 4 } } \big ) ,
|
| 402 |
+
$$
|
| 403 |
+
|
| 404 |
+
Proof. The PINN solution $u _ { \theta ^ { n + 1 } } ( x )$ is obtained by optimize the physics-informed loss ${ \mathcal { L } } ^ { n + 1 } ( \theta ^ { n + 1 } )$ . Define the residual function $\mathcal { R } ^ { n + 1 } ( x )$ by
|
| 405 |
+
|
| 406 |
+
$$
|
| 407 |
+
\mathcal { R } ^ { n + 1 } ( x ) = \frac { u _ { \theta ^ { n + 1 } } ( x ) - u _ { \theta ^ { n } } ( x ) } { \tau } - \mathcal { N } \left[ \frac { u _ { \theta ^ { n + 1 } } ( x ) + u _ { \theta ^ { n } } ( x ) } { 2 } \right] , \quad \forall x \in \Omega .
|
| 408 |
+
$$
|
| 409 |
+
|
| 410 |
+
The loss ${ \mathcal { L } } ^ { n + 1 } ( \theta ^ { n + 1 } )$ is partially composed of the residual function on some randomly sampled point, so
|
| 411 |
+
|
| 412 |
+
$$
|
| 413 |
+
\mathcal { L } ^ { n + 1 } \geq \frac { \lambda _ { r } } { N _ { r } } \sum _ { i = 1 } ^ { N _ { r } } | \mathcal { R } ( x _ { r } ^ { i } ) | ^ { 2 } .
|
| 414 |
+
$$
|
| 415 |
+
|
| 416 |
+
By the Monte-Carlo quadrature rule in the numerical integration method, we can estimate the $L ^ { 2 }$ norm of the residual function $\mathcal { R } ( x )$ by the discrete form
|
| 417 |
+
|
| 418 |
+
$$
|
| 419 |
+
\begin{array} { r l r } { { \| \mathcal { R } ^ { n + 1 } \| ^ { 2 } = \int _ { \Omega } | \mathcal { R } ^ { n + 1 } ( x ) | ^ { 2 } d x } } \\ & { } & { \leq \frac { 1 } { N _ { r } } \sum _ { i = 1 } ^ { N _ { r } } | \mathcal { R } ( x _ { r } ^ { i } ) | ^ { 2 } + C _ { 1 } N _ { r } ^ { - \frac { 1 } { 2 } } } \\ & { } & { \leq \frac { \mathcal { L } ^ { n + 1 } } { \lambda _ { r } } + C _ { 1 } N _ { r } ^ { - \frac { 1 } { 2 } } , } \end{array}
|
| 420 |
+
$$
|
| 421 |
+
|
| 422 |
+
for some constant $C _ { 1 }$ depends on the regularities of the PINN solution $u _ { \theta ^ { n } } ( x )$ .
|
| 423 |
+
|
| 424 |
+
Now we turn to estimate the $L ^ { 2 }$ norm error estimate of $\eta ^ { n } ( x )$ . We first replace $u ^ { n } ( x )$ in the Crank-Nicolson time differencing scheme by the PINN solution $u _ { \theta ^ { n } } ( x )$ and compare the difference. Subtracting equation 31 from the Crank-Nicolson scheme, we obtain the relation of the propagation error $\eta ^ { n } ( x ) \stackrel { } { = } u ^ { n } ( x ) - u _ { \theta ^ { n } } ( x )$ as
|
| 425 |
+
|
| 426 |
+
$$
|
| 427 |
+
\frac { \eta ^ { n + 1 } - \eta ^ { n } } { \tau } - \left( \mathcal { N } \left[ \frac { u ^ { n + 1 } ( x ) + u ^ { n } ( x ) } { 2 } \right] - \mathcal { N } \left[ \frac { u _ { \theta ^ { n + 1 } } ( x ) + u _ { \theta ^ { n } } ( x ) } { 2 } \right] \right) = - \mathcal { R } ( x )
|
| 428 |
+
$$
|
| 429 |
+
|
| 430 |
+
Similar to the proof in Lemma A.1, we multiply equation 32 by $\frac 1 2 ( \eta ^ { n + 1 } ( x ) + \eta ^ { n } ( x ) )$ and integrate for $x$ on the domain $\Omega$ . With Assumption 4.1 holds, we have
|
| 431 |
+
|
| 432 |
+
$$
|
| 433 |
+
\begin{array} { r l r } { { \frac { \| \eta ^ { n + 1 } \| ^ { 2 } - \| \eta ^ { n } \| ^ { 2 } } { 2 \tau } \le - \int _ { \Omega } \mathcal { R } ( x ) \cdot \frac { \eta ^ { n + 1 } ( x ) + \eta ^ { n } ( x ) } { 2 } } } \\ & { } & { \qquad \le \displaystyle \frac { 1 } { 4 } \| \mathcal { R } ^ { n + 1 } \| ^ { 2 } + \frac { 1 } { 2 } \| \eta ^ { n + 1 } \| ^ { 2 } + \frac { 1 } { 2 } \| \eta ^ { n } \| ^ { 2 } , } \end{array}
|
| 434 |
+
$$
|
| 435 |
+
|
| 436 |
+
then we rearrange it to the following form
|
| 437 |
+
|
| 438 |
+
$$
|
| 439 |
+
\left. \eta ^ { n + 1 } \right. ^ { 2 } \leq \frac { 1 + \tau } { 1 - \tau } \left. \eta ^ { n } \right. ^ { 2 } + \frac { \tau } { 1 - \tau } \left. \mathcal { R } ^ { n + 1 } \right. ^ { 2 } .
|
| 440 |
+
$$
|
| 441 |
+
|
| 442 |
+
then we apply Lemma A.3 to get
|
| 443 |
+
|
| 444 |
+
$$
|
| 445 |
+
\begin{array} { r l r } { { \| \eta ^ { n } \| ^ { 2 } \leq ( \frac { 1 + \tau } { 1 - \tau } ) ^ { n } \| \eta ^ { 0 } \| ^ { 2 } + \frac { ( \frac { 1 + \tau } { 1 - \tau } ) ^ { n } - 1 } { \frac { 1 + \tau } { 1 - \tau } - 1 } \cdot \frac { \tau \displaystyle { \operatorname* { m a x } _ { 1 \leq i \leq n } \| \mathcal { R } ^ { i } \| ^ { 2 } } } { 1 - \tau } } } \\ & { } & { \leq ( 1 + 6 t _ { n } ) \| \eta ^ { 0 } \| ^ { 2 } + \frac { 3 t _ { n } } { 2 } \displaystyle \operatorname* { m a x } _ { 1 \leq i \leq n } \| \mathcal { R } ^ { i } \| ^ { 2 } . } \end{array}
|
| 446 |
+
$$
|
| 447 |
+
|
| 448 |
+
Since $\eta ^ { 0 } ( x ) = 0$ , we have $\| \eta ^ { n } \| \le C \sqrt { t _ { n } } ( \operatorname* { m a x } _ { 1 \le i \le n } \sqrt { \mathscr { L } ^ { i } } + N _ { r } ^ { \frac { 1 } { 4 } } )$ for some constant $C$ and we finish the proof.
|
| 449 |
+
|
| 450 |
+
Lemma A.3. If the sequence $\{ T _ { n } \} _ { n = 0 } ^ { \infty }$ satisfies the following propagation relation for some positive constant $\alpha$ and $\{ \beta _ { n } \} _ { n = 1 } ^ { \infty }$ :
|
| 451 |
+
|
| 452 |
+
$$
|
| 453 |
+
T _ { n + 1 } \leq \alpha T _ { n } + \beta _ { n + 1 } , \quad n \geq 0 ,
|
| 454 |
+
$$
|
| 455 |
+
|
| 456 |
+
then we have
|
| 457 |
+
|
| 458 |
+
$$
|
| 459 |
+
T _ { n } \leq \alpha ^ { n } T _ { 0 } + \frac { \alpha ^ { n } - 1 } { \alpha - 1 } \operatorname* { m a x } _ { 1 \leq i \leq n } \beta _ { i } , \quad n \geq 1 .
|
| 460 |
+
$$
|
| 461 |
+
|
| 462 |
+
Proof. This is accomplished by a standard recurrence formula.
|
| 463 |
+
|
| 464 |
+
# A.4 EXPERIMENTAL DETAILS
|
| 465 |
+
|
| 466 |
+
In this section, we provide the details on the numerical experiments of Section 5.
|
| 467 |
+
|
| 468 |
+
We present two practical considerations for the PINN network architecture, which has been applied in CausualPINN Wang et al. (2022a) and other PINN frameworks. Although not deemed crucial for the successful application of Algorithm 1, we have empirically observed that including them can lead to further enhancements in accuracy and computational efficiency.
|
| 469 |
+
|
| 470 |
+
Fourier Features Embedding. Many researchers have utilized Fourier features embedding to enhance the accuracy and generalization Tancik et al. (2020); Wang et al. (2021b). We employ 1-D Fourier features embedding in the following format:
|
| 471 |
+
|
| 472 |
+
$$
|
| 473 |
+
\gamma ( x ) = [ 1 , \cos ( \omega x ) , \sin ( \omega x ) , \cos ( 2 \omega x ) , \sin ( 2 \omega x ) , . . . , \cos ( M \omega x ) , \sin ( M \omega x ) ] ^ { T }
|
| 474 |
+
$$
|
| 475 |
+
|
| 476 |
+
where $\omega = 2 \pi / L$ and $M$ is a positive integer hyper-parameter. It maps the input data to a higher dimensional space by Fourier transforms. The major advantage of this technique is that it improves the model’s ability to approximate periodic or oscillatory behavior in the input data. It allows us to satisfy the periodic boundary condition as
|
| 477 |
+
|
| 478 |
+
$$
|
| 479 |
+
g ( x _ { b } ^ { i } ) = g ( x _ { b } ^ { i } + L )
|
| 480 |
+
$$
|
| 481 |
+
|
| 482 |
+
where $L$ represents the period of the periodic boundary condition. Furthermore, for the twodimensional Navier-Stokes equation, the Fourier feature embedding takes the following form
|
| 483 |
+
|
| 484 |
+
$$
|
| 485 |
+
\gamma ( x ) = { \left[ \begin{array} { l } { 1 } \\ { \cos ( \omega _ { x } x ) , . . . , \cos ( M \omega _ { x } x ) } \\ { \cos ( \omega _ { y } y ) , . . . , \cos ( M \omega _ { y } y ) } \\ { \sin ( \omega _ { x } x ) , . . . , \sin ( M \omega _ { x } x ) } \\ { \sin ( \omega _ { y } y ) , . . . , \sin ( M \omega _ { y } y ) } \\ { \cos ( \omega _ { x } x ) \cos ( \omega _ { y } y ) , . . . , \cos ( M \omega _ { x } x ) \cos ( M \omega _ { y } y ) } \\ { \cos ( \omega _ { x } x ) \sin ( \omega _ { y } y ) , . . . , \cos ( M \omega _ { x } x ) \sin ( M \omega _ { y } y ) } \\ { \sin ( \omega _ { x } x ) \cos ( \omega _ { y } y ) , . . . , \sin ( M \omega _ { x } x ) \cos ( M \omega _ { y } y ) } \\ { \sin ( \omega _ { x } x ) \sin ( \omega _ { y } y ) , . . . , \sin ( M \omega _ { x } x ) \sin ( M \omega _ { y } y ) } \end{array} \right] }
|
| 486 |
+
$$
|
| 487 |
+
|
| 488 |
+
Previous studies Lu et al. (2021b); Sukumar & Srivastava (2022) have shown that this method can generally be applied to any problem that exhibits periodic or oscillatory behavior, regardless of the particular boundary conditions involved. For instance, Fourier feature embedding can be employed to solve problems with Dirichlet boundary conditions in which the solution is specified at the boundary (or Neumann boundary conditions in which the solution’s derivative is specified at the boundary). In such a scenario, the embedding technique can be used to capture the periodic and oscillatory behavior of the input data, while the neural network can be trained to satisfy the Dirichlet boundary conditions (or Neumann boundary conditions).
|
| 489 |
+
|
| 490 |
+
Modified Multi-layer Perceptrons. In recent researches Wang et al. (2022a; 2021a), “modified MLP”, a novel multi-layer perceptron architecture, has been proposed. Compared to conventional multi-layer perceptrons, the “modified MLP” demonstrates superior performance because it excels at capturing steep gradients and minimizing residuals of partial differential equations. The form of this architecture is given as:
|
| 491 |
+
|
| 492 |
+
$$
|
| 493 |
+
\left\{ \begin{array} { l } { U = \sigma \big ( X W _ { u } + b _ { u } \big ) , } \\ { V = \sigma \big ( X W _ { v } + b _ { v } \big ) , } \\ { H _ { ( 1 ) } = \sigma \big ( X W _ { ( 0 ) } + b _ { ( 0 ) } \big ) , } \\ { Z _ { ( n ) } = \sigma \big ( H _ { ( n ) } W _ { ( n ) } + b _ { ( n ) } \big ) , \quad n = 1 , 2 , . . . , D - 1 . } \\ { H _ { ( n + 1 ) } = \big ( 1 - Z _ { ( n ) } \big ) \odot U + Z _ { ( n ) } \odot V , \quad n = 1 , 2 , . . . , D - 1 . } \\ { u _ { \theta } ( X ) = H _ { ( D ) } W _ { ( D ) } + b _ { ( D ) } . } \end{array} \right.
|
| 494 |
+
$$
|
| 495 |
+
|
| 496 |
+
where $\sigma ( \cdot )$ represents activation function $( \operatorname { t a n h } ( \cdot )$ in this work); the trainable parameters of the neural network are indicated by $W _ { u } , W _ { v } , W _ { ( n ) } , b _ { u } , b _ { v } , b _ { ( n ) }$ ; $D$ represents the depth of neural network; and $\odot$ denotes the operation of point-wise multiplication. The use of skip connections or residual connections is a significant distinction between “modified MLP” and conventional MLP. These connections enable the network to bypass certain layers and transmit information directly from earlier layers to later layers.
|
| 497 |
+
|
| 498 |
+
Multiple Neural Networks. For PINN with backward Euler or Crank-Nicolson time differencing, the neural network has the form of single input $x$ and single output $u _ { \theta } ( x )$ . However, for the general form of Runge-Kutta with $q$ stages, we have multiple outputs $\left[ k _ { 1 } ( x ) , k _ { 2 } ( x ) , \cdot \cdot \cdot , k _ { q } ( x ) , u ^ { \bar { n + 1 } } ( x ) \right]$ . While it is possible to use a single neural network with multiple outputs for the PINN approximation, this approach may lead to slow convergence. This is because the hidden function $k _ { i } ( x )$ can differ in scale from the solution $u ^ { n + 1 } ( x )$ . Instead, we use $q + 1$ neural networks to separately approximate $k _ { 1 } ( x ) , k _ { 2 } ( x ) , \cdot \cdot \cdot , k _ { q } ( x ) , u ^ { n + 1 } ( x )$ . Although this approach leads to an increase in the number of neural network parameters, it greatly enhances both the training efficiency and accuracy.
|
| 499 |
+
|
| 500 |
+
# A.4.2 CONFIGURATION OF TRAINING
|
| 501 |
+
|
| 502 |
+
Error metric To quantify the performance of our methods, we apply a relative $L ^ { 2 }$ norm over the spatial-temporal domain:
|
| 503 |
+
|
| 504 |
+
$$
|
| 505 |
+
\mathrm { r e l a t i v e } \ L ^ { 2 } \mathrm { e r r o r } = \sqrt { \frac { \sum _ { n = 1 } ^ { N _ { t } } \sum _ { i = 1 } ^ { N _ { r } } | u _ { \theta ^ { n } } ( x _ { i } ) - u ( t _ { n } , x _ { i } ) | ^ { 2 } } { \sum _ { n = 1 } ^ { N _ { t } } \sum _ { i = 1 } ^ { N _ { r } } u ( t _ { n } , x _ { i } ) ^ { 2 } } }
|
| 506 |
+
$$
|
| 507 |
+
|
| 508 |
+
Neural networks and training parameters In all examples, the Fourier feature embedding is applied and the modified MLP is used. Multiple neural networks are used in our TL-DPINN2 method while a single neural network is used in our TL-DPINN1 method. Adam optimizer with an initial learning rate of 0.001 and exponential rate decay is used. More details about the hyper-parameters of neural networks and the hyper-parameters of Algorithm 1 are presented in Table 7.
|
| 509 |
+
|
| 510 |
+
Table 7: Detailed experimental settings of Section 5.
|
| 511 |
+
|
| 512 |
+
<table><tr><td>Equations</td><td>Depth</td><td>Width</td><td>Features M</td><td>Nt</td><td>Nr</td><td>Iterations (Mo,M1)</td><td>E</td></tr><tr><td>RD</td><td>4</td><td>128</td><td>10</td><td>200</td><td>512</td><td>(10000,1000)</td><td>1e-9</td></tr><tr><td>AC</td><td>4</td><td>128</td><td>10</td><td>200</td><td>512</td><td>(10000,2000)</td><td>1e-10</td></tr><tr><td>KS(regular)</td><td>3</td><td>256</td><td>5</td><td>250</td><td>500</td><td>(10000,3000)</td><td>1e-8</td></tr><tr><td>KS(chaotic)</td><td>8</td><td>128</td><td>5</td><td>250</td><td>500</td><td>(10000,7000)</td><td>1e-10</td></tr><tr><td>NS</td><td>4</td><td>128</td><td>5</td><td>100</td><td>100</td><td>(10000,5000)</td><td>1e-5</td></tr></table>
|
| 513 |
+
|
| 514 |
+
For the configuration of other five baselines: 1) original PINN Raissi et al. (2019); 2) adaptive sampling L. Wight & Zhao (2021); 3) self-attention McClenny & Braga-Neto (2023); 4) time marching Mattey & Ghosh (2022) and 5) causal PINN Wang et al. (2022a), all of them have a neural network size with the same width and 1 deeper depth than that in Table 7. The collocation points number for all five baselines are configured to be $N _ { t } \times N _ { r }$ in Table 7. For example, a continuous original PINN has size [2, 128, 128, 128, 128, 128, 1] and $2 0 0 \times 5 1 2$ collocation points on the space-time domain to compute the loss, then each discrete PINN has the smaller size [1, 128, 128, 128, 128, 1] and much smaller collocation points 512 on space domain. The total parameters and computation of 200 discrete PINNs and the computation on the loss calculation are about the same with a single continuous PINN. In this configuration, we can sure that the comparison between our TL-DPINNs and other five baselines is fair, showing the discrete PINNs are efficient for practical applications.
|
| 515 |
+
|
| 516 |
+
# A.4.3 ADDITIONAL RESULTS FOR REACTION-DIFFUSION EQUATION
|
| 517 |
+
|
| 518 |
+
Figure 6 (a) depicts how the $L ^ { 2 }$ error changes as time goes on, as we can see, the $L ^ { 2 }$ error increases in the early training steps and is kept at a stable level between $1 . 0 0 e \mathrm { ~ - ~ } 0 5$ and $5 . 0 0 e - 0 5$ later. As shown in Figure 6 (b), based on the trainable parameters of the preceding time stamp, only a few hundred steps of training are required for each time stamp to satisfy the early stopping criterion, and then move to the training of the next time stamp. Figure 8 shows the training loss at different time steps. Figure 7 compares the predicted and reference solutions at different time instants. The predictions given by our method are identical to the reference solutions.
|
| 519 |
+
|
| 520 |
+
# A.5 ADDITIONAL RESULTS FOR ALLEN-CAHN EQUATION
|
| 521 |
+
|
| 522 |
+
Figure 9 shows the predicted solution against the reference solution, our proposed method achieves a relative $L ^ { 2 }$ error of $5 . 9 2 e \mathrm { ~ - ~ } 0 4$ . Figure 10 presents the comparison between the reference and the
|
| 523 |
+
|
| 524 |
+

|
| 525 |
+
Figure 6: Training results for the Reaction-Diffusion equation.
|
| 526 |
+
|
| 527 |
+

|
| 528 |
+
Figure 7: Comparison between the predicted and reference solutions at different time instants for the Reaction-Diffusion equation.
|
| 529 |
+
|
| 530 |
+

|
| 531 |
+
Figure 8: Loss curves at different time steps for the Reaction-Diffusion equation.
|
| 532 |
+
|
| 533 |
+

|
| 534 |
+
Figure 9: Comparison between the reference and predicted solutions for the Allen-Cahn equation, and the $L ^ { 2 }$ error is $4 . 0 4 e \mathrm { ~ - ~ } 0 3$ .
|
| 535 |
+
|
| 536 |
+

|
| 537 |
+
Figure 10: Comparison between the predicted and reference solutions at different time instants for the Allen-Cahn equation.
|
| 538 |
+
|
| 539 |
+
predicted solutions at given time instants $t = 0 . 2 5 , 0 . 5 0 , 0 . 7 5 , 1 . 0 0 .$ . As time goes on, our method is capable of exactly fitting the evolutionary reference solution.
|
| 540 |
+
|
| 541 |
+
# A.6 ADDITIONAL RESULTS FOR KURAMOTO–SIVASHINSKY EQUATION
|
| 542 |
+
|
| 543 |
+
Regular. The example presented in Section 5.3 shows a relatively regular solution. From Figure 11 (a), we can figure out how the $L ^ { 2 }$ error changes with the evolution of the equation. The $L ^ { \bar { 2 } }$ error is relatively small in the early time stamps compared with the $L ^ { 2 }$ error in later time stamps for the solution happens to experience a fast transition as time goes on. Figure 11 (b) represents the training epochs required at different time steps. The KS equation tends to become complex at around $t = 0 . 5$ , leading to a drastic surge in demand for training epochs. Figure 12 presents the comparison between the reference and the predicted solutions at different time moments $t = 0 . 2 , 0 . 4 , 0 . 6 , 0 . 8 , 1 . 0$ , and it is clear that our predicted solution is highly consistent with the reference solution.
|
| 544 |
+
|
| 545 |
+

|
| 546 |
+
Figure 11: Training results for the Kuramoto–Sivashinsky (regular) equation.
|
| 547 |
+
|
| 548 |
+

|
| 549 |
+
Figure 12: Comparison between the predicted and reference solutions at different time instants for the Kuramoto–Sivashinsky (regular) equation.
|
| 550 |
+
|
| 551 |
+

|
| 552 |
+
Figure 13: Loss curves at different time steps for the Kuramoto–Sivashinsky (regular) equation.
|
| 553 |
+
|
| 554 |
+
Chaotic. We consider using the Kuramoto-Sivashinsky equation to describe more complex chaotic phenomena, in which $\alpha = 1 0 0 / 1 6$ , $\beta = 1 0 0 / 1 6 ^ { 2 }$ , $\gamma = \mathrm { 1 0 0 } / 1 6 ^ { 4 }$ , and the initial condition $u _ { 0 } ( x ) =$ $\cos ( x ) ( 1 + \sin ( x ) )$ . The comparison between the reference and the predicted solution is visualized in Figure 14. As discussed in the previous section, PINN has difficulty learning sharp features for a larger number of evolutionary equations. However, our proposed method can learn solutions to chaotic phenomena. Our proposed method gives a relative $\bar { L } ^ { 2 }$ error of $3 . 7 4 e \mathrm { ~ - ~ } 0 1$ , whose variation trend is shown in Figure 15 (a). As shown in Figure 15 (b), with the reference solution becoming complex later in the training process, the maximum of the training epoch is always reached.
|
| 555 |
+
|
| 556 |
+
From a critical standpoint, here we should also mention that difficulties can still arise in simulating the long-time behavior of chaotic systems. We observe that our predicted solution accurately captures the transition to chaos at around $t = 0 . 4$ , while eventually losing accuracy after $t = 0 . 8$ as depicted in Figure 14, as well as in CasualPINN Wang et al. (2022a). Figure 16 depicts the comparison between the predicted and reference solution at different time instants. From $t = 0 . 4$ , our method has difficulty in fitting the reference solution exactly and the contrast in the final state is even worse. This may be due to the chaotic nature of the problem and the inevitable numerical error accumulation of PINNs, which have appeared and been discussed in Wang et al. (2022a).
|
| 557 |
+
|
| 558 |
+
# A.6.1 ADDITIONAL RESULTS FOR NAVIER-STOKES EQUATION
|
| 559 |
+
|
| 560 |
+
Our method is effective in solving NS Eq. with turbulence behavior. As shown in Figure 18, only one thousand training epochs are required on average for each timestamp to converge. Figure 20 shows additional comparisons of $w ( t , x , y )$ at different time stamps. As time passes, both the absolute error and the $L ^ { 2 }$ error between the reference and predicted $w ( t , x , y )$ increase gradually. Figure 19 shows how the loss value decreases at different timestamps, where $\mathcal { L } _ { \mathrm { w } } ^ { n }$ is the loss for the equation $\begin{array} { r } { w _ { t } + u _ { \theta ^ { n } } \cdot \nabla w - \frac { 1 } { \mathrm { R e } } \Delta w = 0 } \end{array}$ , and ${ \mathcal { L } } _ { \mathrm { c } } ^ { n }$ for the equation $\nabla \cdot u _ { \theta ^ { n } } = 0$ .
|
| 561 |
+
|
| 562 |
+

|
| 563 |
+
Figure 14: Comparison between the reference and predicted solutions for the Kuramoto–Sivashinsky(chaotic) equation, and the $L ^ { 2 }$ error is $3 . 7 4 e \mathrm { ~ - ~ } 0 1$ .
|
| 564 |
+
|
| 565 |
+

|
| 566 |
+
Figure 15: Training results for the Kuramoto–Sivashinsky (chaotic) equation.
|
| 567 |
+
|
| 568 |
+

|
| 569 |
+
Figure 16: Comparison between the predicted and reference solutions at different time instants for the Kuramoto–Sivashinsky(chaotic) equation.
|
| 570 |
+
|
| 571 |
+

|
| 572 |
+
Figure 17: Loss curves at different time steps for the Kuramoto–Sivashinsky (chaotic) equation.
|
| 573 |
+
|
| 574 |
+

|
| 575 |
+
Figure 18: Training results for the Navier-Stokes equation.
|
| 576 |
+
|
| 577 |
+

|
| 578 |
+
Figure 19: Loss curves at different time steps for the Navier-Stokes equation.
|
| 579 |
+
|
| 580 |
+

|
| 581 |
+
Figure 20: Comparison between the reference and predicted solutions of $w ( t , x , y )$ for the NavierStokes equation at $t = 0 . 2 , 0 . 4 , 0 . 6 , 0 . 8 , 1 . 0 .$ .
|
parse/test/82A2EfMu3e/82A2EfMu3e_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/82A2EfMu3e/82A2EfMu3e_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/82A2EfMu3e/82A2EfMu3e_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/IW1PR7vEBf/IW1PR7vEBf.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/IW1PR7vEBf/IW1PR7vEBf_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/IW1PR7vEBf/IW1PR7vEBf_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/IW1PR7vEBf/IW1PR7vEBf_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/jh7wH2AzKK/jh7wH2AzKK.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/jh7wH2AzKK/jh7wH2AzKK_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/jh7wH2AzKK/jh7wH2AzKK_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/jh7wH2AzKK/jh7wH2AzKK_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/lifLHzadgr/lifLHzadgr.md
ADDED
|
@@ -0,0 +1,790 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CUMULATIVE REASONING WITH LARGE LANGUAGE MODELS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
While language models are powerful and versatile, they often fail to address highly complex problems. This is because solving complex problems requires deliberate thinking, which has been only minimally guided during training. In this paper, we propose a new method called Cumulative Reasoning (CR), which employs language models in a cumulative and iterative manner to emulate human thought processes. By decomposing tasks into smaller components, CR streamlines the problem-solving process, rendering it both more manageable and effective. For logical inference tasks, CR consistently outperforms existing methods with an improvement up to $9 . 3 \%$ , and achieves an accuracy of $9 8 . 0 4 \%$ on the curated FOLIO wiki dataset. In the context of the Game of 24, CR achieves an accuracy of $98 \%$ , which signifies a substantial enhancement of $24 \%$ over the previous state-of-the-art method. Finally, on the MATH dataset, we establish new state-ofthe-art results without any external tools with $5 8 . 0 \%$ overall accuracy, surpassing the previous best approach by a margin of $4 . 2 \%$ , and achieving $43 \%$ relative improvement on the hardest level 5 problems $( 2 2 . 4 \% 3 2 . 1 \% )$ . Furthermore, we extend the concept of Cumulative Reasoning to include a code environment, in this setup, we are devoid of external aids such as retrieval and web browsing, and focus solely on the LLM’s intrinsic computational and logical reasoning capabilities within a Python code environment. Our experiments in this setting yielded impressive results, with an overall accuracy of $7 2 . 2 \%$ on the MATH dataset, significantly outperforming the PAL method with $3 8 . 8 \%$ relative improvement†.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Despite the remarkable advances made by large language models (LLMs) in a variety of applications (Devlin et al., 2018; Radford et al., 2018; 2019; Brown et al., 2020; Raffel et al., 2020; OpenAI, 2023), they still struggle to provide stable and accurate answers when faced with highly complex tasks. For instance, it has been observed that language models have difficulty directly generating correct answers for high school math problems (Lightman et al., 2023).
|
| 12 |
+
|
| 13 |
+
This shortfall may be anticipated, considering the training approach adopted by LLMs. Specifically, they are trained to sequentially predict the next token based on the given context, without a pause for deliberate thoughts. As elucidated by Kahneman (2011), our cognitive processing processes comprise two distinct systems: System 1 is fast, instinctive, and emotional; System 2 is slow, deliberate, and logical. Currently, LLMs align more closely with System 1, thereby potentially explaining their limitations in confronting complex tasks.
|
| 14 |
+
|
| 15 |
+
In response to these limitations, several methods have been proposed to mimic human cognitive processes. These include the Chain-of-Thought (CoT) that prompts the model to offer step-by-step solutions (Wei et al., 2022), and the Tree-of-Thought (ToT) that models the solving process as a thought search tree (Yao et al., 2023; Long, 2023). In addition, dedicated datasets have been created to provide step-wise guidance in model training (Lightman et al., 2023). Nevertheless, these methods do not have a site for storing intermediate results, assuming that all the thoughts form a chain or a tree, which does not fully capture the human thinking process.
|
| 16 |
+
|
| 17 |
+
In this paper, we propose a new method termed Cumulative Reasoning (CR), which presents a more general characterization of the thinking process. CR employs three distinct LLMs: the proposer, verifier, and reporter. The proposer keeps proposing potential propositions, which were verified by one or more verifiers, and the reporter decides when to stop and report the solution.
|
| 18 |
+
|
| 19 |
+
CR significantly amplifies the power of language models in addressing complex tasks, achieved by decomposing each task into atomic and manageable steps. Despite the computational infeasibility of enumerating the exponentially numerous possible complex tasks, CR ensures that each individual step can be efficiently learned and resolved. This strategic decomposition effectively transforms an otherwise unmanageable exponential problem into a sequence of solvable tasks, thereby providing a robust solution to the original problem.
|
| 20 |
+
|
| 21 |
+
Our empirical analyses include three components. In the first experiment, we tackled logical inference tasks like FOLIO wiki (pertaining to first-order logic) and AutoTNLI (associated with higherorder logic). On these datasets, CR consistently surpassed current methodologies, showcasing an enhancement of up to $9 . 3 \%$ . Additionally, a rigorous refinement of the FOLIO dataset generated the “FOLIO wiki curated,” on which CR recorded a remarkable accuracy of $9 8 . 0 4 \%$ . In the second experiment, which revolved around the Game of 24, CR achieved an accuracy of $98 \%$ . Remarkably, this represents a significant improvement of $24 \%$ when compared to the prior state-of-the-art method, ToT (Yao et al., 2023). In the last experiment, we established new state-of-the-art results on the renowned MATH dataset (Hendrycks et al., 2021), achieving $5 8 . 0 \%$ overall accuracy with a margin of $4 . 2 \%$ over the Complex-CoT with PHP method (Fu et al., 2022; Zheng et al., 2023). Noteworthy, our method achieves $43 \%$ relative improvement on the hardest level 5 problems $2 2 . 4 \% 3 2 . 1 \%$ ).
|
| 22 |
+
|
| 23 |
+
Furthermore, we extend the concept of Cumulative Reasoning (CR) with a code environment. Our experimental setup, devoid of other external aids such as external memory, web browsing, or retrieval systems, evaluates the LLM’s intrinsic computational and logical reasoning capabilities. We achieved a $7 2 . 2 \%$ accuracy on the MATH dataset, significantly outperforming methods like PAL (Gao et al., 2023) $( 5 2 \% )$ and ToRA (Gou et al., 2023) $( 6 0 . 8 \% )$ . Notably, there was a $6 6 . 8 \%$ relative improvement over PAL and $12 . 8 \%$ over ToRA on the most challenging level 5 MATH problems, demonstrating the effectiveness of CR in a code environment and further validating the robustness of CR in handling complex tasks.
|
| 24 |
+
|
| 25 |
+
# 2 PRELIMINARIES
|
| 26 |
+
|
| 27 |
+
# 2.1 LOGIC
|
| 28 |
+
|
| 29 |
+
Propositional logic, the most fundamental system of logic, encompasses elements $p , q , r$ and a variety of operations. These include “and” $( p \land q )$ , “or” $( p \lor q )$ , “implies” $( p \Rightarrow q )$ ), and “not” $( \neg p )$ . The constants true and false are denoted as 1 and 0 respectively. This system adheres to the following rules:
|
| 30 |
+
|
| 31 |
+
$$
|
| 32 |
+
x \wedge x = x , ~ x \vee x = x , ~ 1 \wedge x = x , ~ 0 \vee x = x , ~ x \wedge ( y \vee x ) = x = ( x \wedge y ) \vee x .
|
| 33 |
+
$$
|
| 34 |
+
|
| 35 |
+
and distributive laws:
|
| 36 |
+
|
| 37 |
+
$$
|
| 38 |
+
x \wedge ( y \vee z ) = ( x \wedge y ) \vee ( x \wedge z ) , x \vee ( y \wedge z ) = ( x \vee y ) \wedge ( x \vee z ) .
|
| 39 |
+
$$
|
| 40 |
+
|
| 41 |
+
In a Boolean algebra, every element $x$ has a complement $\neg x$ and the following holds true:
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
x \wedge \neg x = 0 , x \vee \neg x = 1 , \neg \neg x = x .
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
Building upon propositional logic, first-order logic (FOL) introduces universal quantification $( \forall )$ and existential quantification $\textcircled{1}$ to describe more intricate propositions. For instance, the statement $ { ^ { \mathrm { * } } } \forall _ { x } \mathrm { D o g } ( x ) \Rightarrow \bar { \mathrm { A n i m a l } } ( x ) ^ { \prime }$ translates to “for every $x$ , if $x$ is a dog, then it is also an animal”. Higherorder logic (HOL) represents a sophisticated formalism that permits quantification over functions and predicates, an ability that contrasts sharply with FOL, which restricts quantification to individual objects. For a detailed discussion on the distinctive characteristics of HOL, as opposed to FOL, please refer to Appendix D.1.
|
| 48 |
+
|
| 49 |
+
# 2.2 ILLUSTRATIVE EXAMPLE
|
| 50 |
+
|
| 51 |
+
Consider the following example adapted from the FOLIO dataset (Han et al., 2022), where empirically only the text statements (excluding logical propositions) will be given:
|
| 52 |
+
|
| 53 |
+
1. All monkeys are mammals: $\forall x ( \mathrm { M o n k e y } ( x ) \Rightarrow \mathrm { M a m m a l s } ( x ) )$ .
|
| 54 |
+
2. An animal is either a monkey or a bird: $\forall x { \bigl ( } \operatorname { A n i m a l } ( x ) \Rightarrow \left( \operatorname { M o n k e y } ( x ) \lor \operatorname { B i r d } ( x ) \right) { \bigr ) }$
|
| 55 |
+
3. All birds fly: $\forall x ( \mathbf { B i r d } ( x ) \Rightarrow \mathbf { F l y } ( x ) )$ .
|
| 56 |
+
4. If something can fly, then it has wings: $\forall x ( \mathrm { F l y } ( x ) \Rightarrow \operatorname { W i n g s } ( x ) )$ .
|
| 57 |
+
5. Rock is not a mammal, but Rock is an animal: ¬Mammal(Rock) $\wedge$ Animal(Rock).
|
| 58 |
+
|
| 59 |
+
The question is: Does rock have wings? We have the following derivations:
|
| 60 |
+
|
| 61 |
+
a. The contrapositive of (1) is: $\forall x ( \neg \mathbf { M a m m a l s } ( x ) \Rightarrow \neg \mathbf { M o n k e y } ( x ) ) .$ .
|
| 62 |
+
b. (a) and (5) ⇒ ¬Monkey(Rock) $\wedge$ Animal(Rock).
|
| 63 |
+
c. (2) and $( 5 ) \Rightarrow \left( { \mathrm { M o n k e y } } ( { \mathrm { R o c k } } ) \lor { \mathrm { B i r d } } ( { \mathrm { R o c k } } ) \right)$ d. (b) and $\mathrm { ( c ) } \Rightarrow \mathrm { B i r d ( R o c k ) }$ .
|
| 64 |
+
e. (3) and $( \mathrm d ) \Rightarrow \mathrm { { F l y } ( \mathrm { { R o c k } ) } }$ .
|
| 65 |
+
f. (4) and $( \mathbf { e } ) \Rightarrow \mathrm { { W i n g s } ( R o c k ) }$ .
|
| 66 |
+
|
| 67 |
+
While the derivation can be treated as a general “chain of thought” from $( a )$ to $( f )$ , its internal structure is neither a chain nor a tree. Instead, it is a directed acyclic graph (DAG), with each directed edge as one step of derivation. For examples of higher-order logic, see Appendix D.1.
|
| 68 |
+
|
| 69 |
+

|
| 70 |
+
Figure 1: Illustration of our logical derivation
|
| 71 |
+
|
| 72 |
+
# 3 OUR METHOD
|
| 73 |
+
|
| 74 |
+
# 3.1 CUMULATIVE REASONING (CR)
|
| 75 |
+
|
| 76 |
+
Our CR algorithm uses three distinct types of LLMs (AI Agents):
|
| 77 |
+
|
| 78 |
+
1. Proposer. This model suggests the next step based on the current context. 2. Verifier(s). This model or set of models scrutinizes the accuracy of the step put forward by the proposer. If the step is deemed correct, it will be added to the context. 3. Reporter. This model determines when the reasoning process should be concluded, by assessing whether the current conditions can directly lead to the final solution.
|
| 79 |
+
|
| 80 |
+
See Figure 2 for an illustration. In each iteration, the proposer initiates the process by proposing one or a few new claim(s) based on existing predicates. Subsequently, the verifier(s) evaluate the proposal, determining whether the claim(s) can be retained as a new predicate. Finally, the reporter decides if it is the optimal time to cease the thought process and deliver the answer.
|
| 81 |
+
|
| 82 |
+
Ideally, the proposer should be implemented using a language model pre-trained on the corresponding derivation tasks. Verifier(s) should be capable of translating the derivations to appropriate formal systems and verifying them using symbolic reasoning modules such as a propositional logic solver or a formal math prover, such as AI agents equipped with code environment or symbolic systems. However, for simplicity, one can also use general-purpose foundation models like GPT-4 (OpenAI, 2023), instantiated with different prompts for these roles.
|
| 83 |
+
|
| 84 |
+
The main theoretical motivation of our method lies in the intuitionistic logic, the philosophy of mathematical constructivism, and the topos theory, which imply that the cumulative process of constructing new propositions is the natural way to perform complex reasoning, especially in the realm of (higher-order) logic and pure mathematics.
|
| 85 |
+
|
| 86 |
+
The primary empirical contribution of our work lies in the synergistic integration of different LLM roles (Proposer, Verifier, and Reporter) within the Cumulative Reasoning framework. This integration facilitates a more effective accumulation and verification of intermediate results, fostering a deeper and more precise reasoning process. The collaborative interplay among these roles (agents), and the interactions among them and the (code) environments, work together in a synergistic way to enhance the reasoning capabilities of the system. This interplay allows for a more effective accumulation and verification of intermediate results, facilitating a deeper and more precise reasoning process.
|
| 87 |
+
|
| 88 |
+

|
| 89 |
+
Figure 2: An illustration of Cumulative Reasoning (CR) for a 3-premises problem.
|
| 90 |
+
|
| 91 |
+
# 3.2 COMPARE WITH COT AND TOT
|
| 92 |
+
|
| 93 |
+
CR clearly generalizes CoT (Wei et al., 2022), in the sense that if there are no verifiers, and the proposer keeps proposing the next steps until the end, CR becomes the standard chain of thought. However, in CR the overall thinking process is not necessarily a chain or a tree, it can be a DAG. Therefore, CR can be used for solving more complex problems.
|
| 94 |
+
|
| 95 |
+
At first glance, CR is similar to the ToT, which solves the problems with a thought search tree (Yao et al., 2023; Long, 2023). However, our method is more general in the sense that it stores all the historical correct reasoning results in memory, which can be a DAG (or even directed hyper-graphs). By contrast, ToT will not store the information from other branches for exploration at the current search branch. For a detailed comparison with a preliminary analysis, please refer to Appendix C.
|
| 96 |
+
|
| 97 |
+
# 4 EXPERIMENTS
|
| 98 |
+
|
| 99 |
+
Our experimental framework is based on the Microsoft guidance library (Lundberg et al., 2023), which offers the flexibility to intertwine generation, prompting, and logical control in a seamless flow that aligns with language models. We consider the following LLMs: GPT-3.5-turbo, GPT-4, LLaMA-13B and LLaMA-65B.
|
| 100 |
+
|
| 101 |
+
Our Proposer, Verifier(s), and Reporter in CR are implemented using the same LLM with different fewshot prompts. This approach ensures a broad application scope and simplifies implementation. For optimal results, future work could consider the application of a Proposer pre-trained on task-specific corpus and Verifier(s) aided by symbolic formal systems. We denote $n$ as the number of generated intermediate propositions, and $k$ as the number of majority voting times. We set the temperature $t =$ 0.1 by default and $t = 0 . 7$ for majority voting. We also remark that both GPT-3.5-turbo and GPT-4 operate as chat-format APIs from OpenAI.
|
| 102 |
+
|
| 103 |
+
# 4.1 FOLIO WIKI
|
| 104 |
+
|
| 105 |
+
FOLIO dataset (Han et al., 2022) is a first-order logical inference dataset for reasoning in natural language. The label of each problem can be “True”, “False”, or “Unknown”. See Figure 3 for an example. We observed that while the Chain-of-Thought reasoning process can generate useful intermediary results, it tends to flounder midway, failing to arrive at the correct conclusion. Conversely, the CR initially spawns two beneficial propositions and leverages them to successfully solve the problem at hand. For a deeper dive into specific examples of the FOLIO dataset, we refer to Appendix E.1.
|
| 106 |
+
|
| 107 |
+
The FOLIO dataset is a composite of 1435 examples, wherein $5 2 . 5 \%$ of these instances have been crafted drawing upon knowledge from randomly selected Wikipedia pages. This approach guarantees the infusion of abundant linguistic variations and a rich vocabulary within the corpus. The residual
|
| 108 |
+
|
| 109 |
+
$4 7 . 5 \%$ of the examples have been penned in a hybrid style, rooted in a variety of complex logical templates. Acknowledging that contemporary LLMs are pre-trained on a considerable volume of a standard human-written corpus, we direct our experiments towards those examples derived from Wikipedia, hereby referred to as FOLIO-wiki. Once a handful of examples are moved aside for few-shot prompts and those examples without source labels for validations are excluded, we are left with a testable collection of 534 examples.
|
| 110 |
+
|
| 111 |
+
Our experimental design employs the LLaMA base model and GPT APIs directly, circumventing the need for fine-tuning with logical inference datasets and thus ensuring a faithful comparison. The results, displayed in Table 1, reveal that CR consistently surpasses Direct (standard Input-Output prompt), CoT, and CoT-SC, with a performance margin spanning up to $8 . 4 2 \%$ . Notably, GPT-4 paired with Cumulative Reasoning (CR) achieves an accuracy rate of $8 7 . 4 5 \%$ , outperforming GPT-4 with CoT-SC, which reports an accuracy rate of $8 5 . 0 2 \%$ . For more experiments on LogiQA (Liu et al., 2020), ProofWriter (Tafjord et al., 2020), and LogicalDeduction datasets (Srivastava et al., 2022) and more ablation studies, please refer to Appendix B.
|
| 112 |
+
|
| 113 |
+
# 4.2 FOLIO WIKI CURATED
|
| 114 |
+
|
| 115 |
+
The accuracy of $8 7 . 4 5 \%$ does not seem to be as competitive as human beings, so we carefully reviewed the FOLIO-wiki dataset. It turns out that many instances inside the dataset are problematic in the following sense:
|
| 116 |
+
|
| 117 |
+
1. Missing common knowledge or contradictory to common knowledge; (9 in total, Example ID No. 34, 62, 162, 167, 228, 268, 526, 677, 679)
|
| 118 |
+
2. Overly ambiguous problems failing to provide unequivocal answers; (37 in total, Example ID No. 141, 215, 216, 223, 252, 261, 298, 321, 330, 396, 402, 409, 411, 431, 432, 456, 457, 482, 483, 496, 563, 572, 599, 624, 629, 641, 654, 660, 673, 682, 698, 750)
|
| 119 |
+
3. Inherent inconsistencies presented within the premises; (2 in total, Example ID No. 640, 643)
|
| 120 |
+
4. Vague premises or typographical errors; (2 in total, Example ID No. 314, 315)
|
| 121 |
+
5. Incorrect answers. (24 in total, Example ID No. 9, 46, 52, 84, 100, 144, 273, 276, 299, 310, 322, 345, 367, 437, 452, 453, 464, 557, 573, 578, 605, 632, 671, 715)
|
| 122 |
+
|
| 123 |
+
We note that except for the first class, all the rest should be removed from the dataset. The first class is because foundation models were trained with common knowledge, but the problem answer based on FOL systems gives an unnatural answer. See Example ID No. 679 shown in Figure 4 and more examples in Appendix E.2) for illustrations. For a brief discussion on the limitations of FOL systems, please refer to Appendix D.
|
| 124 |
+
|
| 125 |
+
Therefore, we removed all 74 such problematic instances, leaving the remaining 460 examples as a curated collection. The results in Table 2 indicate that the application of GPT-4 in conjunction with our method (CR) commands an astounding accuracy of $9 8 . 0 4 \%$ and maintains an error rate as minimal as $1 . 9 6 \%$ . This level of performance is almost twice as effective compared to the combination of GPT-4 and CoT-SC, which scored an accuracy of $9 6 . 0 9 \%$ and an error rate of $3 . 9 1 \%$ .
|
| 126 |
+
|
| 127 |
+
# 4.3 AUTOTNLI
|
| 128 |
+
|
| 129 |
+
Experiment Setting. AutoTNLI (Kumar et al., 2022) is a Tabular Natural Language Inference (TNLI) dataset extended from INFOTABS (Gupta et al., 2020), which can be seen as a higher-order logical inference dataset due to its inherent complexity lies in natural language inference formalism. It contains 1,478,662 tablehypothesis pairs with the corresponding label (Entail or Neutral) that indicates whether the given table entails the hypothesis. We treat the tabular content within AutoTNLI as a set of premises (In fact, the tables within the AutoTNLI dataset are exactly provided in the form
|
| 130 |
+
|
| 131 |
+
Table 3: Results for various reasoning approaches on AutoTNLI dataset.
|
| 132 |
+
|
| 133 |
+
<table><tr><td>Model</td><td>Method</td><td>Acc. ↑(%)</td></tr><tr><td>=</td><td>[Random]</td><td>50.00</td></tr><tr><td>LLaMA-13B</td><td>Direct CoT-SC (k 16) CR (ours, n = 4)</td><td>52.6 52.1 (+1.5) 57.0 (+5.4)</td></tr><tr><td>LLaMA-65B</td><td>Direct CoT CoT-SC (k = 16) CR (ours, n = 4)</td><td>59.7 63.2 (+3.5) 61.7 (+2.0) 72.5 (+12.8)</td></tr></table>
|
| 134 |
+
|
| 135 |
+
of premises), enabling a direct transference of our method applied to the FOLIO dataset. Our experi
|
| 136 |
+
|
| 137 |
+
Table 1: Results for various reasoning approaches on FOLIO-wiki dataset.
|
| 138 |
+
|
| 139 |
+
<table><tr><td>Model</td><td>Method</td><td>Acc. ↑(%)</td></tr><tr><td>=</td><td>[Random]</td><td>33.33</td></tr><tr><td>LLaMA-13B</td><td>Direct CoT-SC (k 16) CR (ours,n = 2)</td><td>44.75 49.06 (+7.31) 53.37 (+8.62)</td></tr><tr><td>LLaMA-65B</td><td>Direct CoT-SC (k = 16) CR (ours,n = 2)</td><td>67.42 67.42(+0.0) 72.10 (+4.68)</td></tr><tr><td>GPT-3.5-turbo</td><td>Direct CoT CoT-SC (k = 16) CR (ours, n = 2)</td><td>62.92 64.61 (+1.69) 63.33 (+0.41) 73.03 (+10.11)</td></tr><tr><td>GPT-4</td><td>Direct CoT CoT-SC (k = 16) CR (ours, n = 2)</td><td>80.52 84.46 (+3.94) 85.02 (+4.50) 87.45 (+6.93)</td></tr></table>
|
| 140 |
+
|
| 141 |
+
Table 2: Results for various reasoning approaches on FOLIO-wiki-curated dataset.
|
| 142 |
+
|
| 143 |
+
<table><tr><td>Model</td><td>Method</td><td>Acc. ↑(%)</td></tr><tr><td></td><td>[Random] Direct</td><td>33.33 49.13</td></tr><tr><td>LLaMA-13B</td><td>CoT-SC (k = 16) CR (ours, n = 2)</td><td>52.17 (+3.04) 55.87 (+6.74)</td></tr><tr><td>LLaMA-65B</td><td>Direct CoT-SC (k 16) CR (ours, n = 2)</td><td>74.78 74.13 (-0.6) 79.57 (+4.79)</td></tr><tr><td>GPT-3.5-turbo</td><td>Direct CoT-SC (k = 16) CR (ours,n = 2)</td><td>69.57 70.65 (+1.08) 78.70 (+9.13)</td></tr><tr><td>GPT-4</td><td>Direct CoT-SC (k = 16) CR (ours, n = 2)</td><td>89.57 95.00 (+5.43) 98.04 (+8.47)</td></tr></table>
|
| 144 |
+
|
| 145 |
+
mentation encompassed two models, LLaMA-13B, and LLaMA-65B, each subjected to assessment using Direct, CoT, CoT-SC, and CR methods. Due to the extensive magnitude of the AutoTNLI dataset, we only take the first 1000 table-hypothesis pairs for evaluation.
|
| 146 |
+
|
| 147 |
+
Evaluation Results. As shown in Table 3, both LLaMA-13B and LLaMA-65B models reveal that CR delivers a significant enhancement in performance compared to CoT, with a relative improvement reaching up to $9 . 3 \%$ on the LLaMA-65B model. This data emphasizes the clear advantage of CR over CoT and CoT-SC techniques in the framework of the AutoTNLI dataset.
|
| 148 |
+
|
| 149 |
+
# 4.4 GAME OF 24
|
| 150 |
+
|
| 151 |
+
The Game of 24 is a puzzle in which players must combine four specified integers using basic arithmetic operations (addition, subtraction, multiplication, division) to get the number 24.
|
| 152 |
+
|
| 153 |
+
Settings and Baselines. To ensure fairness, we adopt exactly identical task settings as Tree of Thoughts (ToT) (Yao et al., 2023) on Game of 24. We use the set of 100 Games of 24 collected by Yao et al. (2023) which was been used to evaluate the performance of ToT. In each game, we consider the game to be successfully solved if and only if the output is a valid equation that reaches 24 and only uses given numbers each exactly once. We quantify the accuracy (success rate) across 100 games as a main evaluative metric.
|
| 154 |
+
|
| 155 |
+
In this experiment, we compare CR with variant prompt algorithms, including standard Input-Output prompting (Direct), Chain-of-Thought prompting (CoT), and CoT-SC by aggregating the majority outcome from 100 sampled CoT trials (designated as ${ \bf k } = 1 0 0$ ), and Tree of Thoughts (ToT) with a breadth-first search width set at 5 (indicated as ${ \boldsymbol { \mathbf { b } } } = 5$ ).
|
| 156 |
+
|
| 157 |
+
CR Setup. Within our CR algorithm, we maintain a set of “reached states”, denoted by $S$ . Initially, $S$ only contains the start state $s$ which represents 4 input numbers without any operation. In each iteration, a state $u$ is randomly selected from $S$ . This selected state $u$ is passed to the Proposer, which randomly picks two remaining numbers within $u$ and combines them through a basic arithmetic operation $( + , - , ^ { * } , \ / )$ to obtain a new number, thereby generating a new state $v$ . The Proposer is instructed to try to avoid taking duplicated operations. Subsequently, the Verifier scrutinizes the arithmetic operation proposed by the Proposer and evaluates the newly generated state $v$ . Then $v$ is inserted to $S$ if the Verifier thinks that the operation from $u$ to $v$ is legitimate and it is potential for $v$ to achieve 24. Upon the Verifier identifying a state $t$ that unequivocally 24, the Reporter devises a solution based on the path from the state $s$ to state $t$ and produces the final answer. The algorithm terminates when the Reporter outputs the final answer or the number of iterations exceeds a limit of $L$ . In the experiments, we set the default value of $L$ to 50.
|
| 158 |
+
|
| 159 |
+
Following Yao et al. (2023), our algorithm runs $b$ concurrent branches and only selects the first answer for these branches that utilizes each input number exactly once for evaluation. Due to the prohibitive cost of GPT-4, we only test our CR algorithm with $b = 1$ to $b = 5$ . As shown in Table 4, we find that CR outperforms ToT by a large margin of $24 \%$ , from $74 \%$ to $98 \%$ , with much fewer states visited.
|
| 160 |
+
|
| 161 |
+
Compare with ToT. Interestingly, in the context of Game of 24, our CR algorithm and ToT algorithm are very similar. Their primary distinction is that, in CR, each iteration of the algorithm generates at most one newly reached state, while ToT produces a multitude of candidate states per iteration, filtering and retaining a subset of states. This implies that ToT explores a larger number of invalid states compared to CR. Moreover, ToT employs a fixed-width and fixeddepth search tree, while CR allows the LLM to determine the search depth autonomously, and performs different search widths on different layers of the search tree.
|
| 162 |
+
|
| 163 |
+
Table 4: Results for various approaches on Game of 24 using GPT-4. The average number of visited states for ToT is computed from the experimental logs available in its official GitHub repository.
|
| 164 |
+
|
| 165 |
+
<table><tr><td>Method</td><td>Acc. ↑(%)</td><td># Visited states ↓</td></tr><tr><td>Direct</td><td>7.3</td><td>1</td></tr><tr><td>CoT</td><td>4.0</td><td>1</td></tr><tr><td>CoT-SC (k = 100)</td><td>9.0</td><td>100</td></tr><tr><td>Direct (best of 100)</td><td>33</td><td>100</td></tr><tr><td>CoT (best of 100)</td><td>49</td><td>100</td></tr><tr><td>ToT (b = 5)</td><td>74</td><td>61.72</td></tr><tr><td>CR (ours, b = 1)</td><td>84 (+10)</td><td>11.68 (-50.04)</td></tr><tr><td>CR (ours,b=2)</td><td>94 (+20)</td><td>13.70 (-48.02)</td></tr><tr><td>CR (ours, b = 3)</td><td>97(+23)</td><td>14.25 (-47.47)</td></tr><tr><td>CR (ours, b = 4)</td><td>97(+23)</td><td>14.77 (-46.95)</td></tr><tr><td>CR (ours, b = 5)</td><td>98 (+24)</td><td>14.86 (-46.86)</td></tr></table>
|
| 166 |
+
|
| 167 |
+
# 5 SOLVING MATH PROBLEMS
|
| 168 |
+
|
| 169 |
+
# 5.1 CR WITHOUT CODE ENVIRONMENT
|
| 170 |
+
|
| 171 |
+
The MATH dataset (Hendrycks et al., 2021) serves as a benchmark for assessing AI models’ mathematical reasoning capabilities, encompassing a broad spectrum of mathematical problems across various subdomains such as Algebra and Geometry. Figure 5 in Appendix A shows an illustrative example from the MATH dataset, and Figure 6 in Appendix A shows the corresponding solutions generated by Complex CoT and CR. In our experiments, we assessed the performance of Complex CoT and our method (CR), both with and without Progressive-Hint Prompting (PHP) (Zheng et al., 2023). For a fair evaluation, we reproduced the results of Complex CoT (w/ PHP) on a subset of 500 test examples, adhering to Lightman et al. (2023), since the other parts of the test dataset (4500 examples) may have been utilized for model training by OpenAI. The difficulty spans from level 1 (simplest) to level 5 (hardest).
|
| 172 |
+
|
| 173 |
+
It is important to note that for our method (CR), we employed 4-shot prompting (4 examples for few-shot prompting) due to GPT-4’s context length constraints (8k by default). While the model occasionally exceeds the context length with 8-shot prompting, it generally demonstrates superior performance. Future experiments will explore the utilization of GPT-4-32k.
|
| 174 |
+
|
| 175 |
+
From Table 5, our method (CR) distinguishes itself by achieving significant advancements in performance across various mathematical subdomains, outperforming Complex CoT by a margin of $5 . 4 \%$ . The enhancements are particularly pronounced in the Number Theory, Probability, PreAlgebra, and Algebra categories. In comparison to the Complex CoT approach, even when restricted to 4-shot prompting due to GPT-4’s context length constraints, CR demonstrates its robustness and effectiveness. It is also evident that the PHP method further amplifies the performance of both Complex CoT and CR, establishing new state-of-the-art results with an overall accuracy of $5 8 . 0 \%$ using CR with PHP, with a margin of $4 . 2 \%$ over Complex CoT with PHP. Additionally, the “Iters” metric elucidates that CR, when synergized with PHP strategies, reaches self-consistent answers with fewer iterations.
|
| 176 |
+
|
| 177 |
+
From Table 6, it is evident that consistent performance boost across different difficulty levels signifies the robustness of the CR methodology in handling a diverse range of mathematical problems. The performance increase of $9 . 7 \%$ at level 5—which translates to a substantial relative improvement of $43 \%$ —compared to the baseline Complex CoT approach without PHP, underscores CR’s effectiveness in handling the most challenging problems in the dataset.
|
| 178 |
+
|
| 179 |
+
Table 5: Comparative performance on the MATH dataset using GPT-4 without code environment. We adopted a default temperature setting of $t = 0 . 0$ , consistent with prior research settings (greedy decoding). PHP denotes the application of the progressive-hint prompting. “Iters” represents the average number of LLM interactions, and Overall reflects the overall results across MATH subtopics.
|
| 180 |
+
|
| 181 |
+
<table><tr><td rowspan="2"></td><td rowspan="2">w/PHP</td><td colspan="8">MATH Dataset (* denotes using 500 test examples subset following Lightman et al. (2023))</td></tr><tr><td>InterAlgebra</td><td>Precalculus</td><td>Geometry</td><td>NumTheory</td><td>Probability</td><td>PreAlgebra</td><td>Algebra</td><td>Overall</td></tr><tr><td>CoT(OpenAI,2023)</td><td>X</td><td></td><td>-</td><td></td><td>-</td><td></td><td></td><td></td><td>42.50</td></tr><tr><td rowspan="3">Comelex CaT, 8-.s)t</td><td></td><td></td><td></td><td>3</td><td></td><td>252</td><td>78</td><td>78</td><td>5</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan="3">ComplexCoT* (repro., 8-shot)</td><td>X</td><td>29.9</td><td>33.9</td><td>34.1</td><td>46.8</td><td>47.4</td><td>62.1</td><td>70.7</td><td>48.80</td></tr><tr><td>√</td><td>28.9</td><td>30.4</td><td>43.9</td><td>53.2</td><td>50.0</td><td>68.5</td><td>84.1</td><td>53.80</td></tr><tr><td>(Iters)</td><td>2.7629</td><td>2.4643</td><td>2.7805</td><td>2.7581</td><td>2.4474</td><td>2.3780</td><td>2.5484</td><td>2.59</td></tr><tr><td rowspan="3">CR ,4.sohde*</td><td></td><td></td><td>35</td><td></td><td></td><td></td><td>7183</td><td></td><td>50</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>280</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 182 |
+
|
| 183 |
+
Table 6: Comparative performance on the MATH dataset using GPT-4 without code environment for different difficulty levels.
|
| 184 |
+
|
| 185 |
+
<table><tr><td rowspan="2"></td><td rowspan="2">w/PHP</td><td colspan="6">MATH Dataset (* denotes using 500 test examples subset)</td></tr><tr><td>Level 5</td><td>Level 4</td><td>Level3</td><td>Level 2</td><td>Level 1</td><td>Overall</td></tr><tr><td>CoT (OpenAI, 2023)</td><td>X</td><td></td><td>-</td><td></td><td>-</td><td></td><td>42.50</td></tr><tr><td>ComplexCoT*</td><td>X</td><td>22.4</td><td>38.3</td><td>62.9</td><td>72.2</td><td>79.1</td><td>48.80</td></tr><tr><td>(repro.,8-shot)</td><td>√</td><td>23.9</td><td>43.8</td><td>63.8</td><td>86.7</td><td>83.7</td><td>53.80</td></tr><tr><td>CR w/o code*</td><td>X</td><td>32.1 (+9.7)</td><td>43.0 (+4.7)</td><td>62.9 (+0.0)</td><td>78.9 (+6.7)</td><td>83.7 (+4.6)</td><td>54.20 (+5.40)</td></tr><tr><td>(ours, 4-shot)</td><td><</td><td>27.3 (+3.4)</td><td>50.0 (+6.2)</td><td>70.9 (+7.1)</td><td>86.7 (+0.0)</td><td>90.7 (+7.0)</td><td>58.00 (+4.20)</td></tr></table>
|
| 186 |
+
|
| 187 |
+
# 5.2 CR WITH CODE ENVIRONMENT ONLY
|
| 188 |
+
|
| 189 |
+
In this section, we extend the concept of Cumulative Reasoning (CR) with the inclusion of a code environment. Our experimental setup chooses not to utilize external aids such as memory modules, web browsing, or retrieval systems. Instead, we focus on a pure Python code environment to emulate a symbolic system. This approach aims to evaluate the LLM’s intrinsic capabilities in computational problem-solving and logical reasoning. This involves a single reasoning context session without additional verifier LLMs.
|
| 190 |
+
|
| 191 |
+
In the CR framework with a code environment, the Python interpreter acts as a symbolic system that aids in verification. This setup allows for an intricate interplay between the proposer (LLM) and the verifier (LLM equipped with code environment). The LLM, acting as the proposer, can generate hypotheses, formulate mathematical expressions, and pose questions to itself. These steps are then executed and verified in the code environment, and the observations (outputs) are then interpreted by the LLM.
|
| 192 |
+
|
| 193 |
+
Our experimental results, as shown in Table 7 and Table 8, demonstrate the effectiveness of the CR methodology in a code environment. We compare our approach with PAL (Gao et al., 2023) and ToRA (Gou et al., 2023), two notable benchmarks in the field. CR with code significantly outperforms these methods, achieving an overall accuracy of $7 2 . 2 \%$ on the MATH dataset, achieving $3 8 . 9 \%$ relative improvement over PAL and $1 8 . 8 \%$ relative improvement over ToRA. More specifically, achieving $6 6 . 8 \%$ relative improvement of PAL, and $1 2 . 8 \%$ relative improvement over ToRA on the hardest level 5 MATH problems.
|
| 194 |
+
|
| 195 |
+
# 6 RELATED WORK
|
| 196 |
+
|
| 197 |
+
Reasoning with LLM. An extensive range of studies highlights the benefits of equipping neural networks with the capacity to generate intermediate steps, which is a capability that notably enhances reasoning performance across a broad spectrum of applications (Zaidan et al., 2007; Yao et al., 2021; Hase & Bansal, 2021; Yang et al., 2022; Wu et al., 2022; Zhou et al., 2022). Morishita et al. (2023) improve the reasoning abilities of language models by using a synthetic corpus derived from formal logic theory. A comprehensive analysis of process-based versus outcome-based approaches on the GSM8K task is conducted by Uesato et al. (2022), and Lightman et al. (2023) further advance this field by meticulously collecting the PRM-800K dataset containing step-by-step supervision.
|
| 198 |
+
|
| 199 |
+
Table 7: Comparative performance on the MATH dataset using GPT-4 and GPT-4-turbo with Python code environment. We adopted a default temperature setting of $t = 0 . 0$ , consistent with prior research settings (greedy decoding). Notice that in this experiment (including reproduced results), we use a lightweight GPT-4-turbo for a cheaper cost as default. “Sessions” denotes how many LLMs with a consecutive thinking context are involved in the reasoning process, and Overall reflects the overall results across MATH subtopics.
|
| 200 |
+
|
| 201 |
+
<table><tr><td rowspan="2"></td><td rowspan="2">#Sessions</td><td colspan="8">MATH Dataset (*denotes 500 text examples subset)</td></tr><tr><td>InterAlgebra</td><td>Precalculus</td><td>Geometry</td><td>NumTheory</td><td>Probability</td><td>PreAlgebra</td><td>Algebra</td><td>Overall</td></tr><tr><td>PAL</td><td>-</td><td>32.8</td><td>29.3</td><td>38.0</td><td>58.7</td><td>61.0</td><td>73.9</td><td>59.1</td><td>51.8</td></tr><tr><td>PAL*(repro.,4 shot)</td><td>1</td><td>30.9</td><td>23.2</td><td>31.7</td><td>66.1</td><td>57.9</td><td>73.2</td><td>65.3</td><td>52.0</td></tr><tr><td>ToRA</td><td></td><td>40.0</td><td>37.2</td><td>44.1</td><td>68.9</td><td>67.3</td><td>82.2</td><td>75.8</td><td>61.6</td></tr><tr><td>ToRA* (repro.,4 shot)</td><td>1</td><td>49.5</td><td>44.6</td><td>48.8</td><td>49.5</td><td>66.1</td><td>67.1</td><td>71.8</td><td>60.8</td></tr><tr><td>CR w/code*(ours,4-shot)</td><td>1</td><td>51.5 (+2.0)</td><td>51.8 (+7.2)</td><td>53.7 (+4.9)</td><td>88.7 (+22.6)</td><td>71.1(+5.0)</td><td>86.6(+13.4)</td><td>86.3 (+14.5)</td><td>72.2 (+11.4)</td></tr></table>
|
| 202 |
+
|
| 203 |
+
Table 8: Comparative performance on the MATH dataset using GPT-4 and GPT-4-turbo with Python code environment for different difficulty levels.
|
| 204 |
+
|
| 205 |
+
<table><tr><td rowspan="2"></td><td rowspan="2">#Sessions</td><td colspan="6">MATH Dataset (* denotes using 500 test examples subset)</td></tr><tr><td>Level5</td><td>Level4</td><td>Level3</td><td>Level2</td><td>Level1</td><td>Overall</td></tr><tr><td>PAL</td><td>=</td><td>=</td><td>=</td><td></td><td></td><td></td><td>51.8</td></tr><tr><td>PAL* (repro.,4-shot)</td><td>1</td><td>31.3</td><td>45.3</td><td>60.0</td><td>65.6</td><td>88.4</td><td>52.0</td></tr><tr><td>ToRA</td><td>1</td><td></td><td>=</td><td>=</td><td>=</td><td>1</td><td>61.6</td></tr><tr><td>ToRA* (repro., 4-shot)</td><td>1</td><td>46.3</td><td>53.9</td><td>69.5</td><td>75.6</td><td>74.4</td><td>60.8</td></tr><tr><td>CR w/code* (ours,2-shot)</td><td>1</td><td>52.2 (+5.9)</td><td>66.4 (+12.5)</td><td>81.9 (+12.4)</td><td>90.0 (+14.4)</td><td>90.7 (+2.3)</td><td>72.2 (+11.4)</td></tr></table>
|
| 206 |
+
|
| 207 |
+
Additionally, a considerable breadth of research is committed to amplifying the reasoning capabilities leveraging symbolic systems, including code environment, knowledge graphs, and formal theorem provers (Mihaylov & Frank, 2018; Bauer et al., 2018; Kundu et al., 2018; Wang et al., 2019; Lin et al., 2019; Ding et al., 2019; Feng et al., 2020; Wang et al., 2022a; Chen et al., 2022; Lyu et al., 2023; Chen et al., 2022; Gao et al., 2023; Gou et al., 2023; Jiang et al., 2022; Yang et al., 2023).
|
| 208 |
+
|
| 209 |
+
Chain-of-Thought Prompting. In the pioneering work on chain-of-thought reasoning, Wei et al. (2022) emphasize the importance of incorporating multi-step reasoning paths before generating definitive answers. In a progression from this, Wang et al. (2022b) introduce self-consistency, a sophisticated decoding strategy destined to supersede the rudimentary greedy decoding employed in CoT prompting. Advancing this further, Zhou et al. (2022) seek to tackle the complexities faced by CoT prompting in addressing tasks necessitating solutions beyond the complexity scope of the exemplars used in the prompts. Khot et al. (2022) enhance LLM capabilities for complex tasks through Decomposed Prompting, a method that dissects tasks into simpler sub-tasks. Creswell & Shanahan (2022) showcase a method for enhancing reasoning quality, conducting a beam search throughout the reasoning trace space. Fu et al. (2022) highlight the importance of increasing reasoning complexity inside the few-shot prompts for better performance.
|
| 210 |
+
|
| 211 |
+
More recently, Li et al. (2023) bring forth DIVERSE, which generates a spectrum of prompts to scrutinize various reasoning trajectories for an identical question, and utilizes a verifier to weed out incorrect answers using a weighted voting scheme. Yao et al. (2023) propose a framework for language model inference, Tree-of-Thought (ToT). ToT enhances the problem-solving abilities of language models by facilitating deliberate decision-making, contemplating multiple reasoning paths, and performing self-evaluative choices to determine subsequent actions. Taking an iterative approach, Zheng et al. (2023) advocate for recurrent invocations of LLMs, leveraging prior answers as contextual hints to inform subsequent iterations. Lastly, Feng et al. (2023) underscore the theoretical prowess of CoT in addressing intricate real-world tasks like dynamic programming.
|
| 212 |
+
|
| 213 |
+
# 7 CONCLUSION
|
| 214 |
+
|
| 215 |
+
In this paper, we propose CR that employs language models iteratively and cumulatively. The main idea behind our algorithm is decomposing the complex task into smaller steps, and maintaining a thinking context for all the intermediate results. Experimental results show that our method achieves state-of-the-art performance for logical inference tasks, the Game of 24, and MATH problems. Given its inherent generality, our framework holds promising potential for addressing a wider array of mathematical challenges.
|
| 216 |
+
|
| 217 |
+
# ETHICS STATEMENT
|
| 218 |
+
|
| 219 |
+
Our research on Cumulative Reasoning (CR) aims to enhance the problem-solving abilities of language models and shows significant improvements in tasks such as logical inference and complex problem-solving. We use a curated FOLIO wiki dataset derived from Yale’s publicly available FOLIO dataset, ensuring that all data is anonymized and stripped of personally identifiable information. While CR potentially makes the decision-making process more transparent by breaking down tasks into simpler components, it inherits the biases present in the language models’ training data and maintains some level of the ’black box’ nature. Its advanced reasoning capabilities, although promising for beneficial applications like medical diagnostics, also pose risks of misuse, such as in disinformation campaigns. Furthermore, the computational intensity of training these models has environmental implications. We urge the research community to adopt responsible guidelines for the deployment of advanced reasoning models and consider future work in improving interpretability, mitigating biases, and reducing environmental impact.
|
| 220 |
+
|
| 221 |
+
# REPRODUCIBILITY STATEMENT
|
| 222 |
+
|
| 223 |
+
To facilitate reproducibility, we make our code available at https://anonymous.4open.scie nce/r/cumulative-reasoning-anonymous-4477. The experiment results can be easily reproduced following the instructions in the README document. We also depict our experiment details in Section 4.
|
| 224 |
+
|
| 225 |
+
# REFERENCES
|
| 226 |
+
|
| 227 |
+
Lisa Bauer, Yicheng Wang, and Mohit Bansal. Commonsense for generative multi-hop question answering tasks. arXiv preprint arXiv:1809.06309, 2018.
|
| 228 |
+
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances in neural information processing systems, 33:1877–1901, 2020.
|
| 229 |
+
Wenhu Chen, Xueguang Ma, Xinyi Wang, and William W Cohen. Program of thoughts prompting: Disentangling computation from reasoning for numerical reasoning tasks. arXiv preprint arXiv:2211.12588, 2022.
|
| 230 |
+
Jonathan Okeke Chimakonam. Proof in Alonzo Church’s and Alan Turing’s Mathematical Logic: Undecidability of First Order Logic. Universal-Publishers, 2012.
|
| 231 |
+
Robin Cooper, Dick Crouch, Jan Van Eijck, Chris Fox, Johan Van Genabith, Jan Jaspars, Hans Kamp, David Milward, Manfred Pinkal, Massimo Poesio, et al. Using the framework. Technical report, Technical Report LRE 62-051 D-16, The FraCaS Consortium, 1996.
|
| 232 |
+
Antonia Creswell and Murray Shanahan. Faithful reasoning using large language models. arXiv preprint arXiv:2208.14271, 2022.
|
| 233 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
|
| 234 |
+
Ming Ding, Chang Zhou, Qibin Chen, Hongxia Yang, and Jie Tang. Cognitive graph for multi-hop reading comprehension at scale. arXiv preprint arXiv:1905.05460, 2019.
|
| 235 |
+
Guhao Feng, Yuntian Gu, Bohang Zhang, Haotian Ye, Di He, and Liwei Wang. Towards revealing the mystery behind chain of thought: a theoretical perspective. arXiv preprint arXiv:2305.15408, 2023.
|
| 236 |
+
Yanlin Feng, Xinyue Chen, Bill Yuchen Lin, Peifeng Wang, Jun Yan, and Xiang Ren. Scalable multi-hop relational reasoning for knowledge-aware question answering. arXiv preprint arXiv:2005.00646, 2020.
|
| 237 |
+
Yao Fu, Hao Peng, Ashish Sabharwal, Peter Clark, and Tushar Khot. Complexity-based prompting for multi-step reasoning. arXiv preprint arXiv:2210.00720, 2022.
|
| 238 |
+
LTF Gamut. Logic, Language, and Meaning, Volume 2: intensional logic and logical grammar. University of Chicago Press, 1990.
|
| 239 |
+
Luyu Gao, Aman Madaan, Shuyan Zhou, Uri Alon, Pengfei Liu, Yiming Yang, Jamie Callan, and Graham Neubig. Pal: Program-aided language models. In International Conference on Machine Learning, pp. 10764–10799. PMLR, 2023.
|
| 240 |
+
Zhibin Gou, Zhihong Shao, Yeyun Gong, Yujiu Yang, Minlie Huang, Nan Duan, Weizhu Chen, et al. Tora: A tool-integrated reasoning agent for mathematical problem solving. arXiv preprint arXiv:2309.17452, 2023.
|
| 241 |
+
Vivek Gupta, Maitrey Mehta, Pegah Nokhiz, and Vivek Srikumar. INFOTABS: inference on tables as semi-structured data. CoRR, abs/2005.06117, 2020.
|
| 242 |
+
Simeng Han, Hailey Schoelkopf, Yilun Zhao, Zhenting Qi, Martin Riddell, Luke Benson, Lucy Sun, Ekaterina Zubova, Yujie Qiao, Matthew Burtell, et al. Folio: Natural language reasoning with first-order logic. arXiv preprint arXiv:2209.00840, 2022.
|
| 243 |
+
Peter Hase and Mohit Bansal. When can models learn from explanations? a formal framework for understanding the roles of explanation data. arXiv preprint arXiv:2102.02201, 2021.
|
| 244 |
+
Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. Measuring mathematical problem solving with the math dataset. arXiv preprint arXiv:2103.03874, 2021.
|
| 245 |
+
Albert Qiaochu Jiang, Sean Welleck, Jin Peng Zhou, Wenda Li, Jiacheng Liu, Mateja Jamnik, Timothee Lacroix, Yuhuai Wu, and Guillaume Lample. Draft, sketch, and prove: Guiding formal ´ theorem provers with informal proofs. ArXiv, abs/2210.12283, 2022.
|
| 246 |
+
Daniel Kahneman. Thinking, fast and slow. macmillan, 2011.
|
| 247 |
+
Tushar Khot, Harsh Trivedi, Matthew Finlayson, Yao Fu, Kyle Richardson, Peter Clark, and Ashish Sabharwal. Decomposed prompting: A modular approach for solving complex tasks. arXiv preprint arXiv:2210.02406, 2022.
|
| 248 |
+
Dibyakanti Kumar, Vivek Gupta, Soumya Sharma, and Shuo Zhang. Realistic data augmentation framework for enhancing tabular reasoning. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, Online and Abu Dhabi, December 2022. Association for Computational Linguistics.
|
| 249 |
+
Souvik Kundu, Tushar Khot, Ashish Sabharwal, and Peter Clark. Exploiting explicit paths for multi-hop reading comprehension. arXiv preprint arXiv:1811.01127, 2018.
|
| 250 |
+
Yifei Li, Zeqi Lin, Shizhuo Zhang, Qiang Fu, Bei Chen, Jian-Guang Lou, and Weizhu Chen. Making language models better reasoners with step-aware verifier. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 5315–5333, 2023.
|
| 251 |
+
Hunter Lightman, Vineet Kosaraju, Yura Burda, Harri Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. Let’s verify step by step. arXiv preprint arXiv:2305.20050, 2023.
|
| 252 |
+
Bill Yuchen Lin, Xinyue Chen, Jamin Chen, and Xiang Ren. Kagnet: Knowledge-aware graph networks for commonsense reasoning. arXiv preprint arXiv:1909.02151, 2019.
|
| 253 |
+
Jian Liu, Leyang Cui, Hanmeng Liu, Dandan Huang, Yile Wang, and Yue Zhang. Logiqa: A challenge dataset for machine reading comprehension with logical reasoning. arXiv preprint arXiv:2007.08124, 2020.
|
| 254 |
+
Jieyi Long. Large language model guided tree-of-thought. arXiv preprint arXiv:2305.08291, 2023.
|
| 255 |
+
Leopold Lowenheim. On possibilities in the calculus of relatives. ¨ Jean van Heijenoort, pp. 1878–1931, 1967.
|
| 256 |
+
|
| 257 |
+
Scott Lundberg, Marco Tulio Correia Ribeiro, David Viggiano, Joao Rafael, Riya Amemiya, and et. al. Microsoft guidance library. https://github.com/microsoft/guidance, 2023.
|
| 258 |
+
|
| 259 |
+
Qing Lyu, Shreya Havaldar, Adam Stein, Li Zhang, Delip Rao, Eric Wong, Marianna Apidianaki, and Chris Callison-Burch. Faithful chain-of-thought reasoning. arXiv preprint arXiv:2301.13379, 2023.
|
| 260 |
+
Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, et al. Self-refine: Iterative refinement with self-feedback. arXiv preprint arXiv:2303.17651, 2023.
|
| 261 |
+
Todor Mihaylov and Anette Frank. Knowledgeable reader: Enhancing cloze-style reading comprehension with external commonsense knowledge. arXiv preprint arXiv:1805.07858, 2018.
|
| 262 |
+
Koji Mineshima, Pascual Mart´ınez-Gomez, Yusuke Miyao, and Daisuke Bekki. Higher-order logical ´ inference with compositional semantics. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pp. 2055–2061, 2015.
|
| 263 |
+
Terufumi Morishita, Gaku Morio, Atsuki Yamaguchi, and Yasuhiro Sogawa. Learning deductive reasoning from synthetic corpus based on formal logic. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett (eds.), Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 25254–25274. PMLR, 23–29 Jul 2023.
|
| 264 |
+
OpenAI. Gpt-4 technical report. ArXiv, abs/2303.08774, 2023.
|
| 265 |
+
Alec Radford, Karthik Narasimhan, Tim Salimans, Ilya Sutskever, et al. Improving language understanding by generative pre-training. openai.com, 2018.
|
| 266 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019.
|
| 267 |
+
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. The Journal of Machine Learning Research, 21(1):5485–5551, 2020.
|
| 268 |
+
Noah Shinn, Federico Cassano, Beck Labash, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. Reflexion: Language agents with verbal reinforcement learning. arXiv preprint arXiv:2303.11366, 2023.
|
| 269 |
+
Aarohi Srivastava, Abhinav Rastogi, Abhishek Rao, Abu Awal Md Shoeb, Abubakar Abid, Adam Fisch, Adam R Brown, Adam Santoro, Aditya Gupta, Adria Garriga-Alonso, et al. Beyond the \` imitation game: Quantifying and extrapolating the capabilities of language models. arXiv preprint arXiv:2206.04615, 2022.
|
| 270 |
+
Hongda Sun, Weikai Xu, Wei Liu, Jian Luan, Bin Wang, Shuo Shang, Ji-Rong Wen, and Rui Yan. From indeterminacy to determinacy: Augmenting logical reasoning capabilities with large language models. arXiv preprint arXiv:2310.18659, 2023.
|
| 271 |
+
Oyvind Tafjord, Bhavana Dalvi Mishra, and Peter Clark. Proofwriter: Generating implications, proofs, and abductive statements over natural language. arXiv preprint arXiv:2012.13048, 2020.
|
| 272 |
+
Alan Mathison Turing et al. On computable numbers, with an application to the entscheidungsproblem. J. of Math, 58(345-363):5, 1936.
|
| 273 |
+
Jonathan Uesato, Nate Kushman, Ramana Kumar, Francis Song, Noah Siegel, Lisa Wang, Antonia Creswell, Geoffrey Irving, and Irina Higgins. Solving math word problems with process-and outcome-based feedback. arXiv preprint arXiv:2211.14275, 2022.
|
| 274 |
+
Xiaoyan Wang, Pavan Kapanipathi, Ryan Musa, Mo Yu, Kartik Talamadupula, Ibrahim Abdelaziz, Maria Chang, Achille Fokoue, Bassem Makni, Nicholas Mattei, et al. Improving natural language inference using external knowledge in the science questions domain. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pp. 7208–7215, 2019.
|
| 275 |
+
Xiting Wang, Kunpeng Liu, Dongjie Wang, Le Wu, Yanjie Fu, and Xing Xie. Multi-level recommendation reasoning over knowledge graphs with reinforcement learning. In Proceedings of the ACM Web Conference 2022, pp. 2098–2108, 2022a.
|
| 276 |
+
Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc Le, Ed Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. Self-consistency improves chain of thought reasoning in language models. arXiv preprint arXiv:2203.11171, 2022b.
|
| 277 |
+
Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. Chain-of-thought prompting elicits reasoning in large language models. Advances in Neural Information Processing Systems, 35:24824–24837, 2022.
|
| 278 |
+
Tongshuang Wu, Michael Terry, and Carrie Jun Cai. Ai chains: Transparent and controllable human-ai interaction by chaining large language model prompts. In Proceedings of the 2022 CHI conference on human factors in computing systems, pp. 1–22, 2022.
|
| 279 |
+
Jingfeng Yang, Haoming Jiang, Qingyu Yin, Danqing Zhang, Bing Yin, and Diyi Yang. Seqzero: Few-shot compositional semantic parsing with sequential prompts and zero-shot models. arXiv preprint arXiv:2205.07381, 2022.
|
| 280 |
+
Kaiyu Yang, Aidan M Swope, Alex Gu, Rahul Chalamala, Peiyang Song, Shixing Yu, Saad Godil, Ryan Prenger, and Anima Anandkumar. Leandojo: Theorem proving with retrieval-augmented language models. arXiv preprint arXiv:2306.15626, 2023.
|
| 281 |
+
Huihan Yao, Ying Chen, Qinyuan Ye, Xisen Jin, and Xiang Ren. Refining language models with compositional explanations. Advances in Neural Information Processing Systems, 34:8954–8967, 2021.
|
| 282 |
+
Shunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran, Thomas L Griffiths, Yuan Cao, and Karthik Narasimhan. Tree of thoughts: Deliberate problem solving with large language models. arXiv preprint arXiv:2305.10601, 2023.
|
| 283 |
+
Omar Zaidan, Jason Eisner, and Christine Piatko. Using “annotator rationales” to improve machine learning for text categorization. In Human language technologies 2007: The conference of the North American chapter of the association for computational linguistics; proceedings of the main conference, pp. 260–267, 2007.
|
| 284 |
+
Chuanyang Zheng, Zhengying Liu, Enze Xie, Zhenguo Li, and Yu Li. Progressive-hint prompting improves reasoning in large language models. arXiv preprint arXiv:2304.09797, 2023.
|
| 285 |
+
Denny Zhou, Nathanael Scharli, Le Hou, Jason Wei, Nathan Scales, Xuezhi Wang, Dale Schuurmans, ¨ Olivier Bousquet, Quoc Le, and Ed Chi. Least-to-most prompting enables complex reasoning in large language models. arXiv preprint arXiv:2205.10625, 2022.
|
| 286 |
+
|
| 287 |
+
A APPENDIX FOR EXAMPLES
|
| 288 |
+
|
| 289 |
+
A.1 ILLUSTRATIVE EXAMPLE ON EXPERIMENT DATASETS
|
| 290 |
+
|
| 291 |
+
# [Problem Description]
|
| 292 |
+
|
| 293 |
+
• Example ID: 687 • Premises:
|
| 294 |
+
1. It is not true that some giant language models do not have good performance.
|
| 295 |
+
2. All language models with good performance are used by some researchers.
|
| 296 |
+
3. If a language model is used by some researchers, it is popular.
|
| 297 |
+
4. If BERT is a giant language model, then GPT-3 is also a giant language model.
|
| 298 |
+
5. BERT is a giant language model.
|
| 299 |
+
|
| 300 |
+
• Hypothesis: GPT-3 is popular. • Label: [True]
|
| 301 |
+
|
| 302 |
+
# [Chain-of-Thought Reasoning by GPT-4]
|
| 303 |
+
|
| 304 |
+
• Reasoning: “From the premises, we have:
|
| 305 |
+
|
| 306 |
+
$$
|
| 307 |
+
\begin{array} { r l } & { 1 . \neg ( \exists x ) ( \mathrm { G i a n t } ( x ) \land \neg \mathrm { G o o d P e r f o r m a n c e } ( x ) ) } \\ & { 2 . \forall x ( \mathrm { G o o d P e r f o r m a n c e } ( x ) \mathrm { U s e d B y R e s e a r c h e r s } ( x ) ) } \\ & { 3 . \forall x ( \mathrm { U s e d B y R e s e a r c h e r s } ( x ) \mathrm { P o p u l a r } ( x ) ) } \\ & { 4 . \mathrm { B E R T } \mathrm { G P T } \ – 3 } \\ & { 5 . \mathrm { B E R T } } \end{array}
|
| 308 |
+
$$
|
| 309 |
+
|
| 310 |
+
Now we know that BERT is a giant language model, so GPT-3 is also a giant language model (from premises 4 and 5). However, the premises do not provide information about GPT-3’s performance or if it is used by researchers. Therefore, we cannot conclude if GPT-3 is popular.”
|
| 311 |
+
|
| 312 |
+
• Prediction: [Unknown] (Wrong)
|
| 313 |
+
|
| 314 |
+
# [Cumulative-Reasoning by GPT-4]
|
| 315 |
+
|
| 316 |
+
# • Generated Propositions:
|
| 317 |
+
|
| 318 |
+
1. “GPT-3 is a giant language model with good performance.” 2. “GPT-3 is used by some researchers.” • Reasoning: “We know that GPT-3 is a giant language model with good performance, and it is used by some researchers. According to the premises, if a language model is used by some researchers, it is popular. Therefore, GPT-3 is popular.” • Prediction: [True] (Correct)
|
| 319 |
+
|
| 320 |
+
Figure 3: An example from the FOLIO dataset, with solutions generated by CoT and CR. CoT will generate the answer directly through a chain of thought. By contrast, CR will first generate a few propositions, and conclude with the help of the generated propositions.
|
| 321 |
+
|
| 322 |
+
[Problem Description]
|
| 323 |
+
• Example ID: 679
|
| 324 |
+
• Premises: 1. Zaha Hadid is a British-Iraqi architect, artist and designer. 2. Zaha Hadid was born on 31 October 1950 in Baghdad, Iraq. 3. Hadid was a visiting professor of Architectural Design at the Yale School of Architecture. 4. Max is an aspiring architecture student, and he plans to apply to Yale School of Architecture. • Hypothesis: Hadid was born in 1982.
|
| 325 |
+
• FOL Label: [Unknown]
|
| 326 |
+
• Human Label: [False] • Explanation: We can see that Zaha Hadid was born on 31 October 1950 in Baghdad, Iraq. This directly contradicts the hypothesis that Hadid was born in 1982. It is common knowledge that people are born only once, and someone can’t be born in two different years.
|
| 327 |
+
|
| 328 |
+
Figure 4: Example 679 from the FOLIO wiki dataset, the origin label provided by the FOL system is not correct, so we choose to curate this dataset, removing these examples with wrong labels. For more examples, please refer to Appendix E.2.
|
| 329 |
+
|
| 330 |
+
# [Problem Description]
|
| 331 |
+
|
| 332 |
+
• Example ID: test/intermediate algebra/1350.json • Level: 5 • Subject: Intermediate Algebra • Problem: Consider the polynomial
|
| 333 |
+
|
| 334 |
+
$$
|
| 335 |
+
f ( x ) = a _ { n } x ^ { n } + a _ { n - 1 } x ^ { n - 1 } + \cdot \cdot \cdot + a _ { 2 } x ^ { 2 } + a _ { 1 } x + a _ { 0 } ,
|
| 336 |
+
$$
|
| 337 |
+
|
| 338 |
+
where the polynomial has integer coefficients and its roots are distinct integers.
|
| 339 |
+
Given $a _ { n } = 2$ and $a _ { 0 } = 6 6$ , the inquiry is to determine the least possible value of $\left| a _ { n - 1 } \right|$ .
|
| 340 |
+
|
| 341 |
+
# [Ground Truth Solution]
|
| 342 |
+
|
| 343 |
+
• Solution: Since $f ( x )$ has integer coefficients, the Integer Root Theorem asserts that any integer roots of $f ( x )$ must divide the constant term $6 6 = 2 \cdot 3 \cdot 1 1$ . Consequently, the potential integer roots of $f ( x )$ are
|
| 344 |
+
|
| 345 |
+
$$
|
| 346 |
+
\pm 1 , \ \pm 2 , \ \pm 3 , \ \pm 6 , \ \pm 1 1 , \ \pm 2 2 , \ \pm 3 3 , \ \pm 6 6 .
|
| 347 |
+
$$
|
| 348 |
+
|
| 349 |
+
Additionally, given that all roots of $f ( x )$ are integers, they are necessarily members of the aforementioned list.
|
| 350 |
+
|
| 351 |
+
We proceed to utilize Vieta’s formulas. The roots of $f ( x )$ yield a product of $( - 1 ) ^ { n } \cdot \frac { a _ { 0 } } { a _ { n } }$ , which evaluates to either 33 or $^ { - 3 3 }$ . Simultaneously, the sum of these roots is $\begin{array} { r } { - \frac { a _ { n - 1 } } { a _ { n } } = - \frac { \dot { a _ { n - 1 } } } { 2 } } \end{array}$ To minimize $\left| a _ { n - 1 } \right|$ , we aim to reduce the absolute value of the root sum, ensuring that the product of the roots remains 33 or $^ { - 3 3 }$ .
|
| 352 |
+
|
| 353 |
+
Considering two distinct scenarios:
|
| 354 |
+
|
| 355 |
+
Case 1: One of the roots is 33 or $^ { - 3 3 }$ . In this scenario, the only other viable roots are $\pm 1$ . Here, the root sum’s absolute value is at least 32.
|
| 356 |
+
|
| 357 |
+
Case 2: One root is 11 or $^ { - 1 1 }$ , and another is 3 or $^ { - 3 }$ . The only other plausible roots remain $\pm 1$ , leading to a root sum’s absolute value of at least $1 1 - 3 - 1 = 7$ . This is a more optimal outcome than Case 1. For an absolute root sum of 7, we find $| a _ { n - 1 } | = 7 | a _ { n } | = 1 4$ .
|
| 358 |
+
|
| 359 |
+
From our analysis, we deduce that $| a _ { n - 1 } | \geq 1 4$ . Verifying this, we observe that equality is attained by
|
| 360 |
+
|
| 361 |
+
$$
|
| 362 |
+
\begin{array} { r } { f ( x ) = 2 ( x + 1 1 ) ( x - 3 ) ( x - 1 ) } \\ { = 2 x ^ { 3 } + 1 4 x ^ { 2 } - 8 2 x + 6 6 , } \end{array}
|
| 363 |
+
$$
|
| 364 |
+
|
| 365 |
+
which is consistent with having integer coefficients and integer roots. Thus, the minimal achievable value for $\left| a _ { n - 1 } \right|$ is 14 .
|
| 366 |
+
|
| 367 |
+
• Answer: 14
|
| 368 |
+
|
| 369 |
+
# [Chain-of-Thought Reasoning by GPT-4]
|
| 370 |
+
|
| 371 |
+
• Reasoning: “Let’s think step by step:
|
| 372 |
+
|
| 373 |
+
1. The roots of the polynomial are distinct integers, and the leading coefficient is 2, so the roots
|
| 374 |
+
must be divisors of $\frac { \check { 6 } 6 } { 2 } = 3 3$ .
|
| 375 |
+
2. The divisors of 33 are $\pm 1 , \pm 3 , \pm 1 1 , \pm 3 3$ .
|
| 376 |
+
3. The sum of the roots of the polynomial is $- \frac { a _ { n - 1 } } { a _ { n } }$
|
| 377 |
+
4. To minimize $\left| a _ { n - 1 } \right|$ , we should select the roots to be as close to zero as possible.
|
| 378 |
+
5. The smallest possible sum of the roots is $- 1 - 3 + 1 1 + 3 3 = 4 0$ ,
|
| 379 |
+
6. Thus, the smallest possible value of $\left| a _ { n - 1 } \right|$ is $2 \times 4 0 = \boxed { 8 0 } .$ ”
|
| 380 |
+
|
| 381 |
+
• Answer: 80 (Wrong)
|
| 382 |
+
|
| 383 |
+
# [Cumulative-Reasoning by GPT-4]
|
| 384 |
+
|
| 385 |
+
# • Generated Hints:
|
| 386 |
+
|
| 387 |
+
1. “Hint 1: Recall Vieta’s formulas, which relate the coefficients of a polynomial to the sums
|
| 388 |
+
and products of its roots.”
|
| 389 |
+
2. “Hint 2: The product of the roots of the polynomial is equal to $- \frac { a _ { 0 } } { a _ { n } }$ .”
|
| 390 |
+
3. “Hint 3: The sum of the roots of the polynomial is equal to $- \frac { a _ { n - 1 } } { a _ { n } }$ ;
|
| 391 |
+
4. “Hint 4: Since the roots are distinct integers, consider the factors of $- \frac { a _ { 0 } } { a _ { n } }$ and their sums.”
|
| 392 |
+
|
| 393 |
+
# • Generated Simple Questions and Answers:
|
| 394 |
+
|
| 395 |
+
Question 1: “What is the product of the roots of the polynomial $f ( x )$ ?” Answer 1: “The product of the roots of the polynomial is $\textstyle - { \frac { a _ { 0 } } { a _ { n } } } = - { \frac { 6 6 } { 2 } } = - 3 3$ .”
|
| 396 |
+
|
| 397 |
+
uestion 2: “What are the possible sets of distinct integer roots of the polynomial?”
|
| 398 |
+
|
| 399 |
+
Answer 2: “The possible sets of distinct integer roots are $\{ - 3 3 , 1 \}$ , $\{ - 1 1 , 3 \}$ , and $\{ - 3 , 1 1 , - 1 \}$ .”
|
| 400 |
+
|
| 401 |
+
Question 3: “What are the sums of the roots for each possible set of roots?”
|
| 402 |
+
|
| 403 |
+
Answer 3: “The sums of the roots are $- 3 2 , - 8$ , and 7 for the sets $\{ - 3 3 , 1 \} , \ \{ - 1 1 , 3 \}$ , and $\{ - 3 , 1 1 , - 1 \}$ , respectively.”
|
| 404 |
+
|
| 405 |
+
Question 4: “What is the least possible value of $\left| a _ { n - 1 } \right|$ ?”
|
| 406 |
+
|
| 407 |
+
Answer 4: “The least possible value of $\left| a _ { n - 1 } \right|$ is $2 \times 7 = 1 4$ .”
|
| 408 |
+
|
| 409 |
+
• Solution: “Let’s think step by step. Given that $a _ { n } \ = \ 2$ and $a _ { 0 } ~ = ~ 6 6$ , and the roots of the polynomial are distinct integers, the least possible value of $\left| a _ { n - 1 } \right|$ is $\boxed { 1 4 } .$ , • Answer: 14 (Correct)
|
| 410 |
+
|
| 411 |
+
Figure 6: Solutions for the example presented in Figure 5 from the MATH dataset, generated by CoT and CR. CoT will generate the answer directly through a chain of thought. By contrast, CR will first generate a few hints, then several simple and foundational questions, and then answer them by self, and finally conclude with the help of the generated hints and question-answer pairs.
|
| 412 |
+
|
| 413 |
+

|
| 414 |
+
Figure 7: Meta Prompt for CR with code environment on solving MATH problems.
|
| 415 |
+
|
| 416 |
+

|
| 417 |
+
Figure 8: System Instructions used in CR with code environment for solving MATH problems, the actual context would be [SystemInstruction] $^ +$ [MetaPrompt].
|
| 418 |
+
|
| 419 |
+
# B MORE EXPERIMENTS ON LOGICAL INFERENCE TASKS
|
| 420 |
+
|
| 421 |
+
B.1 MORE EXPERIMENTAL RESULTS
|
| 422 |
+
|
| 423 |
+
Table 9: Comparison results on LogiQA
|
| 424 |
+
|
| 425 |
+
<table><tr><td>Method</td><td>Acc. ↑</td><td># Visited States ↓</td></tr><tr><td>Direct</td><td>31.69%</td><td>1</td></tr><tr><td>CoT</td><td>38.55%</td><td>1</td></tr><tr><td>CoT-SC ToT</td><td>40.43%</td><td>16 19.87</td></tr><tr><td>CR</td><td>43.02% 45.25%</td><td>17</td></tr></table>
|
| 426 |
+
|
| 427 |
+
Table 11: Comparison results on FOLIO-val
|
| 428 |
+
|
| 429 |
+
<table><tr><td>Method</td><td>Acc. ↑</td><td># Visited States ↓</td></tr><tr><td>Standard</td><td>60.29%</td><td>1</td></tr><tr><td>CoT</td><td>67.65%</td><td>1</td></tr><tr><td>CoT-SC</td><td>68.14%</td><td>16</td></tr><tr><td>ToT</td><td>69.12%</td><td>19.12</td></tr><tr><td>CR</td><td>69.11%</td><td>15.87</td></tr></table>
|
| 430 |
+
|
| 431 |
+
Table 10: Comparison results on ProofWriter
|
| 432 |
+
|
| 433 |
+
<table><tr><td>Method</td><td>Acc. ↑</td><td># Visited States ↓</td></tr><tr><td>Standard</td><td>46.83%</td><td>1</td></tr><tr><td>CoT</td><td>67.41%</td><td>1</td></tr><tr><td>CoT-SC</td><td>69.33%</td><td>16</td></tr><tr><td>ToT</td><td>70.33%</td><td>24.57</td></tr><tr><td>CR</td><td>71.67%</td><td>16.76</td></tr></table>
|
| 434 |
+
|
| 435 |
+
Table 12: Comparison results on LD
|
| 436 |
+
|
| 437 |
+
<table><tr><td>Method</td><td>Acc. ↑</td><td># Visited States ↓</td></tr><tr><td>Standard</td><td>71.33%</td><td>1</td></tr><tr><td>CoT</td><td>73.33%</td><td>1</td></tr><tr><td>CoT-SC</td><td>74.67%</td><td>16</td></tr><tr><td>ToT</td><td>76.83%</td><td>21.83</td></tr><tr><td>CR</td><td>78.33%</td><td>16.98</td></tr></table>
|
| 438 |
+
|
| 439 |
+
For a fair comparison of different methods on the LogiQA, ProofWriter, FOLIO (validation set), and LD datasets, we report the third-party reproduced results by Sun et al. (2023), For implementation details on these experiments, please refer to their work.
|
| 440 |
+
|
| 441 |
+
# B.2 ABLATION STUDIES
|
| 442 |
+
|
| 443 |
+
Table 13: Ablation studies on FOLIO wiki dataset using GPT-3.5-turbo model.
|
| 444 |
+
|
| 445 |
+
<table><tr><td>Model</td><td>Method</td><td>Acc.↑(%)</td></tr><tr><td></td><td>[Random]</td><td>33.33</td></tr><tr><td>GPT-3.5-turbo</td><td>Direct CoT CoT-SC (k = 16) CR (ours,n = 2)</td><td>62.92 64.61 (+1.69) 63.33 (+0.41) 73.03 (+10.11)</td></tr></table>
|
| 446 |
+
|
| 447 |
+
# C DETAILED COMPARISON OF COT, TOT AND CR
|
| 448 |
+
|
| 449 |
+
To compare these methods, we consider a simple 2-stage reasoning process, which can be extended to multiple stages as well. For simplicity, whenever the model has a step-verifier, we assume that the verifier has $100 \%$ accuracy. Moreover, we assume that there exists exactly one correct reasoning path for the problem. We have the following definitions.
|
| 450 |
+
|
| 451 |
+
Definition C.1 (Arrival Probability). For a given algorithm, we may compute its arrival probability as the probability of reaching the correct conclusion from the initial state, with one-experience successful invocation. Specifically, denote the arrival probability of CoT as $P _ { \mathrm { C o T } }$ , the arrival probability of running CoT multiple times as $P _ { \mathrm { C o T - S C } }$ , the arrival probability of ToT as $P _ { \mathrm { T o T } } = p _ { 1 _ { \mathrm { T o T } } } p _ { 2 _ { \mathrm { T o T } } }$ , the arrival probability of CR as $P _ { \mathrm { C R } } = p _ { 1 _ { \mathrm { C R } } } p _ { 2 _ { \mathrm { C R } } }$ . Here, $p _ { 1 _ { \mathrm { T o T } } }$ and $p _ { 1 _ { \mathrm { C R } } }$ are the probablity of getting the first reasoning step correctly, while $p _ { \mathrm { { 2 T o T } } }$ and $p _ { 2 _ { \mathrm { C R } } }$ are for the second step conditioned on the first step being correct.
|
| 452 |
+
|
| 453 |
+
Since both ToT and CR have verifiers, they can exclude the wrong reasoning path immediately, see Figure 9. Therefore, we immediately have $P _ { \mathrm { C o T } } \leq p _ { 1 _ { \mathrm { T o T } } } p _ { 2 _ { \mathrm { T o T } } }$ , as CoT explores more useless branches.
|
| 454 |
+
|
| 455 |
+

|
| 456 |
+
Figure 9: Comparison between CoT-SC, ToT, and CR.
|
| 457 |
+
|
| 458 |
+
Notice that using $p _ { 1 _ { \mathrm { C R } } }$ or $p _ { 2 _ { \mathrm { C R } } }$ to denote the arrival probabilities of CR is not accurate, as CR will maintain a history of visited states. Therefore we use $p _ { 1 _ { \mathrm { C R } } | ( \cdot ) }$ and $p _ { 2 _ { \mathrm { C R } } | ( \cdot ) }$ to denote the probability conditioned with additional visited states. We have the following assumption.
|
| 459 |
+
|
| 460 |
+
Assumption C.2. $p _ { 1 _ { \mathrm { T o T } } } \leq p _ { 1 _ { \mathrm { C R } } }$ , $p _ { 2 _ { \mathrm { T o T } } } \leq p _ { 2 _ { \mathrm { C R } } }$ , In addition, $p _ { 1 _ { \mathrm { C R } } | ( \cdot ) }$ and $p _ { 2 _ { \mathrm { C R } } | ( \cdot ) }$ will monotonically increase as more nodes have been entered:
|
| 461 |
+
|
| 462 |
+
$$
|
| 463 |
+
p _ { 1 _ { \mathtt { T e T } } } \le p _ { 1 _ { \mathrm { C R } } | ( \mathtt { p r e m i s e s } ) } \le p _ { 2 _ { \mathrm { C R } } | ( \mathtt { p r e m i s e s } , \mathtt { s t a g e - 1 } \ n o d e _ { 1 } ) } \le p _ { 2 _ { \mathrm { C R } } | ( \mathtt { p r e m i s e s } , \mathtt { s t a g e - 1 } \ n o d e _ { 1 } , \mathtt { n o d e } _ { 2 } , \cdots , \mathtt { n o d e } _ { n } ) } ,
|
| 464 |
+
$$
|
| 465 |
+
|
| 466 |
+
$$
|
| 467 |
+
\begin{array} { r l } & { p _ { 2 _ { \mathrm { T o T } } } \leq p _ { 2 _ { \mathrm { C R } } | ( \mathrm { p r e m i s e s } , \mathrm { s t a g e - 1 ~ n o d e s } ) } \leq p _ { 2 _ { \mathrm { C R } } | ( \mathrm { p r e m i s e s } , \mathrm { s t a g e - 1 ~ n o d e s } , \mathrm { s t a g e - 2 ~ n o d e } _ { 1 } ) } } \\ & { \qquad \leq p _ { 2 _ { \mathrm { C R } } | ( \mathrm { p r e m i s e s } , \mathrm { s t a g e - 1 ~ n o d e s } , \mathrm { s t a g e - 2 ~ n o d e } _ { 1 } , \mathrm { n o d e } _ { 2 } , \cdots , \mathrm { n o d e } _ { n } ) } , } \end{array}
|
| 468 |
+
$$
|
| 469 |
+
|
| 470 |
+
This assumption is natural and has been empirically validated in various tasks (Madaan et al., 2023; Shinn et al., 2023) since CR will not enter the failed nodes multiple times, since the verifier has
|
| 471 |
+
|
| 472 |
+
wiped out the possibilities of these nodes and their successors. The following lemma is handy for later comparison.
|
| 473 |
+
|
| 474 |
+
Lemma C.3. For any positive integer $n$ , for any probabilities $p _ { 1 } ~ \in ~ [ 0 , 1 ]$ and $p _ { 2 } ~ \in ~ [ 0 , 1 ]$ , the following inequality holds:
|
| 475 |
+
|
| 476 |
+
$$
|
| 477 |
+
1 - ( 1 - p _ { 1 } \cdot p _ { 2 } ) ^ { n } \leq ( 1 - ( 1 - p _ { 1 } ) ^ { n } ) \cdot ( 1 - ( 1 - p _ { 2 } ) ^ { n } ) .
|
| 478 |
+
$$
|
| 479 |
+
|
| 480 |
+
Proof.
|
| 481 |
+
|
| 482 |
+
$$
|
| 483 |
+
\begin{array} { c } { 1 - ( 1 - p _ { 1 } \cdot p _ { 2 } ) ^ { n } \leq ( 1 - ( 1 - p _ { 1 } ) ^ { n } ) \cdot ( 1 - ( 1 - p _ { 2 } ) ^ { n } ) } \\ { \Leftrightarrow 1 - ( 1 - p _ { 1 } \cdot p _ { 2 } ) ^ { n } \leq 1 - ( 1 - p _ { 1 } ) ^ { n } - ( 1 - p _ { 2 } ) ^ { n } + ( 1 - p _ { 1 } ) ^ { n } \cdot ( 1 - p _ { 2 } ) ^ { n } } \\ { \Leftrightarrow ( 1 - p _ { 1 } ) ^ { n } + ( 1 - p _ { 2 } ) ^ { n } \leq ( 1 - p _ { 1 } \cdot p _ { 2 } ) ^ { n } + ( 1 - p _ { 1 } ) ^ { n } \cdot ( 1 - p _ { 2 } ) ^ { n } } \\ { \Leftrightarrow ( 1 - p _ { 1 } ) ^ { n } + ( 1 - p _ { 2 } ) ^ { n } \leq ( 1 - p _ { 1 } \cdot p _ { 2 } ) ^ { n } + ( 1 - p _ { 1 } - p _ { 2 } + p _ { 1 } \cdot p _ { 2 } ) ^ { n } } \end{array}
|
| 484 |
+
$$
|
| 485 |
+
|
| 486 |
+
Notice that
|
| 487 |
+
|
| 488 |
+
$$
|
| 489 |
+
( 1 - p _ { 1 } \cdot p _ { 2 } ) + ( 1 - p _ { 1 } - p _ { 2 } + p _ { 1 } \cdot p _ { 2 } ) \equiv ( 1 - p _ { 2 } ) + ( 1 - p _ { 2 } ) \equiv 2 - p _ { 1 } - p _ { 2 } ,
|
| 490 |
+
$$
|
| 491 |
+
|
| 492 |
+
WLOG, let $p _ { 1 } \geq p _ { 2 }$ , then
|
| 493 |
+
|
| 494 |
+
$$
|
| 495 |
+
\begin{array} { r } { ( 1 - p _ { 1 } - p _ { 2 } + p _ { 1 } \cdot p _ { 2 } ) \leq ( 1 - p _ { 1 } ) \leq ( 1 - p _ { 2 } ) \leq ( 1 - p _ { 1 } \cdot p _ { 2 } ) . } \end{array}
|
| 496 |
+
$$
|
| 497 |
+
|
| 498 |
+
From thinterval and the $x ^ { n } + ( 2 - p _ { 1 } - p _ { 2 } - x ) ^ { n }$ $\textstyle ( - \infty , { \frac { 2 - p _ { 1 } - p _ { 2 } } { 2 } } ]$ $[ \frac { 2 - p _ { 1 } - p _ { 2 } } { 2 } , + \infty )$ $\{ ( 1 - p _ { 1 } - p _ { 2 } + p _ { 1 } \cdot p _ { 2 } ) , ( 1 - p _ { 1 } \cdot p _ { 2 } ) \}$ $\{ ( 1 - p _ { 1 } ) , ( 1 - p _ { 2 } ) \}$ $\begin{array} { r } { y = \frac { 2 - p _ { 1 } - p _ { 2 } } { 2 } } \end{array}$
|
| 499 |
+
|
| 500 |
+
Theorem C.4 $( P _ { \mathrm { C o T - S C } } \leq P _ { \mathrm { T o T } } \leq P _ { \mathrm { C R } } )$ . Assume CoT-SC has n different trials, while ToT and CR search with breadth at most $n$ . Under Assumptions C.2, the following inequality holds:
|
| 501 |
+
|
| 502 |
+
$$
|
| 503 |
+
P _ { C o T - S C } \leq P _ { T o T } \leq P _ { C R } .
|
| 504 |
+
$$
|
| 505 |
+
|
| 506 |
+
Proof.
|
| 507 |
+
|
| 508 |
+
$$
|
| 509 |
+
\begin{array} { r l } & { P _ { \mathrm { C o T - S C } } \leq 1 - ( 1 - p _ { \mathrm { C o T } } ) ^ { n } \leq 1 - ( 1 - p _ { 1 } \cdot p _ { 2 } ) ^ { n } , } \\ & { \qquad P _ { \mathrm { T o T } } = ( 1 - ( 1 - p _ { 1 } ) ^ { n } ) \cdot ( 1 - ( 1 - p _ { 2 } ) ^ { n } ) , } \end{array}
|
| 510 |
+
$$
|
| 511 |
+
|
| 512 |
+
Combined with Lemma C.3, now we have
|
| 513 |
+
|
| 514 |
+
$$
|
| 515 |
+
P _ { \mathrm { C o T - S C } } \leq P _ { \mathrm { T o T } } .
|
| 516 |
+
$$
|
| 517 |
+
|
| 518 |
+
From Assumption C.2, we have
|
| 519 |
+
|
| 520 |
+
$$
|
| 521 |
+
P _ { \mathrm { T o T } } \leq ( 1 - ( 1 - p _ { 1 _ { \mathrm { C R } } | \mathrm { ( p r e m i s e s ) } } ) ^ { n } ) \cdot ( 1 - ( 1 - p _ { 2 _ { \mathrm { C R } | \mathrm { ( p e m i s e s , s t a g e - 1 } n o d s ) } } ) ^ { n } ) \leq P _ { \mathrm { C R } } .
|
| 522 |
+
$$
|
| 523 |
+
|
| 524 |
+
Finally, we conclude that
|
| 525 |
+
|
| 526 |
+
$$
|
| 527 |
+
P _ { \mathrm { C o T - S C } } \leq P _ { \mathrm { T o T } } \leq P _ { \mathrm { C R } } .
|
| 528 |
+
$$
|
| 529 |
+
|
| 530 |
+
# D MORE ON LOGIC
|
| 531 |
+
|
| 532 |
+
Limitations of First-Order Logic Systems. It is not surprising that the labels verified by FOL are still not satisfying. There are several limitations inside the FOL systems:
|
| 533 |
+
|
| 534 |
+
1. Limitations of Expressiveness (Lowenheim ¨ , 1967): FOL even lacks the expressive power to capture some properties of the real numbers. For example, properties involving uncountably many real numbers often cannot be expressed in FOL. In addition, properties requiring quantification over sets of real numbers or functions from real numbers to real numbers cannot be naturally represented in FOL.
|
| 535 |
+
|
| 536 |
+
2. Translation Misalignment: Risk of semantic discrepancies during translation, rendering resolutions ineffective. For instance, translating statements as $\forall \mathbf { B i r d } ( x ) \ \Rightarrow \ \mathbf { C a n F l y } ( x )$ and $\forall x ( \mathrm { F l y } ( x ) \ \Rightarrow$ Wings $( x )$ ) may cause a misalignment between “CanFly” and “Fly”, leading to flawed conclusions. It often fails to capture the full richness and ambiguity of natural language and lacks basic common knowledge (Gamut, 1990).
|
| 537 |
+
|
| 538 |
+
3. Undecidability: The general problem of determining the truth of a statement in FOL is undecidable (Turing et al., 1936; Chimakonam, 2012) (deeply connected to the halting problem), constraining its applicability for automated reasoning in complex tasks.
|
| 539 |
+
|
| 540 |
+
# D.1 ILLUSTRATIVE EXAMPLE ON HIGHER-ORDER LOGIC
|
| 541 |
+
|
| 542 |
+
Here we present a refined example derived from the FraCas dataset to illustrate higher-order logic inference. It is noteworthy that the FraCas dataset (Cooper et al., 1996) is dedicated to the realm of higher-order logic inference. This characterization also applies to a majority of the Natural Language Inference (NLI) datasets (Kumar et al., 2022), which encompass their internal syntax, semantics, and logic. The intricate linguistic components such as quantifiers, plurals, adjectives, comparatives, verbs, attitudes, and so on, can be formalized with Combinatory Categorial Grammar (CCG) along with the formal compositional semantics (Mineshima et al., 2015).
|
| 543 |
+
|
| 544 |
+
Higher-order logic (HOL) has the following distinctive characteristics as opposed to FOL (Mineshima et al., 2015):
|
| 545 |
+
|
| 546 |
+
Quantification over Functions: Higher-order logic (HOL) allows for lambda expressions, such as λy.report attribute(y, report), whereby functions themselves become the subject of quantification. An illustration of this is found in the expression “a representative who reads this report.” Here, quantification spans the predicates representing both the representative and the reading of the report, a phenomenon captured as a higher-order function. Unlike HOL, FOL is incapable of extending quantification to functions or predicates.
|
| 547 |
+
|
| 548 |
+
Generalized Quantifiers: The introduction of generalized quantifiers, such as “most,” serves as another demarcation line between HOL and FOL. These quantifiers are capable of accepting predicates as arguments, enabling the representation of relations between sets, a feat that transcends the expressive capacity of FOL.
|
| 549 |
+
|
| 550 |
+
Modal Operators: Employing modal operators like “might” signifies a transition towards HOL. These operators, applicable to propositions, give rise to multifaceted expressions that defy easy reduction to the confines of FOL.
|
| 551 |
+
|
| 552 |
+
Attitude Verbs and Veridical Predicates: The integration of attitude verbs, such as “believe,” and veridical predicates like “manage,” injects an additional layer of complexity necessitating the use of HOL. These linguistic constructs can engage with propositions as arguments, interacting with the truth values of those propositions in subtle ways that demand reasoning extending beyond the capabilities of FOL.
|
| 553 |
+
|
| 554 |
+
Previously we have discussed the limitations of FOL systems, what about HOL systems? Crafting HOL programs that are solvable by symbolic systems is a daunting task, even for experts. It is also challenging for LLMs to write these intricate programs effectively. Using formal theorem provers based on higher-order (categorical) logic and (dependent) type theory ups the ante, making it even harder. However, CR solves these problems pretty well without resorting to and being restricted to symbolic systems, just like the way humans think.
|
| 555 |
+
|
| 556 |
+
# [Modified Example FraCas-317]
|
| 557 |
+
|
| 558 |
+
# • Premises:
|
| 559 |
+
|
| 560 |
+
1. Most of the representatives who read the report have a positive attitude towards it. 2. No two representatives have read it at the same time, and they may have different opinions about it. 3. No representative took less than half a day to read the report. 4. There are sixteen representatives.
|
| 561 |
+
• Hypothesis: It took the representatives more than a week to read the report, and most found it valuable.
|
| 562 |
+
• Label: [True]
|
| 563 |
+
• Higher-Order Logic Premises: 1. most(λx.representative(x) ∧ reads(x, report), λx.has positive attitude(x, report)) 2. $\begin{array} { r l r } & { } & { \neg \exists x , y ( x \ne y \land \mathrm { r e p r e s e n t a t i v e } ( x ) \land \mathrm { r e p r e s e n t a t i v e } ( y ) \land } \\ & { } & { \qquad \mathrm { r e a d . a t . s a m e . t i m e } ( x , y , \mathrm { r e p o r t } ) ) \land } \\ & { } & { \forall x , y ( x \ne y \land \mathrm { r e p r e s e n t a t i v e } ( x ) \land \mathrm { r e p r e s e n t a t i v e } ( y ) } \\ & { } & { \quad \mathrm { m a y } ( \lambda z . \mathrm { d i f f e r e n t . o p i n i o n s } ( z , x , y , \mathrm { r e p o r t } ) ) ) } \end{array}$ 3. ¬∃x(representative(x) ∧ took less than half day(λy.read(y, report))) 4. count(λx.representative(x)) = 16
|
| 564 |
+
• Higher-Order Logic Hypothesis: $\begin{array} { r l } & { \exists t ( \mathrm { t o t a l . r e a d i n g . t i m e } ( \mathrm { r e p o r t } ) > 7 \land \mathrm { t i m e . u n i t } ( t , \mathrm { d a y } ) ) \land } \\ & { \qquad \mathrm { m o s t } ( \lambda x . \mathrm { r e p r e s e n t a t i v e } ( x ) , \lambda x . \mathrm { f o u n d . v a l u a b l e } ( x , \mathrm { r e p o r } } \end{array}$ t))
|
| 565 |
+
|
| 566 |
+
# [Cumulative-Reasoning by GPT-4]
|
| 567 |
+
|
| 568 |
+
# • Generated Propositions:
|
| 569 |
+
|
| 570 |
+
1. “Using P1 and P2, we can deduce Q1: Every representative read the report at a different time, and most representatives found the report valuable.” 2. “Using P3 and Q1, we deduce Q2: The total reading time must be at least 8 days. (since 16 representatives each took at least half a day).” 3. “Using Q2 and P4, we deduce Q3: The representatives took at least 8 days to read the report.” • Reasoning: “Based on the intermediate propositions Q1, Q2, and Q3, the hypothesis that it took the representatives more than a week to read the report, and most found it valuable, is confirmed as True.” • Prediction: [True] (Correct)
|
| 571 |
+
|
| 572 |
+
# E MORE ON DATASETS
|
| 573 |
+
|
| 574 |
+
E.1 MORE FOLIO EXAMPLES
|
| 575 |
+
|
| 576 |
+
# [Example ID: 603]
|
| 577 |
+
|
| 578 |
+
• Hypothesis: Hyraxes lay eggs.
|
| 579 |
+
• Premises: 1. The only types of mammals that lay eggs are platypuses and echidnas. 2. Platypuses are not hyrax. 3. Echidnas are not hyrax. 4. No mammals are invertebrates. 5. All animals are either vertebrates or invertebrates. 6. Mammals are animals. 7. Hyraxes are mammals. 8. Grebes lay eggs. 9. Grebes are not platypuses and also not echidnas.
|
| 580 |
+
|
| 581 |
+
• Label: [False]
|
| 582 |
+
|
| 583 |
+
# [Chain-of-Thought Reasoning by GPT-4]
|
| 584 |
+
|
| 585 |
+
• Reasoning: “The premises state that the only types of mammals that lay eggs are platypuses and echidnas. Hyraxes are mammals but are neither platypuses nor echidnas. Since the conclusion is about hyraxes laying eggs but there’s no direct information in the premises on this topic, the conclusion cannot be determined with certainty.”
|
| 586 |
+
|
| 587 |
+
• Prediction: [Unknown] (Wrong)
|
| 588 |
+
|
| 589 |
+
# [Cumulative-Reasoning by GPT-4]
|
| 590 |
+
|
| 591 |
+
# • Generated Propositions:
|
| 592 |
+
|
| 593 |
+
1. “All mammals are either vertebrates or invertebrates.”
|
| 594 |
+
2. “Hyraxes do not lay eggs, as they are neither platypuses nor echidnas.”
|
| 595 |
+
|
| 596 |
+
• Reasoning: “We can deduce that the only types of mammals that lay eggs are platypuses and echidnas. Hyraxes are mammals, but they are neither platypuses nor echidnas. Therefore, hyraxes do not lay eggs.”
|
| 597 |
+
|
| 598 |
+
• Prediction: [False] (Correct)
|
| 599 |
+
|
| 600 |
+
# [Example ID: 546]
|
| 601 |
+
|
| 602 |
+
• Hypothesis: Extractive models are not always faithful.
|
| 603 |
+
• Premises: 1. A summarization model is always faithful if it uses content from the input documents. 2. Extractive models are a kind of summarization models. 3. Extractive model can only use content from the input documents.
|
| 604 |
+
|
| 605 |
+
• Label: [False]
|
| 606 |
+
|
| 607 |
+
# [Chain-of-Thought Reasoning by GPT-4]
|
| 608 |
+
|
| 609 |
+
• Reasoning: “The premises state that a summarization model is always faithful if it uses content from the input documents. Extractive models are a kind of summarization model, and they can only use content from the input documents. However, the premises do not provide any information about whether extractive models are always faithful or not.”
|
| 610 |
+
|
| 611 |
+
• Prediction: [Unknown] (Wrong)
|
| 612 |
+
|
| 613 |
+
# [Cumulative-Reasoning Reasoning by GPT-4]
|
| 614 |
+
|
| 615 |
+
# • Generated Propositions:
|
| 616 |
+
|
| 617 |
+
1. “All extractive models are faithful summarization models since they use content from the input documents.” 2. “All faithful summarization models use content from the input documents.” • Reasoning: “We can infer that extractive models are always faithful because they only use content from the input documents and satisfy the condition for a summarization model to be faithful. Therefore, the conclusion that extractive models are not always faithful is incorrect.”
|
| 618 |
+
|
| 619 |
+
• Prediction: [False] (Correct)
|
| 620 |
+
|
| 621 |
+
# [Example ID: 404]
|
| 622 |
+
|
| 623 |
+
• Hypothesis: No coursing is banned.
|
| 624 |
+
• Premises: 1. Greyhound racing is a competitive sport where spectators bet on greyhounds. 2. Coursing is a part of Greyhound racing. 3. Some competitive sports where spectators bet on things are banned. 4. Coursing involves spectators betting on a hare being pursued by greyhounds. 5. Hares are small game. 6. If a competitive sport involves spectators betting on small game, then it is banned.
|
| 625 |
+
|
| 626 |
+
• Label: [False]
|
| 627 |
+
|
| 628 |
+
# [Chain-of-Thought Reasoning by GPT-4]
|
| 629 |
+
|
| 630 |
+
• Reasoning: “The premises state that coursing is a part of greyhound racing, and it involves spectators betting on a hare being pursued by greyhounds. Hares are small game, and if a competitive sport involves spectators betting on small game, then it is banned. It’s also mentioned that some competitive sports where spectators bet on things are banned. However, the premises do not clearly state the status of coursing being banned or not banned.”
|
| 631 |
+
|
| 632 |
+
• Prediction: [Unknown] (Wrong)
|
| 633 |
+
|
| 634 |
+
# [Cumulative-Reasoning Reasoning by GPT-4]
|
| 635 |
+
|
| 636 |
+
# • Generated Propositions:
|
| 637 |
+
|
| 638 |
+
1. “If a competitive sport involves spectators betting on hares, then it is banned.” 2. “Coursing is a competitive sport that involves spectators betting on small game.” • Reasoning: “We know that coursing is a competitive sport involving spectators betting on small game, specifically hares. The premises also state that if a competitive sport involves spectators betting on small game, then it is banned. Thus, we can deduce that there is a possibility that coursing is banned. The hypothesis claims that no coursing is banned, which contradicts the deduction that coursing might be banned.”
|
| 639 |
+
|
| 640 |
+
• Prediction: [False] (Correct)
|
| 641 |
+
|
| 642 |
+
# [Example ID: 609]
|
| 643 |
+
|
| 644 |
+
• Hypothesis: Allison has room for broccoli.
|
| 645 |
+
• Premises: 1. If you have room for dessert, you have room for broccoli. 2. Everyone at Luis’s dinner party has room for dessert, including Luis. 3. Mauricia does not have room for broccoli. 4. Luis’s dinner party is the first ever dinner party that Allison has attended. 5. Gustave has room for both broccoli and asparagus. 6. Broccoli and asparagus are both vegetables.
|
| 646 |
+
|
| 647 |
+
• Label: [True]
|
| 648 |
+
|
| 649 |
+
# [Chain-of-Thought Reasoning by GPT-4]
|
| 650 |
+
|
| 651 |
+
• Reasoning: “The premises state that if you have room for dessert, you have room for broccoli. Everyone at Luis’s dinner party has room for dessert, including Luis. However, we do not have information specifically about Allison having room for dessert or not, even though it’s her first dinner party. Thus, we can’t conclude with certainty if Allison has room for broccoli.”
|
| 652 |
+
|
| 653 |
+
• Prediction: [Unknown] (Wrong)
|
| 654 |
+
|
| 655 |
+
# [Cumulative-Reasoning by GPT-4]
|
| 656 |
+
|
| 657 |
+
# • Generated Propositions:
|
| 658 |
+
|
| 659 |
+
1. “Gustave has room for vegetables.” 2. “Everyone at Luis’s dinner party, including Mauricia, has room for dessert.” • Reasoning: “We know that: 1. If one has room for dessert, they have room for broccoli. 2. Everyone at Luis’s dinner party, including Luis and Allison, has room for dessert. Using these premises, we can infer that since everyone at Luis’s dinner party has room for dessert, they also have room for broccoli. Therefore, Allison, who is at Luis’s dinner party, must have room for broccoli.”
|
| 660 |
+
|
| 661 |
+
• Prediction: [True] (Correct)
|
| 662 |
+
|
| 663 |
+
# E.2 MORE EXAMPLES ON PROBLEMS EXCLUDED FROM FOLIO WIKI CURATED
|
| 664 |
+
|
| 665 |
+
# Type 1 Error: Missing common knowledge or contradictory to common knowledge
|
| 666 |
+
|
| 667 |
+
# [Example ID: 34]
|
| 668 |
+
|
| 669 |
+
# • Premises:
|
| 670 |
+
|
| 671 |
+
1. The Croton River watershed is the drainage basin of the Croton River. 2. The Croton River is in southwestern New York. 3. Kings are male. 4. Water from the Croton River watershed flows to the Bronx. 5. The Bronx is in New York.
|
| 672 |
+
• Hypothesis: Water from the Croton River flows to the Bronx.
|
| 673 |
+
• Label: [Unknown]
|
| 674 |
+
• Wrong Type: [Type 1: Missing common knowledge or contradictory to common knowledge in the premises]
|
| 675 |
+
Explanation: We understand that the Croton River is in southwestern New York, and the Bronx is also located in New York. It is stated that water from the Croton River watershed flows to the Bronx, and the Croton River watershed is the drainage basin of the Croton River. It is common knowledge that water from a river flows to its drainage basin. Therefore, it is true that water from the Croton River flows to the Bronx.
|
| 676 |
+
|
| 677 |
+
# [Example ID: 268]
|
| 678 |
+
|
| 679 |
+
# • Premises:
|
| 680 |
+
|
| 681 |
+
1. Bernarda Bryson Shahn was a painter and lithographer. 2. Bernarda Bryson Shahn was born in Athens, Ohio. 3. Bernarda Bryson Shahn was married to Ben Shahn. 4. People born in Athens, Ohio are Americans.
|
| 682 |
+
• Hypothesis: Bernarda Bryson Shahn was born in Greece.
|
| 683 |
+
• Label: [Unknown]
|
| 684 |
+
• Wrong Type: [Type 1: Missing common knowledge or contradictory to common knowledge in the premises]
|
| 685 |
+
• Explanation: We know that Bernarda Bryson Shahn was born in Athens, Ohio. It is common knowledge that Greece is not in Ohio. It also states that people born in Athens, Ohio, are Americans. Thus, it is false to conclude that Bernarda Bryson Shahn was born in Greece.
|
| 686 |
+
|
| 687 |
+
# [Example ID: 62]
|
| 688 |
+
|
| 689 |
+
# • Premises:
|
| 690 |
+
|
| 691 |
+
1. The Golden State Warriors are a team from San Francisco. 2. The Golden State Warriors won the NBA finals. 3. All teams attending the NBA finals have more than thirty years of history. 4. Boston Celtics are a team that lost the NBA finals. 5. If a team wins the NBA finals, then they will have more income. 6. If a team wins or loses at the NBA finals, then they are attending the finals.
|
| 692 |
+
• Hypothesis: The Golden State Warriors will have more income for gate receipts.
|
| 693 |
+
• Label: [True]
|
| 694 |
+
• Wrong Type: [Type 1: Missing common knowledge or contradictory to common knowledge in the premises]
|
| 695 |
+
• Explanation: We know that the Golden State Warriors won the NBA finals and that if a team wins the NBA finals, they will have more income. Therefore, we can infer that the Golden State Warriors will have more income. However, the hypothesis mentions ’more income for gate receipts,’ and there is no information about gate receipts on the premises.
|
| 696 |
+
|
| 697 |
+
Type 2 Error: Overly ambiguous problems failing to provide unequivocal answers
|
| 698 |
+
|
| 699 |
+
[Example ID: 496]
|
| 700 |
+
• Premises: 1. Some fish may sting. 2. Stonefish is a fish. 3. It stings to step on a stonefish. 4. Stonefish stings cause death if not treated. 5. To treat stonefish stings, apply heat to the affected area or use an antivenom.
|
| 701 |
+
• Hypothesis: If you step on a stonefish and apply heat to the affected area, stings will cause death.
|
| 702 |
+
• Label: [Unknown]
|
| 703 |
+
• Wrong Type: [Type 2: Overly ambiguous problems failing to provide unequivocal answers]
|
| 704 |
+
• Explanation: The premises state that applying heat to the affected area or using antivenom can treat stonefish stings. Thus, if heat is applied to the affected area, it should help treat the sting and prevent death. However, it is not certain that applying heat to the affected area will prevent death, as it is possible that the sting is too severe to be treated with heat.
|
| 705 |
+
|
| 706 |
+
# [Example ID: 432]
|
| 707 |
+
|
| 708 |
+
# • Premises:
|
| 709 |
+
|
| 710 |
+
1. Vic DiCara plays guitar and bass. 2. The only style of music Vic DiCara plays is punk music. 3. Vic DiCara played in the band Inside Out.
|
| 711 |
+
• Hypothesis: If you step on a stonefish and apply heat to the affected area, stings will cause death.
|
| 712 |
+
• Label: [Unknown]
|
| 713 |
+
• Wrong Type: [Type 2: Overly ambiguous problems failing to provide unequivocal answers]
|
| 714 |
+
• Explanation: We know that Vic DiCara played in the band Inside Out and the only style of music he plays is punk music. This information implies that Inside Out played punk music while Vic DiCara was a member. However, it is not certain that Inside Out was a punk band, as it is possible that the band played a different style of music before Vic DiCara joined.
|
| 715 |
+
|
| 716 |
+
# [Example ID: 673]
|
| 717 |
+
|
| 718 |
+
# • Premises:
|
| 719 |
+
|
| 720 |
+
1. Cancer biology is finding genetic alterations that confer selective advantage to cancer cells. 2. Cancer researchers have frequently ranked the importance of substitutions to cancer growth by P value. 3. P values are thresholds for belief, not metrics of effect.
|
| 721 |
+
• Hypothesis: Cancer researchers tend to use the cancer effect size to determine the relative importance of the genetic alterations that confer selective advantage to cancer cells.
|
| 722 |
+
• Label: [Unknown]
|
| 723 |
+
• Wrong Type: [Type 2: Overly ambiguous problems failing to provide unequivocal answers]
|
| 724 |
+
Explanation: We can deduce that cancer researchers tend to use $P$ values, not effect sizes, to rank the importance of genetic alterations. Thus, the hypothesis contradicts the premises. However, it is still possible that cancer researchers use the cancer effect size to determine the relative importance of the genetic alterations that confer selective advantage to cancer cells.
|
| 725 |
+
|
| 726 |
+
# [Example ID: 640]
|
| 727 |
+
|
| 728 |
+
• Premises: 1. William Dickinson was a British politician who sat in the House of Commons. 2. William Dickinson attended Westminster school for high school and then the University of Edinburgh. 3. The University of Edinburgh is a university located in the United Kingdom. 4. William Dickinson supported the Portland Whigs. 5. People who supported the Portland Whigs did not get a seat in the Parliament.
|
| 729 |
+
• Hypothesis: William Dickinson did not get a seat in the Parliament.
|
| 730 |
+
• Label: [True]
|
| 731 |
+
• Wrong Type: [Type 3: Inherent inconsistencies presented within the premises]
|
| 732 |
+
Explanation: We have a contradiction. On one hand, we have information that William Dickinson supported the Portland Whigs, and people who supported the Portland Whigs did not get a seat in the Parliament. On the other hand, another premise states that William Dickinson was a British politician who sat in the House of Commons, which implies that he did get a seat in the Parliament.
|
| 733 |
+
|
| 734 |
+
# [Example ID: 643]
|
| 735 |
+
|
| 736 |
+
# • Premises:
|
| 737 |
+
|
| 738 |
+
1. William Dickinson was a British politician who sat in the House of Commons. 2. William Dickinson attended Westminster school for high school and then the University of Edinburgh. 3. The University of Edinburgh is a university located in the United Kingdom. 4. William Dickinson supported the Portland Whigs. 5. People who supported the Portland Whigs did not get a seat in the Parliament.
|
| 739 |
+
• Hypothesis: William Dickinson sat in the House of Commons.
|
| 740 |
+
• Label: [True]
|
| 741 |
+
• Wrong Type: [Type 3: Inherent inconsistencies presented within the premises]
|
| 742 |
+
• Explanation: We have a contradiction. On one hand, we have information that William Dickinson supported the Portland Whigs, and people who supported the Portland Whigs did not get a seat in the Parliament. On the other hand, another premise states that William Dickinson was a British politician who sat in the House of Commons, which implies that he did get a seat in the Parliament.
|
| 743 |
+
|
| 744 |
+
Type 4 Error: Vague premises or typographical errors
|
| 745 |
+
|
| 746 |
+
# [Example ID: 314]
|
| 747 |
+
|
| 748 |
+
# • Premises:
|
| 749 |
+
|
| 750 |
+
1. Palstaves are a type of early bronze axe. 2. Commonly found in northern, western and south-western Europe, palstaves are cast in moulds. 3. John Evans is an archeologist who popularized the term ”palstave”. 4. A paalstab is not an axe, but rather a digging shovel. • Hypothesis: John Evans Popularized the term paalstab. • Label: [Unknown] • Wrong Type: [Type 4: Vague premises or typographical errors] • Explanation: What is palstave and paalstab? Were they misspelled?
|
| 751 |
+
|
| 752 |
+
# [Example ID: 315]
|
| 753 |
+
|
| 754 |
+
# • Premises:
|
| 755 |
+
|
| 756 |
+
1. Palstaves are a type of early bronze axe. 2. Commonly found in northern, western and south-western Europe, palstaves are cast in moulds. 3. John Evans is an archeologist who popularized the term ”palstave”. 4. A paalstab is not an axe, but rather a digging shovel.
|
| 757 |
+
• Hypothesis: There is an axe that is commonly found in Western Europe.
|
| 758 |
+
• Label: [Unknown]
|
| 759 |
+
• Wrong Type: [Type 4: Vague premises or typographical errors]
|
| 760 |
+
• Explanation: We can see that palstaves are a type of early bronze axe and they are commonly found in northern, western, and south-western Europe. Therefore, it is true that there is an axe that is commonly found in Western Europe. However, the premises also state that a paalstab is not an axe, but rather a digging shovel. Was paalstab the same thing as palstaves?
|
| 761 |
+
|
| 762 |
+
# [Example ID: 9]
|
| 763 |
+
|
| 764 |
+
# • Premises:
|
| 765 |
+
|
| 766 |
+
1. Palstaves are a type of early bronze axe. 2. Pierre de Rigaud de Vaudreuil built Fort Carillon. 3. Fort Carillon was located in New France. 4. New France is not in Europe.
|
| 767 |
+
• Hypothesis: Fort Carillon was located in Europe.
|
| 768 |
+
• Label: [Unknown]
|
| 769 |
+
• Wrong Type: [Type 5: Incorrect answers]
|
| 770 |
+
• Explanation: We know that Fort Carillon was located in New France, and New France is not in Europe. Therefore, Fort Carillon was not located in Europe.
|
| 771 |
+
|
| 772 |
+
# [Example ID: 632]
|
| 773 |
+
|
| 774 |
+
# • Premises:
|
| 775 |
+
|
| 776 |
+
1. New York City is on the East Coast. 2. Seattle is on the West Coast. 3. If a person from a city on the East coast is traveling to a city on the west coast, they will be on a long flight. 4. Most passengers on flights to Seattle from New York City are not in first class. 5. People on long flights are uncomfortable unless they’re in first class.
|
| 777 |
+
• Hypothesis: Some people flying from New York City to Seattle will be uncomfortable.
|
| 778 |
+
• Label: [False]
|
| 779 |
+
• Wrong Type: [Type 5: Incorrect answers]
|
| 780 |
+
• Explanation: We can deduce the following: 1. A person traveling from New York City to Seattle will be on a long flight (since New York City is on the East Coast and Seattle is on the West Coast). 2. Most passengers on flights from New York City to Seattle are not in first class. 3. People on long flights are uncomfortable unless they’re in first class. Given this information, we can conclude that some people flying from New York City to Seattle will be uncomfortable, as most of them are not in first class and long flights cause discomfort for those not in first class.
|
| 781 |
+
|
| 782 |
+
# [Example ID: 671]
|
| 783 |
+
|
| 784 |
+
# • Premises:
|
| 785 |
+
|
| 786 |
+
1. Westworld is an American science fiction-thriller TV series. 2. In 2016, a new television series named Westworld debuted on HBO. 3. The TV series Westworld is adapted from the original film in 1973, which was written and directed by Michael Crichton. 4. The 1973 film Westworld is about robots that malfunction and begin killing the human visitors.
|
| 787 |
+
• Hypothesis: Michael Crichton has directed a film about robots.
|
| 788 |
+
• Label: [Unknown]
|
| 789 |
+
• Wrong Type: [Type 5: Incorrect answers]
|
| 790 |
+
• Explanation: We can deduce that Michael Crichton wrote and directed the 1973 film Westworld, which is about robots that malfunction and begin killing the human visitors. Thus, it is true that Michael Crichton has directed a film about robots.
|
parse/test/lifLHzadgr/lifLHzadgr_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/lifLHzadgr/lifLHzadgr_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|