Papers › Meshed-Memory Transformer for Image Captioning

Meshed-Memory Transformer for Image Captioning

17 Dec 2019CVPR 2020 6arXiv:1912.08226archive 2025-07-28

Marcella Cornia, Matteo Stefanini, Lorenzo Baraldi, Rita Cucchiara

Transformer-based architectures represent the state of the art in sequence modeling tasks like machine translation and language understanding. Their applicability to multi-modal contexts like image captioning, however, is still largely under-explored. With the aim of filling this gap, we present M² - a Meshed Transformer with Memory for Image Captioning. The architecture improves both the image encoding and the language generation steps: it learns a multi-level representation of the relationships between image regions integrating learned a priori knowledge, and uses a mesh-like connectivity at decoding stage to exploit low- and high-level features. Experimentally, we investigate the performance of the M² Transformer and different fully-attentive models in comparison with recurrent ones. When tested on COCO, our proposal achieves a new state of the art in single-model and ensemble configurations on the "Karpathy" test split and on the online test server. We also assess its performances when describing objects unseen in the training set. Trained models and code for reproducing the experiments are publicly available at: https://github.com/aimagelab/meshed-memory-transformer.

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="1912.08226")

Code

Syntology Ran 5 of 8 code samples harvested from 1 repository linked to this paper; 3 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · our draft was wrong; 1 ran · fixture could not drive it; 2 ran with no contract checked.

By repository: official repository: 8 samples from 1 repository, 5 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

aimagelab/meshed-memory-transformer officialmentioned in papermentioned on GitHubpytorchBSD-3-Clause report
Japanese-Image-Captioning/M2-transformer-for-Japanese mentioned on GitHubpytorchBSD-3-Clause 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

8 samples harvested; 5 ran; 1 honoured the contract we drafted; 3 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 · honoured contract
1ran · our draft was wrong
1ran · fixture could not drive it
2ran
3unverified

Licence: 0 of the 8 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 aimagelab/meshed-memory-transformer. “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.

cook_test aimagelab/meshed-memory-transformer/evaluation/bleu/bleu_scorer.py official repository ran BSD-3-Clause (permissive) · f5741ff28f6cb706 · report
cook_test aimagelab/meshed-memory-transformer/evaluation/cider/cider_scorer.py official repository ran BSD-3-Clause (permissive) · 7cb89de9e327ddab · report
position_embedding aimagelab/meshed-memory-transformer/models/transformer/utils.py official repository ran · fixture could not drive it fingerprinted BSD-3-Clause (permissive) · e344c95038ed76fd · report
precook aimagelab/meshed-memory-transformer/evaluation/bleu/bleu_scorer.py official repository ran · our draft was wrong fingerprinted BSD-3-Clause (permissive) · ec4448373d72d636 · report
sinusoid_encoding_table aimagelab/meshed-memory-transformer/models/transformer/utils.py official repository ran · honoured contract fingerprinted BSD-3-Clause (permissive) · 35fbc756acf92321 · report
cook_refs aimagelab/meshed-memory-transformer/evaluation/bleu/bleu_scorer.py official repository unverified BSD-3-Clause (permissive) · 7586e1d32f7325f7 · report
cook_refs aimagelab/meshed-memory-transformer/evaluation/cider/cider_scorer.py official repository unverified BSD-3-Clause (permissive) · 26e17b0aeb64b34c · report
precook aimagelab/meshed-memory-transformer/evaluation/cider/cider_scorer.py official repository unverified BSD-3-Clause (permissive) · ca007f4b8a45fbdc · report

Tasks

Image CaptioningMachine TranslationText GenerationTranslation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Captioning COCO (Common Objects in Context) M2 Transformer CIDEr 131.2 #2 of 17 Archive leaderboard report
Image Captioning COCO Captions Meshed-Memory Transformer BLEU-1 80.8 #25 of 41 Archive leaderboard report
Image Captioning COCO Captions Meshed-Memory Transformer BLEU-4 39.1 #25 of 41 Archive leaderboard report
Image Captioning COCO Captions Meshed-Memory Transformer CIDER 131.2 #25 of 41 Archive leaderboard report
Image Captioning COCO Captions Meshed-Memory Transformer METEOR 29.2 #25 of 41 Archive leaderboard report
Image Captioning COCO Captions Meshed-Memory Transformer ROUGE-L 58.6 #25 of 41 Archive leaderboard report
Image Captioning COCO Captions Meshed-Memory Transformer SPICE 22.6 #25 of 41 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerReLUResidual ConnectionSoftmaxTestTransformer

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