Latent Paraphrasing: Perturbation on Layers Improves Knowledge Injection in Language Models

As Large Language Models (LLMs) are increasingly deployed in specialized domains with continuously evolving knowledge, the need for timely and precise knowledge injection has become essential. Fine-tuning with paraphrased data is a common approach to enhance knowledge injection, yet it faces two significant challenges: high computational costs due to repetitive external model usage and limited sample diversity. To this end, we introduce LaPael, a latent-level paraphrasing method that applies input-dependent noise to early LLM layers. This approach enables diverse and semantically consistent augmentations directly within the model. Furthermore, it eliminates the recurring costs of paraphrase generation for each knowledge update. Our extensive experiments on question-answering benchmarks demonstrate that LaPael improves knowledge injection over standard fine-tuning and existing noise-based approaches. Additionally, combining LaPael with data-level paraphrasing further enhances performance.

Paper

References (59)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer NFcZ5/10 · confidence 4/52024-07-02

Summary

The paper proposes a new method named LaPael to enhance knowledge injection for large language models. Different from traditional data-level augmentations or noise-based methods, LaPael operates at the latent level, preserving the semantic integrity of the text while introducing meaningful variability. Experimental results on three question-answering datasets show that the proposed method outperforms the baselines.

Strengths

1. The authors propose a latent perturbation for enhancing knowledge injection of LLMs, and the proposed method outperforms the baselines. 2. The paper is written-well, with a direct motivation and a well organized structure.

Weaknesses

1. The difference between the method proposed in this paper and the previous perturbation or enhancement methods in the feature space is not explained clearly. 2. Why is the output distribution of Transformer assumed to be Gaussian in Training Part of Section 4.2? What is the effect of directly calculating the KL divergence of two distributions without considering the type of distribution? The author's explanation will help readers better understand the method. 3. The authors claim that the paraphrasing method requires a high computational cost, so they should compare the proposed method with the paraphrasing method on computational cost.

Questions

1. In Table 7, why was it not compared with the Fine Tuning (+para) method? 2. Will the proposed knowledge injection method have a negative impact on the knowledge already mastered by LLMs?

Rating

5

Confidence

4

Soundness

3

Presentation

3

Contribution

2

Limitations

Please see above Weaknesses and Questions.

Reviewer WC5j6/10 · confidence 3/52024-07-11

Summary

This paper focusses on the ability of LLMs to learn new knowledge. Previous work has shown that paraphrasing techniques help learning this new knowledge. However, as the authors argue, explicit paraphrasing has a high computational cost, and the paraphrased data is of limited diversity. To circumvent this, this paper introduces latent paraphrasing, by adding a latent paraphrasing layer in the standard transformer module, in between the LayerNorm and the MLP. This layer is trained with paraphrased data, generated by an LLM. The optimization objective is to minimize the KL-divergence between the output of a “standard” transformer model with the paraphrases as input, and the output of a transformer including the paraphrasing layer with the original sentences as input. The authors test their approach, called LaPael, on three datasets: SQuAD, StreamingQA, and ArchivalQA, and compare against multiple fine-tuning baselines. They show that LaPael mostly outperforms the baselines, even in cross-domain transfer experiments.

Strengths

* This paper presents a large number of ablation experiments, that show the benefit of each of the components of the proposed approach. These experiments are very insightful, as at first the method might sound a bit complicated. Moreover, the extensive ablation experiments can help steer future research in this direction. * The proposed approach is effective, and outperforms the baselines with relatively large margins.

Weaknesses

* The objective of the paper is to explicitly focus on fine-tuning approaches, instead of approaches that rely on external memory. In that light, it makes sense to only compare against fine-tuning baselines. However, if one is just interested in what method performs best on the task, comparing against external memory based approaches would have been a good addition to the results section. * As a related point, I am wondering to what extent the used datasets can really evaluate new knowledge injection. For example, SQuAD is based on Wikipedia, which the models have probably seen during pretraining. Also see my related question below. * I also have a few other questions about the approach, which I have added in the question section below.

Questions

* The authors mention that they use Vicuna as the base model. It seems unlikely that the model has never seen the new knowledge represented in D_K during pre-training. At the same time, the authors show that the model without adaptation scores much lower than any of the other baselines. This makes me wonder to what extent the authors think that LaPael measures true new knowledge injection in the LLM? Some clarifying questions: * Line 177: regarding the gold mask for tokens that correspond to the named entity. How is determined what the named entities are in the sentence? Do the authors deploy some sort of NER tagger? * Line 193: mentions “rephrasing each question of D_QA”. Should this be “rephrasing each document”? * Line 217: mentions that “the LLM is fine-tuned on the test set”. To confirm — does this refer to the paraphrased version of the test set, D_K? * Line 238: regarding “Combining LaPael and Paraphrases”. I understand the objective of this experiment, and I agree with the authors that it is insightful. I am not entirely sure if I understand the experimental setup here. Specifically, what does “number of paraphrases” mean in the LaPael setting in Figure 4? Is “ours” the default LaPael setup, and “fine-tuning” LaPael + fine-tuning? * Table 7: Can the authors elaborate on how they adapt the baselines in this real-world data scenario?

Rating

6

Confidence

3

Soundness

3

Presentation

3

Contribution

3

Limitations

The limitations are addressed in the appendix.

Reviewer WC5j2024-08-09

Thank you for your response, and clarifications. They largely address my concerns, and I appreciate the additional results for the two new datasets. I have one follow-up question about the results for the new RAG baseline. First of all, thank you for running these experiments, and including the numbers in the rebuttal, and for updating the manuscript with these numbers. Currently, the RAG numbers are quite far from the LaPael numbers. What do you think is the main advantage of using a method like LaPael over the retrieval based method?

Authorsrebuttal2024-08-10

Thank the reviewer for your reply and follow-up question. We are happy to hear that your concerns are largely addressed by our response. Regarding your follow-up question, the main advantage of fine-tuning approaches including ours, over retrieval-based approaches such as RAG lies in simplicity, inference efficiency, and computational cost. Fine-tuning approaches result in a self-contained model that *simplifies* the overall system architecture by eliminating the need for additional infrastructure for document retrieval and ranking during inference. This approach *avoids the extra computational costs* associated with query embedding and extended prompts with retrieved documents, making it more *cost-efficient*, especially in terms of GPU memory, and suitable for deployment in resource-constrained environments. Due to the complexity-performance trade-off, the choice between two approaches depends on the deployment environment. Fine-tuning approaches are specifically suited for settings that require low-latency and resource-efficient deployment. We hope this explanation clarifies your question. If you have any further questions, please let us know.

Reviewer WC5j2024-08-12

Thanks for your elaboration. I appreciate your work for trying a new approach. I'm wondering about the computational cost though, because you also need to train and use the latent paraphraser. I'm assuming the computational cost in the end boils down to certain architectural choices you make. Or would you say LaPael is always computationally more cost efficient than a RAG type of method?

Authorsrebuttal2024-08-13

Thank the reviewer for engaging in this discussion. We are happy to share our response to the question below: > I'm wondering about the computational cost though, because you also need to train and use the latent paraphraser. I'm assuming the computational cost in the end boils down to certain architectural choices you make. Or would you say LaPael is always computationally more cost efficient than a RAG type of method? To clarify, **our comparison focused on the computational cost during inference, not training.** In our previous response, we emphasized that fine-tuning methods are more cost-efficient than RAG-based methods in terms of inference cost. When considering the computational cost for training, fine-tuning methods including LaPael do indeed incur additional costs, particularly due to the fine-tuning of LLMs for knowledge injection. Moreover, LaPael requires further costs for training and utilizing the latent paraphraser, as we mentioned in our responses to Reviewer Zuau (`1-2`) and Reviewer (`4-3`). We hope our answer clarifies the inquiry. If there are any further questions, please let us know.

Reviewer WC5j2024-08-13

Thank you! I think it would be valuable to add some additional discussion around this topic in the paper, as it clarifies the motivation for your approach.

Authorsrebuttal2024-08-14

We do appreciate your valuable suggestions on our work and will gladly continue improving our paper. Thank the reviewer once again for your time and effort in helping us enhance our work.

Reviewer bjHu3/10 · confidence 5/52024-07-11

Summary

This paper presents LaPael, a novel approach to injecting new knowledge into Large Language Models (LLMs). Previous works have shown that fine-tuning the model with data augmented by paraphrasing helps the model learn new knowledge. However, this requires high-quality paraphrased data each time new knowledge is injected, which is costly. The paper proposes a method that introduces a paraphraser layer within the LLMs, which acts as a latent paraphraser that paraphrases the input text in the latent space. The authors train the latent paraphraser using paraphrased data. Once the latent paraphraser is trained, it is used to fine-tune the LLM on the new knowledge. LaPael outperforms standard fine-tuning and paraphrasing approaches, showing improvements on question-answering benchmarks.

Strengths

1. The paraphraser layer within LLMs introduces a novel method for incorporating new knowledge, reducing the need for high-quality paraphrased data and reducing the significant cost of fine-tuning the model. 2. The paper demonstrates that LaPael outperforms the supervised fine-tuning method on question-answering benchmarks.

Weaknesses

**The major weakness of the paper lies in the experiment section and the details provided regarding the experiment. Below are my concerns and questions related to this section:** 1. Line 190: "We use the subset of questions in the test set of each dataset for $D_{QA}$" -> Why is only a subset of questions chosen instead of the entire test set? No details about this are mentioned in the paper. 2. Creating a document out of question-and-answer pairs to inject knowledge into the LLM and then testing it on the same test set is inappropriate for evaluating knowledge injection. It would have been more suitable to use datasets with available documents, inject the knowledge from these documents, and then test the model on the QA. Additionally, the documents used should not have been seen by the pretrained LLM during its pretraining phase to quantify how much knowledge has been injected into the LLM. 3. There are no statistics available for the created documents, such as their size. Creating small paragraphs from question-and-answer pairs, fine-tuning the model on these paragraphs, and then testing it on the same question-and-answer pairs does not constitute a correct and fair evaluation. 4. Line 212: Why are in-context examples used instead of experimenting with a zero-shot setting to assess the extent of the model's learned knowledge? 5. Lines 184-185: It is not clear what the authors meant by "We sample N noise." 6. Line 182: "From Equation 10" should be "from Equation 15." **The writing of the paper is also very weak. Here are a few examples:** a. The acronym "LM" is used in the experiment section without being defined. The paper uses "LLM" for Large Language Models and sometimes "LM." b. The paper uses "$D_{knowledge}$" and "$D_{K}$" interchangeably. Please ensure consistency. c. There are missing details in the experiment section, and no correct reference is provided to indicate where in the appendix these details can be found.

Questions

Please refer to the weaknesses section.

Rating

3

Confidence

5

Soundness

1

Presentation

1

Contribution

2

Limitations

NA

Reviewer Zuau5/10 · confidence 4/52024-07-13

Summary

This paper proposed a latent paraphraser to generate paraphrased data which will be used as augmented data in LLMs' fine-tuning. To tackle the challenges of repetitive external model interventions, the latent paraphraser (LaPael) is trained to add a small perturbation at the latent feature level of the LLM and eliminate the need for users to repeatedly paraphrase using LLMs once latent paraphrasers are trained. Specially, with the paired-data as input, i,e., original and paraphrased sentence, the training objective is to minimise the KL divergence between distributions of original sentence after the paraphraser transformation and the distribution of the paraphrased sentence. The experimental results show that LaPael outperforms existing noise-based paraphraser in generating better augmentation data.

Strengths

1. The paper is well writen and easy-to-follow and the research topic of generating augmentation data is important. 2. The empirical results clearly show the superiority of the proposed method, LaPael.

Weaknesses

1. The cost of training the latent paraphraser is not clear, as expensive training will impedes the efficiency of the proposed method. 2. Lack of qualitative analysis of show how the phrased sentences differ from the given paraphrased sentences from GPT3.5.

Questions

1. In table3, the cross-domain transfer: why the results trained on X evaluated on X, is worse than trained on X but evaluated on Y. 2. Any explainations or case study showing the generated paraphase sentences from LaPael? 3. The computation cost comparsion with noise-based paraphraser.

Rating

5

Confidence

4

Soundness

3

Presentation

3

Contribution

2

Limitations

The trade-off between task performance and computation cost.

Reviewer Zuau2024-08-12

Q1: I am asking for the **computation cost comparison** between noise-based and the proposed method, as the author mentioned "We have clearly stated the cost of training the latent paraphraser compared to noise-based fine-tuning baselines in the revised manuscript.", But I couldn't find it. Q2: Thanks for your results and the acknowledgment of "**this degradation of math reasoning performance**". I keep my original score mostly because the inefficiency in keeping the (other) basic reasoning capability, e.g., math of the LLMs after inserting such paraphrase layer, as one of the important principle of knowledge injecting is not to destroy the existing knowledge capacity.

Authorsrebuttal2024-08-13

Thank the reviewer for clarifying the questions. > Q1: I am asking for the computation cost comparison between noise-based and the proposed method, as the author mentioned "We have clearly stated the cost of training the latent paraphraser compared to noise-based fine-tuning baselines in the revised manuscript.", But I couldn't find it. We apologize for any confusion. Regarding the revised manuscript, we have consistently addressed all comments in the revised version of the manuscript, which unfortunately we cannot upload at this moment. Here, we provide the computational cost comparison between noise-based baselines and the proposed method in terms of per-step FLOPs for training: ### Noise-based baselines: * Fine-tuning LLM: $3F$ FLOPs ### The proposed method: * Fine-tuning LLM: $3.036F$ FLOPs * Additional training for latent pararphasers: $1.108F$ FLOPs. We believe that our method offers a viable option to **enhance the effectiveness of knowledge injection** into LLMs, despite requiring some initial training cost. This cost leads to superior results compared to noise-based baselines. > Q2: Thanks for your results and the acknowledgment of "this degradation of math reasoning performance". I keep my original score mostly because the inefficiency in keeping the (other) basic reasoning capability, e.g., math of the LLMs after inserting such paraphrase layer, as one of the important principle of knowledge injecting is not to destroy the existing knowledge capacity. Thank the reviewer for sharing valuable thoughts. While we understand the concern regarding fine-tuning and catastrophic forgetting, we would like to emphasize that **this is a common challenge across all fine-tuning methods, not just our approach**, as evidenced by the previous work [1]. Our method does not significantly exacerbate this issue while improving the knowledge injection performance. From this perspective, we believe our method offers a valuable contribution. We are very grateful for the opportunity to discuss these points with the reviewer. The reviewer's engagement in this discussion is highly valuable to us. Please let us know before the discussion period ends if there are any further concerns or questions. **Reference** [1] Jang et al., Towards Continual Knowledge Learning of Language Models

Reviewer Zuau2024-08-10

Thanks very much for your detailed clarification! Follow up questions: (1) Can you give a comparison here between noise-based paraphraser (such as FreeLB) and LaPael? (2) I am curious, after adding such a latent Paraphraser layer, what are the inference performances changes on Unrelated but Basic Reasoning datasets? such as math reasoning, code generation. As the inplementation is expected to not degrader the basic model capacity.

Authorsrebuttal2024-08-11

Thank you for reviewing our response and providing additional comments. We greatly appreciate your feedback and will address your questions below. --- > Can you give a comparison here between noise-based paraphraser (such as FreeLB) and Lapael? Here is the comparison between two noise-based baselines and Lapael. The noise-based baselines, NEFTune and FreeLB, do not require a preliminary step prior to fine-tuning LLMs: * **NEFTune:** During fine-tuning, NEFTune adds random noise to token embeddings during fine-tuning to improve model robustness. [1] * **FreeLB:** During fine-tuning, FreeLB introduces adversarial perturbations to token embeddings, aiming to minimize adversarial risk by optimizing the model's performances across various perturbations. [2] * **LaPael (ours):** Uses an *input-dependent noise generator* (latent paraphrasers) that applies noise to latent features, learning the noise distribution directly from given paraphrases. LaPael optimizes its latent pararphrasers by aligning the output distributions between the perturbed model with the original sentence and the model with paraphrased sentences, as detailed in Section 4.2 of the main paper. This approach enables LaPael to generate noise that is more contextually appropriate and effective. We would like to emphasize that while LaPael requires an additional step of training latent paraphrasers before fine-tuning the LLM, this overhead becomes negligible (previous response `1-2`) and significant performance gains can be achieved compared to the baselines (Tables 2 and 3). We have added this detailed comparison in addition to the content on Lines 105-107 of the main manuscript. --- > I am curious, after adding such a latent Paraphraser layer, what are the inference performance changes on Unrelated but Basic Reasoning datasets? such as math reasoning, code generation. As the implementation is expected to not degrader the basic model capacity. Thank you for the insightful question. Fine-tuning LLMs for knowledge injection can indeed degrade the model's capacity due to *catastrophic forgetting* induced by the fine-tuning process. To illustrate this, we provide the math reasoning performance of the LLM (fine-tuned on the synthetic documents of the SQuAD dataset) on the GSM8K [3] test set. * Performance on GSM8K test set after knowledge injection | GSM8K | Accuracy | | -------- | -------- | | No adapt.| 23.05 | | Fine-Tuning| 18.88 | | Ours (Fine-Tuning with LaPael) | 18.04 | The results show that fine-tuning itself largely contributes to the degradation of math reasoning performance. As discussed in our response to Reviewer NFcZ (`4-5`), maintaining reasoning performance after fine-tuning is beyond the scope of our work, which primarily focuses on improving knowledge injection. Nonetheless, we acknowledge the importance of addressing this problem and its potential to guide future research. We have included this point and the associated results in the limitations section of our revised manuscript. --- We hope that our response sufficiently addresses your questions. Should you have any further inquiries or comments, please don’t hesitate to let us know so that we can resolve them. If you find that most of your concerns have been addressed, we kindly ask that you consider adjusting the score accordingly. Thank you so much for your effort and time in reviewing our work. **Reference** [1] Jain et al., NEFTune: Noisy Embeddings Improve Instruction Fine-tuning. [2] Zhu et al., FreeLB: Enhanced Adversarial Training for Natural Language Understanding. [3] Cobbe et al., Training Verifiers to Solve Math Word Problems

Reviewer bjHu2024-08-12

Thank you to the authors for their rebuttal. I have read the authors' responses and the comments from other reviewers.

Authorsrebuttal2024-08-13

We would like to thank the reviewer for their engagement during this phase. We hope we have addressed the issues raised. It would be very helpful if the reviewer could provide any further concerns or suggestions that remain. Thank the reviewer once again for your time and effort in this process.

Reviewer NFcZ2024-08-13

Thanks to the authors for the detailed responses. After reading the other reviews and the rebuttals, I maintain the original rating.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC