Crossover Flowchart
Compatibility Check
Before crossover, the two parent genomes must share:- The same base architecture family
- Compatible tensor shapes for all overlapping layers
- At least one common merge method if strategy switching is disabled
Uniform Crossover
Each gene in the offspring genome is selected independently from either parent with equal probability. Genes are:merge_method: categorical, copied from one parentalpha: vector, copied as a whole or blendedper_layer_alpha: map, keys merged, values selected per keydensity: scalar, copied from one parenttask_vectors: list, merged by parent indexlayer_routing: map, keys merged, values selected per keystructural_parameters: copied as a whole from one parentquantization: copied from one parent
One-Point Layer Crossover
A single layer index is chosen as the crossover point. All layer-specific parameters below the point come from Parent A; all at or above come from Parent B. This is meaningful forper_layer_alpha and layer_routing.
For global parameters (alpha, merge_method, density), the offspring receives the full set from Parent A. This operator is most effective when parents have different layer-wise blending strategies.
Crossover point selection is uniform across all layer indices. The point is recorded in the offspring metadata for lineage tracking.
Arithmetic Blend
Scalar and vector fields are blended arithmetically rather than copied:- Alpha is re-normalized to sum to 1.0
- Density is clipped to [0.2, 1.0]
Constraint Enforcement
All offspring must satisfy the same validation rules as mutated genomes:- Alpha sums to 1.0
- Density in valid range
- Layer routing without gaps or overlaps
- Parent models exist and are compatible
- Structural parameters match architecture family
Operator Selection Probabilities
Probabilities are configurable per experiment. The EvolutionEngine may adjust probabilities adaptively based on offspring success rates.
Crossover produces two offspring per pair by default: one with the primary blend and one with the inverse (1 - beta). Both are validated and evaluated independently.