{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/text-only-training-for-image-captioning-using","title":"Text-Only Training for Image Captioning using Noise-Injected CLIP","arxiv_id":"2211.00575","date":"2022-11-01","proceeding":null,"authors":["David Nukrai","Ron Mokady","Amir Globerson"],"abstract":"We consider the task of image-captioning using only the CLIP model and additional text data at training time, and no additional captioned images. Our approach relies on the fact that CLIP is trained to make visual and textual embeddings similar. Therefore, we only need to learn how to translate CLIP textual embeddings back into text, and we can learn how to do this by learning a decoder for the frozen CLIP text encoder using only text. We argue that this intuition is \"almost correct\" because of a gap between the embedding spaces, and propose to rectify this via noise injection during training. We demonstrate the effectiveness of our approach by showing SOTA zero-shot image captioning across four benchmarks, including style transfer. Code, data, and models are available on GitHub.","url_abs":"https://arxiv.org/abs/2211.00575v1","url_pdf":"https://arxiv.org/pdf/2211.00575v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"text-only-training-for-image-captioning-using","repo_url":"https://github.com/davidhuji/capdec","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"text-only-training-for-image-captioning-using","repo_url":"https://github.com/uriberger/re_cap","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"text-only-training-for-image-captioning-using","repo_url":"https://github.com/zelaki/wsac","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"text-only-training-for-image-captioning-using","repo_url":"https://github.com/avitej-iyer/CapDec-Recreation","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"image-captioning","task_name":"Image Captioning"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"semi-supervised-learning-for-image-captioning","task_name":"Semi Supervised Learning for Image Captioning"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"clip","method_name":"CLIP"},{"method_slug":"cosine-annealing","method_name":"Cosine Annealing"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"discriminative-fine-tuning","method_name":"Discriminative Fine-Tuning"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"gpt-2","method_name":"GPT-2"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-cosine-annealing","method_name":"Linear Warmup With Cosine Annealing"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"weight-decay","method_name":"Weight Decay"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-captioning-on-coco-captions","task":"Image Captioning","dataset":"COCO Captions","model":"CapDec","rank_in_archive_order":32,"of":41,"metrics":{"BLEU-4":"26.4","CIDER":"91.8","METEOR":"25.1"},"uses_additional_data":false},{"leaderboard":"/sota/image-captioning-on-flickrstyle10k","task":"Image Captioning","dataset":"FlickrStyle10K","model":"CapDec","rank_in_archive_order":1,"of":2,"metrics":{"BLEU-1 (Romantic)":"29.4"},"uses_additional_data":false},{"leaderboard":"/sota/image-captioning-on-mscoco-1","task":"Image Captioning","dataset":"MSCOCO","model":"CapDec","rank_in_archive_order":1,"of":1,"metrics":{"BLEU-4":"26.4"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-learning-for-image-captioning-2","task":"Semi Supervised Learning for Image Captioning","dataset":"Flickr30k","model":"CapDec","rank_in_archive_order":1,"of":1,"metrics":{"CIDEr":"39.1"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-learning-for-image-captioning-3","task":"Semi Supervised Learning for Image Captioning","dataset":"FlickrStyle10K","model":"CapDec","rank_in_archive_order":1,"of":1,"metrics":{"CIDEr":"30.0"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2211.00575","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2211.00575"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zelaki/wsac","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/avitej-iyer/CapDec-Recreation","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/uriberger/re_cap","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/davidhuji/capdec","reach":{"status":"ok"}}],"summary":{"ran_violates":1,"ran_draft_wrong":1,"ran_honours":1,"ran_fixture":1,"unverified":1},"by_repo_kind":{"official":{"samples":2,"ran":2,"repositories":1},"listed":{"samples":3,"ran":2,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":1,"samples":[{"code_sha256_prefix":"885631f3668eea0d","entry":"caption_has_gender_term","repo":"davidhuji/capdec","repo_kind":"official","path":"embeddings_generator.py","file_url":"https://github.com/davidhuji/capdec/blob/HEAD/embeddings_generator.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"885631f3668eea0d"}},{"code_sha256_prefix":"afcd5e18d918a60c","entry":"change_gender_randomly","repo":"davidhuji/capdec","repo_kind":"official","path":"embeddings_generator.py","file_url":"https://github.com/davidhuji/capdec/blob/HEAD/embeddings_generator.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"afcd5e18d918a60c"}},{"code_sha256_prefix":"1f75ed1d9554f429","entry":"count_ready_parphrased_embeddings","repo":"avitej-iyer/CapDec-Recreation","repo_kind":"listed","path":"predictions_runner.py","file_url":"https://github.com/avitej-iyer/CapDec-Recreation/blob/HEAD/predictions_runner.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"Unlicense","inline_ok":true,"mcp_get_code":{"code_sha256":"1f75ed1d9554f429"}},{"code_sha256_prefix":"ab6c8d4586f1b912","entry":"remove_long_samples","repo":"uriberger/re_cap","repo_kind":"listed","path":"reformulate.py","file_url":"https://github.com/uriberger/re_cap/blob/HEAD/reformulate.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ab6c8d4586f1b912"}},{"code_sha256_prefix":"0b71ec66957d1ec4","entry":"calc_distances_of_ready_embeddings","repo":"avitej-iyer/CapDec-Recreation","repo_kind":"listed","path":"predictions_runner.py","file_url":"https://github.com/avitej-iyer/CapDec-Recreation/blob/HEAD/predictions_runner.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Unlicense","inline_ok":true,"mcp_get_code":{"code_sha256":"0b71ec66957d1ec4"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}