Inception score evaluation: what a high GAN score hides

Somewhere along the way, Inception Score Evaluation became the default answer to the question “is my GAN any good?” Teams building Generative Adversarial Networks (GANs) chase a single number, and the synthetic data quietly gets worse while that number climbs. After a decade of building complex systems, I trust a metric only as far as I trust the context around it.

If your model keeps producing technically correct images that any human looks at and immediately rejects, the Inception Score (IS) is probably part of the problem. Machine learning hits this bottleneck constantly: we want one objective number for a subjective question.

Where the GAN metaphor breaks down

The usual explanation is the forger and the art critic. The Generator (G) paints a fake, the Discriminator (D) tries to catch it. In production that setup turns into a race condition, because the generator finds a shortcut that fools the critic without producing images that are either varied or good. That is the point where drift detection and a wider evaluation setup start to matter.

The symptom you see most often is mode collapse. The generator works out that one convincing golden retriever, repeated forever, is enough to beat the critic. The critic is satisfied and the diversity of your dataset is zero. The Inception Score exists to catch exactly that.

How Inception score evaluation works

Inception Score Evaluation runs your images through a pre-trained Inception network, usually Google’s ImageNet version. It asks about quality and about diversity, and it answers with two probability distributions:

  • Conditional probability (Pc): does the image land clearly in one class? Low entropy means high quality.
  • Marginal probability (Pm): are the images spread across all 1000 classes? High entropy means diversity.

The score is the Kullback-Leibler (KL) divergence between those two distributions, and you want that distance to be large. Here is the catch. If your generator makes something outside those 1000 ImageNet classes, say medical X-rays or custom WooCommerce product textures, the Inception network has no idea what it is looking at.

The code: calculating KL divergence

Most people import a library for this and never look inside it. The math is short enough to read in one sitting, and reading it is what lets you notice when a result is skewed.

// Example of calculating KL Divergence in Python (NumPy)
import numpy as np

def bbioon_calculate_kl_divergence(p, q):
    """
    p = Conditional probability (Pc)
    q = Marginal probability (Pm)
    """
    # Avoid division by zero with a tiny epsilon
    eps = 1e-10
    return np.sum(p * np.log((p + eps) / (q + eps)))

# In a real Inception Score Evaluation, you'd average this over a batch of 50k images.

How close synthetic data should sit to real data

A good score is a relative thing. What I tell clients is that IS_synthetic should sit close to IS_real. If the real dataset scores 5.0 and your GAN reports 9.0, you have not beaten the data. You have probably overfit the generator to the biases of the Inception network, one of the evaluation limitations raised in the original NIPS 2016 papers.

If this kind of evaluation work is eating your dev hours, I can take it off your plate. I have been dealing with WordPress, APIs and messy data integrations since the 4.x days.

Architect’s takeaway

The Inception Score is a first look, not a source of truth. Outside the ImageNet semantic space it needs company: FID (Fréchet Inception Distance), manual human review, or both. A pretty number has never made a system stable, so treat a good score as a reason to keep checking rather than a reason to ship and forget.

author avatar
Ahmad Wael
I'm a WordPress and WooCommerce developer with 15+ years of experience building custom e-commerce solutions and plugins. I specialize in PHP development, following WordPress coding standards to deliver clean, maintainable code. Currently, I'm exploring AI and e-commerce by building multi-agent systems and SaaS products that integrate technologies like Google Gemini API with WordPress platforms, approaching every project with a commitment to performance, security, and exceptional user experience.