Introduction
In professional translation workflows, human-in-the-loop systems are essential. A machine translation (MT) system generates a draft, which a human post-editor then corrects. Ideally, the MT system should adapt to these corrections in real-time to avoid repeating the same errors in subsequent sentences. However, updating modern Neural Machine Translation (NMT) models dynamically presents significant technical challenges.
The Challenge of Real-Time Adaptation
Traditional methods for updating NMT models, such as Online Tuning (gradient-based fine-tuning on the fly), are computationally expensive and require substantial GPU resources for every sentence. Furthermore, these methods often suffer from "catastrophic forgetting," where the model improves on the current document but loses general translation proficiency.
Non-parametric approaches like kNN-MT offer an alternative by using a translation memory to store corrections. However, standard kNN-MT relies on a fixed interpolation weight to balance the base model and the memory. This "one-size-fits-all" approach is brittle, especially when human feedback is sparse or inconsistent.
The KoK Architecture: Dynamic Trust in Feedback
To address these limitations, the researchers propose KNN-over-KNN (KoK). This non-parametric method allows NMT systems to learn from human corrections in real-time without modifying the base model's weights. The system introduces two distinct k-nearest-neighbor modules that work alongside a frozen, pre-trained NMT model.
- Token-KNN (The Memory): As a human provides corrections, the system stores the model's internal hidden state as a key and the corrected word as the value. During inference, the system retrieves similar contexts to suggest corrections.
- Policy-KNN (The Decision Maker): This novel module determines the interpolation weight ($\lambda_t$) dynamically for every word. It analyzes features from the Token-KNN's retrieval results—such as neighbor distance and consistency—to decide whether to trust the memory or the base NMT model. If the retrieved corrections are consistent and similar to the current context, the system increases the weight of the Token-KNN.
Experimental Evaluation
The KoK system was evaluated on two domain-specific benchmarks: EMEA (medical domain) and JRC-Acquis (legal domain). The researchers categorized documents into "buckets" by length to observe how the system adapts as human feedback accumulates over time.
Key Results and Performance
KoK demonstrated significant improvements in translation accuracy, achieving up to a 12.9 BLEU point gain on the EMEA dataset compared to a standard pre-trained model. It consistently outperformed traditional gradient-based online tuning, particularly as the document length increased and the "memory" grew.
A critical metric in this study was the R-indicator, which measures the system's ability to remember words that have appeared only a few times in previous corrections. As shown in the results, KoK excels at "fixing it once and remembering it forever," significantly outperforming baselines in low-frequency scenarios ($R_1, R_2$).
Conclusion and Future Directions
KoK provides a robust, efficient, and non-parametric solution for real-time NMT adaptation. By treating the choice between model and memory as a dynamic classification problem, it avoids the pitfalls of fixed interpolation and catastrophic forgetting. Future work will focus on reducing the computational latency of dual-KNN lookups and managing large-scale datastores across diverse production environments.
Summary updated