Targeted adversarial robustness in handwritten mathematical expression recognition (HMER) systems remains a critical yet underexplored problem. We propose STAF, a novel flow-based framework for targeted attacks that performs fine-grained, symbol-level manipulations through differentiable geometric perturbations while preserving high visual fidelity. Instead of injecting pixel-level noise, our method learns a sparse flow field to induce localized structural deformations that align with the desired target expression. To guide perturbations toward the intended symbol without manual supervision, we leverage the cross-modal attention of the HMER model during optimization. Furthermore, we incorporate a composite loss function combining weighted adversarial loss, total variation, Laplacian regularization, and flow sparsity to ensure spatial continuity and perceptual naturalness. Extensive experiments on the CROHME benchmark demonstrate the superiority of our approach over existing baselines in both attack success rate and visual quality. Flow field visualizations reveal strong spatial alignment between perturbation and target symbols, highlighting the interpretability of our strategy. This study exposes critical vulnerabilities in sequence recognition models and provides new insights into building more robust HMER systems. The source code of this work is available at: https://github.com/givesoftware/STAF/tree/main .

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

STAF: Symbol-Targeted Adversarial Flow for Handwritten Mathematical Expression Recognition

  • Xiangshu Ruan,
  • Mingyu Fan,
  • Yijian Wu,
  • Dan Cheng

摘要

Targeted adversarial robustness in handwritten mathematical expression recognition (HMER) systems remains a critical yet underexplored problem. We propose STAF, a novel flow-based framework for targeted attacks that performs fine-grained, symbol-level manipulations through differentiable geometric perturbations while preserving high visual fidelity. Instead of injecting pixel-level noise, our method learns a sparse flow field to induce localized structural deformations that align with the desired target expression. To guide perturbations toward the intended symbol without manual supervision, we leverage the cross-modal attention of the HMER model during optimization. Furthermore, we incorporate a composite loss function combining weighted adversarial loss, total variation, Laplacian regularization, and flow sparsity to ensure spatial continuity and perceptual naturalness. Extensive experiments on the CROHME benchmark demonstrate the superiority of our approach over existing baselines in both attack success rate and visual quality. Flow field visualizations reveal strong spatial alignment between perturbation and target symbols, highlighting the interpretability of our strategy. This study exposes critical vulnerabilities in sequence recognition models and provides new insights into building more robust HMER systems. The source code of this work is available at: https://github.com/givesoftware/STAF/tree/main .