English
Related papers

Related papers: kNN-Prompt: Nearest Neighbor Zero-Shot Inference

200 papers

Speech recognition performance varies by language, domain, and speaker characteristics such as accent, but fine-tuning a model on any of these categories may lead to catastrophic forgetting. Token-level $k$ nearest neighbor search ($k$NN),…

Computation and Language · Computer Science 2025-02-12 Maya K. Nachesa , Vlad Niculae

Task-Oriented Parsing (TOP) enables conversational assistants to interpret user commands expressed in natural language, transforming them into structured outputs that combine elements of both natural language and intent/slot tags. Recently,…

Computation and Language · Computer Science 2023-12-19 Wenting Zhao , Ye Liu , Yao Wan , Yibo Wang , Qingyang Wu , Zhongfen Deng , Jiangshu Du , Shuaiqi Liu , Yunlong Xu , Philip S. Yu

Prompting language models (LMs) with training examples and task descriptions has been seen as critical to recent successes in few-shot learning. In this work, we show that finetuning LMs in the few-shot setting can considerably reduce the…

Computation and Language · Computer Science 2021-07-02 Robert L. Logan , Ivana Balažević , Eric Wallace , Fabio Petroni , Sameer Singh , Sebastian Riedel

Large language models (LLMs) often hallucinate and lack the ability to provide attribution for their generations. Semi-parametric LMs, such as kNN-LM, approach these limitations by refining the output of an LM for a given prompt using its…

Computation and Language · Computer Science 2025-04-28 Minghan Li , Xilun Chen , Ari Holtzman , Beidi Chen , Jimmy Lin , Wen-tau Yih , Xi Victoria Lin

LLM-generated text (LGT) detection is essential for reliable forensic analysis and for mitigating LLM misuse. Existing LGT detectors can generally be categorized into two broad classes: learning-based approaches and zero-shot methods.…

Computation and Language · Computer Science 2026-04-03 Kahim Wong , Kemou Li , Haiwei Wu , Jiantao Zhou

Large language models (LLMs) have revolutionized zero-shot task performance, mitigating the need for task-specific annotations while enhancing task generalizability. Despite its advancements, current methods using trigger phrases such as…

Computation and Language · Computer Science 2024-06-13 Saurabh Srivastava , Chengyue Huang , Weiguo Fan , Ziyu Yao

Few-shot prompting and step-by-step reasoning have enhanced the capabilities of Large Language Models (LLMs) in tackling complex tasks including code generation. In this paper, we introduce a prompt selection and augmentation algorithm…

Robotics · Computer Science 2024-03-21 On Tai Wu , Frodo Kin Sun Chan , Zunhao Zhang , Yan Nei Law , Benny Drescher , Edmond Shiao Bun Lai

kNN-MT, recently proposed by Khandelwal et al. (2020a), successfully combines pre-trained neural machine translation (NMT) model with token-level k-nearest-neighbor (kNN) retrieval to improve the translation accuracy. However, the…

Computation and Language · Computer Science 2021-05-28 Xin Zheng , Zhirui Zhang , Junliang Guo , Shujian Huang , Boxing Chen , Weihua Luo , Jiajun Chen

Recent advances have shown that optimizing prompts for Large Language Models (LLMs) can significantly improve task performance, yet many optimization techniques rely on heuristics or manual exploration. We present LatentPrompt, a…

Computation and Language · Computer Science 2025-08-05 Mateusz Bystroński , Grzegorz Piotrowski , Nitesh V. Chawla , Tomasz Kajdanowicz

Large Language Models (LLMs) are gaining significant popularity in recent years for specialized tasks using prompts due to their low computational cost. Standard methods like prefix tuning utilize special, modifiable tokens that lack…

Computation and Language · Computer Science 2024-10-14 Nusrat Jahan Prottasha , Asif Mahmud , Md. Shohanur Islam Sobuj , Prakash Bhat , Md Kowsher , Niloofar Yousefi , Ozlem Ozmen Garibay

Interpretability techniques in NLP have mainly focused on understanding individual predictions using attention visualization or gradient-based saliency maps over tokens. We propose using k nearest neighbor (kNN) representations to identify…

Computation and Language · Computer Science 2020-10-20 Nazneen Fatema Rajani , Ben Krause , Wengpeng Yin , Tong Niu , Richard Socher , Caiming Xiong

Re-rankers, which order retrieved documents with respect to the relevance score on the given query, have gained attention for the information retrieval (IR) task. Rather than fine-tuning the pre-trained language model (PLM), the large-scale…

Information Retrieval · Computer Science 2023-05-24 Sukmin Cho , Soyeong Jeong , Jeongyeon Seo , Jong C. Park

In this work, we propose a simple method that applies a large language model (LLM) to large-scale retrieval in zero-shot scenarios. Our method, the Language language model as Retriever (LameR), is built upon no other neural models but an…

Computation and Language · Computer Science 2023-08-03 Tao Shen , Guodong Long , Xiubo Geng , Chongyang Tao , Tianyi Zhou , Daxin Jiang

We consider language modelling (LM) as a multi-label structured prediction task by re-framing training from solely predicting a single ground-truth word to ranking a set of words which could continue a given context. To avoid annotating…

Computation and Language · Computer Science 2021-12-14 Arvid Frydenlund , Gagandeep Singh , Frank Rudzicz

Large Language Models (LLMs) have shown impressive zero-shot performance across a variety of Natural Language Processing tasks, including document re-ranking. However, their effectiveness degrades on unseen tasks and domains, largely due to…

Information Retrieval · Computer Science 2025-05-02 Marco Braga , Pranav Kasela , Alessandro Raganato , Gabriella Pasi

Using tools by Large Language Models (LLMs) is a promising avenue to extend their reach beyond language or conversational settings. The number of tools can scale to thousands as they enable accessing sensory information, fetching updated…

Information Retrieval · Computer Science 2024-12-06 Mohammad Kachuee , Sarthak Ahuja , Vaibhav Kumar , Puyang Xu , Xiaohu Liu

Khandelwal et al. (2020) use a k-nearest-neighbor (kNN) component to improve language model performance. We show that this idea is beneficial for open-domain question answering (QA). To improve the recall of facts encountered during…

Computation and Language · Computer Science 2020-10-14 Nora Kassner , Hinrich Schütze

Neural Networks trained with gradient descent are known to be susceptible to catastrophic forgetting caused by parameter shift during the training process. In the context of Neural Machine Translation (NMT) this results in poor performance…

Computation and Language · Computer Science 2019-06-20 Ankur Bapna , Orhan Firat

Nearest Neighbor Machine Translation ($k$NN-MT) has achieved great success in domain adaptation tasks by integrating pre-trained Neural Machine Translation (NMT) models with domain-specific token-level retrieval. However, the reasons…

Computation and Language · Computer Science 2023-10-25 Ruize Gao , Zhirui Zhang , Yichao Du , Lemao Liu , Rui Wang

Query expansion is a widely used technique to improve the recall of search systems. In this paper, we propose an approach to query expansion that leverages the generative abilities of Large Language Models (LLMs). Unlike traditional query…

Information Retrieval · Computer Science 2023-05-08 Rolf Jagerman , Honglei Zhuang , Zhen Qin , Xuanhui Wang , Michael Bendersky