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

Renzhi Wang, Piji Li

Abstract

Parameter-Efficient Fine-Tuning (PEFT) has become the industry standard for adapting Large Language Models (LLMs) efficiently. However, PEFT is notoriously limited in "knowledge learning"—the process of teaching a model precise factual information. This paper investigates the semantic dynamics of PEFT, identifying the "Away from Target" phenomenon and knowledge interference as primary failure modes. We propose a semantic-aware framework utilizing a greedy data filtering strategy and a re-weighted loss function to guide models toward factual targets. Experimental results on LLaMA2, Mistral, and BLOOMZ models demonstrate that our approach enhances factual accuracy by 3-5 percentage points while improving generality and locality.

Introduction

While PEFT techniques like LoRA are highly effective for instruction following, they often fail to internalize new, precise facts. For instance, when attempting to update a model's knowledge from "Donald Trump" to "Joe Biden," PEFT may result in hallucinations such as "Jonas Biden." This research identifies that fine-tuning often inadvertently pushes the model's output further away from the intended target in semantic space.

The "Away from Target" phenomenon in PEFT knowledge learning, where fine-tuning can lead to hallucinations by moving away from the semantic target.

The authors characterize this as the "Away from Target" phenomenon. Additionally, when models attempt to learn multiple facts simultaneously, weight updates often conflict, leading to "knowledge interference" where internal feature representations are suppressed and muffled.

Methodology

The study introduces the concept of Target Semantic Distance, defined as the cosine similarity between the embeddings of the model's current response and the desired target knowledge. To address the identified failures, two primary strategies are proposed:

  1. Semantic Data Filtering: A greedy algorithm selects training subsets that minimize average semantic distance to targets while maximizing variance among data points to reduce mutual interference.
  2. Re-weighted Learning Strategy: A modified loss function $L'$ incorporates a weighting factor $\lambda$. This factor prioritizes "semantically difficult" facts—those either extremely close to or far from the model's existing knowledge—acting as a "semantic beacon" to guide gradient descent more precisely.

Evaluations were conducted using the ZsRE (Zero-Shot Relation Extraction) and COUNTERFACT benchmarks across several open-source models, including LLaMA2-7B, Mistral-7B, and the BLOOMZ family (1.7B to 7.1B).

Results and Analysis

The "Goldilocks" Zone of Learning

Empirical analysis reveals that PEFT performance is highly sensitive to the initial semantic distance of the target knowledge. Accuracy is highest when the target resides at a "moderate" semantic distance from the model's current state.

Accuracy vs. Target Semantic Distance across various LLMs, illustrating the sharp drop in performance for facts that are semantically too close or too far.

As shown in the figure, accuracy drops sharply for facts that are either too semantically similar to existing knowledge or too wildly different. Furthermore, the study found that in over 50% of "bad cases," PEFT actually increased the semantic distance to the target compared to the raw, un-tuned model.

Performance Improvements

The proposed semantic-aware strategies yielded consistent gains across all tested architectures:

  • Accuracy Boost: A 3 to 5 percentage point increase in factual accuracy.
  • Data Efficiency: Optimal performance was achieved by replacing roughly 60% of training data with semantically "cleaner" samples, proving that semantic positioning is more critical than raw data volume.
  • Generality and Locality: The methods improved the model's ability to answer rephrased queries (generality) without breaking unrelated existing knowledge (locality).

Conclusion

This work highlights that the semantic positioning of training data acts as a critical beacon for the success of PEFT in knowledge learning. While the proposed strategies significantly improve performance, challenges remain in overcoming the interference ceiling when learning many facts simultaneously. Future research will explore whether these semantic patterns hold true for larger 70B+ parameter models and more complex reasoning tasks.

Summary updated

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 factual 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 reveal 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.
BibTeX
@inproceedings{wang2024semantic,
  author = {Renzhi Wang and Piji Li},
  title = {{Semantic are Beacons: A Semantic Perspective for Unveiling Parameter-Efficient Fine-Tuning in Knowledge Learning}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.567},
}
Figure