Skip to main content
CMA-ES Optimizer

This optimizer is open source. Any third-party models, product names, or trademarks referenced are the property of their respective owners, and Proto is not affiliated with them.


Source
ProtoProtoevo-design/proto-language
View source
Optimizer contributors
Separable (diagonal) CMA-ES over a single segment’s logits.
Each trajectory adapts a Gaussian mean, diagonal covariance and step size over the flattened (L, |vocab|) logits, starting from the target’s logits (else its one-hot, else zeros). Samples are decoded by the PositionWeightGenerator and scored with score_energy; the best half of each generation’s passing samples updates the distribution. Results are each trajectory’s best decoded sequence and energy, with the trajectory’s current mean as logits: the learned position-weight matrix, reusable by a later stage. With constraint_weight_schedules, generation t scores its samples at the weights scheduled for t; each generation’s ranking uses one set of weights, and each trajectory’s best-so-far energy is shifted to those weights from its recorded per-constraint scores before the generation’s best is compared with it. Reference: Ros & Hansen (2008), “A Simple Modification in CMA-ES Achieving Linear Time and Space Complexity”, PPSN X.

API Reference

ConfigCMAESOptimizerConfig Source
Configuration for separable CMA-ES logit search.
The search dimension is n = L * |vocab| (about 4000 for a 200-residue protein), so with the default population the covariance and step-size learning rates are small and the search moves slowly. It suits short segments or modest budgets of expensive scorers; raise population_size for longer segments.
integer
required
Number of CMA-ES generations; each samples, scores, and updates the search distribution.
integer
Independent CMA-ES trajectories; each yields one candidate. Overrides program count.
integer
default:"16"
Logit samples per trajectory per generation (lambda).
number
default:"1.0"
Initial global step size (standard deviation) in logit units.
integer
Random seed for reproducible optimization, generator, and constraint tool streams.
integer
default:"1"
Save history and log progress every N steps. Step 0 and final step always saved.
boolean
default:"False"
Save granular per-proposal results (accept/reject) in history snapshots.
boolean
default:"False"
Emit per-step debug information about proposals, scores, and acceptance through the logger.
integer
With a checkpoint_dir, checkpoint the running stage every N iterations. None: stage ends only.
integer
Stop after N iterations in a row without improving the best energy (first sets it). None disables.
number
default:"0.0"
Minimum decrease of the best energy that counts as improvement for plateau_patience.
array
Per-constraint weight schedules that override the constraint’s static weight at each step.

Usage

python

Metadata