Understanding how large language models (LLMs) represent natural language is a central challenge in natural language processing (NLP) research. Many existing methods extract word embeddings from an LLM, visualise the embedding space via point-plots, and compare the relative positions of certain words. However, this approach only considers single words and not whole natural language expressions, thus disregards the context in which a word is used. Here we present a novel tool for analysing and visualising information flow in natural language expressions by applying diffusion tensor imaging (DTI) to word embeddings. We find that DTI reveals how information flows between word embeddings. Tracking information flows within the layers of an LLM allows for comparing different model structures and revealing opportunities for pruning an LLM's under-utilised layers. Furthermore, our model reveals differences in information flows for tasks like pronoun resolution and metaphor detection. Our results show that our model permits novel insights into how LLMs represent actual natural language expressions, extending the comparison of isolated word embeddings and improving the interpretability of NLP models.


翻译:理解大型语言模型(LLM)如何表征自然语言是自然语言处理(NLP)研究中的一个核心挑战。现有方法大多从LLM中提取词嵌入,通过散点图可视化嵌入空间,并比较特定词语的相对位置。然而,这种方法仅考虑单个词语而非完整的自然语言表达,因而忽略了词语使用的上下文。本文提出一种新颖工具,通过将扩散张量成像(DTI)应用于词嵌入,来分析和可视化自然语言表达中的信息流。我们发现DTI能够揭示信息在词嵌入之间的流动方式。通过追踪LLM各层内的信息流,可以比较不同的模型结构,并揭示对LLM未充分利用层进行剪枝的潜在机会。此外,我们的模型揭示了在代词消解和隐喻检测等任务中信息流的差异。结果表明,该模型为理解LLM如何表征实际自然语言表达提供了新的视角,扩展了孤立词嵌入的比较方法,并提升了NLP模型的可解释性。

0
下载
关闭预览

相关内容

扩展英语大语言模型到新语言的综述
专知会员服务
18+阅读 · 2024年8月15日
【UIUC博士论文】迈向可信的大型语言模型,312页pdf
专知会员服务
41+阅读 · 2024年6月8日
图嵌入(Graph embedding)综述
人工智能前沿讲习班
449+阅读 · 2019年4月30日
深度上下文词向量
微信AI
27+阅读 · 2018年9月13日
Word2Vec与Glove:词嵌入方法的动机和直觉
论智
14+阅读 · 2018年6月23日
深度学习 | 利用词嵌入对文本进行情感分析
沈浩老师
11+阅读 · 2017年10月19日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员