SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · ijcai2022_0224 · IJCAI · 2022

S 2 Transformer for Image Captioning

Jingkuan Song, Lianli Gao, Haonan Zhang, Pengpeng Zeng

Code that ran

6 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 2 no recorded run), measured 2026-11-24; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/ijcai2022_0224.json · badge: /api/ran/ijcai2022_0224.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
zchoi/S2-Transformer canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
FunctionStatusWhere it lives
cook_refs Ran
ran; our contract draft was wrong, not the code
zchoi/S2-Transformer/evaluation/bleu/bleu_scorer.py
code served (permissive licence) · get_code("7586e1d32f7325f7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from collections import defaultdict

ARGS = {
    'refs': [
        'the quick brown fox jumps over the lazy dog',
        'a quick brown fox leaps over a lazy dog'
    ],
    'eff': 'shortest',
    'n': 4
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
cook_test Ran
ran; our contract draft was wrong, not the code
zchoi/S2-Transformer/evaluation/bleu/bleu_scorer.py
pointer only (licence: MIT); the stored copy get_code serves, from div290/capeen, is pointer only (licence: NONE) · get_code("f5741ff28f6cb706")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from div290/capeen, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

position_embedding Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zchoi/S2-Transformer/models/transformer/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from 232525/PureT, is pointer only (licence: NONE) · get_code("e344c95038ed76fd")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from 232525/PureT, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

precook Ran
ran; our contract draft was wrong, not the code
zchoi/S2-Transformer/evaluation/bleu/bleu_scorer.py
code served (permissive licence) · get_code("ec4448373d72d636")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

ARGS = {
    "s": "the quick brown fox jumps over the lazy dog",
    "n": 4,
    "out": False
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
precook Ran
ran; our contract draft was wrong, not the code
zchoi/S2-Transformer/evaluation/cider/cider_scorer.py
code served (permissive licence) · get_code("ca007f4b8a45fbdc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned defaultdict. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-27T00:14:48Z. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from collections import defaultdict

ARGS = {
    "s": "The quick brown fox jumps over the lazy dog",
    "n": 4
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sinusoid_encoding_table Ran
ran, honoured the contract we drafted
zchoi/S2-Transformer/models/transformer/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from 232525/PureT, is pointer only (licence: NONE) · get_code("35fbc756acf92321")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from 232525/PureT, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

evaluate_loss Not yet run
unverified (harvested, no recorded run)
zchoi/S2-Transformer/train_transformer.py
code served (permissive licence) · get_code("5af2a3fc35c0de6a")
How it ran

no invocation recorded.

train_xe Not yet run
unverified (harvested, no recorded run)
zchoi/S2-Transformer/train_transformer.py
code served (permissive licence) · get_code("bf407c244b10f6ad")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 6 later) and 2 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
precook 22 other papers
14 dated earlier, 7 later, 1 same year, order not determinable
1411.4555 (2014-11)
Show and Tell: A Neural Image Caption Generator
1502.03044 (2015-02)
Show, Attend and Tell: Neural Image Caption Generation with Visual Attention
1611.09268 (2016-11)
MS MARCO: A Human Generated MAchine Reading COmprehension Dataset
and 19 more not named here
cook_refs 21 other papers
12 dated earlier, 8 later, 1 same year, order not determinable
1502.03044 (2015-02)
Show, Attend and Tell: Neural Image Caption Generation with Visual Attention
1611.09268 (2016-11)
MS MARCO: A Human Generated MAchine Reading COmprehension Dataset
1611.09571 (2016-11)
Predicting Human Eye Fixations via an LSTM-based Saliency Attentive Model
and 18 more not named here
precook 4 other papers
3 dated earlier, 1 later
1611.09571 (2016-11)
Predicting Human Eye Fixations via an LSTM-based Saliency Attentive Model
1804.08771 (2018-04)
A Call for Clarity in Reporting BLEU Scores
1912.08226 (2019-12)
Meshed-Memory Transformer for Image Captioning
and 1 more not named here
cook_test 3 other papers
2 dated earlier, 1 later
1611.09571 (2016-11)
Predicting Human Eye Fixations via an LSTM-based Saliency Attentive Model
1912.08226 (2019-12)
Meshed-Memory Transformer for Image Captioning
2410.04433 (2024-10)
CAPEEN: Image Captioning with Early Exits and Knowledge Distillation
position_embedding 3 other papers
1 dated earlier, 1 later, 1 same year, order not determinable
1912.08226 (2019-12)
Meshed-Memory Transformer for Image Captioning
2203.15350 (2022-03)
End-to-End Transformer Based Model for Image Captioning
2310.18773 (2023-10)
CityRefer: Geography-aware 3D Visual Grounding Dataset on City-scale Point Cloud Data
sinusoid_encoding_table 3 other papers
1 dated earlier, 1 later, 1 same year, order not determinable
1912.08226 (2019-12)
Meshed-Memory Transformer for Image Captioning
2203.15350 (2022-03)
End-to-End Transformer Based Model for Image Captioning
2310.18773 (2023-10)
CityRefer: Geography-aware 3D Visual Grounding Dataset on City-scale Point Cloud Data

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Transformer-based architectures with grid features represent the state-of-the-art in visual and language reasoning tasks, such as visual question answering and image-text matching. However, directly applying them to image captioning may result in spatial and fine-grained semantic information loss. Their applicability to image captioning is still largely under-explored. Towards this goal, we propose a simple yet effective method, Spatialand Scale-aware Transformer (S 2 Transformer) for image captioning. Specifically, we firstly propose a Spatial-aware Pseudo-supervised (SP ) module, which resorts to feature clustering to help preserve spatial information for grid features. Next, to maintain the model size and produce superior results, we build a simple weighted residual connection, named Scale-wise Reinforcement (SR) module, to simultaneously explore both low-and high-level encoded features with rich semantics. Extensive experiments on the MSCOCO benchmark demonstrate that our method achieves new state-of-art performance without bringing excessive parameters compared with the vanilla transformer. The source code is available at https://github.com/zchoi/S2-Transformer.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("ijcai2022_0224")
get_code_for_paper("ijcai2022_0224")
have("ijcai2022_0224")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/ijcai2022_0224.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/ijcai2022_0224.svg)](https://syntology.ai/paper/ijcai2022_0224)

Connect an agent — have() is free.