Abstract
Training boosting-based classifiers, such as the Viola-Jones face detector, traditionally requires an exhaustive search over a massive space of potential weak learners. This process is computationally intensive and often serves as a primary bottleneck in machine learning workflows. This paper proposes an alternative approach: utilizing a Genetic Algorithm (GA) to evolve weak learners. By treating the search as an optimization problem, the proposed method achieves significant computational speedups—exceeding 300x for face detection and 5000x for face alignment—while maintaining competitive accuracy and providing implicit regularization.
Introduction
Boosting is a powerful meta-algorithm that constructs a "strong" classifier by iteratively combining a series of "weak" learners. In the classic Viola-Jones framework, these weak learners are simple Haar features (rectangular filters). However, the search space for these features is vast, encompassing millions of combinations of position, size, and type. The standard brute-force approach evaluates every possible candidate in every iteration, a process that can take weeks on modern hardware. This paper explores whether a Genetic Algorithm can navigate this parameter space more efficiently without sacrificing the quality of the final model.
Methodology
Genetic Representation and Evolution
The search for an optimal weak learner is reformulated as a genetic optimization problem. Each learner's parameters—including x and y coordinates, width, and height—are encoded into a binary string or "chromosome." The algorithm proceeds through several stages:
- Fitness Evaluation: A chromosome's fitness is defined as being inversely proportional to its weighted training error. High-performing classifiers are more likely to be selected for reproduction.
- Evolutionary Operators: Standard genetic operators, including crossover (recombining parent strings) and mutation (random bit-flipping), are used to explore the parameter space.
- Elitism: To prevent the loss of high-quality solutions, the top $N$ performers are preserved across generations.
Linked Parameters
A critical optimization in this method is the separation of "free" and "linked" parameters. While geometry (position and size) is evolved via the GA, parameters that can be calculated analytically—such as the optimal threshold for a given feature—are handled by an efficient sub-routine. This significantly reduces the dimensionality of the search space the GA must traverse.
Experimental Results
The proposed method was evaluated on two distinct tasks: face detection using the Viola-Jones framework and face alignment using a Boosted Ranking Model (BRM).
Computational Efficiency
The GA-based approach demonstrated dramatic reductions in training time. For the Viola-Jones detector, the algorithm achieved a 329x speedup compared to brute-force search. As shown in the performance data, a configuration with a small population ($N=50$) and few generations ($K_{max}=10$) reduced the iteration time from over 900 seconds to under 3 seconds.
Accuracy and Regularization
Crucially, the speedup did not come at the cost of accuracy. In many cases, the GA-based learners achieved test error rates comparable to or even better than those found via exhaustive search.
As seen in the error analysis, the configuration with $N=400$ and $K_{max}=40$ yielded a test error of 0.0328, which is lower than the 0.0349 achieved by the brute-force method. This suggests that the GA may provide a form of implicit regularization, avoiding the extreme overfitting that can occur when selecting the absolute global minimum of training error in every boosting iteration.
Discussion
Efficiency over Perfection
The results support the hypothesis that boosting does not require the absolute best weak learner in every step to converge to a strong final model. "Good enough" learners found rapidly by the GA are sufficient for robust convergence. Furthermore, the author noted that using multiple small populations ($S > 1$) allows for effective parallelization on multi-core architectures, further enhancing practical training speeds.
Limitations
The current implementation requires a fixed-length parameter vector, which limits its immediate application to variable-depth structures like decision trees. Additionally, the effectiveness of the GA is dependent on a relatively smooth fitness landscape; highly discontinuous parameter spaces may still pose challenges.
Conclusion
By replacing exhaustive search with a Genetic Algorithm, this paper demonstrates that the training time for boosting-based classifiers can be reduced by several orders of magnitude. The method offers a practical solution for training complex models on large datasets, with the added benefit of potential improvements in generalization through implicit regularization. Future work will focus on extending this approach to more complex weak learners, such as decision trees, and exploring its applicability beyond Haar features.
Summary updated