The Importance of Hyperparameter Optimisation for Facial Recognition Applications

Hannah M. ClausAAAI 2022 · DOI

Abstract

Hyperparameter tuning is a critical yet often overlooked phase in the development of Artificial Neural Networks (ANNs). This paper explores the transition from manual "guess-and-check" methods to automated optimization techniques in the context of facial recognition. Using a Multi-Layer Perceptron (MLP) classifier and Principal Component Analysis (PCA), we evaluate the performance of Manual Optimisation, Grid Search, Random Search, and a hybrid refinement approach. Our results indicate that automated methods not only improve recognition accuracy but also drastically reduce error rates. Specifically, a hybrid approach combining Random Search with manual fine-tuning achieved an accuracy of 98.2% on the Yale Face Database B, demonstrating the necessity of systematic optimization for high-stakes security applications.

Introduction

Building an effective facial recognition system involves more than just selecting a neural network architecture; it requires precise calibration of hyperparameters—the "knobs" that govern the learning process. Parameters such as learning rates, hidden layer configurations, and dimensionality reduction components form an effectively infinite search space. Traditionally, many developers rely on manual optimization, a process often hampered by human bias and inefficiency. This study investigates whether systematic, automated methods can outperform human intuition in identifying the optimal configurations for a security-sensitive application where marginal gains in accuracy are paramount.

Methodology

The experimental pipeline utilized a Multi-Layer Perceptron (MLP) classifier. To manage the high dimensionality of image data, Principal Component Analysis (PCA) was employed to extract essential features while reducing computational load. The research compared four distinct optimization strategies:

  1. Manual Optimisation: Parameters were adjusted based on iterative observation and heuristic intuition.
  2. Grid Search: An automated exhaustive search over a predefined subset of the hyperparameter space.
  3. Random Search: An automated method that samples random combinations of parameters, allowing for broader exploration of the search space.
  4. Hybrid Approach (Further Optimisation): This final stage involved taking the top-performing configurations from Random Search and applying targeted manual fine-tuning to reach peak performance.

The hyperparameters under investigation included the number of Principal Components (PCs), hidden neurons (HNs), activation functions, batch sizes, solvers, and learning rates.

Experimental Setup

The study utilized the Yale Face Database B, consisting of 1,500 images of 30 individuals (50 images per person). The dataset includes significant variations in lighting conditions, providing a robust test for the model's generalization capabilities.

Key Results

The experimental results demonstrate a clear performance hierarchy among the optimization methods. While manual tuning provided a baseline accuracy of 96.6%, it suffered from a high error rate of 30.0%. The introduction of automated methods led to significant improvements in both metrics.

Comparison of accuracy and error rates across different optimization methods.

As shown in the results, Random Search outperformed Grid Search, achieving 98.1% accuracy. This supports the theory that random sampling is more effective at navigating high-dimensional spaces without becoming trapped in rigid grids. The highest performance (98.2%) was achieved through the "Further Optimisation" hybrid approach, suggesting that while automation is superior for broad exploration, human intuition remains valuable for localized refinement. Most notably, all automated methods reduced the error rate from 30.0% to less than 1.0%, a critical threshold for real-world security applications.

Discussion and Conclusion

The findings underscore the efficiency of automated search methods. Despite the computational cost—with each automated method requiring approximately 30 hours of processing time—the gains in reliability are substantial. However, the study also highlights ongoing challenges, particularly regarding dataset bias. The Yale Face Database B lacks gender diversity (only ~30% female), which can lead to algorithmic bias.

In conclusion, transitioning from manual to automated hyperparameter optimization is essential for developing reliable facial recognition systems. Future work should focus on utilizing more diverse datasets, such as the "Gender Shades" database, and leveraging greater computational resources to further explore the hyperparameter landscape.

Summary updated

BibTeX
@inproceedings{claus2022importance,
  author = {Hannah M. Claus},
  title = {{The Importance of Hyperparameter Optimisation for Facial Recognition Applications}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i11.21701},
}
Figure