Skip to content

Implement Stage 17 hidden layer growth - #18

Merged
aarambh-darshan merged 1 commit into
mainfrom
stage17-layer-growth
Jul 4, 2026
Merged

Implement Stage 17 hidden layer growth#18
aarambh-darshan merged 1 commit into
mainfrom
stage17-layer-growth

Conversation

@aarambh-darshan

Copy link
Copy Markdown
Member

Summary

  • Implement real Stage 17 hidden-layer growth by allowing additional hidden layers before the output layer.
  • Preserve existing bound answer readouts by feeding the output layer from flattened hidden activations.
  • Generalize training, backpropagation, diagnostics, and store validation for deep network topologies.
  • Add Stage 17 CLI integration coverage, deep persistence coverage, and focused core/learn layer-growth tests.
  • Update README, ROADMAP, ARCHITECTURE, CHANGELOG, and regenerated BENCHMARKS for Stage 17 completion.

Implementation details

  • Network forward pass now records per-layer hidden activations and output activations in a cache.
  • Hidden readouts include layer index, neuron index, global hidden index, and neuron id so diagnostics and bound memory remain stable after depth growth.
  • Layer growth inserts a new hidden layer before output, expands downstream input widths, and appends output columns without rewriting older fact columns.
  • Backprop computes deltas and gradients across all hidden layers instead of assuming a two-layer topology.
  • Trainer growth now chooses deepest available hidden capacity or grows a new layer when hidden memory is saturated.
  • Persistence validation now accepts variable hidden depth while preserving the existing file format version.

Verification

  • git diff --check
  • cargo fmt --all -- --check
  • cargo test --workspace
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo build --workspace --release
  • cargo bench -p manas-benches -- --quick
  • cargo bench -p manas-benches -- --write-markdown BENCHMARKS.md
  • bash demo.sh

@aarambh-darshan
aarambh-darshan merged commit 5f148ef into main Jul 4, 2026
1 check passed
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.

1 participant