arXiv:2511.07869cs.DScs.DC2025-11被引 5

通过并行采样加速生成模型,实现理论最优速度提升。

Parallel Sampling via Autospeculation

  • 用自生成的近似分布并行预判采样路径,减少串行等待。
  • 在高精度下将采样时间从O(n)降至O(n¹ᐟ²),首次实现扩散模型并行加速。
  • 适合需要快速生成的大模型应用,如语言、图像生成。

我们提出并行算法,通过计数加速两类模型的采样:任意顺序自回归模型和去噪扩散模型。任意顺序自回归模型通过提供条件边缘分布的预言机访问目标分布μ(定义在[q]^n上),而去噪扩散模型通过在高斯噪声下提供条件均值的预言机访问μ(定义在ℝⁿ上)。标准串行采样算法在两种场景下均需˜O(n)时间生成样本。本文证明,通过并行调用预言机,期望采样时间可降至˜O(n¹ᐟ²)。该结果改进了任意顺序自回归模型此前的˜O(n²ᐟ³)上限,并首次在高精度条件下为扩散模型提供了并行加速,前提是μ的支持集有界。我们引入新方法——推测拒绝采样:利用一个辅助的‘推测’分布ν近似μ以加速采样。该方法受大模型中流行的‘推测解码’启发,但关键不同在于:采用‘自推测’,即ν由定义μ的同一预言机构建;且在序列层面而非单步进行推测,这是实现˜O(n¹ᐟ²)并行复杂度的关键。

原文摘要 · Abstract (English)

We present parallel algorithms to accelerate sampling via counting in two settings: any-order autoregressive models and denoising diffusion models. An any-order autoregressive model accesses a target distribution $μ$ on $[q]^n$ through an oracle that provides conditional marginals, while a denoising diffusion model accesses a target distribution $μ$ on $\mathbb{R}^n$ through an oracle that provides conditional means under Gaussian noise. Standard sequential sampling algorithms require $\widetilde{O}(n)$ time to produce a sample from $μ$ in either setting. We show that, by issuing oracle calls in parallel, the expected sampling time can be reduced to $\widetilde{O}(n^{1/2})$. This improves the previous $\widetilde{O}(n^{2/3})$ bound for any-order autoregressive models and yields the first parallel speedup for diffusion models in the high-accuracy regime, under the relatively mild assumption that the support of $μ$ is bounded. We introduce a novel technique to obtain our results: speculative rejection sampling. This technique leverages an auxiliary ``speculative'' distribution~$ν$ that approximates~$μ$ to accelerate sampling. Our technique is inspired by the well-studied ``speculative decoding'' techniques popular in large language models, but differs in key ways. Firstly, we use ``autospeculation,'' namely we build the speculation $ν$ out of the same oracle that defines~$μ$. In contrast, speculative decoding typically requires a separate, faster, but potentially less accurate ``draft'' model $ν$. Secondly, the key differentiating factor in our technique is that we make and accept speculations at a ``sequence'' level rather than at the level of single (or a few) steps. This last fact is key to unlocking our parallel runtime of $\widetilde{O}(n^{1/2})$.

采样加速并行计算扩散模型自回归

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