Papers › Gradient penalty from a maximum margin perspective

Gradient penalty from a maximum margin perspective

15 Oct 2019arXiv:1910.06922archive 2025-07-28

Alexia Jolicoeur-Martineau, Ioannis Mitliagkas

A popular heuristic for improved performance in Generative adversarial networks (GANs) is to use some form of gradient penalty on the discriminator. This gradient penalty was originally motivated by a Wasserstein distance formulation. However, the use of gradient penalty in other GAN formulations is not well motivated. We present a unifying framework of expected margin maximization and show that a wide range of gradient-penalized GANs (e.g., Wasserstein, Standard, Least-Squares, and Hinge GANs) can be derived from this framework. Our results imply that employing gradient penalties induces a large-margin classifier (thus, a large-margin discriminator in GANs). We describe how expected margin maximization helps reduce vanishing gradients at fake (generated) samples, a known problem in GANs. From this framework, we derive a new L^∞ gradient norm penalty with Hinge loss which generally produces equally good (or better) generated output in GANs than L²-norm penalties (based on the Fr\'echet Inception Distance).

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

Code

Syntology Ran 2 of 10 code samples harvested from 1 repository linked to this paper; 8 have no recorded run. Of those that ran: 1 ran · violated contract; 1 ran · fixture could not drive it.

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

AlexiaJM/MaximumMarginGANs officialmentioned in papermentioned on GitHubtfMIT report
lucidrains/stylegan2-pytorch mentioned on GitHubpytorchMIT 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

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

1ran · violated contract
1ran · fixture could not drive it
8unverified

Licence: 0 of the 10 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 AlexiaJM/MaximumMarginGANs. “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.

calculate_frechet_distance AlexiaJM/MaximumMarginGANs/Code/fid.py official repository ran · fixture could not drive it fingerprinted MIT (permissive) · 7e61fe013d57c481 · report
strToBool AlexiaJM/MaximumMarginGANs/Code/GAN.py official repository ran · violated contract MIT (permissive) · 9617b12aa6ac6bbe · report
calculate_activation_statistics AlexiaJM/MaximumMarginGANs/Code/fid.py official repository unverified MIT (permissive) · 6917ffcb1214d74f · report
calculate_frechet_distance AlexiaJM/MaximumMarginGANs/Code/fid_new.py official repository unverified MIT (permissive) · 846d824d45774de9 · report
get_activations AlexiaJM/MaximumMarginGANs/Code/fid.py official repository unverified MIT (permissive) · e69fcd6206886931 · report
make_dot AlexiaJM/MaximumMarginGANs/Code/pytorch_visualize.py official repository unverified MIT (permissive) · 52a3f79b47513c42 · report
preprocessCatFace AlexiaJM/MaximumMarginGANs/Code/preprocess_cat_dataset.py official repository unverified MIT (permissive) · 7376fdf98a6f6485 · report
register_vis_hooks AlexiaJM/MaximumMarginGANs/Code/pytorch_visualize.py official repository unverified MIT (permissive) · c3ee865ac3297b5a · report
rotateCoords AlexiaJM/MaximumMarginGANs/Code/preprocess_cat_dataset.py official repository unverified MIT (permissive) · cf539e0bbc356efb · report
save_visualization AlexiaJM/MaximumMarginGANs/Code/pytorch_visualize.py official repository unverified MIT (permissive) · 17dcbb4211f84f3f · report

Tasks

Image Generation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Generation CIFAR-10 HingeGAN FID 27.12 #65 of 78 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Convolution

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