解耦局部潜在变量:利用稀疏混合专家学习 LLM 嵌入空间中的分层流形结构
Unraveling the Localized Latents: Learning Stratified Manifold Structures in LLM Embedding Space with Sparse Mixture-of-Experts
AI总结:
本文提出基于稀疏 MoE 与注意力软门控的分析框架,通过不同稀疏度的字典学习专家揭示 LLM 嵌入空间的分层流形结构,并验证其语义聚类可解释性。
摘要:
然而,现实世界数据通常呈现复杂的局部结构,这对于在嵌入空间中具有平滑全局流形的单模型方法而言可能难以解析。在本研究中,我们推测在这些大型语言模型的潜在空间中,嵌入位于一种局部流形结构上,其维度会根据输入数据的困惑度和领域而变化,通常被称为分层流形结构;这些结构组合起来形成一个称为分层空间的结构化空间。为研究这一结构主张的有效性,我们提出了一个基于混合专家(MoE)模型的分析框架,其中每个专家都由一种简单的字典学习算法在不同稀疏度水平下实现。通过引入基于注意力的软门控网络,我们验证了模型能够为一组输入数据源学习专门的子流形,从而反映 LLM 嵌入空间中的语义分层。我们进一步分析了这些分层子流形的内在维度,并给出了关于专家分配、门控熵以及专家间距离的大量统计结果。实验结果表明,我们的方法不仅验证了 LLM 嵌入空间中存在分层流形结构的主张,还提供了与输入数据内在语义变化相一致的可解释聚类。
英文摘要:
However, real-world data often exhibit complex local structures that can be challenging for single-model approaches with a smooth global manifold in the embedding space to unravel. In this work, we conjecture that in the latent space of these large language models, the embeddings live in a local manifold structure with different dimensions depending on the perplexities and domains of the input data, commonly referred to as a Stratified Manifold structure, which in combination form a structured space known as a Stratified Space. To investigate the validity of this structural claim, we propose an analysis framework based on a Mixture-of-Experts (MoE) model where each expert is implemented with a simple dictionary learning algorithm at varying sparsity levels. By incorporating an attention-based soft-gating network, we verify that our model learns specialized sub-manifolds for an ensemble of input data sources, reflecting the semantic stratification in LLM embedding space. We further analyze the intrinsic dimensions of these stratified sub-manifolds and present extensive statistics on expert assignments, gating entropy, and inter-expert distances. Our experimental results demonstrate that our method not only validates the claim of a stratified manifold structure in the LLM embedding space, but also provides interpretable clusters that align with the intrinsic semantic variations of the input data.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。