Pre-trained Language Models (PLMs), as parametric-based eager learners, have become the de-facto choice for current paradigms of Natural Language Processing (NLP). In contrast, k-Nearest-Neighbor (k-NN) classifiers, as the lazy learning paradigm, tend to mitigate over-fitting and isolated noise. In this paper, we revisit k-NN classifiers for augmenting the PLMs-based classifiers. From the methodological level, we propose to adopt k-NN with textual representations of PLMs in two steps: (1) Utilize k-NN as prior knowledge to calibrate the training process. (2) Linearly interpolate the probability distribution predicted by k-NN with that of the PLMs' classifier. At the heart of our approach is the implementation of k-NN-calibrated training, which treats predicted results as indicators for easy versus hard examples during the training process. From the perspective of the diversity of application scenarios, we conduct extensive experiments on fine-tuning, prompt-tuning paradigms and zero-shot, few-shot and fully-supervised settings, respectively, across eight diverse end-tasks. We hope our exploration will encourage the community to revisit the power of classical methods for efficient NLP\footnote{Code and datasets are available in https://github.com/zjunlp/Revisit-KNN.


翻译:预训练语言模型(PLMs)作为基于参数的即时学习模型,已成为当前自然语言处理(NLP)范式中的事实标准。相比之下,k近邻(k-NN)分类器作为懒惰学习范式,能够有效缓解过拟合和孤立噪声问题。本文重新审视了k-NN分类器在增强PLMs分类器中的应用。在方法论层面,我们提出分两步将k-NN与PLMs的文本表示相结合:(1)利用k-NN作为先验知识来校准训练过程;(2)将k-NN预测的概率分布与PLMs分类器的概率分布进行线性插值。该方法的核心在于实现k-NN校准训练,即在训练过程中将预测结果作为简单样本与困难样本的判别指标。从应用场景多样性角度出发,我们针对微调、提示微调范式以及零样本、少样本和全监督设置,在八个不同终端任务上开展了广泛实验。希望本研究能激励学界重新审视经典方法在高效NLP中的潜力\footnote{代码与数据集详见https://github.com/zjunlp/Revisit-KNN.}。

1
下载
关闭预览

相关内容

分类是数据挖掘的一种非常重要的方法。分类的概念是在已有数据的基础上学会一个分类函数或构造出一个分类模型(即我们通常所说的分类器(Classifier))。该函数或模型能够把数据库中的数据纪录映射到给定类别中的某一个,从而可以应用于数据预测。总之,分类器是数据挖掘中对样本进行分类的方法的统称,包含决策树、逻辑回归、朴素贝叶斯、神经网络等算法。
【AAAI2022】基于对比学习的预训练语言模型剪枝压缩
专知会员服务
29+阅读 · 2022年1月24日
专知会员服务
82+阅读 · 2021年10月15日
专知会员服务
90+阅读 · 2021年6月29日
专知会员服务
39+阅读 · 2021年6月6日
专知会员服务
124+阅读 · 2020年9月8日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
164+阅读 · 2019年10月12日
强化学习最新教程,17页pdf
专知会员服务
182+阅读 · 2019年10月11日
浅聊对比学习(Contrastive Learning)
极市平台
3+阅读 · 2022年7月26日
浅聊对比学习(Contrastive Learning)第一弹
PaperWeekly
1+阅读 · 2022年6月10日
深度自进化聚类:Deep Self-Evolution Clustering
我爱读PAMI
15+阅读 · 2019年4月13日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
国家自然科学基金
2+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Arxiv
12+阅读 · 2023年5月31日
VIP会员
最新内容
BES:让语言模型通过双向进化搜索自我改进
专知会员服务
3+阅读 · 5月30日
以色列-美国-伊朗战争中的无人机:关键要点
专知会员服务
4+阅读 · 5月30日
《Palantir任务保障性软件安全标准(MA-S2)》
专知会员服务
10+阅读 · 5月30日
基于声学的无人机检测技术综述
专知会员服务
7+阅读 · 5月30日
《当代混合战争分析框架:俄乌战争经验教训》
战略前沿人工智能的再思考(中文)
专知会员服务
8+阅读 · 5月29日
《量化地基防空系统间接效应的博弈论方法》
专知会员服务
6+阅读 · 5月29日
相关VIP内容
【AAAI2022】基于对比学习的预训练语言模型剪枝压缩
专知会员服务
29+阅读 · 2022年1月24日
专知会员服务
82+阅读 · 2021年10月15日
专知会员服务
90+阅读 · 2021年6月29日
专知会员服务
39+阅读 · 2021年6月6日
专知会员服务
124+阅读 · 2020年9月8日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
164+阅读 · 2019年10月12日
强化学习最新教程,17页pdf
专知会员服务
182+阅读 · 2019年10月11日
相关资讯
浅聊对比学习(Contrastive Learning)
极市平台
3+阅读 · 2022年7月26日
浅聊对比学习(Contrastive Learning)第一弹
PaperWeekly
1+阅读 · 2022年6月10日
深度自进化聚类:Deep Self-Evolution Clustering
我爱读PAMI
15+阅读 · 2019年4月13日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
相关基金
国家自然科学基金
2+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员