Generative Cross-Entropy: A Strictly Proper Loss for Data-Efficient Classification
Qipeng Zhan, Zhuoping Zhou, Li Shen
NeurIPS page · OpenReview · Open on the map
Category: Graphs, OOD Detection & Medical Imaging › Probabilistic Calibration and Weak Supervision · Type: new method · Keywords: Generative Cross-Entropy, sample-efficient classification, loss functions, proper scoring rules, mini-batch normalization
Summary
Generative Cross-Entropy (GenCE) is a drop-in replacement for cross-entropy that introduces a generative learning principle into discriminative networks, improving data efficiency, calibration, and out-of-distribution detection.
Explained to a 5-year-old
When we teach a computer to recognize pictures, we usually use a special rule called cross-entropy. This rule needs many examples to learn well. The researchers noticed that if we also think about how the computer guesses, like a generative classifier does, we can learn faster with fewer examples. They created a new rule that mixes this thinking into the old rule, so the computer can learn from fewer pictures and be more confident in its guesses. This helps the computer work better when there are not many labeled examples.
Explained to a 5-year-old, longer
In many machine learning tasks, we want a computer to guess the right label, like saying whether a picture is a cat or a dog. Usually we train the computer using a loss function called cross-entropy, which works well when we have lots of labeled examples. However, when we only have a few labeled examples, the computer often does not learn as well. Researchers have tried to help the computer by adding more data, like making copies of pictures or using pre-trained models, but they rarely change the loss function itself. They observed that generative classifiers, which also model how data is generated, can reach good performance with fewer examples than discriminative classifiers. Inspired by this, the authors propose a loss that incorporates a generative idea into the standard discriminative network without altering its architecture. The new loss works by normalizing each example’s prediction with the predictions of other examples in the same mini-batch, linking the learning signal across similar classes. This coupling makes the training more efficient, allowing the model to learn from fewer labeled samples. The authors prove that this loss is strictly proper, meaning it encourages the model to output true probabilities. Experiments on three datasets and two network architectures show that the new loss improves classification accuracy, gives better calibrated probabilities, and detects out-of-distribution inputs more reliably. Overall, the approach makes it possible to train accurate classifiers even when labeled data is scarce. This can be useful in real-world situations where collecting large amounts of labeled data is expensive or time-consuming.
For a technical reader
The paper addresses the inefficiency of the standard cross-entropy loss when labeled data is limited, noting that most prior work focuses on data-side remedies like augmentation. They propose a loss that blends a generative perspective into the discriminative training pipeline by normalizing each sample’s softmax score with the model’s predictions on the current mini-batch, coupling examples of the same class. This non-local loss can be computed without changing the network architecture and is proven strictly proper under a completeness condition. Empirical results on three datasets and two architectures show improvements in accuracy, calibration, and out-of-distribution detection. The work suggests a practical way to achieve better sample efficiency in classification tasks.
Problem
Supervised classification models trained with cross-entropy often require many labeled examples to achieve good performance when labels are scarce. The training objective itself is rarely revisited to improve sample efficiency.
Method
The approach reformulates the class-conditional likelihood in a Bayesian way and derives a loss that normalizes each sample’s softmax score by the model’s predictions on the current mini-batch, coupling examples of the same class. This yields a non-local loss that can be computed without changing the network architecture or fitting a separate density model. The loss is shown to be strictly proper under a completeness condition.
Results
The approach achieves superior classification performance, better probability calibration, and stronger out-of-distribution detection compared to cross-entropy and other losses across multiple datasets and architectures.
Contributions
It introduces a generative-inspired loss that can be used as a drop-in replacement for cross-entropy, provides a theoretical proof of strict propriety, and demonstrates consistent gains in sample efficiency, calibration, and OOD detection.
Limitations and assumptions
The strict propriety guarantee relies on a completeness condition, and the empirical evaluation is limited to three datasets and two architectures.
Practical relevance
This loss enables more data-efficient training of classification models, reducing the need for large labeled datasets and improving reliability in deployment.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction