用可解释代理自动分析大模型嵌入空间的拓扑结构。
Explainable Mapper: Charting LLM Embedding Spaces Using Perturbation-Based Explanation and Verification Agents
- 通过扰动技术驱动的智能代理,自动探索嵌入空间拓扑。
- 在BERT多层中复现并深化了已有语言特性发现。
- 适合对模型内部机制感兴趣的开发者和研究人员。
大型语言模型(LLMs)生成的高维嵌入蕴含丰富的语义与句法关系。通过映射器图(mapper graphs)研究其嵌入空间的拓扑结构,可揭示模型内部组织规律:每个节点代表一个拓扑邻域(包含一组嵌入聚类),边表示邻域间的重叠。然而,人工探索此类空间以发现编码的语言属性耗时巨大。为此,本文提出一种半自动标注框架,首先定义映射器图中节点、边、路径、连通分量与轨迹等可探索元素的分类体系,并设计两类基于大模型的可定制化代理,利用扰动技术实现可扩展的自动化分析。这些代理能探索并解释元素特征,验证解释的鲁棒性。我们在可视化分析工作台中实现该框架,通过案例研究验证其有效性,成功复现了关于BERT多层嵌入特性的已有发现,并进一步揭示了拓扑邻域的语言特性。
原文摘要 · Abstract (English)
Large language models (LLMs) produce high-dimensional embeddings that capture rich semantic and syntactic relationships between words, sentences, and concepts. Investigating the topological structures of LLM embedding spaces via mapper graphs enables us to understand their underlying structures. Specifically, a mapper graph summarizes the topological structure of the embedding space, where each node represents a topological neighborhood (containing a cluster of embeddings), and an edge connects two nodes if their corresponding neighborhoods overlap. However, manually exploring these embedding spaces to uncover encoded linguistic properties requires considerable human effort. To address this challenge, we introduce a framework for semi-automatic annotation of these embedding properties. To organize the exploration process, we first define a taxonomy of explorable elements within a mapper graph such as nodes, edges, paths, components, and trajectories. The annotation of these elements is executed through two types of customizable LLM-based agents that employ perturbation techniques for scalable and automated analysis. These agents help to explore and explain the characteristics of mapper elements and verify the robustness of the generated explanations. We instantiate the framework within a visual analytics workspace and demonstrate its effectiveness through case studies. In particular, we replicate findings from prior research on BERT's embedding properties across various layers of its architecture and provide further observations into the linguistic properties of topological neighborhoods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。