Papers › Image-to-Markup Generation with Coarse-to-Fine Attention

Image-to-Markup Generation with Coarse-to-Fine Attention

16 Sep 2016ICML 2017 8arXiv:1609.04938archive 2025-07-28

Yuntian Deng, Anssi Kanervisto, Jeffrey Ling, Alexander M. Rush

We present a neural encoder-decoder model to convert images into presentational markup based on a scalable coarse-to-fine attention mechanism. Our method is evaluated in the context of image-to-LaTeX generation, and we introduce a new dataset of real-world rendered mathematical expressions paired with LaTeX markup. We show that unlike neural OCR techniques using CTC-based models, attention-based approaches can tackle this non-standard OCR task. Our approach outperforms classical mathematical OCR systems by a large margin on in-domain rendered data, and, with pretraining, also performs well on out-of-domain handwritten data. To reduce the inference complexity associated with the attention-based approaches, we introduce a new coarse-to-fine attention layer that selects a support region before applying attention.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1609.04938")

Code

Syntology Ran 1 of 13 code samples harvested from 4 repositories linked to this paper; 12 have no recorded run. Of those that ran: 1 ran · our draft was wrong.

By repository: official repository: 1 sample from 1 repository, 0 ran; community (archive-listed): 12 samples from 3 repositories, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

14 repositories listed; official and paper-mentioned ones first.

harvardnlp/im2markup officialmentioned on GitHubtorch report
BachoSeven/stellestelline mentioned on GitHubtf report
CT2001/image-to-latex mentioned on GitHubpytorchMIT report
CT2001/image-to-latex-biology mentioned on GitHubpytorchMIT report
da03/Attention-OCR mentioned on GitHubtf report
jvpoulos/Attention-OCR mentioned on GitHubtfMIT report
kingyiusuen/image-to-latex mentioned on GitHubpytorchMIT report
lukas-blecher/LaTeX-OCR mentioned on GitHubpytorchMIT report
opennmt/im2text mentioned on GitHubMIT report
untrix/im2latex tfAGPL-3.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 1 ran; 0 honoured the contract we drafted; 12 have no recorded run. Read from Syntology's graph 2026-09-25; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
12unverified

Licence: 0 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 4 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

process_args harvardnlp/im2markup/scripts/preprocessing/preprocess_images.py official repository unverified MIT (permissive) · ae08cb323bcbd595 · report
process_args da03/Attention-OCR/src/launcher.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 5f977334a9330cac · report
FMM_func CT2001/image-to-latex/data-preprocess/no_chinese.py community (archive-listed) unverified MIT (permissive) · 5bfcddf02c8fcf58 · report
find_first CT2001/image-to-latex/image_to_latex/models/resnet_transformer.py community (archive-listed) unverified MIT (permissive) · d3fb41b62eaedad7 · report
generate_square_subsequent_mask CT2001/image-to-latex/image_to_latex/models/resnet_transformer.py community (archive-listed) unverified MIT (permissive) · 9fae5025ebafa98e · report
get_wmt_enfr_dev_set jvpoulos/Attention-OCR/src/model/data_utils.py community (archive-listed) unverified MIT (permissive) · ec532e8f70289f38 · report
get_wmt_enfr_train_set jvpoulos/Attention-OCR/src/model/data_utils.py community (archive-listed) unverified MIT (permissive) · 0a7b6ca2e2bf4659 · report
max_2x1pool jvpoulos/Attention-OCR/src/model/cnn.py community (archive-listed) unverified MIT (permissive) · 3ca4a31edc44c233 · report
max_2x2pool jvpoulos/Attention-OCR/src/model/cnn.py community (archive-listed) unverified MIT (permissive) · 32711cdafa63eda4 · report
maybe_download jvpoulos/Attention-OCR/src/model/data_utils.py community (archive-listed) unverified MIT (permissive) · 43ea785c6d00f3e4 · report
process_args jvpoulos/Attention-OCR/src/launcher.py community (archive-listed) unverified MIT (permissive) · e1ee189649199b8f · report
rnn_decoder jvpoulos/Attention-OCR/src/model/seq2seq.py community (archive-listed) unverified MIT (permissive) · f44847e8b1c4bd91 · report
var_random jvpoulos/Attention-OCR/src/model/cnn.py community (archive-listed) unverified MIT (permissive) · 213cd44559181629 · report

Tasks

DecoderOptical Character Recognition (OCR)

Datasets

Introduced by this paper, per the archive.

im2latex-100k

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections