arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.12915cs.LGmath.PR
收藏

如何通过分布外检测学习理论增强Transformer:可学习性与可靠性

How Out-of-Distribution Detection Learning Theory Enhances Transformer: Learnability and Reliability

Shanghai Jiao Tong University, China(上海交通大学);University of Oxford, UK(牛津大学);Shanghai AI Laboratory, China(上海人工智能实验室);University of New South Wales, Sydney, Australia(新南威尔士大学);Shanghai Innovation Institute, China(上海创新研究院)

Yijin Zhou, Yutang Ge, Wenyuan Xie, Linqian Zeng, Xiaowen Dong, Yuguang Wang

AI总结:

本文提出基于PAC理论的Transformer分布外检测方法,通过惩罚异常值误分类和生成软合成异常值,提升模型的可靠性和决策边界。

摘要:

Transformer在自然语言处理和计算机视觉任务中表现出色。然而,它们在泛化到分布外(OOD)数据集时仍面临挑战,即数据分布与训练期间看到的分布不同。分布外检测旨在区分异常值同时保持分布内(ID)数据的性能。本文介绍了针对Transformer的分布外检测大概率正确(PAC)理论,该理论建立了数据分布和模型配置的条件,以确定Transformer的分布外检测可学习性。它表明,在足够数据的条件下,异常值可以被准确表示和区分。理论含义强调了理论原则与实际训练范式之间的权衡。通过研究这种权衡,我们自然推导出利用辅助异常值来增强分布外检测的合理性。我们的理论表明,通过在损失函数中惩罚异常值的误分类,并战略性地生成软合成异常值,可以稳健地增强Transformer网络的可靠性。这种方法产生了一种新的算法,确保了可学习性并优化了内liers和outliers之间的决策边界。在实践中,该算法在各种数据格式上 consistently 实现了最先进的(SOTA)性能。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑