Towards Context-Robust LLMs: A Gated Representation Fine-tuning Approach
Large Language Models (LLMs) enhanced with external contexts, such as through retrieval-augmented generation (RAG), often face challenges in handling imperfect evidence.They tend to over-rely on external knowledge, making them vulnerable to misleading and unhelpful contexts.To address this, we propose the concept of context-robust LLMs, which can effectively balance internal knowledge with external context, similar to human cognitive processes.Specifically, context-robust LLMs should rely on external context only when lacking internal knowledge, identify contradictions between internal and external knowledge, and disregard unhelpful contexts.To achieve this goal, we introduce Grft, a lightweight and plug-and-play gated representation fine-tuning approach.Grft consists of two key components: a gating mechanism to detect and filter problematic inputs, and low-rank representation adapters to adjust hidden representations.By training a lightweight intervention function with only 0.0004% of model size on fewer than 200 examples, Grft can effectively adapts LLMs towards context-robust behaviors.
Authors
- Hui Liu (ORCID: https://orcid.org/0000-0003-4599-5702)
- Tianqi Zheng
- Yue Xing (ORCID: https://orcid.org/0009-0001-2499-7461)
- Hanqing Lu
- Kai Guo (ORCID: https://orcid.org/0009-0009-5424-6106)
- Pengfei He (ORCID: https://orcid.org/0000-0002-9220-8639)
- Shenglai Zeng
Publication Details
- Published
- 2025-01-01
- DOI
- https://doi.org/10.18653/v1/2025.acl-long.506
- Primary Topic
- Natural Language Processing Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Science Foundation
- U.S. Department of Commerce
- Michigan Department of Agriculture and Rural Development