用拓扑方法追踪大模型层间特征演化,揭示决策机制
Persistent Topological Features in Large Language Models
- 通过拓扑数据分析层间特征演化路径
- 发现不同模型与数据集下拓扑特征敏感度差异
- 可用于层剪枝,保持系统级视角
理解大语言模型的决策过程至关重要,因其应用广泛。本文将拓扑数据分析中的锯齿持久性(zigzag persistence)这一形式化数学框架与实用算法相结合。该方法能动态捕捉模型各层间数据结构的变化,引入拓扑描述符以量化p维洞在层间的持续与演化情况。与逐层评估后聚合的方法不同,本方法直接追踪特征的完整演化路径,从统计角度揭示提示在表征空间中如何被重排及相对位置变化,提供对系统整体运作的洞察。实验表明,这些描述符对不同模型和多种数据集均表现出高度敏感性。作为下游应用,我们利用锯齿持久性设计层剪枝准则,结果媲美当前最优方法,同时保持系统级视角。
原文摘要 · Abstract (English)
Understanding the decision-making processes of large language models is critical given their widespread applications. To achieve this, we aim to connect a formal mathematical framework - zigzag persistence from topological data analysis - with practical and easily applicable algorithms. Zigzag persistence is particularly effective for characterizing data as it dynamically transforms across model layers. Within this framework, we introduce topological descriptors that measure how topological features, $p$-dimensional holes, persist and evolve throughout the layers. Unlike methods that assess each layer individually and then aggregate the results, our approach directly tracks the full evolutionary path of these features. This offers a statistical perspective on how prompts are rearranged and their relative positions changed in the representation space, providing insights into the system's operation as an integrated whole. To demonstrate the expressivity and applicability of our framework, we highlight how sensitive these descriptors are to different models and a variety of datasets. As a showcase application to a downstream task, we use zigzag persistence to establish a criterion for layer pruning, achieving results comparable to state-of-the-art methods while preserving the system-level perspective.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。