CYBORG: Blending Human Saliency Into the Loss Improves Deep Learning

Aidan Boyd, Patrick J. Tinsley, Kevin W. Bowyer, Adam Czajka

TL;DR

This paper introduces CYBORG, a novel training strategy that guides deep learning models to focus on human-perceived salient regions in images. By incorporating human-annotated saliency maps into the loss function, CYBORG significantly improves generalization performance on synthetic face detection tasks, outperforming models trained with more data or non-human-derived cues.

What Problem Does This Paper Address?

Deep learning models often struggle with generalization, meaning they perform poorly on data that differs from their training set. This is particularly true for tasks involving synthetic data, like generated faces, where models can learn spurious correlations rather than robust features. The authors propose that current deep learning training is too "passive," and that incorporating human perceptual intelligence could lead to more active and effective learning. They aim to bridge the gap between how humans perceive important image regions and how current models learn, specifically for tasks where human expertise is readily available.

Methods

The core innovation is the CYBORG training strategy, which augments the standard classification loss with a human saliency loss. This new loss component penalizes discrepancies between the model's predicted saliency maps and human-annotated saliency maps.

Here's a breakdown:

  • Class Activation Mapping (CAM): The authors use CAM to generate saliency maps from the model's internal representations. This is a standard technique that allows visualization of which image regions contribute most to a model's prediction.
  • Human Saliency Maps: These are created by collecting annotations from human participants who not only classify images (e.g., real vs. fake faces) but also highlight the specific regions that informed their decision. These individual annotations are then aggregated to form a collective saliency map.
  • CYBORG Loss: The loss function is a weighted sum of the standard classification loss and the human saliency loss. The saliency loss is calculated as the L2 norm (distance) between the human-derived saliency map and the model's CAM-generated saliency map. This encourages the model to align its attention with human perception.
  • Key Advantage: The CAM method used for saliency generation only requires a forward pass, making it computationally feasible to integrate directly into the training loop, unlike more complex gradient-based saliency methods.

Datasets

The study utilizes both authentic and synthetic face image datasets:

  • Authentic Datasets:
    • CelebA-HQ: 30,000 high-quality celebrity images at 1024x1024 resolution.
  • Flickr-Faces-HQ (FFHQ): 70,000 high-resolution face images with variations in age, ethnicity, and accessories.
  • FRGC-Subset: 16,433 face images with variations in expression, ethnicity, gender, and age.
  • Synthetic Datasets: Images generated by seven different Generative Adversarial Network (GAN) architectures:
  • ProGAN
    • StyleGAN
    • StyleGAN2
    • StyleGAN2-ADA
    • StyleGAN3
    • StarGANv2
    • SREFI (a non-GAN method)

A significant portion of the data was collected through a custom online annotation tool where 363 participants judged real vs. fake face pairs and annotated supporting regions.

Key Insights and Ideas

  • Human perception is a powerful training signal: The core idea is that by explicitly guiding models to focus on what humans find salient, we can improve their ability to generalize to unseen data. This moves beyond purely data-driven learning.
  • CYBORG is more than just "more data": The study demonstrates that simply increasing the training dataset size (up to 7x) with standard loss functions does not achieve the same generalization improvements as the CYBORG approach. This suggests that the quality of the learning signal (human saliency) is more impactful than sheer quantity of data in this context.
  • Human saliency is superior to automated cues: When comparing human saliency maps to automatically generated face segmentation masks, the human-derived cues led to significantly better generalization performance, highlighting the unique value of human perceptual judgment.
  • Deepfake detection is a different problem: The paper shows that state-of-the-art "deepfake" detectors perform poorly on entirely synthetic GAN-generated faces, indicating that these two detection tasks are not interchangeable.
  • Annotation improves human performance: As a side observation, asking humans to annotate regions supporting their decisions improved their own classification accuracy, suggesting that the act of focused attention itself is beneficial.

Key Results

  • Significant Generalization Improvement: CYBORG consistently outperformed classical training (using only classification loss) across four different CNN architectures (DenseNet, ResNet, Inception, Xception) on an open-set test of synthetic faces from six unseen GANs. For example, for ResNet50, CYBORG achieved an AUC of 0.633 ± 0.04, compared to 0.537 ± 0.09 for classical training.
  • Outperforming Larger Datasets: CYBORG models achieved better performance than models trained with seven times the data using only classical loss.
  • Human Saliency vs. Segmentation: CYBORG with human saliency maps outperformed models trained with face segmentation masks, demonstrating the superiority of human-derived cues.
  • Visual Alignment: CAM visualizations showed that CYBORG-trained models focused on facial features (mouth, nose, eyes) more consistently and similarly to human annotations, whereas classical models had more diffuse and less consistent attention patterns.
  • Human Classification Boost: In the annotation experiment, human accuracy increased from random chance (50%) to 69.2% when asked to annotate regions supporting their decisions.

Limitations and Future Work

  • "Expert Level" Tasks: The authors note that the CYBORG approach is most applicable to tasks where human accuracy is not at an "expert level." For tasks where humans are already near-perfect, the benefit might be less pronounced.
  • Computational Cost: While CAM is efficient, the overall training process with the added saliency loss is still more computationally intensive than standard classification.
  • Data Acquisition: Obtaining high-quality human saliency maps can be time-consuming and costly, though the paper suggests it's more effective than simply acquiring more data.
  • Future Work: The paper opens avenues for exploring how to incorporate human visual saliency into loss functions more broadly. They also suggest investigating the "value" of human saliency in other domains and for different types of models, such as self-attention mechanisms.

Summary updated

Abstract

Can deep learning models achieve greater generalization if their training is guided by reference to human perceptual abilities? And how can we implement this in a practical manner? This paper proposes a training strategy to ConveY Brain Oversight to Raise Generalization (CYBORG). This new approach incorporates human-annotated saliency maps into a loss function that guides the model's learning to focus on image regions that humans deem salient for the task. The Class Activation Mapping (CAM) mechanism is used to probe the model's current saliency in each training batch, juxtapose this model saliency with human saliency, and penalize large differences. Results on the task of synthetic face detection, selected to illustrate the effectiveness of the approach, show that CYBORG leads to significant improvement in accuracy on unseen samples consisting of face images generated from six Generative Adversarial Networks across multiple classification network architectures. We also show that scaling to even seven times the training data, or using non-human-saliency auxiliary information, such as segmentation masks, and standard loss cannot beat the performance of CYBORG-trained models. As a side effect of this work, we observe that the addition of explicit region annotation to the task of synthetic face detection increased human classification accuracy. This work opens a new area of research on how to incorporate human visual saliency into loss functions in practice. All data, code and pre-trained models used in this work are offered with this paper.
BibTeX
@inproceedings{boyd2023cyborg,
  author = {Aidan Boyd and Patrick J. Tinsley and Kevin W. Bowyer and Adam Czajka},
  title = {{CYBORG: Blending Human Saliency Into the Loss Improves Deep Learning}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2023},
  doi = {10.1109/wacv56688.2023.00605},
}
Figure