arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2311.13102cs.CLcs.LGmath.AT
收藏

基于Transformer语言模型拓扑特征检测分布外文本

Detecting out-of-distribution text using topological features of transformer-based language models

University of Melbourne(墨尔本大学);Deakin University(迪肯大学)

Andres Pollano, Anupam Chaudhuri, Anj Simmons

AI总结:

本研究利用Transformer语言模型自注意力映射的拓扑特征检测分布外文本,在BERT上验证,优于CLS嵌入,尤其擅长区分远域外样本,但近域或同域数据上表现有限。

摘要:

为保护处理文本数据的机器学习系统免受可能导致不可预测行为的分布外(OOD)输入的影响,我们探索利用基于Transformer的语言模型的自注意力映射的拓扑特征来检测输入文本何时处于分布外。自注意力构成基于Transformer的语言模型的核心,根据上下文动态地为单词分配向量,因此理论上我们的方法适用于任何具有多头自注意力的基于Transformer的语言模型。我们在BERT上评估了我们的方法,并将其与使用CLS嵌入的传统OOD方法进行了比较。结果表明,我们的方法在区分分布内样本与远域外样本方面优于CLS嵌入,但在处理近域或同域数据集时表现不佳。

英文摘要:

To safeguard machine learning systems that operate on textual data against out-of-distribution (OOD) inputs that could cause unpredictable behaviour, we explore the use of topological features of self-attention maps from transformer-based language models to detect when input text is out of distribution. Self-attention forms the core of transformer-based language models, dynamically assigning vectors to words based on context, thus in theory our methodology is applicable to any transformer-based language model with multihead self-attention. We evaluate our approach on BERT and compare it to a traditional OOD approach using CLS embeddings. Our results show that our approach outperforms CLS embeddings in distinguishing in-distribution samples from far-out-of-domain samples, but struggles with near or same-domain datasets.

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

↑