Papers › End-to-End Transformer Based Model for Image Captioning

End-to-End Transformer Based Model for Image Captioning

29 Mar 2022arXiv:2203.15350archive 2025-07-28

Yiyu Wang, Jungang Xu, Yingfei Sun

CNN-LSTM based architectures have played an important role in image captioning, but limited by the training efficiency and expression ability, researchers began to explore the CNN-Transformer based models and achieved great success. Meanwhile, almost all recent works adopt Faster R-CNN as the backbone encoder to extract region-level features from given images. However, Faster R-CNN needs a pre-training on an additional dataset, which divides the image captioning task into two stages and limits its potential applications. In this paper, we build a pure Transformer-based model, which integrates image captioning into one stage and realizes end-to-end training. Firstly, we adopt SwinTransformer to replace Faster R-CNN as the backbone encoder to extract grid-level features from given images; Then, referring to Transformer, we build a refining encoder and a decoder. The refining encoder refines the grid features by capturing the intra-relationship between them, and the decoder decodes the refined features into captions word by word. Furthermore, in order to increase the interaction between multi-modal (vision and language) features to enhance the modeling capability, we calculate the mean pooling of grid features as the global feature, then introduce it into refining encoder to refine with grid features together, and add a pre-fusion process of refined global feature and generated words in decoder. To validate the effectiveness of our proposed model, we conduct experiments on MSCOCO dataset. The experimental results compared to existing published works demonstrate that our model achieves new state-of-the-art performances of 138.2% (single model) and 141.0% (ensemble of 4 models) CIDEr scores on `Karpathy' offline test split and 136.0% (c5) and 138.3% (c40) CIDEr scores on the official online test server. Trained models and source code will be released.

PaperPDFCodeCode Syntology ran

In Syntology 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="2203.15350")

Code

Syntology Ran 17 of 33 code samples harvested from 2 repositories linked to this paper; 16 have no recorded run. Of those that ran: 1 ran · honoured contract; 2 ran · violated contract; 1 ran · our draft was wrong; 2 ran · fixture could not drive it; 11 ran with no contract checked.

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

232525/PureT officialmentioned on GitHubpytorch report
jchenghu/expansionnet_v2 mentioned on GitHubpytorch 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

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

1ran · honoured contract
2ran · violated contract
1ran · our draft was wrong
2ran · fixture could not drive it
11ran
16unverified

Licence: 15 of the 33 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 2 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.

DecoderLayer 232525/PureT/models/pure_transformer.py official repository ran no licence file found · pointer only · 1ba18af6ffb51016 · report
FeedForward 232525/PureT/models/pure_transformer.py official repository ran no licence file found · pointer only · 2b5d0b9e88a90691 · report
MultiHeadSelfAttention 232525/PureT/models/pure_transformer.py official repository ran fingerprinted no licence file found · pointer only · 1b4e47ec99e1e927 · report
activation 232525/PureT/models/pure_transformer.py official repository ran · our draft was wrong no licence file found · pointer only · a7b560d30ae66959 · report
expand_tensor 232525/PureT/models/pure_transformer.py official repository ran · fixture could not drive it fingerprinted no licence file found · pointer only · 84c9e795607ff8d1 · report
position_embedding 232525/PureT/models/pure_transformer.py official repository ran · fixture could not drive it fingerprinted no licence file found · pointer only · e344c95038ed76fd · report
sinusoid_encoding_table 232525/PureT/models/pure_transformer.py official repository ran · honoured contract fingerprinted no licence file found · pointer only · 35fbc756acf92321 · report
subsequent_mask 232525/PureT/models/pure_transformer.py official repository ran · violated contract no licence file found · pointer only · d52f2d9e7e545563 · report
BasicLayer 232525/PureT/models/pure_transformer.py official repository unverified no licence file found · pointer only · a383a407c29985a1 · report
BasicModel 232525/PureT/models/pure_transformer.py official repository unverified no licence file found · pointer only · 5b2d8e2e4e7f8a89 · report
Decoder 232525/PureT/models/pure_transformer.py official repository unverified no licence file found · pointer only · 08f74e27081d74e9 · report
Encoder 232525/PureT/models/pure_transformer.py official repository unverified no licence file found · pointer only · 67c9f8c281deae2e · report
EncoderLayer 232525/PureT/models/pure_transformer.py official repository unverified no licence file found · pointer only · 0fd3949590683cc4 · report
PureT 232525/PureT/models/pure_transformer.py official repository unverified no licence file found · pointer only · cbce59c76431bd39 · report
SwinTransformerBlock 232525/PureT/models/pure_transformer.py official repository unverified no licence file found · pointer only · 284c0f72a6c81f95 · report
DropPath jchenghu/expansionnet_v2/models/End_ExpansionNet_v2.py community (archive-listed) ran fingerprinted MIT (permissive) · d14d5773d2c8e320 · report
EmbeddingLayer jchenghu/expansionnet_v2/models/End_ExpansionNet_v2.py community (archive-listed) ran · metamorphic tier: deterministic MIT (permissive) · 8dc0059690e3667f · report
EncoderLayer jchenghu/expansionnet_v2/models/End_ExpansionNet_v2.py community (archive-listed) ran · metamorphic tier: deterministic MIT (permissive) · fafb495b474a7acd · report
FeedForward jchenghu/expansionnet_v2/models/End_ExpansionNet_v2.py community (archive-listed) ran · metamorphic tier: deterministic MIT (permissive) · 47ef05333de71076 · report
MultiHeadAttention jchenghu/expansionnet_v2/models/End_ExpansionNet_v2.py community (archive-listed) ran · metamorphic tier: deterministic MIT (permissive) · ac6767df3a332ab9 · report
PatchEmbed jchenghu/expansionnet_v2/models/End_ExpansionNet_v2.py community (archive-listed) ran · metamorphic tier: deterministic MIT (permissive) · 4e15874ef9b1a7e7 · report
StaticExpansionBlock jchenghu/expansionnet_v2/models/End_ExpansionNet_v2.py community (archive-listed) ran MIT (permissive) · 44e7ad9330aa17b8 · report
WindowAttention jchenghu/expansionnet_v2/models/End_ExpansionNet_v2.py community (archive-listed) ran · metamorphic tier: deterministic MIT (permissive) · 5fd5f10dcdb2c664 · report
to_2tuple jchenghu/expansionnet_v2/models/End_ExpansionNet_v2.py community (archive-listed) ran · violated contract fingerprinted MIT (permissive) · 905129493d469a67 · report
BasicLayer jchenghu/expansionnet_v2/models/End_ExpansionNet_v2.py community (archive-listed) unverified MIT (permissive) · 57addd57b713784d · report
CaptioningModel jchenghu/expansionnet_v2/models/End_ExpansionNet_v2.py community (archive-listed) unverified MIT (permissive) · 7e1f0615f9be6815 · report
DecoderLayer jchenghu/expansionnet_v2/models/End_ExpansionNet_v2.py community (archive-listed) unverified MIT (permissive) · 3bafaef1eb838048 · report
DynamicExpansionBlock jchenghu/expansionnet_v2/models/End_ExpansionNet_v2.py community (archive-listed) unverified MIT (permissive) · b525d13f285adc10 · report
End_ExpansionNet_v2 jchenghu/expansionnet_v2/models/End_ExpansionNet_v2.py community (archive-listed) unverified MIT (permissive) · 9cf97124f3e0546a · report
SwinTransformer jchenghu/expansionnet_v2/models/End_ExpansionNet_v2.py community (archive-listed) unverified MIT (permissive) · d4ca4e9d197b7459 · report
SwinTransformerBlock jchenghu/expansionnet_v2/models/End_ExpansionNet_v2.py community (archive-listed) unverified MIT (permissive) · 2b3a7a150945b433 · report
create_no_peak_and_pad_mask jchenghu/expansionnet_v2/models/End_ExpansionNet_v2.py community (archive-listed) unverified MIT (permissive) · f20981676e57f873 · report
create_pad_mask jchenghu/expansionnet_v2/models/End_ExpansionNet_v2.py community (archive-listed) unverified MIT (permissive) · bb0dd55c83a9c845 · report

Tasks

DecoderImage Captioning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEConvolutionDense ConnectionsDropoutFaster R-CNNLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerRPNResidual ConnectionRoIPoolSoftmaxTransformer

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