arXiv:2505.00818cs.LGcs.SY2025-05被引 1

用数学推导出类Transformer的预测架构,解决隐马尔可夫模型下的因果非线性预测问题。

Dual Filter: A Transformer-like Inference Architecture for Hidden Markov Models

  • 基于最优控制重构预测目标,导出概率测度空间上的不动点方程
  • 提出双滤波算法,迭代求解与纯解码器Transformer结构高度相似
  • 为大模型推理机制提供新数学视角,适合研究生成模型理论者

本文提出一种数学框架,用于在观测由潜在隐马尔可夫模型(HMM)生成的场景下进行因果非线性预测。该问题设定和所提解决方案均受仅解码器型Transformer架构启发,即从有限观测序列(标记)映射到下一标记的条件概率。本文目的并非构建Transformer的数学模型,而是从基本原理出发,推导出专为该预测任务设计的类Transformer架构。所提框架基于原创最优控制方法,将最小均方误差(MMSE)预测目标重新表述为最优控制问题。对最优控制问题的分析导出了概率测度空间上的不动点方程。为求解此不动点方程,引入双滤波算法,其迭代过程与仅解码器型Transformer架构高度相似。文中详细讨论了这些类比关系,并关联到先前将Transformer建模为概率测度空间上流形传输的工作。通过数值实验验证了算法性能,参数设置符合研究级大模型规模。

原文摘要 · Abstract (English)

This paper presents a mathematical framework for causal nonlinear prediction in settings where observations are generated from an underlying hidden Markov model (HMM). Both the problem formulation and the proposed solution are motivated by the decoder-only transformer architecture, in which a finite sequence of observations (tokens) is mapped to the conditional probability of the next token. Our objective is not to construct a mathematical model of a transformer. Rather, our interest lies in deriving, from first principles, transformer-like architectures that solve the prediction problem for which the transformer is designed. The proposed framework is based on an original optimal control approach, where the prediction objective (MMSE) is reformulated as an optimal control problem. An analysis of the optimal control problem is presented leading to a fixed-point equation on the space of probability measures. To solve the fixed-point equation, we introduce the dual filter, an iterative algorithm that closely parallels the architecture of decoder-only transformers. These parallels are discussed in detail along with the relationship to prior work on mathematical modeling of transformers as transport on the space of probability measures. Numerical experiments are provided to illustrate the performance of the algorithm using parameter values typical of research-scale transformer models.

隐马尔可夫模型预测架构最优控制类Transformer

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