Hyperparameter tuning is often considered the "dark art" of optimization. Whether utilizing Evolutionary Algorithms (EAs) or Swarm Intelligence, the performance of a solver frequently hinges on "magic numbers"—step sizes, crossover rates, and scale factors—that are notoriously difficult to calibrate. In a study presented at GECCO '22, researchers Michele Tessari and Giovanni Iacca proposed a shift away from handcrafted "rules of thumb" toward a general-purpose framework that uses Reinforcement Learning (RL) to automatically learn how to tune these parameters on the fly.
The Framework: Learning to Adapt
The researchers treated the optimization process as an RL environment. At each generation of an evolutionary algorithm, an RL agent observes the state of the search and decides how to adjust the hyperparameters. They utilized Proximal Policy Optimization (PPO), a state-of-the-art RL algorithm known for its stability, to train the agent's "brain"—a simple neural network with two hidden layers.
The framework was tested on two prominent algorithms:
- CMA-ES: Learning to adapt the step-size ($\sigma$).
- Differential Evolution (DE): Learning to adapt the scale factor ($F$) and crossover rate ($CR$).
To ensure the agent could generalize across different mathematical landscapes, the researchers used normalized state metrics, such as inter-generational fitness improvement and genotype spread. This normalization prevents the agent from being overwhelmed by the varying scales of different objective functions.
Key Insights: The Power of Uniformity and Schedules
One of the most significant findings was the impact of the action space on performance. For Differential Evolution, the researchers experimented with the agent picking fixed values versus defining the parameters of a distribution (Normal or Uniform) from which the EA would sample its values.
As shown in the results, the Uniform Distribution policy performed significantly better than fixed values or Normal distributions. This suggests that maintaining search diversity through controlled randomness is vital for effective metaheuristic adaptation. Furthermore, the agents successfully learned a general strategy: high exploration (large steps/high mutation) early in the run, shifting to high exploitation (fine-tuning) toward the end.
Results and Benchmarking
The framework was evaluated using the Black-Box Optimization Benchmarking (BBOB) suite across 46 functions in 5, 10, and 20 dimensions. The RL-based policies were compared against gold-standard handcrafted methods: CSA (for CMA-ES) and iDE/jDE (for Differential Evolution).
- Differential Evolution: The RL policies were highly successful. The uniform distribution policy was competitive with or superior to iDE and jDE in the majority of test cases.
- CMA-ES: Results were more modest, with the RL policy outperforming the standard Cumulative Step-size Adaptation (CSA) on approximately 30.4% of functions. This underscores the robustness of existing handcrafted logic for CMA-ES while proving that RL can still hold its own.
Future Directions
While the current agents effectively learn time-based schedules, they do not yet fully "feel" the specific topology of a function (e.g., distinguishing between a smooth valley and a jagged ridge). Future work aims to increase neural network capacity for more reactive behaviors, explore algorithm portfolios where the agent switches between different metaheuristics mid-run, and apply the framework to combinatorial problems like the Traveling Salesperson Problem.
Summary updated