arXiv:2605.07172cs.CL2026-05ACL

用拓扑结构优化大模型对齐,让生成路径更符合语义逻辑。

Topology-Enhanced Alignment for Large Language Models: Trajectory Topology Loss and Topological Preference Optimization

论文配图:Topology-Enhanced Alignment for Large Language Models: Trajectory Topology Loss and Topological Preference Optimization
图 1 · 摘自论文原文
  • 通过0维持久同调提取提示与答案的语义桥,引导模型更新方向
  • 在DPO中引入拓扑偏好向量,提升选择与拒绝响应的差异性
  • 适用于需要可控生成质量的对话系统和对齐研究

大语言模型的SFT和RLHF/DPO对齐通常忽略表示空间的全局几何结构,仅依赖局部词元似然或标量得分。我们将生成视为隐藏空间中的语义轨迹,提出一种拓扑增强对齐框架,利用0维持久同调正则化这些轨迹。首先,在SFT中引入轨迹拓扑损失(TTL):将提示与标准答案嵌入视为混合点云,使用0D持久同调算法提取“提示-答案桥”,使模型实际更新方向与这些拓扑桥对齐而非任意方向。其次,在DPO中提出拓扑偏好优化(TPO):构建特定主题的语义偏好向量,并在中间隐藏层对齐拒绝与选择响应间的改进方向。还引入动态加权机制平衡DPO与TPO损失。在Qwen2.5-7B-Instruct上使用UltraChat和Anthropic HH-RLHF数据集评估,拓扑增强目标在自动偏好指标和LLM判别评价中持续优于强基线(如逐例、最近邻、随机正则化),同时保持或降低毒性。结果表明,持久同调与轨迹几何为可控对齐提供了有前景的方向。

原文摘要 · Abstract (English)

Alignment of large language models (LLMs) via SFT and RLHF/DPO typically ignores the global geometry of the representation space, relying instead on local token likelihoods or scalar scores. We view generation as tracing a semantic trajectory in hidden space and propose a topology-enhanced alignment framework that regularizes these trajectories using 0-dimensional persistent homology. First, for SFT, we introduce Trajectory Topology Loss (TTL). Treating prompt and gold-answer embeddings as a mixed point cloud, we use a 0D persistent homology algorithm to extract "prompt-answer bridges." TTL aligns the model's actual update direction with these topological bridges rather than arbitrary directions. Second, for DPO, we propose Topological Preference Optimization (TPO). TPO constructs topic-specific semantic preference vectors and aligns the improvement direction between rejected and chosen responses with these vectors in an intermediate hidden layer. We also introduce a dynamic weighting scheme to balance DPO and TPO losses. Evaluating on Qwen2.5-7B-Instruct using UltraChat and Anthropic HH-RLHF, our topology-enhanced objectives consistently outperform strong non-topological baselines (e.g., per-example, nearest-neighbor, random regularizers) on automatic preference metrics and LLM-judge evaluations, while maintaining or improving toxicity. Results show persistent homology and trajectory geometry offer a promising direction for controllable alignment.

拓扑优化大模型对齐生成控制

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。