paper-with-me

홈 › Papers

kNN-BOX: A Unified Framework for Nearest Neighbor Generation

2023-02-27 · Wenhao Zhu, Qianfeng Zhao, Yunzhe Lv, ShuJian Huang, Siheng Zhao, Sizhe Liu, Jiajun Chen

Augmenting the base neural model with a token-level symbolic datastore is a novel generation paradigm and has achieved promising results in machine translation (MT). In this paper, we introduce a unified framework kNN-BOX, which enables quick development and interactive analysis for this novel paradigm. kNN-BOX decomposes the datastore-augmentation approach into three modules: datastore, retriever and combiner, thus putting diverse kNN generation methods into a unified way. Currently, kNN-BOX has provided implementation of seven popular kNN-MT variants, covering research from performance enhancement to efficiency optimization. It is easy for users to reproduce these existing works or customize their own models. Besides, users can interact with their kNN generation systems with kNN-BOX to better understand the underlying inference process in a visualized way. In the experiment section, we apply kNN-BOX for machine translation and three other seq2seq generation tasks, namely, text simplification, paraphrase generation and question generation. Experiment results show that augmenting the base neural model with kNN-BOX leads to a large performance improvement in all these tasks. The code and document of kNN-BOX is available at https://github.com/NJUNLP/knn-box.

📄 PDF Abstract BibTeX arXiv:2302.13574

Code (1)

njunlp/knn-box 공식 구현 pytorch

Tasks

Machine TranslationParaphrase GenerationQuestion GenerationQuestion-GenerationText SimplificationTranslation

Methods 이 논문이 사용한 방법론

Tanh Activation 설명 없음
Sigmoid Activation 설명 없음
BASE 설명 없음
LSTM An LSTM is a type of recurrent neural network that addresses the vanishing gradient problem in vanilla…
Seq2Seq Seq2Seq, or Sequence To Sequence, is a model used in sequence prediction tasks, such as language modelling and machine translation. The idea is to use one…

Similar Papers 제목 키워드 기반

Interpolation between Convolution and Attention via K-Nearest Neighbors

2026-05-31 · Mingi Kang arxiv

The shift from Convolutional Neural Networks to Transformers has reshaped computer vision, yet these two architectural families are typically viewed as fundamentally distinct. Convolutional Neural Networks are defined by…

Watch the Neighbors: A Unified K-Nearest Neighbor Contrastive Learning Framework for OOD Intent Discovery

2022-10-17 · Yutao Mou, Keqing He, Pei Wang, Yanan Wu 외

Discovering out-of-domain (OOD) intent is important for developing new skills in task-oriented dialogue systems. The key challenges lie in how to transfer prior in-domain (IND) knowledge to OOD clustering, as well as joi…

ClusteringContrastive LearningDiversityIntent Discovery+2

Nearest Neighbor Non-autoregressive Text Generation

2022-08-26 · Ayana Niwa, Sho Takase, Naoaki Okazaki

Non-autoregressive (NAR) models can generate sentences with less computation than autoregressive models but sacrifice generation quality. Previous studies addressed this issue through iterative decoding. This study propo…

DecoderMachine TranslationText GenerationTranslation

Unifying Convolution and Attention via Convolutional Nearest Neighbors

2025-11-18 · Mingi Kang, Jeová Farias Sales Rocha Neto arxiv

Convolutional Neural Networks and Vision Transformers are the two dominant architectural families in computer vision, defined by spatially local convolution and global self-attention respectively. Despite their apparent …

UniNL: Aligning Representation Learning with Scoring Function for OOD Detection via Unified Neighborhood Learning

2022-10-19 · Yutao Mou, Pei Wang, Keqing He, Yanan Wu 외

Detecting out-of-domain (OOD) intents from user queries is essential for avoiding wrong operations in task-oriented dialogue systems. The key challenge is how to distinguish in-domain (IND) and OOD intents. Previous meth…

Contrastive LearningOut of Distribution (OOD) DetectionRepresentation LearningTask-Oriented Dialogue Systems