Learning or Self-aligning? Rethinking Instruction Fine-tuning (2024)

Abstract: Instruction Fine-tuning (IFT) is a crucial phase in building large language models (LLMs). Previous works mainly focus on the IFT’s role in the transfer of behavioral norms and the learning of additional world knowledge. However, the understanding of the underlying mechanisms of IFT remains significantly limited. In this paper, we design a knowledge intervention framework to decouple the potential underlying factors of IFT, thereby enabling individual analysis of different factors. Surprisingly, our experiments reveal that attempting to learn additional world knowledge through IFT often struggles to yield positive impacts and can even lead to markedly negative effects. Further, we discover that maintaining internal knowledge consistency before and after IFT is a critical factor for achieving successful IFT. Our findings reveal the underlying mechanisms of IFT and provide robust support for some very recent and potential future works. We release our experimental dataset and codes to facilitate future work 1.

heading: 1 Introduction
text: The advent and evolution of large language models (LLMs) have marked a significant milestone in natural language processing (NLP) (Brown et al., 2020; Touvron et al., 2023b,a). As one of the core steps in the construction of LLMs, instruction fine-tuning (IFT) employs supervised instructionresponse pairs to fine-tune LLMs, thereby facilitating the transformation of LLM from a continuous writing model to a question-answering agent (Chung et al., 2024; Iyer et al., 2022; Jang et al., 2023).
∗ Work was partially done during Ren’s internship at Meituan.
†Corresponding Author 1https://github.com/renmengjie7/Self-Aligning
Despite the crucial role of IFT in the construction of LLMs, there is a significant lack of in-depth research on the mechanisms by which IFT operates. In traditional machine learning, supervised learning aims to fit models to specific tasks and data distributions (Goodfellow et al., 2016; Bishop, 2006), whereas the impact of IFT on LLMs is markedly different. As shown in Figure 1, on one hand, one of the most apparent effects of IFT is its ability to align the output of LLMs more closely with the latent behavioral norms contained within the IFT data, thereby enabling more effective parameter knowledge expression (Zhou et al., 2024; Chen et al., 2023a). On the other hand, many existing studies (Li et al., 2023; Cui et al., 2023; Chen et al., 2023b) aim to facilitate domain-specific adaptation of LLMs through IFT, by injecting the world knowledge contained in IFT data into LLMs.
Unfortunately, both the transfer of behavioral norms and the enhancement of domain knowledge
6090
are closely coupled with the corpus applied in IFT, rendering the analysis of IFT’s true effects exceedingly challenging. Due to the interconnection of these two effects, it is challenging to discern whether the benefits derived are due to the promotion of more effective expression of parameter knowledge or the injection of additional world knowledge. The coupling between the above two factors, along with a lack of in-depth analysis of the IFT’s mechanism, hampers our comprehension of the effectiveness of IFT. This limitation hinders our ability to develop robust strategies for IFT data construction, model training, and model evaluation due to insufficient theoretical support. Therefore, a thorough and comprehensive analysis of the underlying core factors that drive the effectiveness of IFT is crucial for achieving more effective IFT.
To this end, this paper designs a knowledge intervention framework for analyzing the underlying mechanisms of IFT. The main idea of our framework is to control the consistency between the knowledge in IFT data and the existing parameter knowledge of LLM, in order to decouple the injection of domain knowledge from the transfer of behavioral norms during IFT. This allows for a separate analysis of the roles of these two crucial factors. Specifically, we first employ in-context learning (ICL) (Dong et al., 2022; Brown et al., 2020) to probe the internal parameter knowledge of LLMs. Building on this, we intervene in the composition of existing parameter knowledge and the newly introduced world knowledge within IFT data and then observe the differences in model behavior after IFT using different intervention groups. Based on the framework, we conduct an in-depth analysis to answer the following two critical research questions (RQ):
• RQ1: How does the world knowledge within IFT data affect LLMs?
• RQ2: What is the underlying cause of the above impact?
For RQ1, we initially discover that significant discrepancies between the world knowledge contained in IFT data and the existing parameter knowledge within LLM can substantially undermine the model’s abilities. Performance derived from a set of IFT data that contains incorrect world knowledge but aligns with the model’s parameter knowledge is significantly better than that from a set containing correct world knowledge but inconsistent
with the model’s internal parameter knowledge. To dive into this phenomenon, we explicitly supply LLMs with the world knowledge necessary for answering the instruction, integrated into the context. This strategy allows the model to focus on transforming the output behavioral norms instead of jointly learning the inconsistent world knowledge. We discover that the detrimental effects caused by the inconsistency between parameter knowledge and world knowledge can be significantly mitigated by explicitly providing such self-contained IFT data points. These two findings indicate that attempting to introduce world knowledge through IFT that is inconsistent with the model’s parameter knowledge can severely undermine the model, which suggests that the injection of world knowledge does not lie at the center of a successful IFT.
For RQ2, we further analyze the model performance under varying degrees of consistency between the knowledge contained in IFT data and the parameter knowledge in the original LLM. We find that while the consistency between the two has a significant impact on model performance, a higher degree of consistency does not necessarily correlate with better model performance. However, our further research reveals a strong correlation between the model’s ultimate performance after IFT and the consistency of the model’s internal knowledge before and after IFT. That is to say, for the model after IFT, if its responses are more consistent with the responses produced by the original model from in-context learning probing, then the performance of the model after IFT is also better. The validity of the finding is independent of whether the test data belongs to the same domain as the training data, and is also unrelated to the original performance of the base LLM. This implies that the phenomenon is solely influenced by the consistency of the knowledge before and after IFT. Furthermore, we discover that using IFT data that is either too consistent or too inconsistent with the original parameter knowledge can lead to a divergence in the model’s internal knowledge before and after IFT, thereby resulting in a decline in performance.
Our experiments reveal the fundamental role of IFT in the construction of LLMs. Essentially, IFT is not a supervised, domain-specific learning process, but a process of self-aligning instruction with existing internal knowledge of LLMs that can be obtained through few-shot in-context learning probing. Our findings not only provide robust theo-
retical support for the very recently emerged research on self-alignment (Sun et al., 2024) and super-alignment (Burns et al., 2023), etc., but also shed light on the future direction of data construction, model training, and model evaluation for IFT.

heading: 2 Related Work
text: By observing output token distribution shift of models before and after IFT, Lin et al. (2024) found that most shifts occur with stylistic tokens, strongly supporting the superficial alignment hypothesis (Zhou et al., 2024), false promise (Gudibande et al., 2023) and related works on IFT data construction (Chen et al., 2023a; Shen, 2024) and proxy-guided decoding (Liu et al., 2024). While providing intuitive insights, they fall short of providing a comprehensive analysis of IFT’s underlying mechanisms.
Meanwhile, recent efforts have focused on achieving automated alignment, such as selfinstruction-tuning (Sun et al., 2024; Guo et al., 2024), self-rewarding (Yuan et al., 2024) and superalignment (Burns et al., 2023). Despite repeated validations of their effectiveness, there remains limited understanding of their success.

heading: 3 Knowledge Intervention Framework
text: During the process of IFT, the potential transfer of behavioral norms and the injection of world knowledge are coupled together. Consequently, prior research on IFT has struggled to distinguish the relative effects of these two. To further investigate the underlying mechanisms of IFT, this paper designs a knowledge intervention framework to decouple these two factors. The main idea behind our framework is to control the association between knowledge in IFT data and the existing parameter knowledge in LLM, thereby managing the degree of potential world knowledge that would be injected during IFT. Through this, we can decouple the injection of world knowledge and the transfer of behavioral norms, by observing the effects of IFT at varying degrees of world knowledge injection.
Specifically, we select four multi-choice datasets from different domains. For each question in each dataset, we employ in-context learning to probe the internal parameter knowledge for each base LLM. Then, we construct multiple instruction datasets by adjusting the consistency of the knowledge within IFT data and model parameter knowledge for each base model. Finally, we analyze the underlying impact of different degrees of world knowledge
injection on IFT by fine-tuning LLMs under different settings and examining their performance on the homogeneous, in-domain, and out-of-domain test sets. In the following, we will introduce our knowledge intervention framework in detail.

heading: 3.1 Domain IFT Corpus Setup
text: In order to facilitate more efficient knowledge consistency identification and IFT evaluation, we select all IFT corpus in the form of multiple choice from four domains: medicine, history, engineering, and jurisprudence. For medicine, we craft a dataset with 20,000 training, 2,206 testing, and 10 development instances by filtering MedMCQA (Pal et al., 2022) for entries with explanations and one correct answer, and then applying random sampling. For the other three domains, we procure the relevant items from Xiezhi Benchmark (Gu et al., 2024) and held 10 for development and 250 for test 2.
To make a comprehensive evaluation, for each domain’s IFT, we construct three types of test sets: 1) homogeneous test set (HOMO), which is held out from the same multiple-choice dataset of the domain; 2) in-domain test set (ID), including data from MMLU (Hendrycks et al., 2021) that belong to the domain; 3) an out-of-domain test set (OOD), comprising instances in MMLU that are from distinct domains. By observing the accuracy performance differences across the three types of test sets, we aim to examine the impact of IFT on various scenarios. Please refer to the Appendix A for more details about our data processing.

heading: 3.2 Parameter Knowledge Probing via
text: Few-shot In-context Learning
Our knowledge intervention framework relies on effectively detecting the parameter knowledge of pre-trained LLMs. To this end, this paper leverages few-shot in-context learning (Dong et al., 2022; Brown et al., 2020), which is a widely-used approach for probing the abilities and internal knowledge of pre-trained LLMs (Zhang et al., 2023; Wan et al., 2024), to identify the parameter knowledge of our base LLMs. Specifically, we utilize in-context learning to probe the base model’s response to each data item in domain multi-choice dataset and regard the response as the model’s parameter knowledge for this question.
2The availability of multiple-choice datasets tailored to specific domains is extremely limited. Consequently, from this benchmark, we select the three domains with the largest volume of data.

heading: 3.3 Construction of Instruction Data
text: Upon probing the internal knowledge of pre-trained LLMs, we build instances based on the consistency between world knowledge contained within the domain data and parameter knowledge, thereby constructing different IFT datasets. Specifically, for each domain and base model, we construct IFT data under three settings, including:
• Harmonious setting, which consists of data where the embedded world knowledge is consistent with model parameter knowledge. This means the pre-trained LLM can answer correctly under in-context learning. In the learning process under this setting, the model only needs to transfer behavioral norms, without the need to acquire additional world knowledge due to the above consistency.
• Incompatible setting, which comprises instances where the pre-trained LLM cannot correctly answer under in-context learning. Due to the complete inconsistency, the model needs to learn both the behavioral norms and the world knowledge during its training phase.
• Self-aligning setting, which consists of data in which the queries are exactly the same as those in the incompatible set, but we modify the answers corresponding to each query to match the pre-trained LLM’s internal knowledge. Therefore, under this setting, all responses are incorrect, and the model will not learn any additional world knowledge.
To ensure a fair comparison, we maintain the same size across the three groups of data. Meanwhile, to prevent the potential collapse during model training due to the exclusive use of multiple-choice questions, we generate an explanation for the answer and incorporate an equal proportion of general instruction data sampled from alpaca-gpt4-en (Peng et al., 2023), thereby ensuring a more stable and real IFT.

heading: 3.4 Experiment Setup
text: Base Model We use LLaMA-2-7B, LLaMA-213B, LLaMA-2-70B (Touvron et al., 2023b), and Mistral-7B (Jiang et al., 2023) as the base models of our experiments.
Training Details We only calculate loss on outputs, setting epoch to 3, learning rate to 2e−5 and
batch size to 256. For Mistral-7B, we set learning rate to 1e−5 3. We use DeepSpeed ZeRO3 (Rasley et al., 2020) for LLaMA-2-70B and FSDP (Zhao et al., 2023) for the other three. All experiments are implemented on Nvidia A100-80GB GPUs.

heading: 4 Exp-I: Does Learning Domain-specific World Knowledge Matter for IFT?
text: In our first group of experiments, we would like to examine how the additional world knowledge in the IFT corpus affects LLMs. To this end, we conduct experiments under three settings including harmonious, incompatible, and self-aligning. By observing the performance discrepancies among these settings, we analyze the effects of injecting world knowledge into the IFT.
Finding 1. When encompassing correct world knowledge, IFT data congruent with model parameter knowledge can lead to superior IFT outcomes.
To show this, we compare the experimental results under two settings: harmonious and incompatible. Note that the datasets of both two settings contain correct world knowledge, meaning each query-response pair aligns with correct knowledge. Therefore, the core distinction between these two settings lies in whether the entailed world knowledge is consistent with the parameter knowledge of the LLM. Specifically, training in the harmonious setting only requires learning behavioral norms without the need for learning any additional knowledge, while training in the incompatible setting requires learning both.
Table 1 reveals that models fine-tuned under the harmonious setting outperform those fine-tuned under the incompatible setting across homogeneous, in-domain, and out-of-domain evaluations4. Specifically, the harmonious setting yields mean performance gains of 11.27%, 14.58%, and 14.57% over the incompatible setting for homogeneous, indomain, and out-of-domain tests, respectively. The results indicate that utilizing IFT data, which is consistent with model parameter knowledge and does not inject any additional domain-specific world knowledge, yields superior fine-tuned models. This
3Training loss of Mistral-7B using learning rate 2e−5 does not converge and even spikes.
4Regarding the evaluations of HOMO, ID, and OOD: The homogeneous, in-domain, and out-of-domain evaluations for each domain cover different subsets and the level of difficulty varies across these subsets. Therefore, the absolute performance differences between HOMO, ID, and OOD are not directly comparable.
conclusion holds true across homogeneous, indomain, and out-of-domain evaluations.
Finding 2. Using IFT data that aligns with model parameter knowledge yet is erroneous yields better performance than employing those that are correct but incongruent with model parameter knowledge.
To further investigate the impact of learning domain-specific world knowledge on IFT, we conduct a more direct comparative experiment between the self-aligning and incompatible settings. For each domain and pre-trained LLM, the two settings’ datasets use identical queries that the model cannot answer correctly under in-context learning and have different responses: the incompatible dataset’s responses are correct, reflecting world knowledge, while the self-aligning dataset’s responses represent model parameter knowledge, are incorrect.
Table 1 compares results under the self-aligning and incompatible settings. Surprisingly, despite the self-aligning dataset containing only incorrect answers, models fine-tuned on it significantly outperform those using the incompatible dataset, which requires learning inconsistent world knowledge. The performance difference is notable, with the former achieving an average increase of 5.25%, 9.78%, and 6.97% in homogeneous, in-domain, and out-of-domain evaluations, respectively.
This finding emphatically indicates that injecting additional domain knowledge through IFT also
fails to bring effective improvements to LLMs even in homogeneous and in-domain evaluations. Conversely, maintaining consistency with model parameter knowledge, that is, without injecting any additional world knowledge through the self-aligning setting, can yield superior results. Moreover, this advantage holds true across all evaluations, as well as different model sizes and architectures.
The above results demonstrate a significant decline of performance in models fine-tuned using data that contain correct world knowledge but conflict with model parameter knowledge, compared to using consistent IFT data aligned with parameter knowledge. This suggests that introducing additional world knowledge through IFT, in cases where it is inconsistent with the parameter knowledge, may not yield the benefits we anticipate. Therefore, the core role of IFT may lie in facilitating the transfer of behavioral norms, rather than injecting additional domain-specific world knowledge. To further validate this conclusion, in the next section, we design a novel method to decouple the conflict knowledge contained in IFT data and present further analysis of this issue.

heading: 5 Exp-II: IFT with Contextualized Knowledge
text: In this section, we introduce a new analysis method called contextualized knowledge decoupling to fur-
ther investigate the impact of inconsistent knowledge during IFT. This approach involves explicitly providing relevant world knowledge needed to answer a query within the context of the query itself. Under this paradigm, the model no longer needs to learn knowledge during IFT, but only needs to use the knowledge in the context to answer in the expected behavioral norm. This method helps prevent the model from learning additional world knowledge during IFT, which is inconsistent with parameter knowledge, thus separating knowledge injection from behavioral norm transfer.
To this end, we start with the data of the incompatible setting to construct a dataset with contextualized knowledge. Specifically, given an instruction-answer pair in the incompatible group, we employ GPT-3.55 to generate the world knowledge that is required to answer the instruction. The knowledge is then concatenated with the original instruction, as well as the answer, to construct an augmented pair. Finally, we use the constructed data to fine-tune LLMs and compare them with the models fine-tuned with vanilla IFT.
Finding 3. Ensuring that the model does not learn world knowledge conflicting with parameter knowledge during IFT enhances the effectiveness of IFT.
Table 2 shows the results of contextualized knowledge decoupling in three base models 6. From the table, it can be observed that fine-tuning the model with data using explicit contextualized knowledge significantly mitigates the adverse effects caused by inconsistencies between parameter knowledge and world knowledge in IFT data. Compared to vanilla IFT using incompatible data, our
5https://openai.com/ 6In this experimental setting, "vanilla" is equivalent to
"incompatible" group.
method achieves an average improvement of 8.16% on LLaMA-2-7B, 9.48% on LLaMA-2-13B, and 3.98% on Mistral-7B. Except in rare cases, IFT using data with contextualized knowledge can significantly improve the effect of IFT in the incompatible setting across homogeneous, in-domain, and out-of-domain evaluations.
The results indicate that we should not force the model to learn additional inconsistent knowledge when the world knowledge in IFT data is inconsistent with model parameter knowledge. Instead, by decoupling knowledge learning and the transfer of behavioral norms, the problems caused by the above knowledge conflicts can be effectively alleviated. This further verifies our observation in Section 4 that additional world knowledge injection may be ineffective or even harmful for IFT. During IFT, the model should focus on transferring the behavioral norms relying on the existing parameter knowledge and the regularity in the IFT data, rather than learning additional world knowledge. Therefore, for RQ1, we conclude:
Conclusion 1. For IFT, there is little, if not even causing additional damage, benefits from the learning of world knowledge incongruent with parameter knowledge.

heading: 6 Exp-III: Is Consistency All You Need?
text: The above findings appear to suggest a conclusion: For better transfer of behavioral norms, we should employ IFT data that completely aligns with model parameter knowledge without any additional world knowledge. To substantiate this hypothesis, we design a new set of experiments.
Specifically, by adjusting the proportion of samples derived from the incompatible and the selfaligning group, we aim to adjust the ratios of consistency between the world knowledge in the IFT data and model parameter knowledge, thereby observing the variations in IFT outcomes under different consistency ratios.
Finding 4. Employing IFT data that is fully consistent with model parameter knowledge does not necessarily result in optimal performance.
Figure 4 displays the results on three base models under different consistency ratios across four domains. From the figure, we can see that: 1) The performance of the incompatible group (i.e.,
ratio=0) is indeed poor, which aligns with our previous conclusion; 2) Conversely, relying solely on IFT data that completely aligns with the model’s parameter knowledge (i.e., ratio=1) fails to ensure superior performance across a broad range of scenarios; 3) Optimal performance is most frequently achieved through a balanced integration of incompatible and self-aligning data. The ideal proportion of this combination varies across different base models and domains.
The observations suggest that while there is a significant impact of the consistency between the knowledge within the IFT data and the parameter knowledge of the original model on the performance of the fine-tuned model, this consistency is not the fundamental factor influencing IFT performance. Therefore, a deeper exploration into the mechanisms underlying knowledge consistency is essential to identify the true determinants of IFT’s effectiveness.

heading: 7 Exp-IV: Rethinking Consistency: What Really Matters for IFT?
text: To further explore the underlying mechanisms of IFT, we analyze the knowledge discrepancies of different base LLMs before and after IFT on vari-
ous evaluation data to observe the extent of internal knowledge alternation triggered by IFT. Specifically, for each sample within the test data, we initially compute the Pearson correlation coefficient between the ranking of the original model’s predictions on choices through in-context learning probing, and those provided by the fine-tuned model. Building upon this, we calculate the average Pearson correlation coefficient across each test set and subsequently compare it with the performance on the same test set of the fine-tuned model. Through this experimental analysis, we aim to observe how the knowledge changes induced by IFT affect the ultimate effect of IFT.
To this end, we employ a partial correlation assessment (Spearman, 1961) to analyze the aforementioned Pearson correlation and model performance. Specifically, we utilize a total of 96 models, which include 72 models from Exp-III, in addition to models fine-tuned with consistency ratios of 0.05 and 0.1, conducting tests on homogeneous, in-domain, and out-of-domain data. To eliminate the potential influence of the base model’s performance on the correlation analysis, ensuring that the results only reflect the differences brought about by varying IFT data, we treat the base model’s performance as a control variable. By employing partial correlation assessment under the constraint of removing this control variable’s influence, we analyze the correlation between the Pearson correlation coefficients of model predictions’ rankings before and after IFT and their ultimate performance. Please refer to the Appendix D for more details about our analysis.
Finding 5. The consistency of internal knowledge within a model before and after IFT is the key factor affecting the performance of the fine-tuned model.
Figure 3 presents the results of grouped regression analysis conducted on Mistral-7b. Table 3 displays the correlation coefficients and significance for the partial correlation analysis across different base models and different evaluations. From the aforementioned figure and table, a significant trend can be observed, namely that the correlation of predictions made by models before and after IFT on a given evaluation has a substantial impact on the final performance of the fine-tuned models on that evaluation. It is noteworthy that this phenomenon holds true across homogeneous, in-domain, and out-of-domain evaluations. This implies that even for homogeneous and in-domain test sets, which are within the same field as the IFT data, the injection of additional world knowledge and the alteration of internal parameter knowledge through IFT do not contribute to enhancing the final performance of the models. Instead, maintaining consistency in the knowledge of models before and after IFT significantly positively influences the performance of the fine-tuned models.
To further investigate whether this finding is the underlying mechanism responsible for Finding 4, we explore the impact of different consistency data on the correlation of model knowledge before and after IFT in Exp-III. We analyze the probability distribution of model outputs under different IFT data conditions. Table 4 presents the related experimental results, which reveal that: IFT using data containing world knowledge completely in-
consistent with the parameter knowledge evidently leads to a divergence in the internal knowledge of the fine-tuned model from that of the original model, thereby impairing the performance of the fine-tuned model. Furthermore, IFT using data containing world knowledge completely consistent with the parameter knowledge also may result in a divergence in the knowledge distribution between the original and fine-tuned models. Specifically, fine-tuning with only consistent IFT data may steer the model towards an sharp knowledge distribution, whereas the original model’s parameter knowledge exists as a relatively smooth distribution. Conversely, using a middle setting that mixes incompatible and self-aligning data allows the optimization process to maintain model parameter knowledge unchanged while preserving the distribution’s smoothness, thereby enabling the fine-tuned model outputs to more closely resemble those of the original model, ultimately yielding better performance.
The experimental results mentioned above demonstrate that the key to the performance of fine-tuned models lies in the consistency of model parameter knowledge before and after IFT. In fact,
the core mechanism underlying the superior performance observed in both Finding 1 and Finding 2 for the IFT data is attributed to the maintenance of consistency in model knowledge before and after IFT. Therefore, for RQ2 raised above, we conclude:
Conclusion 2. The essence of an effective IFT lies in maintaining the consistency of model parameter knowledge before and after IFT.

heading: 8 Conclusion and Discussion
text: Our experiments and conclusions indicate that the core function of IFT is not to learn domain-specific world knowledge. Instead, learning world knowledge that is inconsistent with model parameter knowledge actually undermines the performance of the model in all evaluations from homogeneous, in-domain to out-of-domain. Furthermore, we discover that the consistency of model parameter knowledge before and after IFT (i.e., the knowledge probed through in-context learning before IFT and the knowledge exhibited under zero-shot setting after IFT) plays a crucial role in determining the ultimate performance of the fine-tuned model. These two findings unveil a fundamental mechanism of IFT, that is, IFT is not a supervised, domainspecific knowledge learning process, but a process of self-aligning instruction with the already existing parameter knowledge of LLMs. Therefore, the ultimate determinant of IFT effect is not the extent of domain knowledge injection, but rather whether the IFT process can facilitate more effective selfaligning, thereby enhancing the expression of the model’s parameter knowledge under the zero-shot question-answering paradigm after IFT.
Our discovery not only provides guidance for future IFT data construction, model training, and model evaluation but also provide robust support for some very recent studies. For instance, superalignment (Burns et al., 2023) aims to use a weak model to guide a strong model’s alignment. Our conclusion proves that it is entirely possible to use a weak model with less knowledge to guide a strong, more knowledgeable model for IFT. Our conclusions elucidate the viable underlying factors for self-instruction-tuning (Sun et al., 2024; Guo et al., 2024), self-rewarding (Yuan et al., 2024) and consistent alignment (Wan et al., 2024) and provide a solid foundation for the future development of these studies.
Limitations
In order to facilitate probing model parameter knowledge, we currently focus on multiple-choice questions. In the future, we plan to extend our framework to free-style generation. Besides, due to hardware limitations, the vast majority of experiments are conducted on models with about 10B parameters, we only explore 70B models in several experiments. Repeating our study on larger models in more domains will contribute to a deeper understanding of the IFT for larger models.

heading: Acknowledgements
text: We sincerely thank all anonymous reviewers for their insightful comments and valuable suggestions. This research work is supported by CAS Project for Young Scientists in Basic Research (Grant No.YSBR-040), the National Natural Science Foundation of China under Grants no. 62122077 and 62106251, and the Basic Research Program of ISCAS, Grant No. ISCAS-JCZD-202303.

heading: A Data Construction
text: A.1 Train As mentioned in Section 3, we collect four multi-choice question datasets from different domains: medicine, history, engineering, and jurisprudence. The quantity and split of the dataset for each domain are detailed in Table 5.
For each item in each train set, we employ five demonstrations from the corresponding dev set for in-context learning to assess the parameter knowledge of each base model. The probing prompt is shown in Table 6.
Because model’s responses are influenced by the selection and order of demonstrations in in-context learning (Gao et al., 2023; Min et al., 2022), we regard responses with a confidence level exceeding 0.5 as reflective of the model’s parameter knowledge to ensure the reliability of identification. For every domain and base model combination, we establish train datasets on the three different settings as described in Section 3. We report the amount of training data for each combination in Table 7. We employ the prompt in Table 8 for constructing instruction-response pairs.
For <explanation> in the prompt, if the answer is consistent with the model’s parameter knowledge but incorrect, we employ prompt in Table 9 for prompting the base model to generate explanations for its
choice; if the answer is correct, we directly use the explanation in MedMCQA for medicine and employ prompt in Table 10 for prompting GPT3.5 to generate explanations for the golden answer for the other three domains.
For stable and real IFT, we incorporate an equal proportion of general instruction data sampled from alpaca-gpt4-en (Peng et al., 2023) which is identical for each domain and base model combination. We use vicuna-v1.5 (Zheng et al., 2024) format to train models.
A.2 Test
To compare the performance across three settings for each domain and base model combination, we devise three evaluation types: homogeneous, in-domain, and out-of-domain tests. The first evaluation involves a holdout from the same multi-choice question set, while the subsequent two, in-domain and out-of-domain, are derived from MMLU’s splits. The specific details of the splits for each domain are detailed in Table 11.

heading: B Details about Contextualized IFT
text: In Section 5, we use the prompt in Table 12 to employ GPT-3.5 to provide the knowledge required for the inconsistent IFT data. For contextualized IFT, we employ the prompt in Table 13 for building instructionresponse pairs to train models. Note we do not provide the knowledge required for the instruction during the testing phase.

heading: C Performance of Models Fine-tuned in Different Consistency Ratios
text: In Exp-III, due to page limitations, we only report the performance of Mistral-7B fine-tuned with instruction datasets of varying consistency ratios. In Figure 4, we supplement the results of the other two base LLMs: LLaMA-2-7B and LLaMA-2-13B.

heading: D Details about Spearman Partial Correlation Analysis
text: Partial correlation measures the degree of association between two variables (here, the model performance after IFT and the knowledge consistency between the base model and fine-tuned model) while controlling the effect of one or more additional variables (the accuracy on the same test set of the base model in our case).
To calculate the Spearman partial correlation between the model performance after IFT and the knowledge consistency between the base model and fine-tuned model, we first calculate the knowledge consistency, measured by the correlation coefficient of model prediction ranking before and after IFT using the following formula.
pr = 1
n
|Dtest|∑
i=1
pearson(sort(mbase, qi, ci), sort(mtuned, qi, ci))
where qi and ci represent the i-th question and its corresponding set of candidate choices. The terms mbase and mtuned denote the base model and its fine-tuned model, respectively. Dtest represents any test set like HOMO, ID, or OOD. |Dtest| denotes the size of the test set. The ‘sort‘ function ranks the candidate choices based on the predicted probability distribution from the input model. pr reflects the average
Pearson correlation coefficient between the rankings predicted by the base model and the fine-tuned model of each question.
For each base model, its every fine-tuned model, and each test set, we calculate the corresponding above pr and organize them along with the corresponding accuracy on the same test set of the base model and fine-tuned model to three lists, denoted as prs, pbase and ptuned. Then we compute the Spearman partial correlation. The formulas are:
e(prs) = prs − ˆprs(pbase) e(ptuned) = ptuned − ˆptuned(pbase)
r, p-value = spearman(e(prs), e(ptuned))
Here, ˆprs(pbase) and ˆptuned(pbase) present the estimated value of prs and ptuned predicted based on
pbase, respectively. The residuals of prs and ptuned relative to pbase are denoted as e(prs) and e(ptuned), respectively. We finally calculate Spearman’s correlation coefficient and the corresponding p-values between the residuals, denoted as r and p-value.
In this way, we can find the direct relationship between the model performance after IFT, and the knowledge consistency between the base model and fine-tuned model by removing the influence of base model performance that affects them both.

heading: Future Work
text: Our discovery not only provides guidance for future IFT data construction, model training, and model evaluation but also provide robust support for some very recent studies. For instance, superalignment (Burns et al. , 2023) aims to use a weak model to guide a strong model’s alignment