{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/handwritten-mathematical-expression","title":"Handwritten Mathematical Expression Recognition with Bidirectionally Trained Transformer","arxiv_id":"2105.02412","date":"2021-05-06","proceeding":null,"authors":["Wenqi Zhao","Liangcai Gao","Zuoyu Yan","Shuai Peng","Lin Du","Ziyin Zhang"],"abstract":"Encoder-decoder models have made great progress on handwritten mathematical expression recognition recently. However, it is still a challenge for existing methods to assign attention to image features accurately. Moreover, those encoder-decoder models usually adopt RNN-based models in their decoder part, which makes them inefficient in processing long $\\LaTeX{}$ sequences. In this paper, a transformer-based decoder is employed to replace RNN-based ones, which makes the whole model architecture very concise. Furthermore, a novel training strategy is introduced to fully exploit the potential of the transformer in bidirectional language modeling. Compared to several methods that do not use data augmentation, experiments demonstrate that our model improves the ExpRate of current state-of-the-art methods on CROHME 2014 by 2.23%. Similarly, on CROHME 2016 and CROHME 2019, we improve the ExpRate by 1.92% and 2.28% respectively.","url_abs":"https://arxiv.org/abs/2105.02412v3","url_pdf":"https://arxiv.org/pdf/2105.02412v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"handwritten-mathematical-expression","repo_url":"https://github.com/Green-Wood/BTTR","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"handwritten-mathematical-expression","repo_url":"https://github.com/qingzhenduyu/ical","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"handwritten-mathmatical-expression","task_name":"Handwritten Mathmatical Expression Recognition"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/handwritten-mathmatical-expression","task":"Handwritten Mathmatical Expression Recognition","dataset":"CROHME 2014","model":"BTTR","rank_in_archive_order":12,"of":17,"metrics":{"ExpRate":"53.96"},"uses_additional_data":false},{"leaderboard":"/sota/handwritten-mathmatical-expression-1","task":"Handwritten Mathmatical Expression Recognition","dataset":"CROHME 2016","model":"BTTR","rank_in_archive_order":12,"of":16,"metrics":{"ExpRate":"52.31"},"uses_additional_data":false},{"leaderboard":"/sota/handwritten-mathmatical-expression-2","task":"Handwritten Mathmatical Expression Recognition","dataset":"CROHME 2019","model":"BTTR","rank_in_archive_order":12,"of":14,"metrics":{"ExpRate":"52.96"},"uses_additional_data":false},{"leaderboard":"/sota/handwritten-mathmatical-expression-3","task":"Handwritten Mathmatical Expression Recognition","dataset":"HME100K","model":"BTTR","rank_in_archive_order":10,"of":12,"metrics":{"ExpRate":"64.1"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2105.02412","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2105.02412"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/qingzhenduyu/ical","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Green-Wood/BTTR","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":1,"unverified":2},"by_repo_kind":{"official":{"samples":3,"ran":1,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"e06d2f5f2824ecc6","entry":"rotate_every_two","repo":"Green-Wood/BTTR","repo_kind":"official","path":"bttr/model/pos_enc.py","file_url":"https://github.com/Green-Wood/BTTR/blob/HEAD/bttr/model/pos_enc.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e06d2f5f2824ecc6"}},{"code_sha256_prefix":"c2c5353ea8549a2a","entry":"data_iterator","repo":"Green-Wood/BTTR","repo_kind":"official","path":"bttr/datamodule/datamodule.py","file_url":"https://github.com/Green-Wood/BTTR/blob/HEAD/bttr/datamodule/datamodule.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c2c5353ea8549a2a"}},{"code_sha256_prefix":"c5115025a3ddb95b","entry":"extract_data","repo":"Green-Wood/BTTR","repo_kind":"official","path":"bttr/datamodule/datamodule.py","file_url":"https://github.com/Green-Wood/BTTR/blob/HEAD/bttr/datamodule/datamodule.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c5115025a3ddb95b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}