{
  "id": "learned-rendering",
  "title": "学习渲染 LaTeX、SMILES、HTML 与乐谱",
  "eyebrow": "从标记语言到图像的扩散模型",
  "description": "用扩散模型学习渲染数学公式、分子、表格布局和乐谱，并通过 Scheduled Sampling 处理暴露偏差。",
  "lead": "Yuntian Deng、Noriyuki Kojima 和 Alexander M. Rush 的 Markup-to-Image Diffusion Models with Scheduled Sampling 学习把符号描述转化为图像。论文于 2022 年 10 月 11 日发布，发表于 ICLR 2023，提出了覆盖 LaTeX 公式、SMILES 分子、HTML 表格布局和 LilyPond 乐谱的扩散渲染方法。它也研究了扩散模型中的一个普遍问题：采样过程中遇到的状态与训练输入不同时，错误会逐步累积。",
  "original_papers": [
    "markup-diffusion"
  ],
  "terms": [
    "标记语言到图像生成（markup-to-image）",
    "学习式渲染（learned rendering）",
    "LaTeX 公式图像生成",
    "SMILES 分子图像生成",
    "扩散模型的 Scheduled Sampling",
    "扩散模型的暴露偏差（exposure bias）"
  ],
  "sections": [
    {
      "id": "rendering-direction",
      "title": "输入是标记语言，输出是图像",
      "paragraphs": [
        "学习式渲染器接收描述视觉对象的序列，预测渲染后的像素。LaTeX 描述数学记号，SMILES 描述原子与化学键，HTML 描述表格类布局，LilyPond 描述乐谱。这四个领域共同检验模型对符号内容、布局，以及跨越输入序列的依赖关系的处理能力。",
        "图像到 LaTeX 的识别任务从图片恢复源代码；标记语言到图像的生成任务则朝相反方向进行。论文调整了包括 im2latex-100k 在内的配对数据，学习从标记语言到像素的正向映射。它训练的是条件扩散模型，推理时不调用传统渲染引擎。"
      ],
      "citations": [
        "markup-diffusion"
      ]
    },
    {
      "id": "symbolic-fidelity",
      "title": "图像看起来像，并不等于符号正确",
      "paragraphs": [
        "这些图像要求精确保留符号。多一个减号就会改变公式，化学键错误就会改变分子，音符移位就会改变乐谱。即使图像的整体外观符合相应领域，只要符号与输入不一致，渲染就失败了。布局错误还会传播：多出的符号会挤动后续内容。",
        "因此，论文评估生成结果与参考渲染图像的对齐程度。主要指标把二值图像视为由图像列组成的序列，使用动态时间规整（dynamic time warping），以容纳小幅位移。像素误差和其他图像相似性指标提供补充测量。论文明确区分了这些指标与侧重视觉逼真度和宽泛语义的自然图像指标。"
      ],
      "citations": [
        "markup-diffusion"
      ]
    },
    {
      "id": "scheduled-sampling",
      "title": "让去噪器在自己产生的中间状态上训练",
      "paragraphs": [
        "标准扩散训练从真实图像构造带噪输入；采样时，下一个去噪步骤接收的却是前面模型预测得到的结果。预测中的错误会改变后续步骤遇到的状态。论文把这种不匹配分析为一个错误会累积的序贯决策问题，将扩散采样与暴露偏差联系起来。",
        "Scheduled Sampling 改变训练输入，让去噪器接触模型自己产生的状态，并学习修正自身错误。它将此前在序列生成中研究的原则用于扩散训练。实验在四个渲染领域中比较了 Scheduled Sampling 与基线。输出是否可辨认、符号是否忠实于输入，是两项不同的评估目标；论文同时报告了生成成功与失败的例子。"
      ],
      "citations": [
        "markup-diffusion"
      ]
    },
    {
      "id": "related-methods",
      "title": "标记语言对齐与扩散暴露偏差",
      "paragraphs": [
        "渲染这条线索延伸到 Guojin Zhong 等人在 ACM Multimedia 2023 发表的 FSA-CDM。它沿用四个领域的任务，加入细粒度序列对齐、上下文建模和对比训练信号。除了去噪过程，这项工作还研究标记语言中的词元如何对应图像结构。",
        "扩散训练这条线索则联系到 ICML 2023 论文 Input Perturbation Reduces Exposure Bias in Diffusion Models。该方法通过扰动训练输入，模拟预测误差。两者都针对去噪器在采样时遇到的状态进行训练：Scheduled Sampling 使用模型生成的输入，输入扰动则加入合成误差。"
      ],
      "citations": [
        "fsa-cdm",
        "diffusion-input-perturbation",
        "markup-diffusion"
      ]
    },
    {
      "id": "inspect-results",
      "title": "查看原始示例与实现",
      "paragraphs": [
        "开源仓库提供了公式、表格、乐谱和分子的并排动画，对照 Scheduled Sampling、基线和真实图像。这些示例展示了中间去噪轨迹。可以检查符号何时出现、消失、合并或移动，再把最终输出与精确的输入描述比较。",
        "设计新的学习式渲染任务时，先确定配对的源数据与目标图像，识别哪些符号错误会改变含义，再选择能够暴露这些错误的指标。将渲染准确性与风格相似性分开。已发布的资源包括原始数据集、检查点、代码和记录的示例。"
      ],
      "citations": [
        "markup-diffusion"
      ]
    }
  ],
  "related_guides": [
    "structured-decoding",
    "probabilistic-attention"
  ],
  "demo": "markup",
  "reading_order": [
    "markup-diffusion",
    "fsa-cdm",
    "diffusion-input-perturbation"
  ],
  "updated_at": "2026-11-11",
  "url": "https://yuntiandeng.com/research/zh/learned-rendering/",
  "papers": [
    {
      "id": "markup-diffusion",
      "title": "Markup-to-Image Diffusion Models with Scheduled Sampling",
      "authors": [
        {
          "given": "Yuntian",
          "family": "Deng"
        },
        {
          "given": "Noriyuki",
          "family": "Kojima"
        },
        {
          "given": "Alexander M.",
          "family": "Rush"
        }
      ],
      "year": 2023,
      "venue": "ICLR 2023",
      "paper_url": "https://arxiv.org/abs/2210.05147",
      "pdf_url": "https://arxiv.org/pdf/2210.05147",
      "code_url": "https://github.com/da03/markup2im",
      "doi": "10.48550/arXiv.2210.05147",
      "summary": "通过条件扩散学习渲染 LaTeX、HTML 表格布局、LilyPond 乐谱和 SMILES 分子。Scheduled Sampling 让去噪器接触自己生成的输入，以处理逐步累积的错误。",
      "connection": "原始扩散式标记语言到图像方法，以及覆盖四个领域的渲染基准。",
      "bibtex_type": "inproceedings",
      "citation_key": "deng2023markuptoimage",
      "source_urls": [
        "https://arxiv.org/html/2210.05147v1",
        "https://github.com/da03/markup2im"
      ],
      "arxiv_id": "2210.05147",
      "arxiv_first_posted": "2022-10-11",
      "abstract": "Building on recent advances in image generation, we present a fully data-driven approach to rendering markup into images. The approach is based on diffusion models, which parameterize the distribution of data using a sequence of denoising operations on top of a Gaussian noise distribution. We view the diffusion denoising process as a sequential decision making process, and show that it exhibits compounding errors similar to exposure bias issues in imitation learning problems. To mitigate these issues, we adapt the scheduled sampling algorithm to diffusion training. We conduct experiments on four markup datasets: mathematical formulas (LaTeX), table layouts (HTML), sheet music (LilyPond), and molecular images (SMILES). These experiments each verify the effectiveness of the diffusion process and the use of scheduled sampling to fix generation issues. These results also show that the markup-to-image task presents a useful controlled compositional setting for diagnosing and analyzing generative image models.",
      "abstract_source": "https://arxiv.org/html/2210.05147v1",
      "updated_at": "2026-11-11",
      "description_language": "zh-Hans",
      "abstract_language": "en"
    },
    {
      "id": "fsa-cdm",
      "title": "Contrast-augmented Diffusion Model with Fine-grained Sequence Alignment for Markup-to-Image Generation",
      "authors": [
        {
          "given": "Guojin",
          "family": "Zhong"
        },
        {
          "given": "Jin",
          "family": "Yuan"
        },
        {
          "given": "Pan",
          "family": "Wang"
        },
        {
          "given": "Kailun",
          "family": "Yang"
        },
        {
          "given": "Weili",
          "family": "Guan"
        },
        {
          "given": "Zhiyong",
          "family": "Li"
        }
      ],
      "year": 2023,
      "venue": "ACM Multimedia 2023",
      "paper_url": "https://arxiv.org/abs/2308.01147",
      "pdf_url": "https://arxiv.org/pdf/2308.01147",
      "summary": "FSA-CDM 将细粒度跨模态序列对齐、上下文建模和对比增强的扩散目标结合，用于标记语言到图像生成。",
      "connection": "这项后续工作沿用 Deng、Kojima 和 Rush 提出的任务与四个数据集，研究对齐与对比反馈。",
      "bibtex_type": "inproceedings",
      "citation_key": "zhong2023contrastaugmented",
      "source_urls": [
        "https://arxiv.org/html/2308.01147v1"
      ],
      "arxiv_id": "2308.01147",
      "arxiv_first_posted": "2023-08-02",
      "updated_at": "2026-11-11",
      "description_language": "zh-Hans",
      "abstract_language": "en"
    },
    {
      "id": "diffusion-input-perturbation",
      "title": "Input Perturbation Reduces Exposure Bias in Diffusion Models",
      "authors": [
        {
          "given": "Mang",
          "family": "Ning"
        },
        {
          "given": "Enver",
          "family": "Sangineto"
        },
        {
          "given": "Angelo",
          "family": "Porrello"
        },
        {
          "given": "Simone",
          "family": "Calderara"
        },
        {
          "given": "Rita",
          "family": "Cucchiara"
        }
      ],
      "year": 2023,
      "venue": "ICML 2023",
      "paper_url": "https://proceedings.mlr.press/v202/ning23a.html",
      "pdf_url": "https://proceedings.mlr.press/v202/ning23a/ning23a.pdf",
      "summary": "研究扩散模型采样过程中累积的错误，并在训练中扰动输入，以模拟推理时的预测误差。",
      "connection": "通过合成输入扰动处理同一种训练与采样不匹配问题；Scheduled Sampling 则在模型生成的状态上训练。",
      "bibtex_type": "inproceedings",
      "citation_key": "pmlr-v202-ning23a",
      "source_urls": [
        "https://proceedings.mlr.press/v202/ning23a.html"
      ],
      "updated_at": "2026-11-11",
      "description_language": "zh-Hans",
      "abstract_language": "en"
    }
  ]
}
