Abstract
Query reformulation is essential for improving the performance of downstream NLP systems on noisy or ambiguous user inputs. While previous Reinforcement Learning (RL) approaches succeeded in maximizing downstream accuracy, they often produced non-fluent "word salad" outputs. This paper introduces QRT5, a framework utilizing pre-trained T5 transformers optimized via RL. QRT5 demonstrates superior sample efficiency, reaching peak performance significantly faster than previous RNN-based baselines, while maintaining high natural language fluency. Our results show that QRT5 resists semantic drift and improves performance across Question Answering and Intent Classification tasks.
Introduction
In real-world NLP applications, user queries are frequently noisy, ungrammatical, or ambiguous. Directly processing these queries through downstream systems like Question Answering (QA) models or Intent Classifiers often yields suboptimal results. Query reformulation aims to rewrite these inputs into clean, well-formed natural language.
Previous state-of-the-art frameworks, such as AQA, employed translation-based RNNs tuned with RL to maximize downstream accuracy. However, these models often "gamed" the system, generating repetitive, machine-optimized strings that were unreadable to humans. This research addresses the challenge of optimizing for downstream utility without sacrificing linguistic fluency.
Methodology
The proposed framework, QRT5, replaces older GNMT architectures with a pre-trained T5-base transformer. The training process involves two distinct phases:
- Supervised Fine-Tuning (SFT): The model is initially fine-tuned on paraphrasing and denoising tasks using datasets like Quora and Multi-domain Question Rewriting (MQR) to establish a baseline for clean text generation.
- Reinforcement Learning (RL): The model is further optimized using Policy Gradient (REINFORCE) and Self-Critical (SC) training. The reward signal is derived from the performance of a black-box downstream environment, such as the F1 score of a QA model on the SearchQA dataset.
To ensure fluency, the authors developed a custom Fluency Proxy. Since standard metrics like BLEU correlate poorly with human judgment, a separate T5 model was trained on the Question Well-formedness (QW) dataset to serve as an automated evaluator.
Key Results
Sample Efficiency and Performance
QRT5 exhibits remarkable sample efficiency compared to the RNN-based AQA baseline. While the baseline requires over 100,000 steps to reach its peak, T5-based models achieve comparable or superior performance in a fraction of the time.
As shown in Figure 2, T5-based models reach an F1 score of approximately 0.37 within 5,000 to 10,000 steps, whereas the AQA baseline takes significantly longer to converge. This represents a nearly 3x improvement in training speed for production environments where downstream system calls are expensive.
Fluency and Intent Classification
A critical advantage of QRT5 is its resistance to "semantic drift." Unlike older models that devolved into gibberish, T5's massive linguistic prior helps it maintain human-readable outputs. The custom fluency evaluator assigned QRT5 a mean score of 0.1128 post-RL, compared to 0.0381 for the AQA baseline.
Furthermore, RL tuning proved essential for task utility. While naive SFT on paraphrasing tasks slightly decreased Intent Classification accuracy (from 60.1% to 58.8%), RL-tuned QRT5 reformulations boosted accuracy to 62.0%, demonstrating the model's ability to balance fluency with functional utility.
Discussion and Limitations
Despite its successes, QRT5 is susceptible to overfitting during the RL phase. Prolonged training can lead to a drop in validation rewards and the emergence of repetitive outputs, compromising fluency. Standard hyperparameter tuning did not fully mitigate this instability.
Future work will explore the generalization of reformulators across diverse out-of-domain datasets and the integration of conversational context to produce more informed, context-aware reformulations.
Summary updated