Transformers excel in natural language processing and computer vision tasks. However, they still face challenges in generalizing to Out-of-Distribution (OOD) datasets, i.e. data whose distribution differs from that seen during training. OOD detection aims to distinguish outliers while preserving in-distribution (ID) data performance. This paper introduces the OOD detection Probably Approximately Correct (PAC) Theory for transformers, which establishes the conditions for data distribution and model configurations for the OOD detection learnability of transformers. It shows that outliers can be accurately represented and distinguished with sufficient data under conditions. The theoretical implications highlight the trade-off between theoretical principles and practical training paradigms. By examining this trade-off, we naturally derived the rationale for leveraging auxiliary outliers to enhance OOD detection. Our theory suggests that by penalizing the misclassification of outliers within the loss function and strategically generating soft synthetic outliers, one can robustly bolster the reliability of transformer networks. This approach yields a novel algorithm that ensures learnability and refines the decision boundaries between inliers and outliers. In practice, the algorithm consistently achieves state-of-the-art (SOTA) performance across various data formats.


翻译:Transformer在自然语言处理和计算机视觉任务中表现出色。然而,其在泛化至分布外数据集时仍面临挑战,即处理与训练数据分布不同的数据。分布外检测旨在区分异常样本的同时保持分布内数据的性能。本文提出了针对Transformer的分布外检测近似正确理论,该理论建立了Transformer实现分布外检测可学习性所需的数据分布条件与模型配置条件。研究表明,在满足理论条件且数据充足的条件下,异常样本能够被准确表征与区分。理论分析揭示了理论原则与实际训练范式之间的权衡关系。通过考察这种权衡,我们自然推导出利用辅助异常样本来增强分布外检测的理论依据。该理论表明,通过在损失函数中对异常样本误分类施加惩罚,并策略性地生成软合成异常样本,能够有效增强Transformer网络的可靠性。该方法催生了一种保证可学习性并优化正常样本与异常样本间决策边界的新算法。实验表明,该算法在多种数据模态上均能持续取得最先进的性能表现。

0
下载
关闭预览

相关内容

【CMU博士论文】长度可外推的Transformer,149页pdf
专知会员服务
27+阅读 · 2024年6月30日
【剑桥大学博士论文】机器学习中的分布外泛化,214页pdf
【Google】高效Transformer综述,Efficient Transformers: A Survey
专知会员服务
66+阅读 · 2022年3月17日
国家自然科学基金
21+阅读 · 2015年12月31日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
31+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2013年12月31日
Arxiv
0+阅读 · 1月20日
Arxiv
0+阅读 · 1月8日
VIP会员
相关基金
国家自然科学基金
21+阅读 · 2015年12月31日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
31+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2013年12月31日
Top
微信扫码咨询专知VIP会员