Papers › Towards Bridging the Performance Gaps of Joint Energy-based Models

Towards Bridging the Performance Gaps of Joint Energy-based Models

16 Sep 2022CVPR 2023 1arXiv:2209.07959archive 2025-07-28

Xiulong Yang, Qing Su, Shihao Ji

Can we train a hybrid discriminative-generative model within a single network? This question has recently been answered in the affirmative, introducing the field of Joint Energy-based Model (JEM), which achieves high classification accuracy and image generation quality simultaneously. Despite recent advances, there remain two performance gaps: the accuracy gap to the standard softmax classifier, and the generation quality gap to state-of-the-art generative models. In this paper, we introduce a variety of training techniques to bridge the accuracy gap and the generation quality gap of JEM. 1) We incorporate a recently proposed sharpness-aware minimization (SAM) framework to train JEM, which promotes the energy landscape smoothness and the generalizability of JEM. 2) We exclude data augmentation from the maximum likelihood estimate pipeline of JEM, and mitigate the negative impact of data augmentation to image generation quality. Extensive experiments on multiple datasets demonstrate that our SADA-JEM achieves state-of-the-art performances and outperforms JEM in image classification, image generation, calibration, out-of-distribution detection and adversarial robustness by a notable margin. Our code is available at https://github.com/sndnyang/SADAJEM.

PaperPDFConference PDFCodeCode 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.07959")

Code

Syntology Ran 2 of 6 code samples harvested from 1 repository linked to this paper; 4 have no recorded run. Of those that ran: 2 ran · honoured contract.

By repository: official repository: 5 samples from 1 repository, 1 ran; 1 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

sndnyang/sadajem officialmentioned in papermentioned on GitHubpytorch 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

6 samples harvested; 2 ran; 2 honoured the contract we drafted; 4 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.

2ran · honoured contract
4unverified

Licence: 6 of the 6 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 sndnyang/sadajem. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “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.

init_random_uniform sndnyang/sadajem/train_sadajem.py official repository ran · honoured contract no licence file found · pointer only · 9c46250b2c46c1d6 · report
init_from_centers sndnyang/sadajem/eval_sadajem.py official repository unverified no licence file found · pointer only · 0c18472ec2198141 · report
init_inform sndnyang/sadajem/eval_sadajem.py official repository unverified no licence file found · pointer only · d1969cfef3c43014 · report
init_random sndnyang/sadajem/train_sadajem.py official repository unverified no licence file found · pointer only · 6d7042c0cb9be0d6 · report
sample_p_0 sndnyang/sadajem/train_sadajem.py official repository unverified no licence file found · pointer only · e69a819f5b2d3e0c · report
init_random identical code first harvested elsewhere ran · honoured contract fingerprinted licence of this copy not recorded · d9a9c0f7abb58719 · report

Tasks

Adversarial RobustnessData AugmentationImage ClassificationImage GenerationOut-of-Distribution Detectionimage-classification

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Sharpness-Aware MinimizationSoftmax

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