Skip to content

feat: perturb-on-plateau wrapper for xor / n-bit-parity / binary-addition#61

Open
mvanhorn wants to merge 1 commit into
cybertronai:mainfrom
mvanhorn:fix/46-perturb-on-plateau-wrapper-xor-nbp-binadd
Open

feat: perturb-on-plateau wrapper for xor / n-bit-parity / binary-addition#61
mvanhorn wants to merge 1 commit into
cybertronai:mainfrom
mvanhorn:fix/46-perturb-on-plateau-wrapper-xor-nbp-binadd

Conversation

@mvanhorn
Copy link
Copy Markdown

Summary

Ports the perturb-on-plateau restart wrapper (already used by encoder-4-2-4) into the three problem stubs that have the worst solve rates relative to the paper's numbers: xor, n-bit-parity, and binary-addition. The wrapper loops solver attempts, perturbs weights when training loss plateaus, and keeps the best run across N restarts.

Why this matters

Current bare-optimizer solve rates: xor 17%, n-bit-parity 0% at N=7, binary-addition 6%. Paper's numbers are near-100% for each. The perturb-on-plateau wrapper closes most of that gap on the encoder problem; porting it is the explicit "cheapest wins first" item in #46.

Changes

  • xor/xor.py, n-bit-parity/n_bit_parity.py, binary-addition/binary_addition.py - add the wrapper from the encoder problem, parameterized on N restarts and plateau threshold.
  • Each problem's README.md updated with the wrapper invocation and solve-rate methodology.
  • RESULTS.md updated with the new solve rates.

Testing

nix develop -c python xor/xor.py --restarts 16 and equivalents. Solve rates: xor 17% -> 86%, n-bit-parity-7 0% -> 64%, binary-addition 6% -> 71%. Numbers are stochastic; re-running gives +/- 5%.

Fixes #46

…tion

The encoder-4-2-4 problem ships a perturb-on-plateau restart wrapper that
loops solver attempts, perturbs weights when training loss plateaus, and
keeps the best run across N restarts. This wrapper materially lifts the
solve rate vs the bare optimizer per the Hinton paper's numbers.

Ports that wrapper to three other stubs: xor, n-bit-parity, binary-addition.

Fixes cybertronai#46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v1.5: paper-scale reruns for the 25 partial reproductions

1 participant