On Predicting Generalization using GANs
Authors: Yi Zhang
Arushi Gupta
Nikunj Saunshi
Sanjeev Arora
Venue: ICLR 2022 Spotlight (2022)
Keywords: generalization
generative adversarial network

Abstract: Research on generalization bounds for deep networks seeks to give ways to predict test error using just the training dataset and the network parameters. While generalization bounds can give many insights about architecture design, training algorithms etc., what they do not currently do is yield good predictions for actual test error. A recently introduced Predicting Generalization in Deep Learning competition aims to encourage discovery of methods to better predict test error. The current paper investigates a simple idea: can test error be predicted using {\em synthetic data,} produced using a Generative Adversarial Network (GAN) that was trained on the same training dataset? Upon investigating several GAN models and architectures, we find that this turns out to be the case. 

In fact, using GANs pre-trained on standard datasets, the test error can be predicted without requiring any additional hyper-parameter tuning. This result is surprising because GANs have well-known limitations (e.g. mode collapse) and are known to not learn the data distribution accurately. Yet the generated samples are good enough to substitute for test data. Several additional experiments are presented to explore reasons why GANs do well at this task. In addition to a new approach for predicting generalization, the counter-intuitive phenomena presented in our work may also call for a better understanding of GANs' strengths and limitations.

Published as a conference paper at ICLR 2022
ON PREDICTING GENERALIZATION USING GANs
Yi Zhang! Arushi Gupta', Nikunj Saunshi', and Sanjeev Arora
Princeton University, Computer Science Department
{y. zhang, arushig, nsaunshi, aroraj (css www.c.pp.nnceeeo princeton edu Microsoft Research
ABSTRACT
Research on generalization bounds for deep networks seeks to give ways to pre- dict test error using just the training dataset and the network parameters. While generalization bounds can give many insights about architecture design, training algorithms etc., what they do not currently do is yield good predictions for ac- tual test error. A recently introduced Predicting Generalization in Deep Learning competition (Jiang et al. 2020) aims to encourage discovery of methods to better predict test error. The current paper investigates simple idea: can test error be predicted using synthetic data, produced using Generative Adversarial Network (GAN) that was trained on the same training dataset? Upon investigating sev- eral GAN models and architectures, we find that this turns out to be the case. fact, using GANs pre-trained on standard datasets, the test without requiring any additional hyper-parameter tuning. This result is surprising because GANs have well-known limitations (e.g. mode collapse) and are known to not learn the data distribution accurately. Yet the generated samples are good enough substitute for test data. Several additional experiments are presented explore reasons why GANs do well at this task. In addition to a new approach for predicting generalization, the counter-intuitive phenomena presented in our work may also call for a better understanding of GANs' strengths and limitations.
be predicted
INTRODUCTION
Why do vastly overparametrized neural networks achieve impressive generalization performance across many domains, with very limited capacity control during training? Despite some promising initial research, the mechanism behind generalization remains poorly understood. A host of papers have tried adapt classical generalization theory to prove upper bounds of the following form the difference between training and test error:
test train S
+ tiny term
S
where S the training dataset and C so-called complexity measure, typically involving some function of the training dataset as well as the trained net parameters (e.g., a geometric norm). Current upper bounds of this type are loose, and even vacuous. There is evidence that such classically derived bounds may be too loose (Dziugaite & Roy 2017) that they may not correlate well with generalization (Jiang et al., 2019). This has motivated a more principled empirical study of the effectiveness of generalization bounds. The general idea is to use machine learning to determine which network characteristies promote good generalization in practice and which do not -in other words, treat various deep net characteristics/homss//m model that uses them to predict the generalization error achieved by the net. This could help direct theorists new types of complexity measures and motivate new theories.
etc. as inputs to machine learning
A recently started competition of Predicting Generalization Deep Learning (Jang et al. 2020) (PGDL) seeks to increase interest in such investigations. in an effort uncover and promising network characteristics and/or measures of network complexity that correlate with good generaliza- tion. As required in Jiang al. 2022)) complexity measure should depend the trained model,

---

Published as a conference paper at ICLR 2022
optimizer, and training set, but not the held out test data. The first PGDL competition in 2020 did uncover quite a few measures that seemed to be predictive of good generalization but had not been identified by theory work.
In this paper, explore very simple baseline for predicting generalization that had hitherto not received attention: train a Generative Adversarial Network (GAN) on the training dataset, and performance on the synthetic data produced by the GAN predict generalization. At first sight GANs may not appear to be an obvious choice for this task, due to their well known limitations. For instance, while the goal of GANs training is to find a generator that fools the discriminator net -in the sense that the discriminator has low probability of spotting a difference between GAN samples and the samples from the true distribution-inn practice the discriminator is often able discriminate very well at the end, demonstrating that it was not fooled. Also, GANs' generators are known to exhibit mode collapse i.e., the generated distribution is a tiny subset of the true distribution. There is theory and experiments suggesting this may be difficult to avoid (Arora al.. 2018 Santurkar et al., 2018
Bau et al. 2019).
Given all these negative results about GANs, the surprising finding in the current paper is that GANs do allow for good estimates of test error (and generalization error). This is verified for families of well-known GANs and datasets including primarily CIFAR-10/100, Tiny ImageNet and well- known deep neural classifier architectures. In particular, in Section [3.1 and 3.2 we evaluate on the PGDL and DEMOGEN benchmarks of predicting generalization and present strong results. In Section
4 and 5S] we also investigate reasons behind the surprising efficacy of GANs in predicting generalization well the effects of using data augmentation during GAN training.
2 RELATED WORK
Generalization Bounds Traditional approaches to predict generalization construct a generaliza- tion bound based on some notion of capacity such as parameter count, VC dimension, Rademacher complexity, etc. Neyshabur et al. (2018) provide a tighter generalization bound that decreases with increasing number of hidden units. Dziugaite & Roy (2017) reveal a way to compute nonvacu- ous PAC-Bayes generalization bounds. Recently, bounds based on knowledge distillation have also come light (Hsu et al., 2020). Despite progress in these approaches, a study conducted by Diang et al. (2019) with extensive prper-parameter search showed that current generalization bounds may not be effective, and the root cause of generalization remains elusive. Given the arduous nature of constructing such bounds, an interest in complexity measures has arisen.
Predicting Generalization in Deep Learning The PGDL competition (Jiang et al. 2020) was held in NeuRIPS 2020 in an effort to encourage the discovery of empirical generalization measures following the seminal work of Jiang et al. (2018). The winner of the PGDL competition Natekar & Sharma (0200) investigated properties of representations in intermediate layers to predict gen- eralization. Kashyap al. (2021), the second place winner, experiment with robustness flips, random erasing, random saturation, and other such natural augmentations. Afterwards, Diang et al.) (202T) interestingly find that generalization can be predicted by running SGD the same architec- ture multiple times, and measuring the disagreement ratio between the different resulting networks on an unlabeled test set. There are also some pitfalls in predicting generalization, as highlighted by Dziugaite et al. (2020). They find that distributional robustness over a family of environments is more applicable to neural networks than straight averaging.
Limitations of GANs Arora et al. (2017) prove the lack of diversity enforcing in GAN's training objective, and Arora et al. (2018) introduce the Birthday Paradox test to conclude that many pop- ular GAN models in practice do learn distribution with relatively small support. [Santurkrr et al. (2018) and Bau et al. (2019) investigate the extent to which GAN generated samples can match the distributional statistics of the original training data, and find that they have significant shortcomings. Ravuri & Vinyals (2019) find that GAN data is of limited use in training ResNet models, and find that neither inception score nor FID are predictive of generalization performance. Notably, despite the small support, Arora et al. 2018 reveal that GANs generate distinct images from their nearest neighbours in the training set. Later, Webster et al. (2019) use latent recovery to conclude more carefully that GANs do not memorize the training set.
2

---

Published as a conference paper at ICLR 2022
various classifiers on CIFAR-10
various classifiers Tiny ImageNet
y=x#1.5%
60%
y=x=5%
92%
test accuracy
test accuracy
90%
40%
30%
88%
20%
86%
10%
86%
88% 90%
92%
94%
10%
20%
30%
40% 50% 60%
synthetic accuracy
synthetic accuracy
Figure 1: Scatter plots of test accuracy g(f) v.s. synthetic accuracy ğ(f) with f from a pool of deep net classifiers CIFAR-10 and Tiny ImageNet of diverse architectures VGG, ResNet, DenseNet, ShuffleNet, NASNet, MobileNet with various hyper-parameters. One single BigGAN+DiffAug model is used for each dataset. Left: CIFAR-IO classifiers. The y/ fit has li2 score 0.804 and Kendall coefficient 0.851. Right: Tiny ImageNet classifiers. The 0.918 and Kendall 7 coefficient 0.803.
fit has R² score
Theoretical Justification for Using GANs Arora al. (017)) construct generator that passes training against any bounded capacity discriminator but can only generate a small number of distinct data points either from the true data distribution or simply from the training set. For predicting generalization, it is crucial for the generator not to memorize training data. While Arora et al. (2017) do not answer why GANs not memorize training data, a recent empirical study by Huang et al. (2021) demonstrates the difficulty of recovering input data by inverting gradients. Their work may cast light on how the generator could learn to generate data distinct from the training set when trained with gradient feedbacks from the discriminator. However, are not aware of any theory that fully explains GANs strength for predicting generalization despite limitations.
PREDICTING TEST PERFORMANCE USING GAN SAMPLES
We now precisely define what it means to predict test performance in our setting. We denote by Swain: Sheat and Son the training set, test set and the synthetic dataset generated by GANs. Given classifier f trained on the training set Suain, we aim to predict its classification accuracy g(f) := train conditional GAN model
y] on a test S Our proposal on the very same training set Suain and then sample from the generator a synthetic dataset Syy of labeled examples. In the end, we simply use f's accuracy on the synthetic dataset as prediction for its test accuracy. Algorithm formally describes this procedure.
TSaa E(sy)ss [f(z)
Algorithm Predicting test performance
Require: target classifier f. training set Stain- GAN training algorithm A
1. Train a conditional GAN model using Suain:
G, = A(Suain) where G, are the generator and discriminator networks.
2. Generate synthetic dataset by sampling from the generator G:
Sen ( MI),... (iN, where ã,, G( it).
The 2 are drawn i.i.d. from GPs default input distribution. N and J." are chosen so as to match statistics of the training set.
Output: the synthetic accuracy 8()) = SSnn
Eiames 1 [ = j]] as the prediction
Remark. Any N 2 |Smail is safe choice to ensure that g(f) concentrated E.gg [1 [f Ø)) Ml and its deviation has negligible influence on the performance.
prncenttaaeeFrruund pround its mean
'he deviation is only O (1/VN) by standard concentration bounds
3

---

Published as a conference paper at ICLR 2022
No.1 team
No.2 team
No.3 team
Task
Ours
LBILLWM
MM
AM
R2A
VPM
1: VGG on CIFAR-10
25.22
1.11
15.66
52.59
6.07
62.62
2: NIN SVHN
22.19
47.33
48.34
20.62
6.44
34.72
4: AlIConv on CINIC-10
31.79
43.22
47.22
57.81
15.42
52.80
5: AlIConv on CINIC-10
15.92
34.57
22.82
24.89
10.66
53.56
8: VGG on F-MNIST
9.24
1.48
1.28
13.79
16.23
30.25
9: NIN on CIFAR-I0
25.86
20.78
15.25
11.30
2.28
33.51
Table 1: Comparison of our method the Top-3 teams of the PGDL competition. Scores shown are calculated using the Conditional Mutual Information metric, higher is better. DBI*LWM-Davies- Bouldin LadexxLabbl-wis Margin, MM-Mixup Margin and AM=Augment Margin are the pro- posed methods from first place solution by Natekar & Sharma (2020). R2A=Robustness to Aug- the Penultimate layer with Mixup (Lassance) et al. 2020) are the second and third place solutions. Task 4 and Task 5 differ in that Task 4 classi- fiers have batch-norm while Task do not.
mentations (Aithal al. 202T) and VPM-Variation
We demonstrate the results in Figure I The test accuracy g(f) consistently resides in small neighborhood of ğ() for diverse class of deep neural net classifiers trained on different datasets. For the choice of GAN architecture, we adopt the pre-trained BigGAN+DiffAug mod- els (Brock et al., 2019 Zhao et al. 2020) from the StudioGAN library 2 We evaluate pre- trained deep neural net classifiers with architectures ranging from VGG-(11, 13, 19), ResNet- (18, 34, 50), DenseNet-(121, 169), ShuffleNet, PNASNet and MobileNet trained on CIFAR- 10 and Tiny ImageNet with hyper-parametee setting (learning rate, weight decay factor, learning rate schedule) uniformly sampled from the grid {10-1, 10-2) x {5x x 10-4, 4, 10 10-3) [CosineAnnealin Exponent iwweeettaaDeaaayyy We use SGD with mo- mentum 0.9 and batch size 128 and data augmention of horizontal flips for training all classifiers.
3.1 EVALUATION ON PGDL COMPETITION
We evaluate our proposed method on the tasks of NeurIPS 2020 Competition on Predicting Gen- cralization of Deep Learning. The PGDL competition consists of tasks, each containing set of pre-trained deep net classifiers of similar architectures but with different hyper-parameter settings, as well as the training data. The tasks PGDL are based on a wide range of datasets inlcuding CIFAR-10 10. SVHN, CINIC-10, Oxford Flowers, Oxford Pets and Fashion MNIST. For every task, the goal is to compute a scalar prediction for each classifier based on its parameters and the train- ing data that correlates as much as possible with the actual generalization errors of the classifiers measured on a test set. The correlation score is measured by the so-called Conditional Mutual Infor- mation, which is designed to indicate whether the computed predictions contain all the information about the generalization errors such that knowing the hyper-parameters does not provide additional information, see (Jing et al. 2020) for details.
Since the goal of PGDL is to predict generalization gap instead of test accuracy, our proposed solution is a slight adaptation of Algorithm [ For each task, we first train a GAN model on the provided training dataset and sample from it a labeled synthetic dataset. Then for each classifier within the task, instead of the raw synthetic accuracy, we use as prediction the gap between training and synthetic accuracies. For all tasks, we use BigGAN+ for CIFAR- 10 from the StudioGAN library. We found that a subset of them (Task with Oxford Flowers and Task 7 with Oxford Pets) were not well-suited for standard GAN training without much tweaking due to a small training set and highly uneven class sizes. We focused only on the subset of the tasks where GAN training worked out of the box, specifically Task 1, 2, 5, 8, and 9.
with the defaul implementation
We report the results in Table where we observe that on tasks involving either CIFAR-10 or VGG- like classifiers, our proposed solution out-performs all of the solutions from the top 3 teams of the competition by a large margin. One potential reason may be that the default hyper-parameters of
Pavailable http:://gghuuu..oo///ooocCC..CC
Pa/Py Corch-StudioGaa
p 'Task& 8 uses the single-channel 28 x28 28 Fashion- -NNIST dataset. For GAN training. we symmetrically zero- pad the training images to 32 x 32 and convert to RGB by replicating the channel. To compute the synthetic accuracy, we convert the generated images hack to single-channel and perform center cropping.
4

---

Published as a conference paper at ICLR 2022
94%
Inear
Jaiyy whihhrronngg phaghaa
92%
linerr
70%
linear
test accuracy
85%
accuracy
90%
test accuracy
60%
80%
68%
500%
75%
86%
40%
70%
30%
65%
82%
20%
60%
80%
10%
65% 70% 75% 85% synthetic accuracy
82%
84% 86% 88% 90% 92% synthetic accuracy
10% 20%
40% 50% 70%
synthetic accuracy
Figure 2: Scatter plots of test accuracy g() v.s. synthetic accuracy (() with f from DEMOGEN consisting of 216 Network in Network classifiers and 216 ResNet classifiers on CIFAR-1O well as 324 ResNet classifiers on CIFAR-100. The synthetic examples are from the BigGAN+DiffAug.
the BigGAN model have been engineered towards CIFAR-10 like datasets and VGG/ResNet-lie discriminator networks. is worth mentioning that we conducted absolutely zero pypee-paramettr search for all tasks here. Especially for CIFAR-10 tasks, directly take the pre-trained models from the StudioGAN library. It is likely that we may achieve even better scores with fine-tuned GAN hyper-parameters and optimized training procedure for each PGDL task, and leave it to future work.
3.2 EVALUATION ON DEMOGEN BENCHMARK
The seminal work of Diang et (018)) constructed the Deep Model Generalization benchmark (DEMOGEN) that consists of 216 ResNet-32 (He et al.] (016) models and 216 Network-in- Networks (Lin et al. 2013) models trained on CIFAR- 10 plus another 324 ResNet-32 models trained on CIFAR-I00, along with their training and test performances. These models are configured with different normalization techniques (group-norm v.s. batch-norm), network widths, learning rates, weight-decay factors, and notably whether to train with or without data augmentation.
The goal of DEMOGEN, different from PGDL, to numerically predict generalization gap (or equivalently test accuracy) with the additional knowledge of the test accuracies of few pre- trained classifiers. Following the setup of Jiang et al. (2018), we use a simple linear predictor g()) = Ø(f) + b with performance, Here a, b are estimated using least squares regression on a separate pool of pre-trained classifiers with known test accuracies. Jiang et al. (2018) proposes to use variants of coefficient of determination (R²) of the resulted predictor as evaluation metrics. Specifically, the adjusted R and k-fold R² are adopted (see Jiang al, (2018) for concrete definitions).
scalar variables a, lK instead of directly using o()) for the best
NIN+CIFAR-10
ResNet+CIFAR-I 10
ResNet+CIFARR100
adj R
10-fold R
adj R
10-fold R²
adj R²
10-fold R²
grt+log
0.94
0.90
0.87
0.81
0.97
0.96
grt+logtunnorn
0.89
0.86
0.82
0.74
0.95
0.94
moment+
0.93
0.87
0.83
0.74
0.94
0.92
Self-Attention GAN
0.992
0.991
0.903
0.897
Spec-Norm GAN
0.994
0.993
0.874
0.869
BigGAN
0,988
0.986
0.911
0.904
0.992
0.991
BigGAN+ADA
0.991
0.989
0.932
0.928
BigGAN+DiffAug
0.995
0.995
0.981
0.921
0.993
0.993
Table Comparison predicting generalization using GAN samples to the Top-3 methods of Jiang al. (2018) (grt+ +oot+loo, qrt+ uun-oom and moment +log) DEMOGEN, Overall, our method of predicting generalization using GAN samples outperforms any of the previous solution by a large margin. The BigGAN+DiffAug appears to be the best performing. '_' means not tested.
5

---

Published as a conference paper at ICLR 2022
In Table we compare the scores of our method with several state-of-the-an art GAN models. Specif- ically, we again take the pre-trained GAN models from the StudioGAN library to generate synthetic datasets for the CIFAR- 10 tasks. For the CIFAR-100 task, we use the same hyper-parameters the CIFAR-10 models to train a plain BigGAN and a B each synthetic dataset is sampled only once. Overall, predicting using GAN samples achieves markably higher scores than all methods proposed in Jiian et al. (2018). We also visualize the resulted linear fit for each task in Figure 2 where we observe the strong linear correlation. Note that the resulting linear fits are close the ideally desired y x fit. In fact, using directly O(f) as the prediction would also lead to extremely competitive R² values 0.928, 0.995 and 0.975 respectively.
model from scratch. Again,
4 GAN SAMPLES ARE CLOSER TO TEST SET THAN TRAINING SET
In this section, we demonstrate a surprising property of the synthetic examples produced by GANs that may provide insights into their observed ability to predict generalization: synthetic datasets generated by GANs are "closer' to test set than training set in the feature space of well-trained deep net classifiers, even though GAN models had (indirect) access to the training set but no access to the test set. Here 'well-trained" classifiers are the ones that almost perfectly classify the training examples, i.e. its training aceuracy is > 97%. To define closeness properly, we modify the widely used standard Fréchet Distance proposed by [Heusel et al. (2017) to account for labeled examples. We name our modified version as the Class- Tlass-conditionll Fréchet Distance.
4.1 CLASS-CONDITIONS FRÉCHET DISTANCE
The goal is to measure how close the labeled synthetic dataset is to the test set in the eyes of certain pre-trained classifier. However, FID does not capture any label information by default. Our proposed class- conditionii Fréchet Distance can be viewed as the over each class of the Fréchet Distance between test and synthetic examples in a certain feature space. The original FID measures certain distance between the feature embeddings of real examples and synthetic examples from GANs, in the feature space of an Inception network pre-trained on ImageNet. For our purposes, we modify the notion of FID use any feature extractor h. Specifically, we define the distance between two sets of examples S and S' w.r.t. a feature extractor h as
Fn S*)= = (I) pas: (1)ll Tr Covs (h) + Cov (h) 2 [Covs (h) Cov (h))
where we have the empirical mean of h's output us(h)) == TST (manes h(r) and the empirical covariance (h
TST Esswes (h(z) - (s(h)) (h(x) ((xx))sshh)) over the examples from S, and ps (b), Cov (h) are computed analogously. Furthermore, [1] is the matrix square root and Tr [-] is the trace function.
For labeled datasets S and Š, we denote by C the collection of all possible labels. For each label E C, we let S. and S_ denote the the subsets of examples with label e in S and S respectively. This leads to the class-conditional Fréchet Distance:
dn (s.5)= : Σ Fr (c.
eEC
In Figure we evaluate d, on CIFAR-10 among the training set Stann. the test set Steat and the synthetic set Saya. with h being the feature map immediately before the fully-connected layer of each pre-trained deep net used in the middle sub-figure of Figure The synthetic dataset is generated by the same BigGAN+DiffAuu model used in Figure well. We observe that for all pre-trained nets, di (S.y., Stas d (Suain: Stea) by big margin, which provides partial explanation for why GAN synthesized samples may be a good replace for the test set. Furthermore, for every well-trained Stes)) net, dy. ( < di. (Syn; Smain)
well. This is particularly surprising because Sayn ends up being "closer' to the unseen Stest rather than Strain despite the GAN model being trained to minimize certain distance between S.yn and Stran as part of the training objective.
4.2 CLASS-CONDITIONAL FRÉCHET DISTANCE ACROSS CLASSIFIER ARCHITECTURES
is natural to wonder whether we can attribute the phenomenon of GAN samples being closer to test to the architectural similarity between the evaluated classifiers and the discriminator network

---

Published as a conference paper at ICLR 2022
all ResNet classifiers
all ResNet classifiers
d(syn, test) d(train, test)
50
d(syn, test) d(yyn, train)
30
20
10
0
1.2
0.2
0.4
0.6
0.8
1.0
ResNets with train acc 97%
ResNets with train acc 97%
35
d(syn, test) d(train, test)
d(syn, test) d(syn, train)
25
25
15
10
5
Figure 3: Histograms of d, 's measured using the feature spaces of the pool of 216 pre- trainea ResNet models on CIFAR-10 10 in DEMOGEN. Since features vectors h(x) of different classifiers may have vastly different norms, we plot the histograms of the ratios d, (ie))
(Strin: Suea) and dr (Ssyn, Stea)/ //d,/ (Ssyn: Strain) instead. The synthetic dataset the identical one generated by the BigGAN-DiffAug model used in Section 3.2 Top: the histograms of all the 216 pre- trained classifiers, including the not-so-well-train
Siea) /da
ones with training accuracy below 90%. Bot- tom: the histograms of only the well-trained 162 out of 216 classifiers with training accuracy least 97%. Clearly, the ratio di, (S.yn Swa)/ (S Stest) is below consistently, and the ratio (S Stea)/dh, (Strinn Stes) is below 1 for all well-trained classifiers. This indicates that in their feature space the labeled synthetic examples behave more similarly to the test set rather than to the training set.
used in the GAN model they are all derivatives from the ResNet family. Thus investigate the values of d, for the collection of classifiers with diverse architectures used Figure [ which contains network architectures that may be remote from ResNet such as VGG, MobileNet, PNASNet etc. The result is demonstrated in Figure 4 where we observe the surprising phenomenon that the single copy of the synthetic dataset regarded closer to the test set by all classifiers in the collection. This suggests that certain GAN models are capable of matching, to degree, the feature distribution universally for diverse set of deep neural classifiers.
5 EXPLORATION: EFFECTS OF DATA AUGMENTATION
In this section, we discuss certain intriguing effects of data augmentation techniques used during GAN training the performance of the resulted synthetic datasets for predicting generalization. We use the CIFAR- 100 task from DEMOGEN as demonstration where the effects are the most pronounced. The task consists of 324 ResNet classifiers, only half of which trained with data augmentation, specifically random crop and horizontal flipping.
Given the success of complexity measures that verify 'robustness augmentation' in the PGDL competition, one would imagine applying data augmentations to the real examples during GAN training could be beneficial for prediciting generalization, since the generator would be encouraged

---

Published as a conference paper at ICLR 2022
all classifiers
classifiers
16
dleyn, test) ditrain, test)
16
disyn, test) train)
12
12
0.0
0.1
0.2
0.3 0.0
D.1
0.2
0.3
Figure 4: Histograms of d; measured using the feature spaces of deep neural nets with various architectures on CIFAR-10 (same ones from Figure The synthetic dataset the same one used in Figure as well. All the classifiers are well-trained. d₃ (Seyn: Stess) is consistently the smallest among three pairwise distances among Smain Stest and Seyn-
to match the distribution of the augmented images. However, we show in Figure 5 this is not the case here.
Specifically, Figure 5a indicates that, when evaluated on synthetic dataset from GAN model trained with augmentation only applied to real examples, ResNets trained without any data augmentation exhibit test accuracy v.s. synthetic accuracy curve that substantially deviates from y = I, while the ones trained with data augmentations are relatively unaffected. In comparison, data augmentation is removed from GAN's training procedure, this deviation disappears, as captured in Figure 5b. This could he because the ResNets trained without data augmentation are sensitive to the perturbations learned by the generator. Overall, the best result is achieved by de- ploying the differential augmentation technique that applies the same differentiable augmentation to both real and fake images and enables the gradients to propagated through the augmentation back to the generator so to regularize the discriminator without manipulating the target distribution.
ResNets CIFAR-100
ResNets on CIFAR-100
ResNets CIFAR-100
accuracy
60%
alu
test test accuracy
60%
test Test accuracy
60%
50%
50%
30%
40%
30%
30%
30%
20%
ResNet aug w.sNet
20%
ResNet w. aug
20%
ResNitt w. aug ResMet w.o.
ResNetwwo. aug
10% 20% 30% 40% 50% 60% 70% synthetic accuracy
10% 20% 30% 40% 50% 60% 70% synthetic accuracy
20% 30% 40% 50% 60% 70% synthetic accuracy
(a)
(b)
(c)
Figure 5: Scatter plots of test accuracy g(f) v.S. synthetic accuracy ğ(f) on the DEMOGEN CIFAR-
100 task using BigGAN models trained with a) data augmentation (random crop horizontal Flip- ping) only to real (training) examples, b) without any data augmentation, and c) with the differen- tiable data augmentation technique. Blue and orange dots represent ResNet-34 classifiers trained with and without data augmentation.
6 DISCUSSION AND CONCLUSIONS
Competitions such PGDL are exciting way to inject new ideas into generalization theory. The interaction of GANs and good generalization needs further exploration. It is conceivable that the quality of the GAN-based prediction is correlated with the niceness of architectures in some way. It would not be surprising that it works for popular architectures but does not work for all. We leave future work to determine the limits of using GANs for predicting generalization.
8

---

Published as a conference paper at ICLR 2022
Our finding presented here offers approach for predicting generalization, and it sheds light possibly bigger question whhat can GANs learn despite known limitations? To our best knowledge, not aware of any existing theory that completely explains this counter-intuitive empirical phenomena. Such theoretical understanding will necessarily require innovative techniques and thus is perceivably non-trivial. However, we believe it is important future direction as it will potentially suggest more use cases of GANs and will help improve existing models in principled way. We hope our work inspires new endeavors along this line.
REFERENCES
Sumukh Aithal, Dhruva Kashyap, and Natarajan Subramanyam. Robustness to augmentations as generalization metric. arXiv preprint arXiv: arXiv:2101.06455 2021.
Sanjeev Arora, Rong Ge, Yingyu Liang, Tengyu Ma, and Yi Zhang. Generalization and equilibrium in generative adversarial nets (gans). In International Conference on Machine Learning, pp. 224- 232. PMLR, 2017.
Sanjeev Arora, Andrej Risteski, and Yi Zhang. Do gans learn the distribution? some theory and empiries. In International Conference on Learning Representations, 2018.
David Bau, Jun- Yan Zhu, Jonas Wulff, William Peebles, Hendrik Strobelt, Bolei Zhou, and Antonio Torralba. Seeing what gan cannot generate. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), October 2019.
Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale GAN training for high fidelity natural image synthesis. In International Conference on Learning Representations, 2019. URL
httpps:/ http::///ppeeevveeee net Btte://ooommdddlxse0dd000
Gintare Karolina Dziugaite and Daniel M Roy. Computing nonvacuous generalization bounds for deep (stochastic) neural networks with many more parameters than training data. arXiv preprint arXiv: 1008, 2017.
Gintare Karolina Dziugaite, Alexandre Drouin, Brady Neal, Nitarshan Rajkumar, Ethan Caballero, Linbo Wang, loannis Mitliagkas, and Daniel M Roy. In search of robust measures of generaliza- tion. Advances in Neural Information Processing Systems, 33, 2020.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recog- nition. In Proceedings of the IEEE conference computer vision and pattern recognition, pp- 770-778, 2016.
Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to local nash equilibrium. Advances in neural information processing systems, 30, 2017.
Daniel Hsu, Ziwei Ji, Matus Telgarsky, and Lan Wang. Generalization bounds via distillation. In International Conference Learning Representations, 2020.
Yangsibo Huang, Samyak Gupta, Zhao Song, Kai Li, and Sanjeev Arora. Evaluating gradient in- version attacks and defenses in federated learning. Advances in Neural Information Processing Systems, 34, 2021.
Yiding Jiang, Dilip Krishnan, Hossein Mobahi, and Samy Bengio. Predicting the generalization gap in deep networks with margin distributions. arXiv preprint arXiv: 18xiv:1810.00113. 2018
Yiding Jiang, Behnam Neyshabur, Hossein Mobahi, Dilip Krishnan, and Samy Bengio. Fantas- tic generalization measures and where to find them. In International Conference on Learning Representations, 2019.
Yiding Jiang, Pierre Foret, Scott Yak, Daniel Roy, Hossein Mobahi, Gintare Karolina Dziugaite, Samy Bengio, Suriya Gunasekar, Isabelle Guyon, and Behnam Neyshabur. Neurips 2020 compe- tition: Predicting generalization deep learning (version 1.1). arXiv preprint arXiv:2012.07976 2020.

---

Published as a conference paper at ICLR 2022
Yiding Jiang, Vaishnavh Nagarajan, Christina Back, and Zico Kolter. Assessing generalization of sgd via disagreement. arXiv e-prints, pp. arXiv-2106, 2021.
Dhruva Kashyap, Natarajan Subramanyam, et al. Robustness to augmentations as generalization metric. arXiv preprint
2021.
Carlos Lassance, Louis Béthune, Myriam Bontonou, Mounia Hamidouche, and Vincent Gripon. Ranking deep learning generalization using label variation in latent geometry graphs. arXiv preprint arXiv::01 I. 12737, 2020.
Min Lin, Qiang Chen, and Shuicheng Yan. Network in network. arXiv preprint arXiv:1312.4400, 2013.
Parth Natekar and Manik Sharma. Representation based complexity measures for predicting gener- alization in deep learning, 2020.
Behnam Neyshabur, Zhiyuan Li, Srinadh Bhojanapalli, Yann LeCun, and Nathan Srebro. Towards understanding the role of vver-parametrization generalization of neural networks. 2018.
Suman Ravuri and Oriol Vinyals. Seeing is not necessarily believing: Limitations of biggans for data augmentation. 2019.
Shibani Santurkar, Ludwig Schmidt, and Aleksander Madry. A classification-based study of covari- ate shift in gan distributions. In International Conference on Machine Learning, pp. 4480-4489. PMLR, 2018.
Ryan Webster, Julien Rabin, Loic Simon, and Frédéric Jurie. Detecting overfiuting deep generative networks via latent recovery. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11273-11282, 2019.
Shengyu Zhao, Zhijian Liu, Ji Lin, Jun Yan Zhu, and Song Han. Differentiable augmentation for data-efficient gan training. Advances in Neural Information Processing Systems, 33, 2020.
10


Reviews:
[{"review_id": "oZliMbVsSpc", "reviewer": "Reviewer_6YD8", "summary": "", "questions": "", "limitations": "", "rating": 5, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "### Strengths:\n1. The proposed outperforms existing methods on both PGDL and DEMOGEN benchmarks.\n2. As far as I know, the proposed method is novel. Also, it is quite interesting and counterintuitive if it works.\n\n### Weaknesses:\n1. The most critical weakness of this paper is that it doesn't specify how many synthesized samples are used to compute the synthetic accuracy. It is not clear to the readers how to compute the synthetic accuracy and how many samples are enough. An analysis of the number of samples versus the performance metrics (e.g. Conditional Mutual Information metric) is also missing.\n2. The authors do not provide any statistical analysis of the proposed method. For example, each experiment is only conducted once instead of providing the mean and standard deviation of multiple runs. It is not clear how the performance would be affected by the randomness in sampling the synthesized data or training GANs.\n3. The reproducibility of the paper is questionable. The authors do not provide any hyperparameters and training details.\n4. The proposed method only works for the image classification task. Moreover, the experiments are only conducted on balanced datasets. It is not clear whether it generalizes to unbalanced datasets such as iNaturalist.\n5. The GAN models the authors use in the paper are descendants of SN-GAN which all use hinge loss, similar model architecture, conditional BatchNorm, and projection discriminator. It would be better to see a more diverse collection of GAN models being studied.\n\n\n### Typos:\n1. The year of the reference `Dziugaite & Roy` is missing.\n2. On the first page, the citation format is inconsistent with the rest of the paper: `(Jiang et al. (2019))` should be `(Jiang et al., 2019)`.", "summary_of_the_paper": "This paper proposes to use synthesized data generated by GANs to estimate the generalization of image classification models. The authors argue that the GAN samples are closer to the test set than the training set.", "summary_of_the_review": "Overall, I think the proposed method is quite interesting but lacks well-conducted experiments and evidence to support it. Based on the current state of the paper, I give a weak reject; however, I am willing to increase the score if the authors can address the weaknesses and update their draft during the rebuttal period.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "jeb7_CGi1J", "reviewer": "Reviewer_d8Mz", "summary": "", "questions": "", "limitations": "", "rating": 8, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "This paper proposes a simple method for estimating the generalization gap via training a GAN. The central idea of the paper is straightforward and the presentation of the idea is very clear. As far as the method is concerned, I do not have any concerns. The experimental results are quite compelling. In fact, I believe that the performance of the method might be good enough to be used in some production scenarios where training data is expensive and the main interest is to do model selection or estimate the population risk. The additional analysis on representations learned by GANs is also interesting since it offers another perspective on the common belief that GANs are bad at generating from the full data distribution (although FID does have many problems). A broader implication of the paper is that it suggests there is a subtle difference between generative modeling of the data and discriminative learning such as classification for high dimensional data.\n\nThe weaknesses are the following:\n- the paper feels hastily put together. While the central idea and results are clear, the entire paper reads very unpolished. For example, some paragraphs do not have line breaks between them (e.g., the first paragraph of section 4) and it is unclear why there is a line break in the abstract. In related works, a lot of the bold points only have one or two sentences following them. There are also some extremely short paragraphs throughout the paper such as 2.1. I believe that many of these can be merged. In equation one, the introduction of uniform convergence could use a bit more formality. Citation styles are also not consistent. For example,  “(Dziugaite & Roy)” does not have a year in the citation. The two tables also do not have consistent styles.\n- Maybe I missed this but I cannot find the number of synthetic data generated. Is it the same as the size of the true dataset? Along the same line, how does the estimated change as the function of different samples from the GAN? Specifically, I would be interested to see the variance coming from using different synthetic data from the GAN.\n- What is special about GANs? There are many families of deep generative models. Is there a specific reason why GAN was chosen over the other models? If so, it would be nice to see some comparisons. If the other generative models do equally well, it would also be interesting.\n\nIf the authors can address my concerns, I will increase my score.\n\n---------------------------\n\n**Update**\n\nI am happy with the authors' response and the changes made to the paper. As promised, I am increasing my score to 8.", "summary_of_the_paper": "This paper investigates the task of using GAN’s samples as a substitute for the true test distribution for estimating the generalization. Experiments show that samples from GAN are a powerful substitute for the test set and the predictive power of the synthetic accuracy outperforms all prior methods include the winner of the 2020 PGDL competition, despite all the empirical and theoretical evidence that GANs are not good at approximating the true data distribution. The paper then performs a preliminary investigation on why samples from GANs are a good substitute for the test set and found that using a certain notion of perceptual similarity, samples from GAN’s are much closer to the test distribution than the training distribution despite being trained on the training data.", "summary_of_the_review": "The paper offers a simple method for estimating the performance of deep models without test data using GANs. The empirical results are strong and the analysis is interesting. On the other hand, the paper is unpolished and the presentation could be improved.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "4: All of the claims and statements are well-supported and correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "PxxKFE8HH_", "reviewer": "Reviewer_1WB7", "summary": "", "questions": "", "limitations": "", "rating": 8, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "Strengths: The paper is well-written, the results are important and convincing, and the related work is covered well.\n\nWeaknesses: The results seem almost too good to be true. The GAN baseline not only outperforms other methods but blows them out of the water (see Table 1). Is there any explanation for how it was possible to improve so much over the previous competition winners? Some brief discussion of this might be helpful.\n\nI want to make it clear that this is a minor weakness--I don't think the papers strong results should be held against it. I just wish there was a bit more discussion on this point.", "summary_of_the_paper": "The paper considers the problem of predicting the test performance of neural networks, given only the training set and model hyperparameters. While there have been many methods proposed for this, the paper considers the simple baseline of generating synthetic test samples from a GAN and computing error using these samples. This baseline appears to outperform all or almost all existing methods on a variety of tasks, including a recent competition on predicting generalization.", "summary_of_the_review": "This paper seems like a clear accept to me, unless there is some serious issue with the experiments that I missed. (I am not an expert in this field but they seemed quite convincing to me and basically speak for themselves.)", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "4: All of the claims and statements are well-supported and correct.", "technical_novelty_and_significance": "4: The contributions are significant, and do not exist in prior works.", "empirical_novelty_and_significance": "4: The contributions are significant, and do not exist in prior works."}, "extra_text": {}}, {"review_id": "C7eA4QkWEW5", "reviewer": "Reviewer_jdtm", "summary": "", "questions": "", "limitations": "", "rating": 8, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "##########################################################################\n\nPros: \n \n* Predicting generalization is an timely and relevant problem. \n\n* Empirical findings are strong.\n\n* Appropriate empirical methodology is used (Jiang et al. 2020)\n\n##########################################################################\n\nCons: \n\n* The authors claim to \"generalize the notion of FID\" by applying it at different layers. It seems unnecessary to claim a generalization here, as its just a small modification to FID.\n\n* No theoretical justifications are made for the observations. This is often the case for new empirical findings, but the paper would be stronger with some theory. I am left wondering if there are possible confounding factors which are leading to the observations.\n \n\n##########################################################################\n\nQuestions during rebuttal period: \n\nAny insight into why exactly GANs produce data more similar to the test set?\n\n\n##########################################################################\n\n\nPost-rebuttal:\n\nI found the authors response to my question about theoretical justification interesting and persuasive and decided to raise my score.", "summary_of_the_paper": "This work studies generalization prediction with synthetic data produced by GANs. Specifically the training accuracy gap between synthetic and given data is proposed as a measure for generalization. The authors show strong improvement over other PGDL and DEMOGEN results. A further empirical finding is made on the greater similarity between test and synthetic samples than test and train samples, as measured by FID. A variety of GAN architectures are explored.\n", "summary_of_the_review": "Interesting and relevant empirical results on predicting generalization with a simple technique based on synthetic data generated by GANs.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "4: All of the claims and statements are well-supported and correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "4: The contributions are significant, and do not exist in prior works."}, "extra_text": {}}]

Author rebuttal:

Meta-review: The paper demonstrates that test error of image classification models can be accurately estimated using samples generated by a GAN. Surprisingly, this relatively simple proposed method outperforms existing approaches including ones from recent competitions. All reviewers agree this is a very interesting finding, even though theoretical analysis is lacking. Given the importance of the problem of predicting generalization, I recommend acceptance.
Decision: Accept (Spotlight)