Hybrid Models for Open Set Recognition

Hongjie Zhang, Ang Li, Jie Guo, Yanwen Guo

Introduction

Most contemporary machine learning models are designed under a "closed-set" assumption, where the classes encountered during testing are identical to those seen during training. However, real-world applications frequently encounter "unknown" or out-of-distribution (OOD) samples. A standard closed-set classifier is forced to assign these unknowns to one of the known categories, often with misleadingly high confidence.

Open Set Recognition (OSR) addresses this by enabling models to identify and reject unknown samples. As illustrated in the figure below, while closed-set models partition the entire feature space among known classes, open-set models aim to define bounded regions for known data, treating the remaining space as "unknown."

Comparison of (a) Closed set recognition, where decision boundaries extend to infinity, and (b) Open set recognition, which identifies bounded regions for known classes.

The OpenHybrid Framework

To solve the OSR problem, the authors introduce OpenHybrid, a framework that integrates discriminative classification with generative density estimation. The architecture consists of three core components:

  1. Encoder ($F$): Maps input images into a shared latent embedding space.
  2. Classifier ($C$): Predicts the specific class for known samples based on the latent embedding.
  3. Flow-based Density Estimator ($D$): An invertible "Residual Flow" module that estimates the probability density ($\\log P(x)$) of the latent embedding.
The OpenHybrid architecture during training (left) and testing (right). The model jointly optimizes for classification and density estimation in a shared latent space.

Joint Training and the "Flow Flaw"

A critical innovation of OpenHybrid is the joint end-to-end training of all components. Previous hybrid models often suffered from a "flow flaw" where generative models assigned higher likelihoods to simple outliers (like SVHN digits) than to complex training data (like CIFAR-10 images).

By training the encoder and flow model together, the system learns a latent representation that is both discriminative for classification and well-suited for the flow model's unimodal Gaussian prior. This joint optimization forces the encoder to project multi-modal input data into a latent space where "known-ness" is clearly defined by high density, effectively resolving the outlier likelihood issue.

Experimental Evaluation

OpenHybrid was benchmarked against several state-of-the-art (SOTA) methods using standard datasets like MNIST, CIFAR-10, and TinyImageNet.

  • TinyImageNet: OpenHybrid achieved a significant leap in performance with an AUROC of 0.793, compared to the previous SOTA of 0.589.
  • CIFAR-10: The model reached an AUROC of 0.950, outperforming non-flow methods by approximately 6%.
  • Cross-dataset Robustness: In the challenging CIFAR-10 vs. SVHN task, OpenHybrid achieved a near-perfect AUROC of 0.998, demonstrating its ability to overcome the traditional pitfalls of flow-based models.

Conclusion

OpenHybrid demonstrates that combining discriminative and generative models through a shared, jointly-trained latent space is a powerful strategy for Open Set Recognition. By moving density estimation from pixel space to a semantically rich latent space, the model achieves superior outlier detection without sacrificing classification accuracy. Future work may focus on automated methods for setting the outlier threshold and providing a more rigorous theoretical foundation for why joint training so effectively mitigates the "higher likelihood for outliers" problem.

Summary updated

BibTeX
@inproceedings{zhang2020hybrid,
  author = {Hongjie Zhang and Ang Li and Jie Guo and Yanwen Guo},
  title = {{Hybrid Models for Open Set Recognition}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58580-8\_7},
}
Figure