[Paper Review] 1st Place Solution for ICDAR 2021 Competition on Mathematical Formula Detection
This paper presents the 1st place solution for the ICDAR 2021 Mathematical Formula Detection (MFD) competition, employing an anchor-free object detection framework based on Generalized Focal Loss (GFL) with ResNeSt backbone. The method leverages Adaptive Training Sample Selection (ATSS) to address sampling imbalance and optimizes Feature Pyramid Network (FPN) levels (2–6) to improve detection of small embedded formulas, achieving SOTA performance with a 94.89 F1 score on embedded formulas and 98.76 on isolated formulas.
In this technical report, we present our 1st place solution for the ICDAR 2021 competition on mathematical formula detection (MFD). The MFD task has three key challenges including a large scale span, large variation of the ratio between height and width, and rich character set and mathematical expressions. Considering these challenges, we used Generalized Focal Loss (GFL), an anchor-free method, instead of the anchor-based method, and prove the Adaptive Training Sampling Strategy (ATSS) and proper Feature Pyramid Network (FPN) can well solve the important issue of scale variation. Meanwhile, we also found some tricks, e.g., Deformable Convolution Network (DCN), SyncBN, and Weighted Box Fusion (WBF), were effective in MFD task. Our proposed method ranked 1st in the final 15 teams.
Motivation & Objective
- Address the challenge of detecting mathematical formulas with extreme scale variation and aspect ratio diversity in document images.
- Overcome the limitations of anchor-based object detectors in handling large-scale disparities between embedded and isolated formulas.
- Improve detection performance on small, embedded formulas that are often missed due to sampling imbalance in standard training strategies.
- Optimize feature pyramid network (FPN) configuration to enhance detection of tiny formulas with short sides as small as 16 pixels.
- Achieve state-of-the-art performance on the ICDAR 2021 MFD benchmark through a combination of architectural choices and training tricks.
Proposed method
- Adopted Generalized Focal Loss (GFL) as the base detector, using an anchor-free, one-stage FCOS-based architecture to better handle variable aspect ratios and scale disparities.
- Employed Adaptive Training Sample Selection (ATSS) to balance positive sample distribution across instances, eliminating the bias toward larger formulas seen in random sampling.
- Reconfigured the FPN to use levels (2–6) instead of the default (3–7), enabling detection of small formulas with short sides as small as 16 pixels.
- Integrated Deformable Convolutional Networks (DCN) to improve feature representation for irregularly shaped or complex formulas.
- Applied SyncBatchNorm (SyncBN) and Ranger optimizer to stabilize training and improve convergence on large-scale datasets.
- Used Weighted Box Fusion (WBF) post-processing to refine predictions, increasing recall with minimal precision loss.

Experimental results
Research questions
- RQ1How can an object detection framework be adapted to handle the extreme scale variation and aspect ratio diversity in mathematical formula detection?
- RQ2To what extent does ATSS improve detection performance compared to random sampling, especially for small embedded formulas?
- RQ3What is the optimal FPN configuration for detecting both large isolated formulas and tiny embedded formulas in the MFD task?
- RQ4How do architectural components like DCN, SyncBN, and WBF contribute to performance gains in mathematical formula detection?
- RQ5Can a combination of training and inference optimizations, such as large input resolution and model ensembling, lead to SOTA results on the MFD benchmark?
Key findings
- The proposed method achieved a 94.89 F1 score on embedded formulas, significantly outperforming the second-best method (94.29), highlighting its effectiveness on the most challenging subtask.
- The method achieved a 98.76 F1 score on isolated formulas, demonstrating strong generalization across all formula types.
- The use of ATSS reduced sampling imbalance, ensuring that small embedded formulas received sufficient positive samples during training.
- Switching FPN from levels (3–7) to (2–6) enabled detection of formulas with short sides as small as 16 pixels, which were previously undetectable.
- Weighted Box Fusion (WBF) improved overall performance by 0.3% by increasing recall without significantly reducing precision.
- The combination of large input resolution, optimized FPN, and ATSS contributed to a 10.6% performance gap reduction on embedded formulas compared to baseline methods.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.