Papers › Linearly Mapping from Image to Text Space

Linearly Mapping from Image to Text Space

30 Sep 2022arXiv:2209.15162archive 2025-07-28

Jack Merullo, Louis Castricato, Carsten Eickhoff, Ellie Pavlick

The extent to which text-only language models (LMs) learn to represent features of the non-linguistic world is an open question. Prior work has shown that pretrained LMs can be taught to caption images when a vision model's parameters are optimized to encode images in the language space. We test a stronger hypothesis: that the conceptual representations learned by frozen text-only models and vision-only models are similar enough that this can be achieved with a linear map. We show that the image representations from vision models can be transferred as continuous prompts to frozen LMs by training only a single linear projection. Using these to prompt the LM achieves competitive performance on captioning and visual question answering tasks compared to models that tune both the image encoder and text decoder (such as the MAGMA model). We compare three image encoders with increasing amounts of linguistic supervision seen during pretraining: BEIT (no linguistic information), NF-ResNET (lexical category information), and CLIP (full natural language descriptions). We find that all three encoders perform equally well at transferring visual property information to the language model (e.g., whether an animal is large or small), but that image encoders pretrained with linguistic supervision more saliently encode category information (e.g., distinguishing hippo vs. elephant) and thus perform significantly better on benchmark language-and-vision tasks. Our results indicate that LMs encode conceptual information structurally similarly to vision-based models, even those that are solely trained on images. Code is available here: https://github.com/jmerullo/limber

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

Code

Syntology Ran 5 of 14 code samples harvested from 1 repository linked to this paper; 9 have no recorded run. Of those that ran: 5 ran with no contract checked.

By repository: official repository: 14 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.

jmerullo/limber officialmentioned in papermentioned on GitHubpytorchMIT report
bytetriper/lm4lv mentioned on GitHubpytorchApache-2.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

14 samples harvested; 5 ran; 0 honoured the contract we drafted; 9 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.

5ran
9unverified

Licence: 0 of the 14 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 jmerullo/limber. “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.

load_config jmerullo/limber/config.py official repository ran MIT (permissive) · ace12fad87592626 · report
pad_to_size jmerullo/limber/transforms.py official repository ran MIT (permissive) · e82e4764f914492f · report
pad_to_size_tensor jmerullo/limber/transforms.py official repository ran fingerprinted MIT (permissive) · d3af6b05f019b479 · report
remove_tokens_after_eos jmerullo/limber/sampling.py official repository ran MIT (permissive) · ba246ce8c9917aba · report
top_k_filter jmerullo/limber/sampling.py official repository ran fingerprinted MIT (permissive) · aa8cc3e8f125148a · report
beit_feature_extractor jmerullo/limber/transforms.py official repository unverified MIT (permissive) · 43c05e1f4efea52f · report
collate_fn jmerullo/limber/dataset.py official repository unverified MIT (permissive) · 435a97d7491369dc · report
configure_param_groups jmerullo/limber/config_params.py official repository unverified MIT (permissive) · b93589f28f3dd515 · report
full_nfresnet50 jmerullo/limber/image_encoders.py official repository unverified MIT (permissive) · 32d95b9de0cbb2de · report
get_params_for_weight_decay_optimization jmerullo/limber/config_params.py official repository unverified MIT (permissive) · f2aaccc3c641089b · report
get_tokenizer jmerullo/limber/limber_gptj.py official repository unverified MIT (permissive) · 1fe016f046db89bd · report
load_json jmerullo/limber/dataset.py official repository unverified MIT (permissive) · 26c48ad88add4d84 · report
nfresnet50 jmerullo/limber/image_encoders.py official repository unverified MIT (permissive) · 81a63795029ff25d · report
read_img_captions jmerullo/limber/dataset.py official repository unverified MIT (permissive) · a4d1b53e4f72d453 · report

Tasks

Image CaptioningImage to textLanguage ModellingOpen-Ended Question AnsweringQuestion AnsweringVisual Question AnsweringVisual Question Answering (VQA)

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

CLIPTest

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