Elamur Research

BEGAN: Boundary Equilibrium Generative Adversarial Networks

Paper · 2017 · David Berthelot, Thomas Schumm and Luke Metz

Summary

An image generator learns by trying to produce samples that a discriminator will accept as real. The difficulty is that the discriminator is learning at the same time. If it gets ahead early, the generator may struggle to improve. And when training does produce convincing images, the generator may still repeat a narrow range of examples. Boundary Equilibrium Generative Adversarial Networks, or BEGAN, changes what the discriminator measures and how strongly it responds. The aim is to keep the two networks learning together while giving the experimenter some control over the variety of the output.

The discriminator is an autoencoder, a network that compresses an image into an internal representation and tries to reconstruct it. Its score is the reconstruction error. It learns to reduce this error for real images and, when the training rule calls for it, to raise the error for generated ones. The generator learns to produce images with low reconstruction error. BEGAN sets a target for the expected error on generated images relative to the expected error on real images. A feedback rule adjusts the discriminator’s emphasis on generated images whenever the observed errors depart from that target. The paper also introduces a training diagnostic that combines the real-image error with the size of the departure from equilibrium.

The authors train on 360K celebrity face images and show random samples at 128 × 128. The samples include changes in pose, expression, lighting, and other visible attributes. In a comparison at 64x64, increasing the target ratio brings more variety and more visible artifacts. Interpolations between representations fitted to faces outside the training set give another view of what the generator learned. Some changes in hairstyle and pose are smooth, while certain details disappear and profiles are harder to reproduce than front-facing faces. In a separate unconditional CIFAR-10 experiment, BEGAN receives an Inception score of 5.62, ahead of several reported unsupervised baselines and behind Denoising Feature Matching at 7.72.

The technical distinction is between comparing images and comparing the errors made when reconstructing them. The paper derives a lower bound on the Wasserstein distance between distributions of reconstruction errors and uses their means to build the training objective. This gives the feedback rule a quantity it can measure during training. The face experiments show what the resulting balance can do for visual quality and diversity. The CIFAR-10 comparison gives a numerical reference, while the interpolation examples show where the learned image space still leaves gaps.

Deep dive: BEGAN: Boundary Equilibrium Generative Adversarial Networks

BEGAN trains image generators by balancing reconstruction errors, with a feedback rule that controls the trade-off between variety and visual quality. · about 35 minutes to read

The problem and its context

Learning against a changing opponent

A generative adversarial network, or GAN, is designed to learn a distribution from examples and draw new samples from it. In the image setting, a generator turns a randomly drawn vector into an image. A discriminator examines images from both the training data and the generator. Its judgments give the generator a direction in which to change. Training couples the two jobs because each network’s current behavior helps determine the other’s next update. The paper takes this setup from the original formulation of Generative Adversarial Nets.

The generator has to learn something about the distribution as a whole. Producing a plausible face is one part of that job. Producing plausible faces with different expressions, poses, or appearances is another. A network can succeed at the first while covering very little of the second. At the extreme described by the authors, the generator learns a single image. The paper calls this failure mode modal collapse. A visually convincing sample can therefore be weak evidence about the variety a generator can supply.

The difficulty arises partly because the discriminator sets a moving task. Early in training, the generator can produce images that are easy to distinguish from examples in the dataset. The discriminator can gain the upper hand before the generator has learned enough structure to be a strong opponent. The two networks can also have different capacities because of how they are built or how many parameters they have. A training rule must account for that relationship as well as the eventual quality of the images.

The usual adversarial losses also present a problem for monitoring. In the original game as the authors describe it, an improvement on one side is accompanied by a worsening on the other. Either loss by itself can be difficult to interpret as a measure of progress for the whole system. The authors describe epoch counts and inspection of generated samples as practical ways to follow training. An epoch count records exposure to the data. Sample inspection can reveal an artifact or give a sense of how realistic the outputs look. A numerical diagnostic tied to the training objective would give the experimenter a different kind of evidence.

Why use reconstruction?

The original adversarial setup appealed to image researchers because it could produce sharp, convincing pictures. The BEGAN paper compares this with the images produced by autoencoders trained to reconstruct pixels. The comparison poses an interesting design question. Even if a pixel reconstruction objective has drawbacks as the sole basis for learning to generate images, it can give a discriminator a useful task with feedback throughout the image. An autoencoder learns to reproduce its input, and the resulting error gives the adversarial game a scalar score for each sample.

Two lines of earlier work inform the paper’s account. Convolutional GANs use layers that apply image filters across spatial locations. The authors credit DCGAN with bringing a convolutional architecture to the task and improving the appearance of generated images. Their concern extends from architecture to the information used to train the discriminator, a question that became more explicit after Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks.

Energy Based GANs, or EBGANs, treat the discriminator’s output as an energy assigned to a sample. An autoencoder supplies that energy through a per-pixel error. The earlier authors associated the training behavior of EBGAN with the larger number of targets available to such a discriminator. Even though the reconstruction error is summarized by a scalar, the network that produces it has to predict the image itself. BEGAN adopts the autoencoder and reworks the objective that governs its interaction with the generator.

Other earlier work addressed the tendency of GANs to repeat themselves. The paper mentions batch discrimination and a repelling regularizer, both aimed at mitigating collapse. It treats these as heuristic interventions whose success can vary. The broader problem is how the training process can favor coverage of the data distribution while continuing to reward plausible individual samples. Batch discrimination is among the approaches associated with Improved Techniques for Training GANs.

A separate approach looks for a training signal with a more direct interpretation as progress. The authors describe Wasserstein GAN as offering a loss that can also serve as a convergence measure. In their account, its implementation trades slower training for stability and better coverage of modes. BEGAN draws on a Wasserstein distance too, with reconstruction errors serving as the quantities being compared. This is the point at which its objective and its monitoring signal depart from those of Wasserstein GAN.

What balance would mean

The paper starts from an observation about indistinguishable inputs. If real and generated images were indistinguishable to the autoencoder, their reconstruction errors would have the same distribution, including the same average. The averages are much easier to observe during training than the full image distributions. The authors use that observation to set a target, then introduce a parameter that allows the target to depart from equality. The resulting notion of balance is stated in terms of measurable errors rather than network size or the number of updates allocated to each side.

This changes the question an experimenter can ask of a training run. Alongside whether the pictures look plausible, there is a question about whether the generator is producing images whose errors bear the intended relationship to those of real images. It remains possible for that relationship to hold even when there are weaknesses in the samples. The training target has a narrower meaning than successful image generation. Much of the paper is concerned with what happens when the networks are trained to respect it.

The method, step by step

From images to reconstruction errors

The generator starts with a random vector. It maps that vector to an array with the height, width, and color channels of an image. Independently, the training process supplies a real image from the dataset. Either image can be sent through the discriminator. The discriminator compresses its input and then expands the compressed representation to make a reconstruction. The same discriminator, with the same weights, does this for both image sources.

Imagine following the generated image through the networks. It first comes out of the generator, then passes into the discriminator’s encoder, and finally comes out of the discriminator’s decoder. The score comes from comparing the image at the generator’s output with the image at the decoder’s output. For a real sample, the comparison is between the original image from the dataset and its reconstruction. Each reconstruction is thus judged against its own input. There is no need to assign a real face to each random vector or to select a particular real face as the desired output from that vector.

The two networks use these errors differently. The generator tries to make its outputs easy for the discriminator to reconstruct. The discriminator always has an incentive to improve its reconstructions of real images. It can also be trained to make generated images harder to reconstruct. BEGAN changes the weight of that second incentive during training. When generated images are too easy to reconstruct according to the target ratio, the discriminator’s objective puts more weight on raising their error. When their errors run above the target, that part of the objective loses weight.

A BEGAN training step

The steps in order.

A BEGAN training stepStep 1: Draw real images and random vectors1. Draw real images and random vectorsStep 2: Generate images from the random vectors2. Generate images from the random vectorsStep 3: Reconstruct real and generated images3. Reconstruct real and generated imagesStep 4: Measure their pixel reconstruction errors4. Measure their pixel reconstruction errorsStep 5: Form the discriminator and generator objectives5. Form the discriminator and generator objectivesStep 6: Update each network with its own optimizer6. Update each network with its own optimizerStep 7: Adjust the weight on generated-image error7. Adjust the weight on generated-image error

The flow describes the repeated training step. A trained generator can produce a sample from a random vector on its own. The autoencoder supplies the learning signal, and the feedback update helps manage that signal while both networks are changing. The paper also uses the generator in a separate evaluation procedure that searches for a vector corresponding to an existing image. That search has a different purpose from either training or random sampling.

The loss assigned to an image

The authors express an image as a vector in a real-valued space. Its dimension is the number of pixel-channel values. They write the size of that space as follows.

Nₓ = H × W × C

Here Nₓ is the input and output dimension in image coordinates. H is the image height, W its width, and C the number of color channels. The multiplication sign indicates that all spatial positions and channels contribute to the dimension. The discriminator D takes an image in this space and returns a reconstruction in the same space, so the input and output can be compared coordinate by coordinate.

L(v) = |v − D(v)|^η

L is the reconstruction loss. The variable v denotes the input image and D(v) its reconstruction. The minus sign forms the pixel residual, the array of differences between corresponding input and output values. The bars and the superscript notation represent the paper’s choice of pixel error norm, with η drawn from {1, 2}. The resulting loss is a non-negative scalar. Throughout the argument, the discriminator’s trainable parameters determine how D reconstructs an input and therefore what value L assigns to it.

There are several levels of description here. A single image has many pixel residuals, summarized by a single loss. Drawing different images gives different loss values. Repeating the draw over real images produces one distribution of values, and repeating it over generated images produces another. These distributions depend on the current discriminator because a change in the autoencoder can change the error for an image even when the image itself stays fixed.

Generated images come from a function G that maps vectors of dimension N_z to images of dimension Nₓ. The distribution of its input vectors is specified directly.

z ∼ Uniform([−1, 1]ᴺᶻ)

The vector z is the generator input and N_z, shown in the exponent as ᴺᶻ, is its dimension. The interval from −1 to 1 gives the range of its coordinates, and the power of the interval denotes the corresponding product space. The symbol ∼ means the vector is sampled according to the indicated distribution. The expression Uniform names the uniform distribution on that space. The same random input rule can be used when drawing images for inspection after training.

A distance between distributions of errors

To see why the objective involves mean errors, consider two distributions on the real line. One describes the reconstruction loss on real images. The other describes the reconstruction loss on generated images. The Wasserstein distance asks how costly it is to move probability mass from one distribution to the other. Here the cost of a pairing is the absolute difference between the two loss values. The distance uses the least expected cost over all possible ways of pairing draws while preserving their original distributions.

W₁(μ₁, μ₂) = inf_{q ∈ Γ(μ₁, μ₂)} E_{(u, v) ∼ q}[|u − v|]

W₁ is the Wasserstein distance with absolute difference as its cost. The distributions μ₁ and μ₂ are the distributions of real-image and generated-image reconstruction losses, respectively. Γ(μ₁, μ₂) denotes the set of all couplings of those distributions. A coupling q is a joint distribution for the pair (u, v) in which u alone has distribution μ₁ and v alone has distribution μ₂. In this formula, u and v are scalar loss values. The subscript on E identifies the joint distribution used for the expectation, the bars give the absolute distance between the values, and inf takes the infimum over the admissible couplings.

The pairing can change the average absolute difference. It cannot change the average of the first coordinate or the average of the second coordinate because those are fixed by the marginal distributions. The authors use Jensen’s inequality to move the absolute value outside the expectation and obtain a quantity that is the same for every coupling. This yields the bound used in the paper.

inf_{q ∈ Γ(μ₁, μ₂)} E_q[|u − v|] ≥ inf_{q ∈ Γ(μ₁, μ₂)} |E_q[u − v]| = |m₁ − m₂|

The variables u and v again denote paired losses. The notation E_q means an expectation under q, a member of the coupling set Γ(μ₁, μ₂). The quantities m₁ and m₂ are the means of μ₁ and μ₂. The inequality compares the expected magnitude of the difference with the magnitude of its expectation. The equality follows because the mean signed difference is fixed by the two marginals, regardless of how the coupling pairs their values. The bars on the right give the absolute separation of the two means.

The bound has a practical advantage. Computing it requires average loss values, with no search over pairings. Its interpretation is correspondingly limited. Loss distributions with the same mean can have different shapes, so the bound can lose information even before considering how much is lost in reducing an image to a scalar score. Conversely, a large separation of the means certifies a separation in the loss distributions as measured by the bound. The paper takes advantage of that asymmetry in designing the discriminator.

Building the adversarial objective

The absolute mean difference can grow in either direction. The authors choose the direction in which the discriminator lowers the real-image error and raises the generated-image error. This gives the discriminator a useful positive task on the data. It is asked to learn reconstructions of real images while reserving a separate part of its capacity for responding to the generator.

The signed form of the lower bound along this direction is the following.

W₁(μ₁, μ₂) ≥ m₂ − m₁

W₁ measures the distance between the loss distributions μ₁ and μ₂. The mean m₂ is taken over generated-image errors and m₁ over real-image errors. The right-hand side is their signed difference. The bound is informative about a positive gap when the generated-image mean exceeds the real-image mean. This expression motivates the direction of the discriminator’s objective. The eventual feedback-controlled rule sets a different target for the observed means.

The paper first writes an unweighted adversarial objective. The loss for the discriminator uses one set of random inputs for generated images.

L_D = L(x; θ_D) − L(G(z_D; θ_G); θ_D)

L_D is the objective minimized when updating the discriminator. The variable x stands for a real image, and z_D is a random input used to form the discriminator’s generated example. G is the generator, θ_G is its parameter set, and θ_D is the discriminator’s parameter set. In L, a semicolon marks dependence on the parameter set following it. Subtracting the generated image’s loss means that an update minimizing L_D can favor an increase in that loss as well as a decrease in the loss of the real image.

The original adversarial counterpart can be written compactly.

L_G = −L_D

Here L_G is the objective for the generator in the unweighted formulation, L_D is the discriminator objective, and the minus sign reverses its optimization direction. The real-image term has no dependence on the generator parameters. From the generator’s point of view, the part of the objective that matters is therefore the positive error on generated images. The authors identify z_G as the random input for this generator update. The final training rule writes the generator objective directly as that error.

Though the sign pattern resembles the objective of Wasserstein GAN, the justification concerns a lower bound for distributions of reconstruction losses. The paper’s derivation proceeds from Jensen’s inequality for coupled scalar errors. It consequently imposes no explicit K-Lipschitz condition on the discriminator through the Kantorovich and Rubinstein duality theorem. The question of whether the autoencoder and the equilibrium have an analogous bounding role is left open in the conclusion.

Setting the target for equilibrium

The first equilibrium condition proposed by the authors is equality between the expected reconstruction errors of the two sources.

E[L(x)] = E[L(G(z))]

E denotes an expectation over the samples appearing inside the brackets. The variable x represents a real sample, while z represents a random generator input. The composition L(G(z)) is the reconstruction error of the generated image. The equality specifies a relationship between population averages at a given state of the networks. It does not require a real image and a generated image in the same training step to have identical errors. A draw can depart from the average even when the population relationship holds.

The authors relax this equality with a parameter they call the diversity ratio.

γ = E[L(G(z))] / E[L(x)]

The symbol γ is the chosen ratio in the interval [0, 1]. The numerator is the expected error of reconstructing generated images and the denominator is the expected error of reconstructing real ones. The slash denotes division, so the ratio in this form presumes a positive real-image mean. In use, the target is stated as a proportional relationship between the errors. The training update can compute a difference involving that proportional target without dividing by the measured real-image loss.

E[L(G(z))] = γ × E[L(x)]

E again takes the average over the corresponding image source, G maps z to a generated image, and L gives the discriminator’s reconstruction error. The multiplication by γ sets the target generated-image error as a share of the real-image error. At γ equal to 1, the target recovers equality. A smaller γ places the target generated-image error below the real-image error when the latter is positive. Two runs with the same γ can have different absolute errors because the target fixes their relationship.

The paper connects this parameter to the two jobs given to the discriminator. A lower ratio allows the discriminator to devote more of its effort to reconstructing real images, and the authors associate this setting with less diverse generator outputs. More generally, γ establishes the relationship the training procedure is trying to maintain. A separate variable records how much emphasis is currently needed on generated samples. Keeping those roles separate lets the experimenter hold a target fixed while the feedback mechanism changes the discriminator’s objective during a run.

Correcting departures from the target

The final BEGAN discriminator objective scales the generated-image term by a weight indexed by training step.

L_D = L(x) − kₜ × L(G(z_D))

L_D is the loss minimized for the discriminator parameters. L(x) is the error on real data, and L(G(z_D)) is the error on images made from the discriminator’s random inputs z_D. The variable kₜ is the weight at step t, where t indexes training steps. Multiplication by kₜ changes the strength of the subtracted term. The paper places kₜ in [0, 1] and starts it at 0, so the initial objective for the discriminator consists of the real-image reconstruction term.

The generator’s objective is simpler.

L_G = L(G(z_G))

L_G is minimized with respect to the generator parameters. The vector z_G is sampled for the generator update. G turns it into an image and L evaluates the reconstruction error of that image through the discriminator. The discriminator’s behavior affects the signal passed to the generator even though the optimizer for this loss updates the generator parameters alone. The value of kₜ enters indirectly through the discriminator learned under its weighted objective.

The feedback rule compares the real-image error, scaled by γ, with the generator-side error.

kₜ₊₁ = kₜ + λₖ × (γ × L(x) − L(G(z_G)))

The symbol kₜ₊₁ denotes the weight for the next training step, and kₜ the current weight. λₖ is the proportional gain, which sets the size of the weight adjustment for a given deviation. The paper uses 0.001 for this gain. The expression in parentheses is the signed deviation, with γ × L(x) the current target and L(G(z_G)) the current generator-side error. The sum adds the scaled deviation to the old weight. The paper states the allowed interval for the weight, while the displayed update gives the direction and scale of the adjustment.

If the generated-image error falls below its target, the deviation is positive. The update increases the weight, making the discriminator’s incentive to raise generated-image error stronger. If the generated-image error rises above the target, the deviation is negative and that incentive weakens. When the observed error equals its target, there is no change from the feedback term. The algorithm observes the effect of the networks’ current behavior and uses it to modify the next objective. The paper describes this as closed-loop feedback.

The authors give an intuition for why the initial phase benefits from this arrangement. Early generator outputs can be close to 0 and thus easy to reconstruct, even though the generator has learned little about the real images. Low generated-image loss is therefore possible at the very stage when poor sample quality is expected. Comparing it with the real-image loss tells the algorithm whether the discriminator should start pushing against those generated outputs. The feedback response is relative to the target, so a low error alone has no fixed meaning across all training stages.

The networks use separate optimizers for their respective objectives. This permits updates to both as part of the training procedure, without a prescribed phase of discriminator pretraining or a special alternating schedule. The typical batch size is n = 16, where n here denotes the number of samples in a batch. The authors use the optimizer’s default settings apart from the experiment’s stated learning-rate schedule. The optimizer is described in Adam: A Method for Stochastic Optimization.

A numerical diagnostic during training

A run can satisfy the ratio target at a time when reconstruction of real images is still poor. It can also reconstruct real images well while the generated error departs from the target. The authors combine these two observations into a global measure. The first term measures error on real images. The second measures how far the current errors are from the relationship the controller seeks.

M_global = L(x) + |γ × L(x) − L(G(z_G))|

M_global names the diagnostic. L(x) is the real-image reconstruction error, γ is the target ratio, G(z_G) is an image produced for the generator step, and L(G(z_G)) is its reconstruction error. The bars take the absolute value of the signed deviation, so a deviation in either direction adds a positive amount. The plus sign combines this magnitude with the real-image error. A low value indicates that the two components are jointly small as measured by this expression.

The same error in parentheses thus has different roles in the two formulas. Its sign matters for the feedback update because the algorithm has to choose which way to move kₜ. Its magnitude matters for the diagnostic because either departure counts as a failure to reach the current target. The diagnostic uses quantities already computed during training. It can be tracked alongside generated samples, and the authors also use its behavior to decide when to reduce the learning rate. Its ability to stand in for image inspection is an empirical question addressed by their experiments.

How the networks are built

The discriminator contains a deep convolutional encoder and decoder. The encoder reduces the image’s spatial dimensions as it processes the input and eventually maps the resulting tensor to a hidden vector h of dimension N_h. The decoder expands from this vector back to an image. Fully connected layers perform the mappings to and from the hidden vector, with no nonlinear transformation immediately following those mappings. This vector is the bottleneck through which the autoencoder must pass the information required for reconstruction.

The convolutional layers use 3 × 3 filters, with typically 2 repetitions at a given stage. The authors increase the filter count linearly as the encoder downsamples. They downsample by sub-sampling with stride 2 and increase spatial size in the decoder with nearest-neighbor upsampling. In this setting, repeating layers gives the network more processing at the same resolution before the next change in spatial size. The nonlinear responses after convolutions are exponential linear units, described in Fast and Accurate Deep Network Learning by Exponential Linear Units.

The generator follows the architecture of the discriminator’s decoder. It starts from z, the random vector, where the autoencoder decoder starts from h, a representation formed by encoding a particular image. The generator and decoder have separate weights. Their similar structure means that the authors can use the same basic expansion design for both tasks. The paper presents this as a design choice for simplicity. In most of the reported face experiments, N_h and N_z are both 64, even though the two vectors serve different purposes.

The paper describes optional changes to improve the passage of gradients through the network and sharpen outputs. One interpolates between passing a layer’s input straight through and using the layer’s output. It applies when the shapes are the same and the two values can be combined element by element. The idea draws on Deep Residual Learning for Image Recognition.

inₓ₊₁ = carry × inₓ + (1 − carry) × outₓ

Here x indexes a layer in the expression, inₓ is that layer’s input, and outₓ is its computed output. The quantity inₓ₊₁ is the input supplied to the next layer. The scalar carry sets the weight on the previous input, with its complement, 1 − carry, weighting the computed output. The sums and products operate on arrays with matching shapes. The schedule begins with carry = 1 and decreases it to 0 over 16,000 steps, gradually moving from passing the input through to using the computed output.

Another optional change supplies the decoder’s initial spatial representation to later stages. The hidden vector h is projected to a tensor h₀ of shape 8 × 8 × n, where n here denotes the channel count of that tensor. After a decoder stage increases spatial resolution, it receives an upsampled copy of h₀ alongside its current features. The copy has the same spatial dimensions as the current features and is concatenated with them. This gives later stages a direct connection to the projected hidden representation. The paper relates this kind of connection to earlier architectures including Highway Networks.

Searching the generator’s image space

For a separate test after training, the authors take a real image and look for a random-input vector whose generated image resembles it. This reverses the usual experimental direction. Random sampling starts with z and asks what image appears. The search starts with an image of interest and asks whether the generator can produce a good approximation. The generator’s weights are fixed and Adam changes the input vector to reduce the reconstruction discrepancy.

eᵣ = |xᵣ − G(zᵣ)|

The subscript r marks the quantities used in this real-image search. The target image is xᵣ, zᵣ is the vector being fitted, and G(zᵣ) is the generator’s approximation. The minus sign forms the image difference and the bars summarize it as the error eᵣ. This comparison is between the target image and the generator output. The discriminator’s reconstruction does not enter the search objective.

After fitting the endpoint vectors for two images, the authors move linearly between the vectors and run the resulting intermediate inputs through the same generator. Smooth transitions in the resulting images indicate continuity along those paths. The quality of the fitted endpoints also matters. If an endpoint misses a detail, the intermediate images give evidence about transitions between the generator’s approximations of the faces. This procedure makes the learned space easier to inspect by giving the interpolation recognizable starting and ending points.

Experiments and results

Training data and settings

The main image experiments use a training dataset of 360K celebrity face images. The authors choose it in place of CelebA because it has a wider range of poses, including rotations around the camera axis. They contrast this variation with the aligned faces in CelebA. They also choose faces because people are sensitive to flaws in their appearance. Accordingly, the visual examples address both whether the generator can produce apparently coherent faces and whether it can vary their appearance in recognizable ways.

The networks are trained for image resolutions from 32 to 256. The authors add or remove convolutional layers to accommodate the spatial dimensions while keeping the final downsampled grid at 8 × 8. The hidden and random-input dimensions are usually 64 for these experiments. Changing output resolution therefore changes part of the architecture while preserving the size of the grid at its coarsest spatial stage. This allows the same general design to be used at different image sizes.

Adam starts with a learning rate of 0.0001. When the convergence measure stalls, the authors reduce the rate by a factor of 2. They report occasional collapse or visible artifacts with high initial learning rates and say reducing the rate avoided those failures. Thus the reported training setup includes both the feedback mechanism that adjusts the discriminator’s emphasis and a schedule for the size of updates to the networks themselves.

The largest configuration the paper describes for 128 × 128 images uses n = 128 filters and has 17.3 × 10⁶ trainable parameters. Here n refers to the convolution filter count given for this configuration. Training takes about 2.5 days on four P100 GPUs. The authors report that setups for 32 × 32 images can be trained on one GPU in a few hours. These timings describe the resources for specific resolutions and configurations. The paper connects its claim of quick convergence to the behavior seen during training as well as to these practical runtimes.

What random face samples show

The main face comparison presents BEGAN images at 128 × 128, sampled by drawing z uniformly. The authors point to variation in pose, expression, skin color, illumination, and facial hair. They also describe omissions and imbalances. They see no glasses in the samples they discuss, observe few older people, and see more women than men. In this experiment, claims about variety come from inspecting generated examples. The examples expose some ways in which varied output and incomplete coverage can coexist.

The accompanying EBGAN samples are shown at 64x64. They come from a different dataset, and the displayed images differ in resolution. The contrast provides a visual reference for what an earlier autoencoder-based discriminator produced under its own conditions. The relative contributions of data, resolution, architecture, and training objective remain unresolved by this comparison. The authors explicitly caution against a direct comparison because of the different training data.

The paper describes images above the main illustrated resolution as coherent but softer. It points to Stacked GANs as another example of high-resolution synthesis, with results for birds and flowers at up to 256 × 256. The reference gives context for the authors’ interest in whether generated faces retain a coherent structure as resolution increases. It supplies no shared face benchmark. The paper’s own observations distinguish maintaining the arrangement of a face from preserving sharp details at the larger image sizes.

How the generator connects real images

The real-image interpolation experiment uses faces outside the training data at 128 × 128. The real images appear in the two outermost columns of the layout shown. The next images in from those endpoints are the generator’s best approximations found by the input search. The remaining images come from inputs placed along the line between the fitted vectors. This arrangement lets the reader check how well the generator represents each endpoint before examining the path between them.

In an example with changing hair, the intermediate images show believable hairstyles and a gradual transition. A cigarette visible in a target image is lost in the generated approximation. In the pose examples, rotations proceed smoothly, although profiles are represented less faithfully than camera-facing faces. The authors suggest that profiles may be less common in their dataset. Their explanation is plausible on the observations they report, with the relative frequency of profiles left unmeasured in the experiment.

One example fits an image and its mirror and examines the path between the two representations. Along that path the generator produces a convincing frontal view from the profile example. The authors read this as evidence that identity and rotation can vary with some independence in the learned space. The example shows what is possible along a selected path. It leaves open how repeatable the effect would be across other faces and poses.

For visual context, the paper presents interpolation examples from Adversarially Learned Inference, or ALI, at 64 × 64 and conditional PixelCNN at 32 × 32. The authors had no higher-resolution examples for those comparisons, and the earlier systems were trained on different data. The useful comparison is the form of the evidence. Each illustration allows a reader to inspect endpoints and intermediate images, while a numerical ranking of the systems would need more closely matched conditions.

The training curve and sample appearance

The paper follows the global measure in a 128x128 configuration with 128 filters and shows image quality alongside it. The authors observe that the measure tracks image fidelity in the illustrated run. They also read the plot as evidence that training converges quickly, in line with an earlier observation for EBGAN. This motivates their suggestion that the pixel-wise reconstruction signal contributes to the training behavior.

The two parts of the measure help explain why such a curve can be informative. If the real-image term is large, improving reconstruction can reduce the total. If the deviation term is large, moving the relative errors closer to the target can do the same. The plotted total reflects the combined outcome of these processes. The visual examples supply evidence about how the images change while this is happening. The paper reports the relationship qualitatively and uses the curve as an approximate indicator of progress.

A low value of the diagnostic and a visually plausible sample answer different questions. The diagnostic records the state of the training objective, and the sample shows an instance of what the generator can produce at that state. Reading them together is especially relevant for a method whose objective is expressed through the autoencoder. The face experiment provides this joint view. For a numerical comparison with earlier work, the authors turn to a separate dataset and metric.

The CIFAR-10 comparison

The authors train an unconditional version of BEGAN on CIFAR-10. Unconditional generation means the random input determines the output without a supplied class label directing what kind of image to produce. The paper evaluates the resulting images with the Inception score, which it describes as a heuristic for assessing both individual sample quality and variety through an Inception network. This comparison concerns the distribution of generated CIFAR-10 images, separately from the visual results on celebrity faces.

Inception scores on CIFAR-10 for unsupervised generation and real data

BEGAN scores ahead of most listed generation methods, with Denoising Feature Matching first among them.

Inception scores on CIFAR-10 for unsupervised generation and real dataReal data: 11.24Real data11.24Denoising Feature Matching: 7.72Denoising Feature Matching7.72BEGAN (this paper): 5.62BEGAN (this paper)5.62Adversarially Learned Inference: 5.34Adversarially Learned Inference5.34Improved GANs: 4.36Improved GANs4.36MIX + WGAN: 4.04MIX + WGAN4.04
The numbers
System or settingInception score
Real data11.24
Denoising Feature Matching7.72
BEGAN (this paper)5.62
Adversarially Learned Inference5.34
Improved GANs4.36
MIX + WGAN4.04

BEGAN’s Inception score of 5.62 on generated CIFAR-10 images exceeds the 5.34 reported for ALI. It also exceeds the scores reported for Improved GANs and MIX + WGAN. The leading result among the unsupervised generation methods is Denoising Feature Matching at 7.72. The score of 11.24 for real CIFAR-10 data is a reference for the metric on real images, a different kind of entry from the scores for the generators. The paper reports the scores without identifying a CIFAR-10 split for the real-data entry.

The comparison supports a practical claim about the loss-based method. A generator trained using reconstruction errors can produce images that perform competitively on a metric applied to outputs. The CIFAR-10 result leaves the comparison between loss matching and direct distribution matching conditional on the complete systems evaluated. It also leaves the behavior of specific image classes, the frequency of rare outputs, and the visual sharpness of high-resolution faces to other evidence. The authors view combining BEGAN with Denoising Feature Matching as a potential direction because they see the methods as compatible.

What the ablations show

Changing the diversity ratio

The authors show random 64x64 face samples for γ values of 0.3, 0.5, and 0.7. This is the most direct comparison of a setting that belongs specifically to the BEGAN training rule. The parameter sets the target for generated-image reconstruction loss relative to real-image reconstruction loss. Its effect is observed in the images produced after training, rather than through a change to the type of input presented to the generator.

At the low end of the tested settings, faces look overly uniform. Increasing γ brings visibly greater variety and also introduces more artifacts. The authors see some diversity throughout the displayed range. The result is therefore a tradeoff within the compared settings. Adjusting γ changes which kinds of errors and outputs the trained system produces, but the visual evidence leaves the preferred value dependent on how an experimenter weighs diversity and artifacts.

The comparison also bears on an earlier observation cited in the paper, which treated diversity and image quality as independent. In the BEGAN examples the two properties move together as γ changes, with more variety accompanied by weaker visual fidelity in some samples. This shows that the properties can be coupled under the tested training objective. The experiment gives a qualitative relationship for celebrity faces at the displayed resolution. It does not estimate a general response curve or identify a value that would be best for other data.

The ratio sweep matters because it connects a setting in the loss to a property visible in the output. A ratio is easy to define and measure at the level of errors, while the intended effect concerns variation among images. Observing changes in faces supplies the missing link in that particular setup. The omissions elsewhere in the face samples, including the absence of glasses in the authors’ inspection, leave open which attributes can be recovered by changing γ.

Changing the relative capacities

The authors also ask what happens when they give one network a narrower representation than the other. In one condition the generator input has dimension z = 16 and the discriminator hidden state has dimension h = 128. In the other the generator input has dimension z = 128 and the discriminator hidden state has dimension h = 16. In those labels, z and h refer to the dimensions of the respective vectors. The conditions put the narrower representation on different sides of the adversarial game.

The system remains stable and produces recognizable results under both configurations with equilibrium feedback in use. The small discriminator bottleneck harms visual quality in the authors’ assessment. They interpret this as an effect of reduced discriminator capacity. For the autoencoder, a narrower hidden state restricts the representation from which it must reconstruct the image. That can affect both the reconstruction task and the feedback the reconstruction loss passes to the generator.

Reducing the dimension of the generator input has comparatively little visible effect on sample quality or diversity in the examples shown. The result is informative because the two dimensions govern different tasks. The generator vector is a source of variation from which the network constructs an image, while the autoencoder vector must retain useful information about a particular input. The tested reductions appear to matter differently even though both are changes to vector dimensions.

The capacity comparison demonstrates operation under the two deliberately uneven configurations. Because both conditions use the equilibrium rule, the experiment leaves the size of the controller’s contribution unresolved. The visual evidence also comes from changing both dimensions between conditions, which limits what can be assigned to an individual dimension from the comparison alone. The authors’ interpretation is strongest as an account of the conspicuous degradation when the smaller space is on the discriminator side.

What the other analyses isolate

The interpolation examples probe continuity and the ability to approximate particular images. The diagnostic plot probes the association between the training measure and sample appearance. Both are analyses of a trained or training system. They ask different questions from the ratio sweep and the capacity comparison. For example, a smooth change between two fitted endpoints can coexist with limited coverage under random sampling. Conversely, a varied set of random samples does not establish that fitted poses will interpolate cleanly.

The authors report that additional convolutional repetitions improved visual results and describe optional carry mixing and decoder connections as ways to improve gradient propagation and sharpness. The paper provides architectural details for these choices, with no separate numerical comparison that isolates the contribution of each. The reported high-learning-rate failures are likewise observations from setup work. They explain the value of the chosen learning rate in the reported runs, with the separate effects of rate, feedback, and architecture left unquantified.

The proposed role of pixel-wise feedback in quick convergence follows from a similarity the authors see between BEGAN and EBGAN. Both use a reconstruction task, and both are reported to learn quickly. This is an interpretation of the shared design and observed behavior. An experiment that retained the equilibrium update while replacing the discriminator’s reconstruction task would address a different question, one that the paper raises explicitly in its conclusion.

Limitations

Limits identified by the authors

The authors present their control over diversity as partial. In the illustrated γ comparison, variety improves at the cost of more artifacts. The generated faces contain varied visible attributes but omit or underrepresent some appearances. The authors also report a loss of sharpness at higher resolutions and suggest that exploring hyper-parameters could improve the results. These observations qualify the claim that the same design can produce coherent images over a range of resolutions. Coherence, detail, and coverage can each vary.

The qualitative baselines have mismatched datasets and resolutions. The authors flag this directly for EBGAN, and they state similar differences for the interpolation examples from earlier systems. The visual comparisons help put the illustrated samples in context, with a controlled comparison of the underlying methods still open. Likewise, the authors suggest that limited profile coverage in the training data may account for weaker profile reconstructions, but present this as an assumption.

The conclusion asks whether the discriminator needs to be an autoencoder at all. Pixel-level feedback appears helpful in the experiments, while the autoencoder introduces choices about the proper hidden dimension and whether to apply input noise. The authors also ask how training would change with other kinds of autoencoders, including variational autoencoders. They raise this as a possible extension informed by Auto-Encoding Variational Bayes.

Another open question is theoretical. The authors ask whether the autoencoder and the equilibrium together provide a constraint analogous to the Lipschitz condition in Wasserstein GAN. Their bound follows from scalar reconstruction errors, and the experiments show the behavior of the resulting training rule. An equivalence between the constraints would require a separate argument. The paper also leaves several architectural choices unexplored, including batch normalization, dropout, transpose convolutions, and exponential growth in the number of filters.

What the experimental design leaves open

The central mathematical limit follows from the use of a mean. Reconstruction error reduces a whole image to a scalar, and a mean then reduces a distribution of those scalars to an average. Different loss distributions can share an average, and different image distributions can produce similar losses. The lower bound provides a motivation for the objective and a tractable quantity for the controller. It supplies no guarantee that the generator covers the data distribution merely because the desired relation between mean errors has been reached.

The global measure inherits these restrictions. It can become small when the discriminator reconstructs real images well and the relative errors are close to the target. It contains no separate term that counts distinct outputs or measures how frequently the generator produces each kind of image. The paper illustrates a connection to fidelity during training, while the frequency with which the measure would recognize collapse or flag a loss of coverage remains unquantified. Its use as a general stopping criterion would depend on how consistently those relationships hold across runs.

The celebrity face experiments are primarily visual. They give concrete evidence about the displayed samples and fitted paths but do not establish the population frequencies of the attributes discussed. In particular, seeing few older faces or no glasses in the inspected output gives no measured estimate of how common those attributes are in random draws. The paper supplies neither an attribute breakdown of the training collection nor a corresponding quantitative breakdown of generated samples. The contributions of data composition and generator behavior to the observed omissions therefore remain unresolved.

Interpolation addresses a related limitation from another direction. The held-out examples show that the generator can approximate certain images it did not train on and make smooth transitions between fitted vectors. The fitting procedure deliberately seeks inputs that represent the endpoints. A good reconstruction thus establishes that a useful input was found for a selected target, while the chance of drawing similarly useful inputs under ordinary sampling is a separate question. The failure to retain the cigarette and the weaker reconstruction of profiles demonstrate that smooth paths can pass through a space with gaps in the details it represents.

The CIFAR-10 comparison provides a numerical check of quality and diversity as captured by the Inception score. The metric combines those properties into a heuristic score. A difference between methods gives an ordering under that measure, while leaving the source of the difference unresolved. The paper does not give repeated-run variability or a breakdown showing which kinds of images produce the ranking. There is also no matching numerical result for the face experiments, so the CIFAR-10 scores cannot establish quantitative improvements in the high-resolution examples.

Stability is supported by the reported runs and the examples with unequal representation sizes. The paper’s account of failures at high initial learning rates shows that update size still matters. The results establish that the combination of feedback, a suitable learning rate, the chosen architectures, and the reconstruction task can train successfully under the tested conditions. The individual contribution of each part to stability and speed remains uncertain without a comparison that varies those parts under matched conditions. The timing observations describe the stated image sizes and hardware, while relative compute efficiency against other methods is left open.

What came after

The verified record of subsequent experiments is empty here, so the paper’s proposed extensions remain open questions in this account. The authors suggest combining BEGAN with Denoising Feature Matching, which scored higher in their CIFAR-10 comparison. Their proposal concerns whether changes to the adversarial training balance can work alongside a different way of comparing features. The paper reports the methods separately, leaving the effect of combining them undetermined.

The authors also suggest using feedback to adjust the weight of a regularizer or another objective during training. This proposal takes the adjustable weight as the transferable part of BEGAN. In the image experiments the feedback has a concrete target, the relationship between two reconstruction errors. An application to other objectives would have to define an observable relationship of its own, then establish whether keeping the measured quantities close to that relationship improves the outcome of interest.

Cite

Cite as David Berthelot, Thomas Schumm and Luke Metz. 2017. BEGAN: Boundary Equilibrium Generative Adversarial Networks. arXiv (Cornell University).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.1703.10717 · arXiv 1703.10717

@misc{berthelot2017began,
  title = {{BEGAN: Boundary Equilibrium Generative Adversarial Networks}},
  author = {David Berthelot, Thomas Schumm and Luke Metz},
  year = {2017},
  doi = {10.48550/arxiv.1703.10717},
  eprint = {1703.10717},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1703.10717}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/berthelot-2017-began-boundary-equilibrium-generative-adversarial/