Papers › Discffusion: Discriminative Diffusion Models as Few-shot Vision and Language Learners

Discffusion: Discriminative Diffusion Models as Few-shot Vision and Language Learners

18 May 2023arXiv:2305.10722archive 2025-07-28

Xuehai He, Weixi Feng, Tsu-Jui Fu, Varun Jampani, Arjun Akula, Pradyumna Narayana, Sugato Basu, William Yang Wang, Xin Eric Wang

Diffusion models, such as Stable Diffusion, have shown incredible performance on text-to-image generation. Since text-to-image generation often requires models to generate visual concepts with fine-grained details and attributes specified in text prompts, can we leverage the powerful representations learned by pre-trained diffusion models for discriminative tasks such as image-text matching? To answer this question, we propose a novel approach, Discriminative Stable Diffusion (DSD), which turns pre-trained text-to-image diffusion models into few-shot discriminative learners. Our approach mainly uses the cross-attention score of a Stable Diffusion model to capture the mutual influence between visual and textual information and fine-tune the model via efficient attention-based prompt learning to perform image-text matching. By comparing DSD with state-of-the-art methods on several benchmark datasets, we demonstrate the potential of using pre-trained diffusion models for discriminative tasks with superior results on few-shot image-text matching.

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

Code

Syntology Ran 0 of 20 code samples harvested from 1 repository linked to this paper; 20 have no recorded run.

By repository: official repository: 20 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

eric-ai-lab/dsd officialmentioned in paperjaxMIT 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

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

20unverified

Licence: 0 of the 20 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 eric-ai-lab/dsd. “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.

average_score eric-ai-lab/dsd/dsd_infer.py official repository unverified MIT (permissive) · 4294cf0378461ad2 · report
average_score eric-ai-lab/dsd/dsd_train.py official repository unverified MIT (permissive) · 0ca47b5cf6386db5 · report
compute_loss eric-ai-lab/dsd/utils/losses.py official repository unverified MIT (permissive) · 2aa969a20b25a144 · report
compute_score eric-ai-lab/dsd/utils/losses.py official repository unverified MIT (permissive) · 5bc35c622beca1cc · report
evaluate_comvg eric-ai-lab/dsd/eval_score.py official repository unverified MIT (permissive) · 61dde694c9bb23c2 · report
evaluate_retrieval eric-ai-lab/dsd/eval_score.py official repository unverified MIT (permissive) · 3c5ed43dcafc5436 · report
evaluate_vqa eric-ai-lab/dsd/eval_score.py official repository unverified MIT (permissive) · e1b88fc15ff00272 · report
get_full_repo_name eric-ai-lab/dsd/dsd_train.py official repository unverified MIT (permissive) · 6431708d8f3ff177 · report
get_timesteps eric-ai-lab/dsd/dsd_train.py official repository unverified MIT (permissive) · 9f228a3f87edcf83 · report
get_train_dataset eric-ai-lab/dsd/custom_datasets.py official repository unverified MIT (permissive) · be7a240b9dcc2368 · report
image_preprocess eric-ai-lab/dsd/playground.py official repository unverified MIT (permissive) · 3cacd5275cbd348c · report
image_preprocess eric-ai-lab/dsd/utils/process_dataset.py official repository unverified MIT (permissive) · 831f5bc2bdeba8c9 · report
load_json eric-ai-lab/dsd/utils/helper_functions.py official repository unverified MIT (permissive) · 02a978e30e225398 · report
next_available_dirpath eric-ai-lab/dsd/dsd_infer.py official repository unverified MIT (permissive) · 03616619ada8dbef · report
normalize_word eric-ai-lab/dsd/utils/glossary.py official repository unverified MIT (permissive) · 8f1a44ab20956301 · report
preprocess eric-ai-lab/dsd/diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_dsd.py official repository unverified MIT (permissive) · be2fda5ca6ae10b0 · report
process_word eric-ai-lab/dsd/utils/glossary.py official repository unverified MIT (permissive) · c04400bfa2c2f6e0 · report
read_svo eric-ai-lab/dsd/utils/helper_functions.py official repository unverified MIT (permissive) · 248696bec32990b5 · report
sanitize_text eric-ai-lab/dsd/dsd_infer.py official repository unverified MIT (permissive) · fc89a1b3e420c811 · report
show_cropped_image eric-ai-lab/dsd/utils/helper_functions.py official repository unverified MIT (permissive) · 42c588f76987fa6f · report

Tasks

Image GenerationImage-text matchingPrompt LearningText MatchingText to Image GenerationText-to-Image Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Diffusion

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