In CMA-ES (Covariance Matrix Adaptation Evolution Strategy), hyperparameters such as population size (λ) and initial step-size (σ) are critical for balancing exploration, convergence speed, and computational efficiency. Here's the intuition behind their selection:
1. Population Size (λ)
The population size determines how many candidate solutions are generated and evaluated in each iteration. Key considerations include:
Role in Exploration and Covariance Adaptation
- Covariance Matrix Estimation: The covariance matrix models dependencies between variables. A larger λ provides more data points to estimate this matrix accurately, especially in high-dimensional spaces. However, too large a λ increases computational cost.
- Recombination and Selection: A larger λ allows for better selection of parents (μ parents are chosen from λ offspring), enabling more nuanced recombination and adaptation.
Default Heuristic
The standard population size is often set to:
[
\lambda = 4 + \left\lfloor 3 \ln N \right\rfloor
]
where (N) is the problem dimension. This heuristic balances:
- Dimensionality: Higher dimensions require more samples to estimate the covariance structure (since the covariance matrix has (N(N+1)/2) parameters).
- Efficiency: Avoids excessive computational cost by scaling logarithmically with (N).
Trade-offs
- Too Small λ: Insufficient data for reliable covariance estimation, leading to poor adaptation and premature convergence.
- Too Large λ: Excessive computation, potentially outweighing gains in exploration.
2. Initial Step-Size (σ)
The initial step-size controls the scale of the search distribution's mutations. Key considerations include:
Role in Exploration Scale
- Initial Spread: σ sets the initial "radius" of the search around the starting point. A larger σ allows broader exploration but risks overshooting optima. A smaller σ enables precision but may get stuck in local minima.
- Adaptation Foundation: While CMA-ES adapts σ dynamically, the initial value must be reasonable to kickstart exploration without being too restrictive or erratic.
Setting σ
- Problem Scale: σ should align with the expected variability of the problem. For example, if variables are scaled to similar ranges (e.g., [-1, 1]), σ might start at 0.3–0.5. Domain knowledge or trial-and-error may refine this.
- Default Heuristic: Common defaults (e.g., σ=0.3) work for many problems but may need adjustment for specific cases (e.g., very narrow or broad optima).
- Interaction with λ: Larger λ can support smaller σ, as more points provide better coverage even with finer steps. However, σ is primarily adjusted via the algorithm’s internal path-length adaptation.
Trade-offs
- Too Small σ: Slow initial exploration; may get "stuck" in poor regions.
- Too Large σ: Overshooting optima and inefficient early steps, though adaptation can eventually correct this.
Key Intuitions
-
Population Size (λ):
- Goal: Provide sufficient samples for covariance estimation while keeping computation manageable.
- Formula: (4 + \lfloor 3 \ln N \rfloor) ensures λ grows with problem dimensionality but avoids excessive scaling.
-
Initial Step-Size (σ):
- Goal: Set an initial search scale that allows meaningful exploration without being overly restrictive.
- Practical Tip: Use defaults (e.g., σ=0.3) but scale with problem specifics (e.g., σ=0.1 for tightly constrained problems).
-
Adaptation Mechanisms:
- Both λ and σ interact with CMA-ES’s self-adaptation. λ shapes the information flow (covariance and selection), while σ is dynamically adjusted based on step success.
Summary Table
| Hyperparameter | Intuition | Default/Heuristic |
|---|
| λ | Balance between covariance estimation quality and computational cost. | (4 + \lfloor 3 \ln N \rfloor) |
| σ | Set initial search scale to enable exploration while trusting adaptation. | 0.3 (scaled to problem’s characteristic length) |
Practical Considerations
- Problem Scaling: Normalize variables to similar ranges to ensure σ and covariance adaptation work effectively.
- Tuning: Adjust λ and σ empirically if the problem has known characteristics (e.g., rugged landscapes may require larger λ).
- Algorithmic Robustness: CMA-ES’s adaptive mechanisms often make it robust to hyperparameter choices, but thoughtful initialization can accelerate convergence.
By understanding these principles, users can set λ and σ to leverage CMA-ES’s strengths in navigating complex search spaces efficiently.