Complex Background Reconstruction for Novelty Detection

Kun Zhao, Man Su, Ran An, Hui He, Zhi WangApplied Sciences 2023

TL;DR

This paper introduces a novel approach for novelty detection that explicitly addresses the challenge of complex backgrounds in images. By proposing a reconstruction network that learns both foreground and background distributions and a mutual information Siamese network for similarity measurement, the method significantly improves detection accuracy, outperforming existing state-of-the-art techniques.

What Problem Does This Paper Address?

Novelty detection, also known as one-class classification, is a crucial task in unsupervised learning where the goal is to identify samples that deviate from a known "normal" class. This is particularly challenging due to:

  • Lack of manual supervision: Labeled anomaly data is scarce.
  • Rarity of anomalies: Novelty samples are infrequent.
  • Imbalanced datasets: Training data is heavily skewed towards the normal class.
  • Unknown anomaly patterns: Anomalies can manifest in diverse and unpredictable ways.

Existing methods often focus on reconstructing the target object and measuring reconstruction error. However, they tend to overlook the significant influence of background information, especially in complex scenes. This oversight leads to weaker performance on datasets like CIFAR-10, where intricate backgrounds can mislead reconstruction and subsequent anomaly detection. The paper argues that complex backgrounds, far from being a nuisance, can actually provide valuable contextual clues for identifying novel objects.

Methods

The proposed method consists of two main components, trained in an adversarial and unsupervised manner:

  1. Reconstruction Network (RNet): This network is designed to reconstruct input images. It's based on a GAN architecture but replaces the discriminator with a Maximum Mean Discrepancy (MMD) based two-sample test.
  2. MMD-GAN: The core idea is to make the distribution of reconstructed samples closely match that of the original training samples. This is achieved by minimizing the MMD between the original and reconstructed image distributions, aiming to capture both foreground and background features.
  3. Three Subnetworks: RNet comprises an encoder (E) to map images to latent representations, a reconstruction subnetwork (G) to generate reconstructed images, and a discriminator (D) to enforce distribution matching.
  4. Loss Functions: RNet utilizes a combination of reconstruction loss (Lcon), adversarial loss (Ladv) based on MMD, and encoder loss (Lenc) to ensure robust reconstruction that accounts for background.
  5. Mutual Information Siamese Network (MNet): This network measures the similarity between the original image and its reconstruction.
  6. Siamese Architecture: It employs a Siamese network with shared weights. The encoder (E) from RNet is reused to extract features from both the original image and its reconstruction.
  7. Mutual Information Maximization: A key aspect is maximizing the mutual information between the original image features and the extracted features. This encourages the encoder to learn highly discriminative features that capture essential information from the input.
  8. Similarity Metric Loss: To handle potential large reconstruction errors from RNet, MNet uses Huber's loss for similarity measurement. This makes the network more robust to outliers and less sensitive to samples with significant reconstruction discrepancies.

The overall framework trains RNet first to achieve good reconstruction, then uses the reconstructed images as input to MNet for similarity assessment and novelty detection.

Datasets

The proposed method was evaluated on two publicly available multi-class object recognition datasets:

  • CIFAR-10: A dataset of 60,000 color images (32x32) across 10 classes. It's known for its noisy and varied object appearances, making it challenging for novelty detection.
  • Caltech-256: A larger dataset with 30,608 images across 256 classes. It also includes a "clutter" class used as novelty samples.

For training, one class was designated as the "normal" class, with 90% of its samples used. For testing, the remaining 10% of normal samples and a proportion of novelty samples (ranging from 10% to 50% for CIFAR-10, and 50% for Caltech-256's "clutter" class) were used.

Key Insights and Ideas

  • Background as a Feature: The paper's central thesis is that complex backgrounds are not just noise but contain valuable contextual information that can significantly aid novelty detection, especially for objects with high complexity.
  • MMD for Distribution Matching: Using MMD for distribution matching in the reconstruction network is crucial. It allows the network to learn and replicate the statistical properties of both foreground and background, leading to more faithful reconstructions.
  • Mutual Information for Discriminative Features: Maximizing mutual information in the Siamese network forces the feature extractor to learn representations that are highly correlated with the original input, making them more discriminative for distinguishing normal from novel samples.
  • Robustness to Imbalance: The Siamese network architecture is highlighted as being inherently suitable for one-shot learning and mitigating the issue of imbalanced samples, a common problem in novelty detection.
  • Huber's Loss for Stability: Employing Huber's loss in the similarity metric is a smart move to prevent samples with large reconstruction errors from disproportionately affecting the model's performance, enhancing overall robustness.

Key Results

  • CIFAR-10 Performance: The proposed method achieved an average AUC of 73.48% on CIFAR-10, demonstrating comparable performance to OCGAN and significantly outperforming other baselines like OC-SVM, KDE, and VAE.
  • Caltech-256 Performance: On Caltech-256, the method showed superior performance compared to several state-of-the-art novelty detection methods, including CoP, REAPER, OutlierPursuit, LRR, DPCP, R-Graph, and ALOCC, achieving AUCs in the range of 90.8% to 94.2% depending on the number of normal classes used.
  • Ablation Studies:
    • The full model (RNet + MNet + self-looping) achieved the highest AUC (73.48%) on CIFAR-10.
  • Replacing MNet with MSE for reconstruction error measurement resulted in slightly lower performance, indicating MNet's effectiveness in extracting discriminative features.
  • The self-looping training trick also contributed to improved accuracy.
  • Variance Analysis: The paper shows that their MNet-based approach is more stable and performs better than MSE on classes with higher variance (more dispersed distributions), such as TRUCK and AUTOMOBILE.

Limitations and Future Work

  • MMD Requirements: The paper acknowledges that MMD requires comparable distributions that can be mapped to Hilbert space and are amenable to kernel methods.
  • Siamese Network Task Dependence: The efficacy of Siamese networks can fluctuate depending on the specific task, though the authors believe their application here is well-suited.
  • Future Work: The paper suggests that their approach is adaptable to varying levels of motion or scene changes, implying potential for application in video anomaly detection. The focus on background reconstruction also opens avenues for more nuanced understanding of scene context in anomaly detection.

Summary updated

BibTeX
@inproceedings{zhao2023complex,
  author = {Kun Zhao and Man Su and Ran An and Hui He and Zhi Wang},
  title = {{Complex Background Reconstruction for Novelty Detection}},
  booktitle = {Applied Sciences},
  year = {2023},
  doi = {10.3390/app131910702},
}
Figure