PAFT: Prompt-Agnostic Fine-Tuning
Chenxing Wei, Yao Shu, Mingwen Ou, Ying Tiffany He, Fei Richard Yu
2025-02-19
Summary
This paper talks about PAFT, a new method to make large language models (LLMs) better at understanding different ways of asking the same thing by training them to focus on the meaning of tasks rather than specific wordings.
What's the problem?
LLMs often struggle when the wording of a prompt changes slightly, which can cause their performance to drop. This makes them less reliable and harder to use in real-world situations where prompts might not always be perfectly phrased.
What's the solution?
The researchers developed PAFT, which trains LLMs with a variety of prompts that ask the same question in different ways. They created a diverse set of synthetic prompts and used a dynamic training process where prompts were randomly sampled during fine-tuning. This helped the models learn the core meaning of tasks instead of overfitting to specific wordings.
Why it matters?
This matters because it makes LLMs more robust and flexible, allowing them to perform well across a wide range of prompts, including ones they haven't seen before. PAFT improves both accuracy and speed while using minimal extra computational resources, making it a practical solution for building more reliable AI systems.
Abstract
While Large Language Models (LLMs) adapt well to downstream tasks after fine-tuning, this adaptability often compromises prompt robustness, as even minor prompt variations can significantly degrade performance. To address this, we propose Prompt-Agnostic Fine-Tuning(PAFT), a simple yet effective approach that dynamically adjusts prompts during fine-tuning. This encourages the model to learn underlying task principles rather than overfitting to specific prompt formulations. PAFT operates in two stages: First, a diverse set of meaningful, synthetic candidate <PRE_TAG>prompts</POST_TAG> is constructed. Second, during fine-tuning, prompts are randomly sampled from this set to create dynamic training inputs. Extensive experiments across diverse datasets and LLMs demonstrate that models trained with PAFT exhibit strong robustness and generalization across a wide range of prompts, including unseen ones. This enhanced robustness improves both model performance and inference speed while maintaining training efficiency. Ablation studies further confirm the effectiveness of PAFT.