physical-learning-systems
Skill0 starsChanged 3 days agoMITView on GitHub
Learning implemented by a physical substrate: the free and clamped phase loop, local coupled-learning updates in resistor and spring networks, equilibrium propagation and contrastive Hebbian relatives, and memory in disordered matter. Use when the training rule is physics rather than an algorithm.
In this repository55 other files it gives its agents.
- advanced-optimizationSkill
- bayesian-inferenceSkill
- bayesian-pinnSkill
- bayesian-ude-workflowSkill
- catalyst-reactionsSkill
- continuum-mechanics-and-rheologySkill
- control-theorySkill
- creating-julia-appSkill
- debugging-toolkitSkill
- differential-equationsSkill
- differentiationSkill
- equation-discoverySkill
- experiment-trackingSkill
- fem-feaSkill
- julia-graph-neural-networksSkill
- julia-languageSkill
- julia-ml-and-dlSkill
- julia-model-deploymentSkill
- julia-paper-implementationSkill
- julia-pro-helpSkill
- julia-pro-modeSkill
- julia-reinforcement-learningSkill
- modeling-toolkitSkill
- neural-pdeSkill
- nonlinear-dynamicsSkill
- numerical-methods-implementationSkill
- package-development-workflowSkill
- performance-tuningSkill
- playbook-debugSkill
- playbook-model-validateSkill
- playbook-package-releaseSkill
- playbook-paper-implementSkill
- playbook-perfSkill
- playbook-test-specSkill
- principle-both-sidesSkill
- principle-breakingSkill
- principle-file-is-truthSkill
- principle-gateSkill
- principle-limitsSkill
- principle-loud-failureSkill
- principle-one-stepSkill
- principle-proof-listSkill
- principle-rebuttalSkill
- principle-runtime-surfaceSkill
- principle-three-boundsSkill
- principle-three-clocksSkill
- scientific-visualizationSkill
- sciml-and-diffeqSkill
- setup-julia-proSkill
- signal-processingSkill
- simulation-and-hpcSkill
- statistical-physicsSkill
- symbolic-mathSkill
- web-development-juliaSkill
- zarr-cloud-arraysSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Every method in this family runs the same shape:
- Distinctive: line 28
The free-phase error falls across epochs: If it plateaus at the initial level, the two phases are not different enough for the contrast to …
- Distinctive: line 40
Claiming locality while computing a global gradient: If the update reads the loss, it is backpropagation with extra steps.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Physical Learning Systems
Here the thing being trained is the substrate: conductances in a resistor network, stiffnesses in a spring network, disorder in a material. The update must be computable from quantities available at each element, because that is the only thing that makes it physical.
The two-phase loop
Every method in this family runs the same shape:
- Free phase — clamp the inputs, let the network relax, and record the local state of every element.
- Clamped phase — clamp the inputs and nudge the outputs toward the target, relax again, record again.
- Local update — each element changes by a function of its own two phases only.
# resistor network: minimize the output error by local conductance updates
# V_free, V_clamped: node voltages from the two relaxations
for (i, j) in edges
g[i, j] += η * ((V_free[i] - V_free[j])^2 - (V_clamped[i] - V_clamped[j])^2)
endThat single line is the whole claim: the squared voltage drop across an element is the local power, the difference between phases is the teaching signal, and no element ever sees the global error. Coupled learning and equilibrium propagation differ in how the clamped phase is produced (an output clamp versus a soft nudge of magnitude β), and both reduce to contrastive Hebbian learning when the two phases are fully relaxed.
Checks the prototype must pass
- The free-phase error falls across epochs. If it plateaus at the initial level, the two phases are not different enough for the contrast to carry information.
- The update is a descent direction. On a five-element network, compare the local update against a numerically differentiated objective; agreement in sign on every element is the proof that the physical rule optimizes what you think it does.
- A learning-rate sweep.
ηtoo small stalls, too large oscillates as elements overshoot; report the curve, since the usable window is often an order of magnitude wide. - Element bounds. Physical conductances and stiffnesses are positive and saturate. Once many elements sit at a bound, the network has stopped learning and is clipping; count saturated elements per epoch.
- Robustness to disorder and noise, which is the reason to do this physically at all: retrain with 5% element variability and see whether the final error moves less than the variability would suggest.
Memory in disordered matter
A cyclically loaded glass or packing can retain a trace of the training protocol: replay the same amplitude sequence and the response repeats, while a different sequence erases it. Measure this by protocol replay with a control sequence, not by analogy to Hopfield networks. Return-point memory in hysteresis loops and the jamming literature are the same phenomenon at different scales.
Traps
- Claiming locality while computing a global gradient. If the update reads the loss, it is backpropagation with extra steps.
- Comparing free and clamped states at different relaxation times. The contrast is then relaxation error, and the network trains on it.
- No numerical gradient check. A sign error in the update still reduces the error on a small task often enough to look like learning.
- Reporting the final error without the sweep over
η. The result is then a single draw from a wide distribution. - Treating the analogy to energy-based models as a result. Boltzmann machines and physical learning share a contrastive structure; the shared vocabulary is not evidence of shared behaviour.
Done when
Both phases are defined by their boundary conditions and relaxation criterion; every element's update depends only on its own local variables in the two phases; the local update was checked against a numerical gradient on a small network and matched in sign on every element; the error curve, the η sweep, and the count of saturated elements are all reported; and a disorder or noise run shows how much of the final error is substrate variability.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

