Skip to content

Latest commit

 

History

History
66 lines (53 loc) · 7.65 KB

README.md

File metadata and controls

66 lines (53 loc) · 7.65 KB

Teaching

This directory is the evolving course for Strange Matter Engine. Every equation, algorithm, chemical representation, and scientific claim used by the project should be explainable from the material recorded here.

The notes are divided into subjects as they might be taught at a university:

  1. Chemistry — molecular structure, atomic and bond properties, and SMILES.
  2. Molecular Standardisation — conservative parsing, fragment handling, charge, stereochemistry, canonical identity, and provenance.
  3. Pharmacology — CYP inhibition, concentration–response measurements, IC50, and pIC50.
  4. Graph Theory — molecules as graphs, neighbourhoods, and graph representations.
  5. Emergence — cellular automata, local rules, and collective behaviour.
  6. Dynamics — trajectories, convergence, attractors, oscillations, and perturbations.
  7. Hybrid Atom-State Channels — fixed chemical and bond information alongside evolving dynamical channels.
  8. Differentiable Dynamical Fingerprint — the accepted 40-component trajectory representation used during training.
  9. Machine Learning — overview of loss, the two learned components, and model training.
  10. Backpropagation — derivatives, the chain rule, backpropagation through the graph CA, and learning the shared rule θ.
  11. Ridge Regression — regularised linear regression, differentiable linear solves, and the pIC50 readout β.
  12. End-to-End Joint Training — how query loss differentiates through a support-fitted ridge solve to teach the CA.
  13. Optimisation, Adam, and Learning Rates — Adam updates for the CA while ridge coefficients are solved exactly at each fitting boundary.
  14. Regularisation and Parameter Shrinkage — separate L2 control of the readout and graph CA.
  15. Mini-Batching Molecular Graphs — molecule-centred batches, four CYP contexts, variable graph sizes, and missing-label masks.
  16. Gradient Clipping — exploding gradients, global norm clipping, Adam, and recurrent graph-CA stability diagnostics.
  17. Loss Functions and Assay Uncertainty — unweighted MSE, pIC50 residuals, missing labels, reported uncertainty, and robust alternatives.
  18. Hyperparameter Search — reproducible random search, promotion, multi-seed confirmation, and selection rules.
  19. Early Stopping and Refitting — checkpoint selection, patience, protected outer tests, and fixed-duration refitting.
  20. Validation and Statistics — generalisation, data splitting, baselines, and honest evaluation.
  21. Grouped Nested Cross-Validation — molecular and scaffold grouping, nested model selection, leakage prevention, and production evaluation.
  22. Scientific Visualisation — making the model's real dynamics visible and interpretable.
  23. Trajectory Visualisation and PyMOL — multi-state molecular animation, display B values, 3D viewing conformers, and the hydrogen visual coda.
  24. Inertial Reaction–Diffusion Graph CA — momentum, graph diffusion, restoring forces, nonlinear reactions, and the dynamics observed in prototype two.
  25. Graph CA Transition Rules — all ten candidate update rules, their implementation-level mathematics, and the mandatory fair-tuning policy.
  26. Rule 1: Gated Residual CA — messages, candidate states, gates, residual updates, and worked calculations.
  27. Rule 2: Inertial Reaction–Diffusion CA — velocity, diffusion, restoration, damping, and worked calculations.
  28. Rule 3: Activator–Inhibitor CA — excitation, inhibition, nullclines, waves, and limit cycles.
  29. Rule 4: Coupled-Map CA — nonlinear maps, coupling, bifurcations, synchronisation, and Lyapunov analysis.
  30. Rule 5: Damped Symplectic CA — latent coordinates, momentum, potentials, energy, and oscillatory modes.
  31. Rule 6: FitzHugh–Nagumo CA — excitation, recovery, refractory behaviour, and graph diffusion.
  32. Rule 7: Gray–Scott CA — two-field reaction–diffusion, feed, removal, and molecular-graph pattern formation.
  33. Rule 8: Kuramoto–Sakaguchi CA — circular phase, natural frequency, phase lag, and bonded synchronisation.
  34. Rule 9: Conservative Graph-Flux CA — antisymmetric bond flux and exact latent-channel conservation.
  35. Rule 10: Delayed-Memory CA — explicit state delay, feedback, damping, oscillation, and long transients.

Current production architecture: DS-GCAE

The current direct-inhibition model is the Dual-Scale Graph Cellular Automata Ensemble (DS-GCAE v1). It retains the same scientific unit throughout: atoms are cells, bonds define neighbourhoods, a shared local transition rule evolves atom states for multiple generations, multitime trajectory statistics form the molecular fingerprint, and a differentiable closed-form ridge layer maps that fingerprint and CYP context to pIC50.

Five complementary rules are retained as ensemble members: gated residual, delayed memory, inertial reaction diffusion, Kuramoto-Sakaguchi, and FitzHugh-Nagumo. The original scale uses one trained seed per rule and equal weights. The multiscale component averages three independently trained seeds per rule and then applies validation-selected rule weights. A final scalar blend combines 42.5% of the original component with 57.5% of the multiscale component. Ensemble averaging occurs only after every member has completed its own bonded-graph cellular-automata trajectory and ridge prediction, so the ensemble does not replace or bypass the CA dynamics.

The current validation result is point MA-ST-RAE 0.7842, bootstrap mean 0.7850 with a 95% interval from 0.7464 to 0.8274, and RMSE 0.8678 pIC50. The blinded submission contains predictions only. Its labels were never loaded, and its 750 molecules did not participate in training, hyperparameter selection, seed selection, ensemble weighting, or trajectory-regime selection.

Learning rule

Nothing enters the final model merely because it is conventional or available in a software library. Before a component is adopted, we will understand:

  • what problem it solves;
  • what every input, output, parameter, and mathematical term means;
  • how it transforms information;
  • what assumptions it makes;
  • how it can fail; and
  • how we will test whether it helps.

These documents will grow alongside the implementation. They are teaching notes, design records, and a defence against accidental black-box modelling.

Visual laboratory

The interactive notebook course turns these subjects into code-hidden visual experiments using the 12-molecule development set. Static, code-hidden exports are retained in the rendered teaching laboratory.