Add CmaEsRefinementSampler — CMA-ES with quasi-random refinement#359
Open
EliMunkey wants to merge 8 commits intooptuna:mainfrom
Open
Add CmaEsRefinementSampler — CMA-ES with quasi-random refinement#359EliMunkey wants to merge 8 commits intooptuna:mainfrom
CmaEsRefinementSampler — CMA-ES with quasi-random refinement#359EliMunkey wants to merge 8 commits intooptuna:mainfrom
Conversation
Three-phase sampler: Sobol QMC → CMA-ES → Gaussian refinement. Achieves 0.1501 mean normalized regret on BBOB (25% better than pure CMA-ES at 0.2004), discovered through 97 autoresearch experiments. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Document the BBOB evaluation protocol, function categories, and metric definitions for reproducibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix midpoint calculation bug in refinement phase - Add n_medium_refine_trials parameter for explicit control - Remove unused IntersectionSearchSpace import - Use proper TYPE_CHECKING imports for type hints - Rewrite example.py with CMA-ES comparison on Rastrigin - Consolidate README: single benchmark section, working code example, correct optuna_versions (4.7.0), remove broken link Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Test basic sampling, phase transitions, reproducibility, and refinement proximity to the best point. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Run independent benchmark on 8 test functions at 5D and 10D against TPE(multivariate=True) and CMA-ES baselines. CMA-ES+Refine wins at both dimensions, with the advantage widening at 10D (0.17 vs 0.37). - Add for_budget() classmethod for auto-scaling phases to any trial count. - Add test_known_value and test_for_budget tests (6 total). - Document known limitation on deceptive functions (Schwefel). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…line) Replace pseudo-random Gaussian perturbation with Sobol-based quasi-random Gaussian vectors in the refinement phase. The Sobol sequence provides more uniform directional coverage in 5D, systematically exploring directions that pseudo-random misses. Key changes: - Refinement uses scipy.stats.qmc.Sobol + inverse CDF for perturbation - Replace 2-stage (medium/tight) with exponential decay sigma schedule - sigma_start=0.13, decay_rate=0.11 (experimentally optimized) - BBOB mean regret: 0.1284 (was 0.1501, -14.5%) - Strongest gains on separable (-41%) and multimodal_global (-45%) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CmaEsRefinementSampler — CMA-ES with multi-stage local refinementCmaEsRefinementSampler — CMA-ES with quasi-random refinement
Member
|
@not522, could you review this PR? |
Member
|
Thank you for your PR! |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
|
Fixed the ruff lint/format failures in
All |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A three-phase sampler combining Sobol QMC initialization, CMA-ES optimization, and quasi-random Gaussian refinement using Sobol-based perturbation vectors with exponential decay.
BBOB benchmark results (24 functions, 5D, 10 seeds, 200 trials):
The refinement phase uses quasi-random Sobol sequences transformed via inverse CDF to generate Gaussian-distributed perturbation vectors. This provides more uniform directional coverage than pseudo-random Gaussian, systematically exploring directions that random sampling misses.
Minimal example
Full experiment logs (135 experiments): github.com/EliMunkey/autoresearch-optuna
TODO
package/__init__.pyexports the sampler classREADME.mdwith description, API docs, and benchmarksexample.pywith working demonstrationLICENSEfile included