Linking convolutional kernel size to generalization bias in face analysis CNNs

Hao Liang, Josue Ortega Caro, Vikram Maheshri, Ankit B. Patel, Guha Balakrishnan

TL;DR

This paper investigates how the size of convolutional kernels in CNNs, a seemingly minor architectural choice, can introduce significant biases in face analysis tasks, particularly for out-of-distribution (OOD) data. By developing a causal framework and employing adversarial attacks and frequency injection, they demonstrate that smaller kernels lead to a bias towards high-frequency features, which disproportionately affects certain demographic groups.

What Problem Does This Paper Address?

Algorithmic bias in deep learning models, especially in sensitive applications like face analysis, is often attributed to biases in the training data. However, this paper argues that architectural choices, specifically hyperparameters like convolutional kernel size, have been largely overlooked as a source of bias. These architectural decisions can induce "implicit biases" in how models learn features. The authors aim to establish a causal link between a specific architectural hyperparameter (convolutional kernel size) and out-of-distribution (OOD) generalization bias, demonstrating that this bias can manifest even with balanced training datasets.

Methods

The authors propose a causal framework to investigate the link between architectural hyperparameters and OOD bias. The framework involves three key steps:

  1. Architecture Training: Train multiple versions of the same network architecture, differing only in the hyperparameter of interest (convolutional kernel size).
  2. OOD Perturbations: Create an OOD test set by injecting controlled perturbations into standard test images. Two types of perturbations are used:
  3. Adversarial Attacks: Specifically, the Carlini & Wagner (CW) attack and the Fast Gradient Sign Method (FGSM) are employed to subtly alter images and test model robustness.
  4. Frequency Energy Injection: Noise is injected into specific frequency bands of the image's Fourier spectrum to probe frequency-related biases.
  5. Causal Analysis: A multivariable linear regression model is used to predict model performance on OOD images. The regression coefficients are then interpreted to estimate the causal effect of the hyperparameter choice on performance across different protected attribute subgroups (e.g., race, gender).

Datasets

  • Fairface: Used for training and evaluation. It contains approximately 86,744 training and 10,954 testing samples, labeled with 7 race groups and 2 gender groups.
  • UTKFace: Used for training and evaluation. It contains 20,000 training and 3,705 testing samples, labeled with 5 race groups and 2 gender groups.

Key Insights and Ideas

  • Kernel Size as a Bias Inducer: The size of convolutional kernels is not just an architectural detail; it directly influences the frequency content of learned features and can induce significant OOD bias.
  • High-Frequency Bias: Smaller kernel sizes lead to a bias towards learning high-frequency features, making models more sensitive to high-frequency noise and perturbations.
  • Disparate Impact Across Subgroups: This high-frequency bias is not uniform. The authors found that certain demographic groups (e.g., Black individuals, males) consistently exhibit lower high-frequency information in their adversarial perturbations, suggesting that models are less sensitive to these features for these groups.
  • OOD Robustness: Larger kernel sizes generally lead to increased robustness against adversarial attacks and frequency perturbations, as they shift the model's focus towards lower frequencies.
  • Causal Link Established: The proposed causal framework successfully quantifies the impact of kernel size on performance bias across different demographic groups, moving beyond correlational studies.

Key Results

  • Adversarial Attacks:
    • Increasing the first layer kernel size (FLKS) makes adversarial attacks harder, as evidenced by increased perturbation distances.
  • The Black group consistently shows lower perturbation distances, indicating they are more vulnerable to adversarial attacks across various kernel sizes.
  • Regression analysis revealed significant differences in how kernel size affects perturbation distance for different race/gender groups, with Black and Indian groups showing higher coefficients.
  • Frequency Energy Injection:
    • Models are generally more influenced by low-to-mid frequency energy injections than mid-to-high frequencies.
  • While visually distinguishing group-specific trends was difficult, the causal analysis showed that certain frequency injection bands had a greater impact on error rates for specific groups.
  • Model Universality: Similar trends were observed across different CNN architectures (ResNet-34, DenseNet121, VGG16), suggesting the findings are not specific to a single model.
  • Varying All Kernels: Modifying all convolutional kernel sizes simultaneously did not yield significantly different results compared to only modifying the first layer's kernel size.

Limitations and Future Work

  • Limited Application Domain: The study focused on face analysis. Future work should explore the impact of kernel size on bias in other application domains.
  • Simplified OOD Perturbations: The adversarial attacks and frequency injections used are not directly representative of real-world OOD artifacts (e.g., shot noise, fog, motion blur). Future work should investigate the link between frequency biases and performance on these more realistic OOD scenarios.
  • Exhaustive Causal Analysis: While the framework is general, the causal analysis was limited to a few key variables. Future work could incorporate a more comprehensive set of image factors to ensure the "no hidden confounders" assumption is met.
  • Broader Hyperparameter Exploration: The framework is agnostic to the hyperparameter. Future research should extend this analysis to other hyperparameters like activation functions, network depth, weight initialization, and high-level architectural designs (e.g., residual connections, transformers).

Summary updated

BibTeX
@inproceedings{liang2024linking,
  author = {Hao Liang and Josue Ortega Caro and Vikram Maheshri and Ankit B. Patel and Guha Balakrishnan},
  title = {{Linking convolutional kernel size to generalization bias in face analysis CNNs}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2024},
  doi = {10.1109/wacv57701.2024.00464},
}
Figure