QDpy
Loading...
Searching...
No Matches
neuro_elites.py File Reference

Neuro-MAP-Elites with error-mask descriptors and validation-set voting. More...

Go to the source code of this file.

Classes

class  qdpy.algorithms.neuro_elites.NMEEnsemble
 Classifiers selected by validation accuracy and combined with majority voting. More...
class  qdpy.algorithms.neuro_elites.NMEResult
 Report the final learned repertoire, initial mining archive, and model-call counts. More...
class  qdpy.algorithms.neuro_elites._MaskEncoder

Namespaces

namespace  qdpy

Functions

 qdpy.algorithms.neuro_elites.neuro_map_elites (targets, predict, *, sample, mutate, structural, mining_archive, budget, mining_budget, initial_samples=16, shape=(8, 8), min_mining_accuracy=.5, fit_steps=128, hidden=32, fit_batch=32, beta=.3, seed=0)
 Mine models, fit a beta-VAE on their errors, and illuminate the latent space.
 qdpy.algorithms.neuro_elites.nme_ensemble (archive, predict, targets, *, classes=None, max_members=None, size=None)
 Select a majority-vote prefix on an independent validation panel.

Detailed Description

Neuro-MAP-Elites with error-mask descriptors and validation-set voting.

See also
https://doi.org/10.1145/3449726.3459549

Definition in file neuro_elites.py.

Function Documentation

◆ neuro_map_elites()

qdpy.algorithms.neuro_elites.neuro_map_elites ( targets,
predict,
* ,
sample,
mutate,
structural,
mining_archive,
budget,
mining_budget,
initial_samples = 16,
shape = (8, 8),
min_mining_accuracy = .5,
fit_steps = 128,
hidden = 32,
fit_batch = 32,
beta = .3,
seed = 0 )

Mine models, fit a beta-VAE on their errors, and illuminate the latent space.

Parameters
targetsTraining labels in prediction order.
predictCallable (genome) returning predicted training labels.
sampleCallable (rng) returning a genome iterable.
mutateCallable (genome, rng) returning an offspring genome.
structuralCallable (genome) returning the mining descriptors.
mining_archiveEmpty rectangular mining archive with maximizing fitness.
budgetTotal prediction calls, including mining.
mining_budgetEvaluations spent on structural MAP-Elites.
initial_samplesNumber of unconditional samples during mining.
shapeShape of the final latent grid.
min_mining_accuracyMinimum balanced accuracy for masks used in training.
fit_stepsNumber of VAE optimizer updates.
hiddenHidden width of the encoder and decoder.
fit_batchMaximum masks in each optimizer step.
betaWeight of the latent KL term.
seedSeed for variation and training.
Returns
NMEResult with archives, encoder and work counters.
Run structural and learned-descriptor searches over the same training panel.

Use balanced accuracy in both phases. Retain the error masks of qualifying
mining elites and fit a beta-VAE to the binary masks. Seed the learned
archive from cached mining measurements. Normal quantiles partition each
learned axis into bins of equal mass under the latent prior.

Definition at line 140 of file neuro_elites.py.

◆ nme_ensemble()

qdpy.algorithms.neuro_elites.nme_ensemble ( archive,
predict,
targets,
* ,
classes = None,
max_members = None,
size = None )

Select a majority-vote prefix on an independent validation panel.

Parameters
archiveIterable of measured classifiers with a scalar fitness.
predictCallable (genome) returning labels on the validation panel.
targetsValidation labels in callback order.
classesOptional full class list, including classes absent in validation.
max_membersOptional cap on ranked archive members tested.
sizeOptional exact ensemble size for matched-size comparisons.
Returns
NMEEnsemble and validation measurement count.
Try quality-ranked vote prefixes and keep the smallest best-scoring one.

Definition at line 219 of file neuro_elites.py.