arXiv:2602.00426cs.LGcs.AI2026-02被引 2

将大模型视为带注意力的高维非线性自回归模型,揭示其训练与推理机制

LLMs as High-Dimensional Nonlinear Autoregressive Models with Attention: Training, Alignment and Inference

  • 把大模型建模为带注意力的高维非线性自回归系统
  • 统一描述预训练、对齐和生成全过程,涵盖RLHF、DPO等方法
  • 可分析幻觉、思维链等现象,适合理论研究者深入理解模型本质

基于Transformer架构的大语言模型通常通过组件和训练流程描述,掩盖了其底层计算结构。本文提供一份简洁的数学参考,帮助研究人员以方程级视角理解大模型的训练、对齐与生成。我们将大模型形式化为具有注意力依赖的高维非线性自回归模型,涵盖通过下一个词预测进行的预训练,以及强化学习从人类反馈(RLHF)、直接偏好优化(DPO)、拒绝采样微调(RSFT)和从可验证奖励中学习(RLVR)等对齐方法,并包括推理时的自回归生成。自注意力自然表现为重复的双线性-软最大-线性组合,产生高度表达性的序列模型。该框架支持对对齐引发行为(如奉承倾向)、推理阶段现象(如幻觉、上下文学习、思维链提示、检索增强生成)及持续学习等扩展的严谨分析,同时作为解释与进一步理论发展的简洁参考。

原文摘要 · Abstract (English)

Large language models (LLMs) based on transformer architectures are typically described through collections of architectural components and training procedures, obscuring their underlying computational structure. This review article provides a concise mathematical reference for researchers seeking an explicit, equation-level description of LLM training, alignment, and generation. We formulate LLMs as high-dimensional nonlinear autoregressive models with attention-based dependencies. The framework encompasses pretraining via next-token prediction, alignment methods such as reinforcement learning from human feedback (RLHF), direct preference optimization (DPO), rejection sampling fine-tuning (RSFT), and reinforcement learning from verifiable rewards (RLVR), as well as autoregressive generation during inference. Self-attention emerges naturally as a repeated bilinear--softmax--linear composition, yielding highly expressive sequence models. This formulation enables principled analysis of alignment-induced behaviors (including sycophancy), inference-time phenomena (such as hallucination, in-context learning, chain-of-thought prompting, and retrieval-augmented generation), and extensions like continual learning, while serving as a concise reference for interpretation and further theoretical development.

大模型理论注意力机制对齐分析自回归建模

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