IKnow: Instruction-Knowledge-Aware Continual Pretraining for Effective Domain Adaptation
Tianyi Zhang, Florian Mai, Lucie Flek
TL;DR
IKnow tackles domain adaptation for instruction-tuned LLMs by avoiding reliance on base weights or external knowledge databases. It introduces a three-stage pipeline that converts unlabeled test contexts into instruction–response pairs and trains with three self-supervised tasks—Masked Token Prediction, Masked Phrase Prediction, and NL↔KG—to preserve instruction-following while encoding entity–relation semantics. Experimental results on RepliQA and SciQAG show consistent gains over next-token baselines, with notable improvements when employing knowledge-aware tasks, though effects vary by model. The work demonstrates a practical path to domain adaptation that leverages text-internal knowledge, with implications for safer, more robust deployment of instruction-tuned LLMs in new domains.
Abstract
Continual pretraining promises to adapt large language models (LLMs) to new domains using only unlabeled test-time data, but naively applying standard self-supervised objectives to instruction-tuned models is known to degrade their instruction-following capability and semantic representations. Existing fixes assume access to the original base model or rely on knowledge from an external domain-specific database - both of which pose a realistic barrier in settings where the base model weights are withheld for safety reasons or reliable external corpora are unavailable. In this work, we propose Instruction-Knowledge-Aware Continual Adaptation (IKnow), a simple and general framework that formulates novel self-supervised objectives in the instruction-response dialogue format. Rather than depend- ing on external resources, IKnow leverages domain knowledge embedded within the text itself and learns to encode it at a deeper semantic level.
