Papers › DataDream: Few-shot Guided Dataset Generation

DataDream: Few-shot Guided Dataset Generation

15 Jul 2024arXiv:2407.10910archive 2025-07-28

Jae Myung Kim, Jessica Bader, Stephan Alaniz, Cordelia Schmid, Zeynep Akata

While text-to-image diffusion models have been shown to achieve state-of-the-art results in image synthesis, they have yet to prove their effectiveness in downstream applications. Previous work has proposed to generate data for image classifier training given limited real data access. However, these methods struggle to generate in-distribution images or depict fine-grained features, thereby hindering the generalization of classification models trained on synthetic datasets. We propose DataDream, a framework for synthesizing classification datasets that more faithfully represents the real data distribution when guided by few-shot examples of the target classes. DataDream fine-tunes LoRA weights for the image generation model on the few real images before generating the training data using the adapted model. We then fine-tune LoRA weights for CLIP using the synthetic data to improve downstream image classification over previous approaches on a large variety of datasets. We demonstrate the efficacy of DataDream through extensive experiments, surpassing state-of-the-art classification accuracy with few-shot data across 7 out of 10 datasets, while being competitive on the other 3. Additionally, we provide insights into the impact of various factors, such as the number of real-shot and generated images as well as the fine-tuning compute on model performance. The code is available at https://github.com/ExplainableML/DataDream.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 21 code samples harvested from 1 repository linked to this paper: 17 ran (of which 0 constructed an object rather than computing a result; 11 with no instrument failure: 4 honoured, 2 violated, 5 with no contract checked; 6 where Syntology's instrument failed) · 4 unverified. Where Syntology's instrument failed: 6 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: official repository: 21 samples from 1 repository, 17 ran (11 with no instrument failure; 6 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

explainableml/datadream officialmentioned in papermentioned on GitHubpytorchSyntology: 21 samples, 17 ran (6 instrument-failed) · 4 unverified report
explainableml/loft mentioned on GitHubpytorchSyntology: not harvested 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

21 samples harvested: 17 ran (of which 0 constructed an object rather than computing a result; 11 with no instrument failure: 4 honoured, 2 violated, 5 with no contract checked; 6 where Syntology's instrument failed) · 4 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

4ran · honoured contract
2ran · violated contract
6ran · our draft was wrong
5ran
4unverified

Licence: 21 of the 21 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 explainableml/datadream. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 1 sample that ran, the graph records a signature this page does not show: an argument's recorded type or element kind is a printout of an object in Syntology's harness (such as a mock object, a class or a pandas printout), not the type of an input, so it does not describe the call's shape. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

explainableml/datadream official repository 21 samples, 17 ran (6 instrument-failed) · 4 unverified
atoi in 14 papers DataDream/util.py ran · honoured contract fingerprinted no licence file found · pointer only · 6dbf1b2a5b901370 · report fixture: signature text:str/0/str · returned int · level recorded 2026-09-22
collate_fn in 500 papers DataDream/datadream.py ran · our draft was wrong no licence file found · pointer only · fa5f79455727e22f · report fixture: signature examples:list/1/dict · returned dict · level recorded 2026-09-24
configure_metadata classify/util_data.py ran · our draft was wrong fingerprinted no licence file found · pointer only · cc90acdad40fda89 · report fixture: signature metadata_root:str/0/str · returned Munch · level recorded 2026-09-24
cosine_scheduler in 74 papers classify/utils.py ran · honoured contract no licence file found · pointer only · ce0623da3f4979ea · report fixture: signature base_value:float/0/float, final_value:float/0/float, epochs:int/0/int, niter_per_ep:int/0/int, warmup_epochs:int/0/int, start_warmup_value:float/0/float · returned ndarray · level recorded 2026-09-24
filter_dset classify/data.py ran no licence file found · pointer only · 4321e2732ef4f573 · report fixture: signature dataset:MockDataset/0/?, n_img_per_cls:int/0/int, dataset_name:str/0/str · returned MockDataset · level recorded 2026-09-24
get_class_labels in 6 papers classify/util_data.py ran · our draft was wrong no licence file found · pointer only · b84909a8cfcfe0a7 · report fixture: signature metadata:MockMetadata/0/? · returned dict · level recorded 2026-09-24
get_dataset_name_for_template classify/models/clip.py ran · our draft was wrong no licence file found · pointer only · f4b98c9ac15c8f31 · report fixture: signature dataset:str/0/str · returned str · level recorded 2026-09-24
get_image_ids classify/util_data.py ran no licence file found · pointer only · d3b2000a296af30e · report fixture: signature metadata:dict/0/?, proxy:bool/0/bool · returned list · level recorded 2026-09-24
get_prompt_embeds generate/generate.py ran no licence file found · pointer only · 7be7d32ca034f009 · report fixture: signature pipe:MockPipe/0/?, prompts:list/1/str, device:str/0/str · returned Tensor · level recorded 2026-09-24
int2none DataDream/config.py ran · honoured contract fingerprinted no licence file found · pointer only · 98a6d35bba77d210 · report fixture: signature v:str/0/str · returned int · level recorded 2026-09-24
int2none classify/config.py ran · honoured contract fingerprinted no licence file found · pointer only · 8b6b0510fd096618 · report fixture: signature v:str/0/str · returned int · level recorded 2026-09-24
natural_keys in 14 papers DataDream/util.py ran · our draft was wrong fingerprinted no licence file found · pointer only · 5d0ab01cafdf38db · report fixture: signature text:str/0/str · returned list · level recorded 2026-09-24
split_eurosat classify/data.py ran no licence file found · pointer only · 135ddc3e2d86aefb · report fixture: returned Mock · level recorded 2026-09-24
str2bool in 533 papers DataDream/config.py ran · violated contract no licence file found · pointer only · 50232749441a454d · report fixture: signature v:str/0/str · returned bool · level recorded 2026-09-24
str2bool in 533 papers classify/config.py ran · violated contract no licence file found · pointer only · 0e3bc5d81a9cb964 · report fixture: signature v:str/0/str · returned bool · level recorded 2026-09-24
tokenize_prompt in 23 papers DataDream/datadream.py ran · our draft was wrong no licence file found · pointer only · a67a2074238bd9ef · report fixture: signature tokenizer:callable/0/?, prompt:str/0/str, tokenizer_max_length:int/0/int · returned dict · level recorded 2026-09-22
update_pipe generate/generate.py ran no licence file found · pointer only · 563f9ecbc1a3b12d · report fixture: signature pipe:callable/0/?, n_shot:int/0/int, n_template:int/0/int, dataset:str/0/str, datadream_dir:str/0/str, datadream_lr:float/0/float, datadream_epoch:int/0/int, datadream_train_text_encoder:bool/0/bool, fewshot_seed:int/0/int, classname:str/0/str · returned MockPipe · level recorded 2026-09-24
get_pipe generate/generate.py unverified no licence file found · pointer only · ca36e8d2604c2ef5 · report
import_model_class_from_model_name_or_path in 64 papers DataDream/datadream.py unverified no licence file found · pointer only · 0eb3e94e8635150e · report
str2none DataDream/config.py unverified no licence file found · pointer only · 0feb0cc068d06acc · report
str2none classify/config.py unverified no licence file found · pointer only · 906309df9be8f07e · report

Tasks

ClassificationDataset GenerationImage ClassificationImage Generationimage-classification

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

CLIPDiffusion

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