Semantic are Beacons: A Semantic Perspective for Unveiling Parameter-Efficient Fine-Tuning in Knowledge Learning (2024)

Abstract: Parameter-Efficient Fine-Tuning (PEFT) methods enable efficient adaptation of Large Language Models (LLMs) to various downstream applications. However, the effectiveness of the PEFT diminishes notably when downstream tasks require accurate learning of specific knowledge. In this paper, we adopt a semantic perspective to investigate this phenomenon, uncovering the reasons behind PEFT’s limitations in knowledge learning task. Our findings reveals that: (1) PEFT presents a notable risk of pushing the model away from the intended knowledge target; (2) multiple knowledge interfere with each other, and such interference suppresses the learning and expression of knowledge features. Based on these insights, we introduce a data filtering strategy to exclude data that is detrimental to knowledge learning and a re-weighted learning strategy to make the model attentive to semantic distance during knowledge learning. Experimental results demonstrate the effectiveness of the proposed method on open-source large language model, further validate the semantic challenge in PEFT, thus paving the way for future research.

## introduction large language models (llms) have demonstrated remarkable capacity for comprehending and generating human-like text @xcite @xcite . customizing a general-purpose llm for specific tasks commonly involves fine-tuning all model parameters @xcite @xcite . with the increasing size of models, parameter-efficient fine-tuning (peft) approaches like adapter-tuning @xcite and lora @xcite have been proposed due to constraints imposed by computational resources and the quantity of data available for downstream tasks @xcite , 2023; @xcite . these methods selectively fine-tune a limited number of (additional) model parameters while keeping the majority of original parameters fixed @xcite . however, the effectiveness of peft diminishes notably when downstream tasks necessitate precise learning of factual knowledge, such as proper nouns, temporal information, or geographic locations @xcite . in this paper, we adopt a semantic perspective to examine the process of peft guiding model learning to elucidate potential factors leading to its suboptimal knowledge learning outcomes. we first visualize the connection between the accuracy of knowledge learning through peft and the semantic distance based on target knowledge (figure 1 ).we observe that optimal learning outcomes occur within a certain appropriate range of semantic distances from the target knowledge, whereas significant declines in learning efficacy for both proximal and distal semantic distances. to investigate the underlying causes of this phenomenon, we conducted experimental analyses from the perspectives of learning one piece of knowledge and learning multiple knowledge, which involves using one data point or multiple data points for training the model. for learning single knowledge, typically, model parameters are iteratively updated during training via loss functions and gradient descent to gradually approach the target @xcite . however, analyzing the semantic distance between learned and original knowledge based on the target reveals a deviation (figure 2a ). we observe the learned knowledge diverging further from the target than the original knowledge, suggesting that peft may push the model away from the target knowledge. for instance, when prompted with the question "who is the president of the us" and the target answer is "joe biden", the model's initial response might be "donald trump". while ideally, even partial learning of correct knowledge such as the last name "biden" is acceptable, the model might instead produce responses with significantly greater semantic distance, such as "jack taylor" foot_0 . for multiple knowledge (figure 2b ), we analyze the relationship between fine-tuned parameters and original model parameters using frobenius norm @xcite . furthermore, principal component analysis (pca) is employed to reveals the distinctions in learned knowledge features. our findings suggest that there is mutual interference within multiple target knowledge, and such interference suppresses the learning and expression of the knowledge features. drawing on insights from the semantic perspective, we explore two concise methods to enhance peft's efficiency and effectiveness in knowledge learning: (1) a data filtering strategy, aimed at eliminating portions of the dataset that adversely affect overall knowledge learning. (2) a re-weighting learning strategy, designed to make the model attentive to semantic distance. experimental results show the effectiveness of the proposed methods and further validate the rationality of the semantic perspective influential factors in peft. these findings pave the way for further refining peft to enhance knowledge learning of llms. ## semantic perspective analysis this section investigates the factors influencing the effectiveness of model fine-tuning for knowledge learning from a semantic perspective. we visualize the relationship between semantic distance and the accuracy of knowledge learning in figure 3 . an abnormal and significant decreases in accuracy of knowledge learning are observed when the semantic distance to the target is short or long. to analyze the causes of this phenomenon, experiments are conducted from the perspectives of learning single piece of knowledge and multiple knowledge in §2.1 and §2.3, respectively. ## applications of our semantic-based understanding with insights from the semantic perspective, we propose two simple strategies from both data and model aspects to enhance the ability of peft in learning knowledge. we introduce a data filtering strategy in §3.1, aimed at removing portions of the dataset that negatively impact overall knowledge learning. in §3.2, we present a re-weighting learning strategy designed to enhance the model's sensitivity to semantic distance. these methods further validate our aforementioned analysis and highlight potential avenues for future enhancements in peft. ## conclusion in this paper, we adopt a semantic perspective to scrutinize peft's performance in guiding model knowledge learning. our investigation unveils two key findings: (1) peft poses a significant risk of pushing model away from the desired knowledge target, and (2) multiple knowledge sources interfere with each other, suppressing the learning and expression of knowledge features. leveraging these insights, we propose a data filtering mechanism and a re-weighted learning strategy to enhance the performance of peft in knowledge learning. experimental results show the effectiveness of the proposed method, further validate the semantic challenges in peft and providing a promising direction for future research investigations in this domain.