mlsanityData to 7 Oct 2026

DiffMath: Symbol- and Graph-Aware Latent Diffusion Transformer for Handwritten Mathematical Expression Generation

arXiv 2606.19939 ↗First posted 18 Jun 2026cs.CVcited by 0

On the map: Diffusion models → Diffusion foundations and sampling

Abstract (arXiv)

Handwritten Mathematical Expression Generation (HMEG) is challenging due to the complex two-dimensional layouts and long-range structural dependencies of mathematical expressions. Existing methods typically rely on explicit spatial supervision, such as symbol-level bounding boxes, which incurs high annotation costs and limits scalability. In this work, we propose DiffMath, a symbol- and graph-aware latent diffusion framework that leverages the hierarchical structure inherent in LaTeX as a structural prior, eliminating the need for positional supervision. First, we design a Relational Abstract Syntax Tree (RelAST), a generation-oriented representation that distills MathML trees into compact triplet sequences [S, R, D], where each token directly encodes a symbol identity, spatial relation, or nesting depth. Second, we introduce MathVAE, which learns structure-preserving latent representations through symbol-aware and relation-aware perceptual regularization, ensuring that the latent space captures both character semantics and spatial topology. Third, MathDiT performs conditional denoising in this structured latent space, further guided by a global symbol-count prior via Adaptive Layer Normalization (AdaLN) to improve structural coherence. Experiments show that DiffMath produces structurally consistent handwritten expressions, achieves superior performance over existing methods, and improves the accuracy of downstream OCR models through synthetic data augmentation.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Diffusion foundations and sampling, one of 14 directions in Diffusion models. Builds on 33 of its 54 references that are in the map. First posted on arXiv 18 Jun 2026.

Builds on

33 of 54 references.

Closest ancestors · 7

Same direction, newest first

  1. 2025Z-Image: An Efficient Image Generation Foundation Model with Single-Stream Diffusion Transformer27 Nov
  2. 2025Reconstruction vs. Generation: Taming Optimization Dilemma in Latent Diffusion Models2 Jan
  3. 2024Probing the Latent Hierarchical Structure of Data via Diffusion Models17 Oct
  4. 2023SDXL: Improving Latent Diffusion Models for High-Resolution Image Synthesis4 Jul
  5. 2022Scalable Diffusion Models with Transformers19 Dec
  6. 2022Classifier-Free Diffusion Guidance26 Jul
  7. 2020Denoising Diffusion Implicit Models6 Oct

Other references · 26

  1. 2021Emerging Properties in Self-Supervised Vision Transformerscited by 6,893
  2. 2025DINOv3cited by 1,297
  3. 2025FLUX.1 Kontext: Flow Matching for In-Context Image Generation and Editing in Latent Spacecited by 960
  4. 2023ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoderscited by 703
  5. 2013Generating Sequences With Recurrent Neural Networkscited by 549
  6. 2020ScrabbleGAN: Semi-Supervised Varying Length Handwritten Text Generationcited by 69
  7. 2022Syntax-Aware Network for Handwritten Mathematical Expression Recognitioncited by 68
  8. 2024Image Over Text: Transforming Formula Recognition Evaluation with Character Detection Matchingcited by 39
  9. 2021Handwriting Transformerscited by 37
  10. 2022When Counting Meets HMER: Counting-Aware Network for Handwritten Mathematical Expression Recognitioncited by 35
  11. 2023Disentangling Writer and Character Styles for Handwriting Generationcited by 35
  12. 2021Handwritten Mathematical Expression Recognition with Bidirectionally Trained Transformercited by 34
14 more
  1. 2023Handwritten Text Generation from Visual Archetypescited by 32
  2. 2022SLOGAN: Handwriting Style Synthesis for Arbitrary-Length and Out-of-Vocabulary Textcited by 26
  3. 2022CoMER: Modeling Coverage for Transformer-based Handwritten Mathematical Expression Recognitioncited by 24
  4. 2024MathWriting: A Dataset For Handwritten Mathematical Expression Recognitioncited by 20
  5. 2024One-Shot Diffusion Mimicker for Handwritten Text Generationcited by 20
  6. 2024PosFormer: Recognizing Complex Handwritten Mathematical Expression with Position Forest Transformercited by 18
  7. 2024DiffusionPen: Towards Controlling the Style of Handwritten Text Generationcited by 16
  8. 2025Zero-Shot Styled Text Image Generation, but Make It Autoregressivecited by 13
  9. 2025Beyond Isolated Words: Diffusion Brush for Handwritten Text-Line Generationcited by 10
  10. 2024TAMER: Tree-Aware Transformer for Handwritten Mathematical Expression Recognitioncited by 9
  11. 2024Decoupling Layout from Glyph in Online Chinese Handwriting Generationcited by 7
  12. 2021Unsupervised Training Data Generation of Handwritten Formulas using Generative Adversarial Networks with Self-Attentioncited by 3
  13. 2025Uni-MuMER: Unified Multi-Task Fine-Tuning of Vision-Language Model for Handwritten Mathematical Expression Recognitioncited by 3
  14. 2025DiffInk: Glyph- and Style-Aware Latent Diffusion Transformer for Text to Online Handwriting Generationcited by 1

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026GryphOne: Symbol-Aware Masked Diffusion for Structural Refinement in Offline Handwritten Mathematical Expression Recognition
  2. 2025Discovering Mathematical Equations with Diffusion Language Model
  3. 2026TextLDM: Language Modeling with Continuous Latent Diffusion
  4. 2026Variable-Length Tokenization via Learnable Global Merging for Diffusion Transformers
  5. 2025VEHME: A Vision-Language Model For Evaluating Handwritten Mathematics Expressions
  6. 2025Compositional Discrete Latent Code for High Fidelity, Productive Diffusion Models
  7. 2025Diffusion Transformers with Representation Autoencoders
  8. 2026Enhancing Transformer Representations of Symbolic ODE Expressions