Skip to content

Prefast Mode

Codex Checkpoint edited this page Jun 29, 2026 · 4 revisions

Prefast Mode

Prefast is available on v2.1-dev.

It is an optional adaptive trial-ranking model placed before fast-worker screening.

What Prefast Does

For each free fast-worker slot:

  1. the master reads the current accepted SAVE;
  2. during warmup, it generates one ordinary random trial and learns from the relaxed result;
  3. after warmup, it generates a small mini-batch of trial moves;
  4. it computes a descriptor change Delta D for each trial;
  5. it predicts Delta E_pred = w dot Delta D;
  6. it sends the lowest predicted trial to the fast worker.

Prefast does not replace fast or slow relaxation. It does not change final Metropolis acceptance. The slow-worker relaxed energy remains the source of truth.

Basic Usage

paipai \
  --input struc.in \
  --mode search \
  --root search_prefast \
  --device cuda \
  --ngpu 4 \
  --fast 2 \
  --slow 2 \
  --steps 200000 \
  --temp 50 \
  --prefast on \
  --prefast-warmup-steps 1000 \
  --prefast-candidates-per-slot 6 \
  --prefast-diagnostics summary

Descriptor

The default descriptor is:

reference-lattice double-zeta radial basis

It uses fixed reference site geometry:

  • metal-metal pairs: MM
  • metal-interstitial pairs: MI
  • interstitial-interstitial pairs: II

It detects reference distance shells and places two Gaussian functions at each shell center. Empty interstitial sites contribute zero and are not treated as a real element channel.

Important Parameters

Option Meaning
`--prefast on off`
--prefast-candidates-per-slot N Number of trial candidates ranked for each free fast-worker slot after warmup.
--prefast-warmup-steps N Valid MC proposals used for learning before multi-candidate prefast ranking starts.
--prefast-basis ref-dz Reference-lattice double-zeta radial basis.
--prefast-nshells N Number of detected shells per pair family.
--prefast-peak-scan-cutoff X Reference pair cutoff used for shell detection.
--prefast-peak-tol X Distance clustering tolerance.
--prefast-sigma-small X Narrow Gaussian width.
--prefast-sigma-large X Broad Gaussian width.
--prefast-cutoff-margin X Margin after last shell center for cosine cutoff.
--prefast-learning-rate X Normalized-LMS learning rate.
--prefast-lms-epsilon X Denominator stabilizer.
--prefast-weight-decay X Optional weight decay.
`--prefast-diagnostics off summary

Diagnostics

Prefast diagnostic output is controlled by --prefast-diagnostics:

Level Files written
off No prefast diagnostic files.
summary prefast_basis.log and prefast_learning.log.
updates Summary logs plus prefast_weight_updates.log.
full Update logs plus prefast_weights.log.

Use full only when you need the complete learned w vector after every learning step.

Clone this wiki locally