arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.07172cs.CL
收藏

基于拓扑的大型语言模型对齐:轨迹拓扑损失与拓扑偏好优化

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

School of Computing and Intelligent Innovation, Fudan University(复旦大学计算与智能创新学院);School of Economics and Management, Tongji University(同济大学经济与管理学院);College of Information Technology, Shanghai Ocean University(上海海洋大学信息学院)

Yurui Pan, Ke Xu, Bo Peng

AI总结:

本文提出基于拓扑的对齐框架,通过轨迹拓扑损失和拓扑偏好优化提升大型语言模型的对齐性能,实验表明其在自动偏好指标和LLM判断评估中优于传统方法。

摘要:

大型语言模型(LLMs)的对齐通常通过SFT和RLHF/DPO实现,但通常忽略表示空间的全局几何结构,转而依赖局部token似然或标量分数。本文将生成视为隐藏空间中的语义轨迹,并提出一种基于0维持久同调的拓扑增强对齐框架。首先,针对SFT,引入轨迹拓扑损失(TTL),将提示和黄金回答嵌入视为混合点云,利用0D持久同调算法提取

英文摘要:

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.

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

↑