Demasking Fine-Tuning for Knowledge Injection in Autoregressive and Diffusion LLMs

Xu Pan, Ely Hahami, Jingxuan Fan, Ziqian Xie, Haim Sompolinsky
10/10/2025
cs.CLcs.AI
diffusion-flow

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Large language models (LLMs) are often used in environments where facts evolve, yet factual knowledge updates via fine-tuning on unstructured plain text often suffer from 1) reliance on paraphrasing augmentation, without which training does not generalize to downstream QA tasks, and 2) the reversal curse. Recent evidence of the sample efficiency of masked diffusion large language models (dLLMs) and the bidirectional information flow in their demasking training objective suggests that the demasking objective may facilitate knowledge learning from raw knowledge text.

Show full abstract

We test this hypothesis in controlled knowledge fine-tuning experiments on dLLMs and autoregressive LLMs (arLLMs) and find that while arLLMs rely on paraphrase augmentation to generalize knowledge text into question-answering (QA) capability, dLLMs do not require paraphrases to achieve high QA accuracy. We find that giving arLLMs a demasking objective, where the LLM must reconstruct the original text from a masked copy given in context, improves the efficacy of knowledge injection, removing the need for paraphrases and mitigating the reversal curse, recovering most of the gap between arLLMs and dLLMs. We also provide preliminary evidence of the broader applicability of using the demasking objective in arLLM fine-tuning on a large-scale knowledge-intensive dataset.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{pan2025demasking,
  title  = {Demasking Fine-Tuning for Knowledge Injection in Autoregressive and Diffusion LLMs},
  author = {Xu Pan and Ely Hahami and Jingxuan Fan and Ziqian Xie and Haim Sompolinsky},
  year   = {2025},
  eprint = {2510.09885},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.09885v7}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.09885.svg)](https://codeofpaper.com/paper/2510.09885)

Discussion