arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.08053cs.CLcs.AI

探索大语言模型中的叙事聚类:BERT的逐层分析

Exploring Narrative Clustering in Large Language Models: A Layerwise Analysis of BERT

FAU Erlangen-Nürnberg(埃尔朗根-纽伦堡大学);University Hospital Erlangen(埃尔朗根大学医院)

Awritrojit Banerjee, Achim Schilling, Patrick Krauss

AI总结:

本研究通过逐层分析BERT的激活模式,发现其深层对叙事语义内容有强聚类效果,作者风格聚类极弱,揭示了BERT语义优先的表征特性,为理解Transformer语言编码机制提供参考。

摘要:

本研究探究了基于Transformer的大语言模型BERT的内部机制,重点关注其在各层中对叙事内容与作者风格的聚类能力。我们使用通过GPT-4构建的、包含多样语义内容与风格变体的叙事数据集,分析BERT的逐层激活情况,以揭示局部神经处理的模式。借助主成分分析(PCA)和多维标度(MDS)等降维技术,我们发现BERT在其深层表现出基于叙事内容的强聚类特性,且簇群逐渐变得紧凑且边界清晰。当叙事被改写为不同文本类型(例如寓言、科幻、儿童故事)时,可能会出现较强的风格聚类,但针对单个作者的专属作者风格仅观测到极弱的聚类效果。这些发现凸显了BERT对语义内容的优先级高于风格特征,为理解其表征能力与处理层级提供了洞见。本研究有助于理解BERT这类Transformer模型如何编码语言信息,为未来人工智能与认知神经科学的跨学科研究铺平道路。

英文摘要:

This study investigates the internal mechanisms of BERT, a transformer-based large language model, with a focus on its ability to cluster narrative content and authorial style across its layers. Using a dataset of narratives developed via GPT-4, featuring diverse semantic content and stylistic variations, we analyze BERT's layerwise activations to uncover patterns of localized neural processing. Through dimensionality reduction techniques such as Principal Component Analysis (PCA) and Multidimensional Scaling (MDS), we reveal that BERT exhibits strong clustering based on narrative content in its later layers, with progressively compact and distinct clusters. While strong stylistic clustering might occur when narratives are rephrased into different text types (e.g., fables, sci-fi, kids' stories), minimal clustering is observed for authorial style specific to individual writers. These findings highlight BERT's prioritization of semantic content over stylistic features, offering insights into its representational capabilities and processing hierarchy. This study contributes to understanding how transformer models like BERT encode linguistic information, paving the way for future interdisciplinary research in artificial intelligence and cognitive neuroscience.

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

↑