Papers › CAFE: Learning to Condense Dataset by Aligning Features

CAFE: Learning to Condense Dataset by Aligning Features

3 Mar 2022CVPR 2022 1arXiv:2203.01531archive 2025-07-28

Kai Wang, Bo Zhao, Xiangyu Peng, Zheng Zhu, Shuo Yang, Shuo Wang, Guan Huang, Hakan Bilen, Xinchao Wang, Yang You

Dataset condensation aims at reducing the network training effort through condensing a cumbersome training set into a compact synthetic one. State-of-the-art approaches largely rely on learning the synthetic data by matching the gradients between the real and synthetic data batches. Despite the intuitive motivation and promising results, such gradient-based methods, by nature, easily overfit to a biased set of samples that produce dominant gradients, and thus lack global supervision of data distribution. In this paper, we propose a novel scheme to Condense dataset by Aligning FEatures (CAFE), which explicitly attempts to preserve the real-feature distribution as well as the discriminant power of the resulting synthetic set, lending itself to strong generalization capability to various architectures. At the heart of our approach is an effective strategy to align features from the real and synthetic data across various scales, while accounting for the classification of real samples. Our scheme is further backed up by a novel dynamic bi-level optimization, which adaptively adjusts parameter updates to prevent over-/under-fitting. We validate the proposed CAFE across various datasets, and demonstrate that it generally outperforms the state of the art: on the SVHN dataset, for example, the performance gain is up to 11%. Extensive experiments and analyses verify the effectiveness and necessity of proposed designs.

PaperPDFConference PDFCodeCode Syntology ranMethod as code

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 33 code samples harvested from 1 repository linked to this paper: 27 ran (of which 8 constructed an object rather than computing a result; 9 with no instrument failure: 1 honoured, 0 violated, 8 with no contract checked; 18 where Syntology's instrument failed) · 6 unverified. Where Syntology's instrument failed: 16 where our contract draft was wrong; 2 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 33 samples from 1 repository, 27 ran (9 with no instrument failure; 18 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.

No sample is linked to this paper from 1 of its repositories that Syntology harvested for other papers:

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

kaiwang960112/cafe officialmentioned in papermentioned on GitHubpytorchSyntology: 33 samples, 27 ran (18 instrument-failed) · 6 unverified report
Guang000/Awesome-Dataset-Distillation mentioned on GitHubMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Task-Specific Generative Dataset Distillation with Difficulty-Guided Sampling (arXiv:2507.03331; that paper's own run record: 1 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. 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.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

33 samples harvested: 27 ran (of which 8 constructed an object rather than computing a result; 9 with no instrument failure: 1 honoured, 0 violated, 8 with no contract checked; 18 where Syntology's instrument failed) · 6 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
16ran · our draft was wrong
2ran; the contract check could not run
8ran
6unverified

Licence: 33 of the 33 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 kaiwang960112/cafe. “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”. “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. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

kaiwang960112/cafe official repository 33 samples, 27 ran (18 instrument-failed) · 6 unverified
AlexNet in 8 papers distill.py ran no licence file found · pointer only · 931c859769faecd5 · report fixture: returned AlexNet · level recorded 2026-09-22
ConvNet in 13 papers distill.py ran no licence file found · pointer only · 1a326419c73ee5da · report fixture: returned ConvNet · level recorded 2026-09-22
DiffAugment in 28 papers
census: 7 implementations from 5 papers, 5 distinct outputs across 2 buckets, one shared input per bucket this sample: bucket 1 of 2, arg 1: rank 4, kind float, dtype float32
distill.py ran; the contract check could not run (RAISES) no licence file found · pointer only · de12e346f3744454 · report fixture: signature x:Tensor/4/float, strategy:str/0/str, seed:int/0/int, param:DiffAugParam/0/? · returned Tensor · level recorded 2026-09-22
LeNet in 5 papers distill.py ran no licence file found · pointer only · 47a58a8eff474d1c · report fixture: returned LeNet · level recorded 2026-09-22
MLP in 375 papers distill.py ran no licence file found · pointer only · 0935dbd6d06c3d0a · report fixture: returned MLP · level recorded 2026-09-22
ParamDiffAug distill.py ran no licence file found · pointer only · 3a7e1b5c7abb8046 · report fixture: returned ParamDiffAug · level recorded 2026-09-22
ResNet in 139 papers distill.py ran no licence file found · pointer only · 820bb01f1d2a3735 · report fixture: returned ResNet · level recorded 2026-09-22
ResNet18 in 174 papers distill.py ran · our draft was wrong no licence file found · pointer only · aa9bc50ea3b078f6 · report fixture: signature channel:int/0/int, num_classes:int/0/int · returned ResNet · level recorded 2026-09-22
ResNet18BN_AP distill.py ran · our draft was wrong no licence file found · pointer only · 63d307fe8ed31e64 · report fixture: signature channel:int/0/int, num_classes:int/0/int · returned ResNet_AP · level recorded 2026-09-22
ResNet_AP distill.py ran no licence file found · pointer only · d63549dbc5535241 · report fixture: returned ResNet_AP · level recorded 2026-09-22
VGG in 16 papers distill.py ran no licence file found · pointer only · 1bd08e0189b116b5 · report fixture: returned VGG · level recorded 2026-09-22
VGG11 in 36 papers distill.py ran · our draft was wrong no licence file found · pointer only · 955fe26af93adacd · report fixture: signature channel:int/0/int, num_classes:int/0/int · returned VGG · level recorded 2026-09-22
VGG11BN in 29 papers distill.py ran · our draft was wrong no licence file found · pointer only · 988edc744dcd7cc3 · report fixture: signature channel:int/0/int, num_classes:int/0/int · returned VGG · level recorded 2026-09-22
augment in 36 papers distill.py ran; the contract check could not run (RAISES) no licence file found · pointer only · 8335c250c64e41f3 · report fixture: signature images:Tensor/4/float, dc_aug_param:dict/0/?, device:str/0/str · returned Tensor · level recorded 2026-09-22
build_logger in 9 papers distill.py ran · our draft was wrong no licence file found · pointer only · 45800818f22dfa10 · report fixture: signature work_dir:str/0/str, cfgname:str/0/str · returned Logger · level recorded 2026-09-22
criterion_middle distill.py ran · our draft was wrong no licence file found · pointer only · 68cbb3fefaa24eb8 · report fixture: signature real_feature:Tensor/3/float, syn_feature:Tensor/3/float · returned Tensor · level recorded 2026-09-22
get_daparam distill.py ran · our draft was wrong no licence file found · pointer only · b447e8791b4d9091 · report fixture: signature dataset:str/0/str, model:callable/0/?, model_eval:str/0/str, ipc:int/0/int · returned dict · level recorded 2026-09-22
get_eval_pool distill.py ran · our draft was wrong no licence file found · pointer only · ed8ab232870c1ce9 · report fixture: signature eval_mode:str/0/str, model:callable/0/?, model_eval:str/0/str · returned list · level recorded 2026-09-22
get_loops in 8 papers distill.py ran · honoured contract fingerprinted no licence file found · pointer only · ae1b026d05c0c014 · report fixture: signature ipc:int/0/int · returned tuple · level recorded 2026-09-22
rand_brightness in 25 papers
census: 7 implementations from 9 papers, 5 distinct outputs across 2 buckets, one shared input per bucket this sample: bucket 1 of 2, arg 1: rank 4, kind float, dtype float32
distill.py ran · our draft was wrong no licence file found · pointer only · 2381e0ea15f245ea · report fixture: signature x:Tensor/4/float, param:Param/0/? · returned Tensor · level recorded 2026-09-22
rand_contrast in 7 papers
census: 6 implementations from 6 papers, 3 distinct outputs across 2 buckets, one shared input per bucket this sample: bucket 1 of 2, arg 1: rank 4, kind float, dtype float32
distill.py ran · our draft was wrong no licence file found · pointer only · 22b1451f3070f9e5 · report fixture: signature x:Tensor/4/float, param:Param/0/? · returned Tensor · level recorded 2026-09-22
rand_crop in 6 papers distill.py ran · our draft was wrong no licence file found · pointer only · 8ef6746e0ade200d · report fixture: signature x:Tensor/4/float, param:Param/0/? · returned Tensor · level recorded 2026-09-22
rand_cutout in 7 papers
census: 6 implementations from 6 papers, 4 distinct outputs on one shared input this sample: bucket 1 of 1, arg 1: rank 4, kind float, dtype float32
distill.py ran · our draft was wrong no licence file found · pointer only · b3fdd0e504dba6d1 · report fixture: signature x:Tensor/4/float, param:Param/0/? · returned Tensor · level recorded 2026-09-22
rand_flip in 6 papers distill.py ran · our draft was wrong no licence file found · pointer only · a52fd828a62130d2 · report fixture: signature x:Tensor/4/float, param:Param/0/? · returned Tensor · level recorded 2026-09-22
rand_rotate in 5 papers distill.py ran · our draft was wrong no licence file found · pointer only · 6c89a7b5fe0611fa · report fixture: signature x:Tensor/4/float, param:Param/0/? · returned Tensor · level recorded 2026-09-22
rand_saturation in 24 papers
census: 6 implementations from 9 papers, 3 distinct outputs on one shared input this sample: bucket 1 of 1, arg 1: rank 4, kind float, dtype float32
distill.py ran · our draft was wrong no licence file found · pointer only · 7f5ed98fe0143f9c · report fixture: signature x:Tensor/4/float, param:Param/0/? · returned Tensor · level recorded 2026-09-22
rand_scale in 10 papers distill.py ran · our draft was wrong no licence file found · pointer only · d2492574e9a83673 · report fixture: signature x:Tensor/4/float, param:ParamConfig/0/? · returned Tensor · level recorded 2026-09-22
adjust_learning_rate in 125 papers distill.py unverified no licence file found · pointer only · a9589f68cbcd06ab · report
epoch in 23 papers distill.py unverified no licence file found · pointer only · 6fa52b79ca3583aa · report
evaluate_synset distill.py unverified no licence file found · pointer only · c7e7ef42dd736d9d · report
get_dataset in 285 papers distill.py unverified no licence file found · pointer only · af2d19355b2e2b4b · report
get_network in 100 papers distill.py unverified no licence file found · pointer only · d8f2e9a5be7af8ca · report
main in 235 papers distill.py unverified no licence file found · pointer only · 7b2a4be6c55f2514 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for CAFE (graph method: CAFE). 39 bricks; individually on a fixture: 32 ran (of which 11 constructed an object rather than computing a result; 14 with no instrument failure: 1 honoured, 0 violated, 13 with no contract checked; 18 where Syntology's instrument failed) · 7 unverified. The assembly has not been run end-to-end.

  1. main entry · level 0 · unverified · 7b2a4be6c55f2514
  2. DiffAugment helper · level 1 · ran; the contract check could not run (RAISES) · de12e346f3744454
  3. ParamDiffAug helper · level 1 · ran · 3a7e1b5c7abb8046
  4. TensorDataset helper · level 1 · ran · 3c2e1728144bb05d
  5. adjust_learning_rate scheduler · level 0 · unverified · a9589f68cbcd06ab
  6. build_logger helper · level 1 · ran · our draft was wrong · 45800818f22dfa10
  7. criterion_middle loss · level 1 · ran · our draft was wrong · 68cbb3fefaa24eb8
  8. epoch helper · level 0 · unverified · 6fa52b79ca3583aa
  9. evaluate_synset helper · level 0 · unverified · c7e7ef42dd736d9d
  10. get_daparam helper · level 1 · ran · our draft was wrong · b447e8791b4d9091
  11. get_dataset helper · level 0 · unverified · af2d19355b2e2b4b
  12. get_eval_pool helper · level 1 · ran · our draft was wrong · ed8ab232870c1ce9
  13. get_loops helper · level 1 · ran · honoured contract · ae1b026d05c0c014
  14. get_network helper · level 0 · unverified · d8f2e9a5be7af8ca
  15. get_time helper · level 1 · ran · e98b4502952690a9
  16. set_seed_DiffAug helper · level 0 · unverified · e11ae486efd933fd
  17. augment helper · level 1 · ran; the contract check could not run (RAISES) · 8335c250c64e41f3
  18. AlexNet model · level 1 · ran · 931c859769faecd5
  19. ConvNet model · level 1 · ran · 1a326419c73ee5da
  20. LeNet model · level 1 · ran · 47a58a8eff474d1c
  21. MLP model · level 1 · ran · 0935dbd6d06c3d0a
  22. ResNet18 helper · level 1 · ran · our draft was wrong · aa9bc50ea3b078f6
  23. ResNet18BN_AP helper · level 1 · ran · our draft was wrong · 63d307fe8ed31e64
  24. VGG11 helper · level 1 · ran · our draft was wrong · 955fe26af93adacd
  25. VGG11BN helper · level 1 · ran · our draft was wrong · 988edc744dcd7cc3
  26. get_default_convnet_setting helper · level 1 · ran · 19457c962ab49bdd
  27. BasicBlock helper · level 1 · ran · 0e55526126f5ac6a
  28. ResNet model · level 1 · ran · 820bb01f1d2a3735
  29. BasicBlock_AP helper · level 1 · ran · 881b5b714601c990
  30. ResNet_AP model · level 1 · ran · d63549dbc5535241
  31. VGG model · level 1 · ran · 1bd08e0189b116b5
  32. rand_brightness helper · level 1 · ran · our draft was wrong · 2381e0ea15f245ea
  33. rand_contrast helper · level 1 · ran · our draft was wrong · 22b1451f3070f9e5
  34. rand_crop helper · level 1 · ran · our draft was wrong · 8ef6746e0ade200d
  35. rand_cutout helper · level 1 · ran · our draft was wrong · b3fdd0e504dba6d1
  36. rand_flip helper · level 1 · ran · our draft was wrong · a52fd828a62130d2
  37. rand_rotate helper · level 1 · ran · our draft was wrong · 6c89a7b5fe0611fa
  38. rand_saturation helper · level 1 · ran · our draft was wrong · 7f5ed98fe0143f9c
  39. rand_scale helper · level 1 · ran · our draft was wrong · d2492574e9a83673

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2203.01531") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Dataset Condensation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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