arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.02337cs.CL
收藏

衡量文本中的分布偏移:基于语言模型的嵌入的优势

Measuring Distributional Shifts in Text: The Advantage of Language Model-Based Embeddings

Indian Institute of Technology - Bombay(印度理工学院孟买分校);Fiddler AI(Fiddler人工智能公司)

Gyandev Gupta, Bashir Rastegarpanah, Amalendu Iyer, Joshua Rubin, Krishnaram Kenthapadi

AI总结:

本文提出基于聚类和 LLM 嵌入的文本分布偏移检测方法,证明通用 LLM 嵌入比传统嵌入对数据漂移更敏感,并总结其在 Fiddler 平台 18 个月部署的经验。

摘要:

监控生产环境中的机器学习模型,一个关键部分是衡量输入与输出数据漂移。本文提出了一个用于衡量自然语言数据中分布偏移的系统,并着重研究将大型语言模型(LLM)用于该问题的潜在优势。LLM 近期的进展及其在不同领域的成功应用表明,它们能够有效捕捉语义关系,以解决各类自然语言处理问题。LLM 的能力很大程度上来自相应神经网络隐藏层中生成的编码(嵌入)。首先,我们提出一种基于聚类的算法,通过利用此类嵌入来衡量文本数据中的分布偏移。随后,我们研究了该方法应用于由 LLM 和经典嵌入算法生成的文本嵌入时的有效性。实验表明,与其他嵌入方法相比,通用的基于 LLM 的嵌入对数据漂移具有更高的敏感性。我们提出将漂移敏感性作为比较语言模型时需要考虑的一项重要评估指标。最后,我们介绍了在为期 18 个月中将该框架作为 Fiddler ML Monitoring 平台的一部分进行部署所获得的见解和经验教训。

英文摘要:

An essential part of monitoring machine learning models in production is measuring input and output data drift. In this paper, we present a system for measuring distributional shifts in natural language data and highlight and investigate the potential advantage of using large language models (LLMs) for this problem. Recent advancements in LLMs and their successful adoption in different domains indicate their effectiveness in capturing semantic relationships for solving various natural language processing problems. The power of LLMs comes largely from the encodings (embeddings) generated in the hidden layers of the corresponding neural network. First we propose a clustering-based algorithm for measuring distributional shifts in text data by exploiting such embeddings. Then we study the effectiveness of our approach when applied to text embeddings generated by both LLMs and classical embedding algorithms. Our experiments show that general-purpose LLM-based embeddings provide a high sensitivity to data drift compared to other embedding methods. We propose drift sensitivity as an important evaluation metric to consider when comparing language models. Finally, we present insights and lessons learned from deploying our framework as part of the Fiddler ML Monitoring platform over a period of 18 months.

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

↑