SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2203.09173 · ACL · 2022

On Vision Features in Multimodal Machine Translation

Tong Xiao, Bei Li, Tao Zhou, Jingbo Zhu, Anxiang Ma, Zefan Zhou, Chuanhao Lv

arXiv · PDF · Open in the Atlas

Code that ran

2 of 3 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2203.09173.json · badge: /api/ran/2203.09173.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
libeineu/fairseq_mmt community
Papers with Code archive
2 ran · 1 no recorded run
FunctionStatusWhere it lives
FairseqIncrementalState Ran
ran on a synthesized input · constructed an object; no result was computed
libeineu/fairseq_mmt/fairseq/modules/selective_attention.py
code served (permissive licence) · get_code("0aea38188350e4a6")
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 an instance of its own class, FairseqIncrementalState: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. 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.

import torch
import uuid
from typing import Dict, Optional
from torch import Tensor

torch.manual_seed(0)

class FairseqIncrementalState(object):

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.init_incremental_state()

    def init_incremental_state(self):
        self._incremental_state_id = str(uuid.uuid4())

    def _get_full_incremental_state_key(self, key: str) -> str:
        return '{}.{}'.format(self._incremental_state_id, key)

    def get_incremental_state(self, incremental_state: Optional[Dict[str, Dict[str, Optional[Tensor]]]], key: str) -> Optional[Dict[str, Optional[Tensor]]]:
        """Helper for getting incremental state for an nn.Module."""
        full_key = self._get_full_incremental_state_key(key)
        if incremental_state is None or full_key not in incremental_state:
            return None
        return incremental_state[full_key]

    def set_incremental_state(self, incremental_state: Optional[Dict[str, Dict[str, Optional[Tensor]]]], key: str, value: Dict[str, Optional[Tensor]]) -> Optional[Dict[str, Dict[str, Optional[Tensor]]]]:
        """Helper for setting incremental state for an nn.Module."""
        if incremental_state is not None:
            full_key = self._get_full_incremental_state_key(key)
            incremental_state[full_key] = value
        return incremental_state

instance = FairseqIncrementalState()

test_tensor = torch.randn(2, 4)

incremental_state = {
    "some_key": {
        "tensor_value": test_tensor,
        "none_value": None
    }
}

ARGS = {}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type FairseqIncrementalState — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a FairseqIncrementalState output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
with_incremental_state Ran
ran; our contract draft was wrong, not the code
libeineu/fairseq_mmt/fairseq/modules/selective_attention.py
code served (permissive licence) · get_code("1c080baa3e6b2197")
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 type. The image it ran in was not recorded. 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.

import torch
import torch.nn as nn
from typing import Dict, Optional
from torch import Tensor

torch.manual_seed(0)

# The function with_incremental_state takes a single parameter: cls
# It modifies the class to include FairseqIncrementalState as a base class
# We need to create a simple test class to pass to this function

class SimpleModule(nn.Module):
    """A minimal nn.Module to test with_incremental_state"""
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create the class to be decorated
test_class = SimpleModule

ARGS = {
    'cls': test_class
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
SelectiveAttention Not yet run
unverified (harvested, no recorded run)
libeineu/fairseq_mmt/fairseq/modules/selective_attention.py
code served (permissive licence) · get_code("67a11ef05c68a35c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 2 the same month, 2 later) and 1 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
with_incremental_state
brick of this paper's assembly: helper
10 other papers
1 dated earlier, 1 the same month, 8 later · 1 only as an assembly brick
2105.11084 (2021-05)
Unsupervised Speech Recognition
2203.09163 (2022-03)
Modeling Dual Read/Write Paths for Simultaneous Machine Translation
2303.00257 (2023-03)
Hidden Markov Transformer for Simultaneous Machine Translation
and 7 more not named here
FairseqIncrementalState
brick of this paper's assembly: helper
4 other papers
1 the same month, 3 later · 1 only as an assembly brick
2203.09163 (2022-03)
Modeling Dual Read/Write Paths for Simultaneous Machine Translation
2303.00257 (2023-03)
Hidden Markov Transformer for Simultaneous Machine Translation
2407.03575 (2024-07)
DGR-MIL: Exploring Diverse Global Representation in Multiple Instance Learning for Whole Slide Image Classification
and 1 more not named here

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-22.

Repositories linked to this paper

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

Abstract

Previous work on multimodal machine translation (MMT) has focused on the way of incorporating vision features into translation but little attention is on the quality of vision models. In this work, we investigate the impact of vision models on MMT. Given the fact that Transformer is becoming popular in computer vision, we experiment with various strong models (such as Vision Transformer) and enhanced features (such as object-detection and image captioning). We develop a selective attention model to study the patch-level contribution of an image in MMT. On detailed probing tasks, we find that stronger vision models are helpful for learning translation from the visual modality. Our results also suggest the need of carefully examining MMT models, especially when current benchmarks are small-scale and biased. Our code could be found at https: //github.com/libeineu/fairseq_mmt.

For agents

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

get_harvested_code_for_paper("2203.09173")
get_code_for_paper("2203.09173")
have("2203.09173")

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

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

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

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

Connect an agent — have() is free.