trioron 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- trioron-0.2.0/LICENSE +21 -0
- trioron-0.2.0/PKG-INFO +246 -0
- trioron-0.2.0/README.md +204 -0
- trioron-0.2.0/experiments/__init__.py +0 -0
- trioron-0.2.0/experiments/bench_50task.py +976 -0
- trioron-0.2.0/experiments/bench_50task_dreaming_act_seeds.py +440 -0
- trioron-0.2.0/experiments/bench_50task_dreaming_open_seeds.py +387 -0
- trioron-0.2.0/experiments/bench_50task_dreaming_seeds.py +322 -0
- trioron-0.2.0/experiments/bench_50task_dreaming_synaptic_seeds.py +468 -0
- trioron-0.2.0/experiments/bench_50task_dreaming_synaptic_sweep.py +558 -0
- trioron-0.2.0/experiments/bench_50task_frustration_seeds.py +388 -0
- trioron-0.2.0/experiments/bench_50task_hat_extra_seeds.py +275 -0
- trioron-0.2.0/experiments/bench_50task_hat_seeds.py +216 -0
- trioron-0.2.0/experiments/bench_50task_online_ewc.py +361 -0
- trioron-0.2.0/experiments/bench_50task_packnet_seeds.py +199 -0
- trioron-0.2.0/experiments/bench_50task_seeds.py +259 -0
- trioron-0.2.0/experiments/bench_archive_n3.py +63 -0
- trioron-0.2.0/experiments/bench_btm_baseline.py +420 -0
- trioron-0.2.0/experiments/bench_chained_15task.py +3712 -0
- trioron-0.2.0/experiments/bench_chained_extend.py +179 -0
- trioron-0.2.0/experiments/bench_harder.py +756 -0
- trioron-0.2.0/experiments/bench_hat_chained_15_n10.py +38 -0
- trioron-0.2.0/experiments/bench_hat_chained_15_n3.py +40 -0
- trioron-0.2.0/experiments/bench_hippo_k50_n10.py +47 -0
- trioron-0.2.0/experiments/bench_lwf_chained_15_n10.py +40 -0
- trioron-0.2.0/experiments/bench_lwf_chained_15_n3.py +47 -0
- trioron-0.2.0/experiments/bench_manifold_ablation.py +69 -0
- trioron-0.2.0/experiments/bench_manifold_replay_n10.py +49 -0
- trioron-0.2.0/experiments/bench_manifold_replay_n3.py +51 -0
- trioron-0.2.0/experiments/bench_online_ewc_chained_15_n10.py +39 -0
- trioron-0.2.0/experiments/bench_online_ewc_chained_15_n3.py +41 -0
- trioron-0.2.0/experiments/bench_packnet.py +567 -0
- trioron-0.2.0/experiments/bench_packnet_chained_15_n10.py +39 -0
- trioron-0.2.0/experiments/bench_packnet_chained_15_n3.py +42 -0
- trioron-0.2.0/experiments/bench_saturation_curve.py +205 -0
- trioron-0.2.0/experiments/bench_split_mnist.py +533 -0
- trioron-0.2.0/experiments/bench_step8.py +758 -0
- trioron-0.2.0/experiments/build_pareto_table.py +191 -0
- trioron-0.2.0/experiments/ceiling_demo.py +236 -0
- trioron-0.2.0/experiments/committee_eval.py +371 -0
- trioron-0.2.0/experiments/continual_2task.py +196 -0
- trioron-0.2.0/experiments/datasets.py +1002 -0
- trioron-0.2.0/experiments/division_demo.py +369 -0
- trioron-0.2.0/experiments/dream_cycle_calibration.py +284 -0
- trioron-0.2.0/experiments/exp3_cross_seed_absorption.py +606 -0
- trioron-0.2.0/experiments/incubation_capacity_sweep.py +171 -0
- trioron-0.2.0/experiments/incubation_smoke.py +177 -0
- trioron-0.2.0/experiments/poc_dual_organism.py +220 -0
- trioron-0.2.0/experiments/probe_archive_dryrun.py +63 -0
- trioron-0.2.0/experiments/probe_engram_diversity.py +381 -0
- trioron-0.2.0/experiments/probe_engram_real_seed.py +207 -0
- trioron-0.2.0/experiments/probe_fisher_chained_15.py +333 -0
- trioron-0.2.0/experiments/probe_hat.py +40 -0
- trioron-0.2.0/experiments/probe_injection_gradient.py +195 -0
- trioron-0.2.0/experiments/probe_injection_mechanism.py +289 -0
- trioron-0.2.0/experiments/probe_l0_class_prototypes.py +218 -0
- trioron-0.2.0/experiments/probe_manifold_replay.py +60 -0
- trioron-0.2.0/experiments/probe_packnet.py +42 -0
- trioron-0.2.0/experiments/probe_random_projection_fusion.py +121 -0
- trioron-0.2.0/experiments/probe_synthetic_pseudo_rehearsal.py +64 -0
- trioron-0.2.0/experiments/pruning_demo.py +231 -0
- trioron-0.2.0/experiments/seed_population_report.py +95 -0
- trioron-0.2.0/experiments/test_multibranch_absorption.py +335 -0
- trioron-0.2.0/experiments/train_donor.py +200 -0
- trioron-0.2.0/experiments/trigger_demo.py +183 -0
- trioron-0.2.0/pyproject.toml +81 -0
- trioron-0.2.0/setup.cfg +4 -0
- trioron-0.2.0/trioron/__init__.py +43 -0
- trioron-0.2.0/trioron/api.py +953 -0
- trioron-0.2.0/trioron/bridge/__init__.py +31 -0
- trioron-0.2.0/trioron/bridge/base.py +92 -0
- trioron-0.2.0/trioron/bridge/encoders/__init__.py +13 -0
- trioron-0.2.0/trioron/bridge/encoders/audio.py +78 -0
- trioron-0.2.0/trioron/bridge/encoders/image.py +91 -0
- trioron-0.2.0/trioron/bridge/encoders/text.py +69 -0
- trioron-0.2.0/trioron/bridge/organism.py +167 -0
- trioron-0.2.0/trioron/bridge/tools.py +208 -0
- trioron-0.2.0/trioron/ceilings.py +436 -0
- trioron-0.2.0/trioron/classification.py +253 -0
- trioron-0.2.0/trioron/cli.py +874 -0
- trioron-0.2.0/trioron/curriculum.py +138 -0
- trioron-0.2.0/trioron/dreaming.py +1415 -0
- trioron-0.2.0/trioron/frustration.py +176 -0
- trioron-0.2.0/trioron/hat.py +367 -0
- trioron-0.2.0/trioron/incubator.py +228 -0
- trioron-0.2.0/trioron/multibranch.py +536 -0
- trioron-0.2.0/trioron/network.py +412 -0
- trioron-0.2.0/trioron/node.py +595 -0
- trioron-0.2.0/trioron/packnet.py +283 -0
- trioron-0.2.0/trioron/pruner.py +248 -0
- trioron-0.2.0/trioron/serve_http.py +89 -0
- trioron-0.2.0/trioron/triggers.py +221 -0
- trioron-0.2.0/trioron.egg-info/PKG-INFO +246 -0
- trioron-0.2.0/trioron.egg-info/SOURCES.txt +96 -0
- trioron-0.2.0/trioron.egg-info/dependency_links.txt +1 -0
- trioron-0.2.0/trioron.egg-info/entry_points.txt +2 -0
- trioron-0.2.0/trioron.egg-info/requires.txt +29 -0
- trioron-0.2.0/trioron.egg-info/top_level.txt +2 -0
trioron-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Marcelinus R Hatorangan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
trioron-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: trioron
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Continual-learning architecture with archive-routed multi-branch absorption
|
|
5
|
+
Author-email: Marcelinus R Hatorangan <marcelinusrocky@aol.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Repository, https://github.com/marcrockhat/trioron-project
|
|
8
|
+
Keywords: continual-learning,neural-networks,modular-deep-learning,edge-ai,trioron
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
15
|
+
Requires-Python: >=3.9
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: torch<3.0,>=2.0
|
|
19
|
+
Requires-Dist: numpy>=1.24
|
|
20
|
+
Requires-Dist: torchvision>=0.15
|
|
21
|
+
Provides-Extra: bridge-text
|
|
22
|
+
Requires-Dist: sentence-transformers>=2.2; extra == "bridge-text"
|
|
23
|
+
Provides-Extra: bridge-image
|
|
24
|
+
Requires-Dist: open-clip-torch>=2.20; extra == "bridge-image"
|
|
25
|
+
Requires-Dist: Pillow>=10.0; extra == "bridge-image"
|
|
26
|
+
Provides-Extra: bridge-audio
|
|
27
|
+
Requires-Dist: openai-whisper>=20231117; extra == "bridge-audio"
|
|
28
|
+
Provides-Extra: bridge-all
|
|
29
|
+
Requires-Dist: sentence-transformers>=2.2; extra == "bridge-all"
|
|
30
|
+
Requires-Dist: open-clip-torch>=2.20; extra == "bridge-all"
|
|
31
|
+
Requires-Dist: Pillow>=10.0; extra == "bridge-all"
|
|
32
|
+
Requires-Dist: openai-whisper>=20231117; extra == "bridge-all"
|
|
33
|
+
Provides-Extra: serve
|
|
34
|
+
Requires-Dist: fastapi>=0.110; extra == "serve"
|
|
35
|
+
Requires-Dist: uvicorn[standard]>=0.27; extra == "serve"
|
|
36
|
+
Requires-Dist: pydantic>=2.0; extra == "serve"
|
|
37
|
+
Provides-Extra: dev
|
|
38
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
39
|
+
Requires-Dist: build>=1.0; extra == "dev"
|
|
40
|
+
Requires-Dist: twine>=4.0; extra == "dev"
|
|
41
|
+
Dynamic: license-file
|
|
42
|
+
|
|
43
|
+
# Trioron — an epigenetic-inspired self-expanding architecture
|
|
44
|
+
|
|
45
|
+
A continual-learning architecture built around the **trioron**: a node with three coupled state variables (weight, plasticity coefficient, utility) that grows, prunes, and consolidates under a per-curriculum byte budget. Designed for resource-conscious deployment on agentic-AI / IoT / embedded hardware.
|
|
46
|
+
|
|
47
|
+
The full design is in `trioron_blueprint.md`. The paper draft is in `paper/`.
|
|
48
|
+
|
|
49
|
+
- **Want a 5-min reproduction of the paper headline?** → [QUICKSTART.md](QUICKSTART.md)
|
|
50
|
+
- **Want to build your own trioron network and deploy it as an agent?** → [MANUAL.md](MANUAL.md)
|
|
51
|
+
- **Just the cross-modal bridge / encoders?** → [BRIDGE.md](BRIDGE.md)
|
|
52
|
+
- **Want a visual walk-through of the mechanisms?** → [tour/](tour/) — a static
|
|
53
|
+
Canvas petri-dish demo, thirteen chapters with one knob each. Live at
|
|
54
|
+
<https://marcrockhat.github.io/trioron-project/tour/>.
|
|
55
|
+
- **Want an example of what it can do?** → Check out <https://huggingface.co/spaces/Marcrockhat/trioron-demo>.
|
|
56
|
+
|
|
57
|
+
## Headline
|
|
58
|
+
|
|
59
|
+
On a 30-class class-incremental curriculum (chained-15: MNIST → Fashion-MNIST → EMNIST-letters), with growth + dreaming + manifold replay enabled:
|
|
60
|
+
|
|
61
|
+
- **0.601 ± 0.008 full-softmax / 0.677 ± 0.007 domain-aware / 0.961 ± 0.001 task-aware** at 30 KB of replay storage (n = 10 seeds, paired).
|
|
62
|
+
- σ-confident wins over PackNet, HAT, Online EWC, and LwF + EWC on full-softmax and domain-aware (+10σ to +28σ paired). Matches a K = 50 hippocampal exemplar buffer within 0.04 absolute full-softmax at 1/25th the storage.
|
|
63
|
+
- BF16 + int8 dream-archive: **157 KB total deployment** (network + manifold buffer), Δ ≤ 0.0008 lossless.
|
|
64
|
+
- Ship-wake-extend loop validated end-to-end at 23 tasks / 38 classes, **168 KB total**, original tasks preserved at task-aware ≥ 0.93.
|
|
65
|
+
- Multi-branch absorption: zero-shot composition of independently-trained donors via a 4-byte L0 handshake (R · S factorization), lossless on task-aware out to N = 5 donors.
|
|
66
|
+
|
|
67
|
+
Method and result details: `paper/paper.pdf` (built from `paper/paper.tex`).
|
|
68
|
+
|
|
69
|
+
## Quick install (use as a library)
|
|
70
|
+
|
|
71
|
+
Until the PyPI release lands, install straight from GitHub:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
pip install git+https://github.com/marcrockhat/trioron-project.git
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Build your first donor:
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
from trioron.api import TaskData, TrioronConfig, build_donor
|
|
81
|
+
|
|
82
|
+
tasks = [
|
|
83
|
+
TaskData(
|
|
84
|
+
name="cats_vs_dogs",
|
|
85
|
+
X_train=Xtr, y_train=ytr, # (N, 784) float32, (N,) int64
|
|
86
|
+
X_test=Xte, y_test=yte,
|
|
87
|
+
classes=[0, 1],
|
|
88
|
+
),
|
|
89
|
+
TaskData(
|
|
90
|
+
name="birds_vs_fish",
|
|
91
|
+
X_train=..., y_train=...,
|
|
92
|
+
X_test=..., y_test=...,
|
|
93
|
+
classes=[2, 3],
|
|
94
|
+
),
|
|
95
|
+
]
|
|
96
|
+
|
|
97
|
+
donor = build_donor(
|
|
98
|
+
label="my_donor",
|
|
99
|
+
tasks=tasks,
|
|
100
|
+
seed=42, # shared L0 seed (paper §3.10)
|
|
101
|
+
config=TrioronConfig(cap_bytes=32_000),
|
|
102
|
+
out_path="my_donor.pt",
|
|
103
|
+
)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Compose donors with `trioron.api.absorb` and deploy with `trioron.api.deploy_agent`; see [MANUAL.md](MANUAL.md) for the full surface and the docstring in `trioron/api.py` for the three supported flows.
|
|
107
|
+
|
|
108
|
+
## Setup (WSL2)
|
|
109
|
+
|
|
110
|
+
The section below is for *reproducing the paper*, not library use. If you only need the API, the quick install above is enough.
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Move into WSL filesystem (NOT /mnt/c — that's slow)
|
|
114
|
+
cd ~/trioron-project
|
|
115
|
+
|
|
116
|
+
# Use a venv
|
|
117
|
+
python3 -m venv .venv
|
|
118
|
+
source .venv/bin/activate
|
|
119
|
+
|
|
120
|
+
# Install
|
|
121
|
+
pip install -r requirements.txt
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Torch CPU wheel is ~750 MB. First install is the slow part.
|
|
125
|
+
|
|
126
|
+
## Run the unit tests
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
python3 test_node.py # TrioronLayer
|
|
130
|
+
python3 test_network.py # TrioronNetwork
|
|
131
|
+
python3 test_classification.py # multi-class head
|
|
132
|
+
python3 test_dreaming.py # dream block (replay/compress/purge/archive)
|
|
133
|
+
python3 test_frustration.py # plateau-counter multiplier
|
|
134
|
+
python3 test_pruner.py
|
|
135
|
+
python3 test_triggers.py # plateau / rank-saturation / grad-stability
|
|
136
|
+
python3 test_incubator.py
|
|
137
|
+
python3 test_ceilings.py # cap_bytes pre-flight
|
|
138
|
+
python3 test_packnet.py
|
|
139
|
+
python3 test_hat.py
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Expected: all PASS, 0 FAIL on each file.
|
|
143
|
+
|
|
144
|
+
## Reproduce the headline results
|
|
145
|
+
|
|
146
|
+
The n = 10 panels driving the paper's headline table run unattended via:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
bash experiments/run_n10_paper.sh
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
This sequentially runs the manifold-replay panel, the five-family competitor sweep (PackNet / HAT / Online EWC / LwF + EWC / hippocampal K = 50), and the dream-archive panel. Individual panels can also be launched directly:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# chained-15 manifold-grown panel, n = 10
|
|
156
|
+
python3 experiments/bench_manifold_replay_n10.py
|
|
157
|
+
|
|
158
|
+
# Competitor sweep on chained-15 (n = 10)
|
|
159
|
+
python3 experiments/bench_packnet_chained_15_n10.py
|
|
160
|
+
python3 experiments/bench_hat_chained_15_n10.py
|
|
161
|
+
python3 experiments/bench_online_ewc_chained_15_n10.py
|
|
162
|
+
python3 experiments/bench_lwf_chained_15_n10.py
|
|
163
|
+
|
|
164
|
+
# Dream-archive Phase 1 + Phase 2 (storage win, n = 3 pending rerun)
|
|
165
|
+
python3 experiments/bench_archive_n3.py
|
|
166
|
+
|
|
167
|
+
# Ship-wake-extend loop (chained-15 → +8 EMNIST K..R)
|
|
168
|
+
python3 experiments/bench_chained_extend.py
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
CSVs and `*_run*.log` files land in `outputs/`. Run logs from every reported panel are committed; CSVs are gitignored.
|
|
172
|
+
|
|
173
|
+
## Layout
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
trioron-project/
|
|
177
|
+
├── README.md # this file
|
|
178
|
+
├── trioron_blueprint.md # full design doc
|
|
179
|
+
├── trioron/ # core modules
|
|
180
|
+
│ ├── api.py # public build_donor / train / extend API
|
|
181
|
+
│ ├── cli.py # command-line entry point
|
|
182
|
+
│ ├── node.py # TrioronLayer (per-node λ, u, r)
|
|
183
|
+
│ ├── network.py # TrioronNetwork (multi-layer, EWC)
|
|
184
|
+
│ ├── classification.py # CE head + grow_class
|
|
185
|
+
│ ├── triggers.py # plateau / rank / grad-stability
|
|
186
|
+
│ ├── pruner.py # cellular pruning (cosine-nearest redistribute)
|
|
187
|
+
│ ├── incubator.py # growth probe
|
|
188
|
+
│ ├── ceilings.py # cap_bytes pre-flight
|
|
189
|
+
│ ├── dreaming.py # replay / compress / purge / archive
|
|
190
|
+
│ ├── frustration.py # plateau multiplier
|
|
191
|
+
│ ├── curriculum.py # chained-15 / chained-23 builders
|
|
192
|
+
│ ├── multibranch.py # multi-branch organism (zero-shot absorption)
|
|
193
|
+
│ ├── composition/ # L0 handshake translator (R · S factorization)
|
|
194
|
+
│ ├── senses/ # sensory-organism / CIFAR-side experiments
|
|
195
|
+
│ ├── bridge/ # cross-modal encoders (see BRIDGE.md)
|
|
196
|
+
│ ├── packnet.py # PackNet competitor
|
|
197
|
+
│ └── hat.py # HAT competitor
|
|
198
|
+
├── experiments/ # bench scripts (CSV + log outputs)
|
|
199
|
+
├── outputs/ # bench CSVs (gitignored) + run logs (committed)
|
|
200
|
+
├── paper/
|
|
201
|
+
│ ├── paper.tex # integrated paper source (compiles with pdflatex)
|
|
202
|
+
│ ├── paper.pdf # built artifact
|
|
203
|
+
│ └── refs.bib # bibliography
|
|
204
|
+
├── tour/ # static Canvas demo (13 scenes); GitHub Pages source
|
|
205
|
+
├── hf_space_build/ # Hugging Face Space deployment build
|
|
206
|
+
└── test_*.py # unit tests
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Status
|
|
210
|
+
|
|
211
|
+
- [x] Step 1: TrioronLayer + tests
|
|
212
|
+
- [x] Step 2: TrioronNetwork + 2-task continual-learning verification
|
|
213
|
+
- [x] Step 3: Scripted incubation environment
|
|
214
|
+
- [x] Step 4: Three-condition growth trigger (plateau / rank / grad-stability)
|
|
215
|
+
- [x] Step 5: Cellular division routine
|
|
216
|
+
- [x] Step 6: Pruning loop
|
|
217
|
+
- [x] Step 7: Hard ceilings (cap_bytes pre-flight)
|
|
218
|
+
- [x] Step 8: Benchmark vs same-param fixed MLP (falsification gate cleared)
|
|
219
|
+
- [x] Phase 4.5: Dreaming phase (replay / compress / purge / archive)
|
|
220
|
+
- [x] Manifold replay (storage-free pseudo-rehearsal)
|
|
221
|
+
- [x] Dream archive (Phase 1 row-lock + Phase 2 int8 quant)
|
|
222
|
+
- [x] BF16 mixed-precision deployment substrate
|
|
223
|
+
- [x] Ship-wake-extend loop (chained-15 → chained-23)
|
|
224
|
+
- [x] Five-family competitor sweep (PackNet / HAT / Online EWC / LwF / hippo) at n = 10
|
|
225
|
+
- [x] Multi-branch absorption + L0 handshake translator (R · S factorization)
|
|
226
|
+
- [x] Tour: 13-scene Canvas demo at <https://marcrockhat.github.io/trioron-project/tour/>
|
|
227
|
+
- [x] Full integrated paper draft (`paper/paper.tex`, 29 pages)
|
|
228
|
+
- [ ] ArXiv submission (pending endorsement)
|
|
229
|
+
- [ ] PyPI release (currently install via `pip install git+https://github.com/marcrockhat/trioron-project.git`)
|
|
230
|
+
- [ ] Deployment script + ready-to-use checkpoint for Orange Pi 5B
|
|
231
|
+
|
|
232
|
+
## Disclosure
|
|
233
|
+
|
|
234
|
+
This work was carried out in collaboration with two personified AI assistants
|
|
235
|
+
in defined supporting roles: **Gemma** (Gemini Pro 3.1, academic-advisory) and
|
|
236
|
+
**Chloe** (Claude Opus 4.7 1M-context, engineering). Human-led problem framing
|
|
237
|
+
and final decision-making; AI-supported implementation, analysis, and writing.
|
|
238
|
+
The human author holds sole responsibility for all claims, methodological
|
|
239
|
+
choices, and interpretations. Per recent editorial guidance
|
|
240
|
+
([Nature 2023](https://www.nature.com/articles/d41586-023-00191-1),
|
|
241
|
+
[WAME 2023](https://wame.org/page3.php?id=106)), AI systems are not listed
|
|
242
|
+
as authors of record.
|
|
243
|
+
|
|
244
|
+
## License
|
|
245
|
+
|
|
246
|
+
[MIT](LICENSE). Copyright © 2026 Marcelinus R Hatorangan.
|
trioron-0.2.0/README.md
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# Trioron — an epigenetic-inspired self-expanding architecture
|
|
2
|
+
|
|
3
|
+
A continual-learning architecture built around the **trioron**: a node with three coupled state variables (weight, plasticity coefficient, utility) that grows, prunes, and consolidates under a per-curriculum byte budget. Designed for resource-conscious deployment on agentic-AI / IoT / embedded hardware.
|
|
4
|
+
|
|
5
|
+
The full design is in `trioron_blueprint.md`. The paper draft is in `paper/`.
|
|
6
|
+
|
|
7
|
+
- **Want a 5-min reproduction of the paper headline?** → [QUICKSTART.md](QUICKSTART.md)
|
|
8
|
+
- **Want to build your own trioron network and deploy it as an agent?** → [MANUAL.md](MANUAL.md)
|
|
9
|
+
- **Just the cross-modal bridge / encoders?** → [BRIDGE.md](BRIDGE.md)
|
|
10
|
+
- **Want a visual walk-through of the mechanisms?** → [tour/](tour/) — a static
|
|
11
|
+
Canvas petri-dish demo, thirteen chapters with one knob each. Live at
|
|
12
|
+
<https://marcrockhat.github.io/trioron-project/tour/>.
|
|
13
|
+
- **Want an example of what it can do?** → Check out <https://huggingface.co/spaces/Marcrockhat/trioron-demo>.
|
|
14
|
+
|
|
15
|
+
## Headline
|
|
16
|
+
|
|
17
|
+
On a 30-class class-incremental curriculum (chained-15: MNIST → Fashion-MNIST → EMNIST-letters), with growth + dreaming + manifold replay enabled:
|
|
18
|
+
|
|
19
|
+
- **0.601 ± 0.008 full-softmax / 0.677 ± 0.007 domain-aware / 0.961 ± 0.001 task-aware** at 30 KB of replay storage (n = 10 seeds, paired).
|
|
20
|
+
- σ-confident wins over PackNet, HAT, Online EWC, and LwF + EWC on full-softmax and domain-aware (+10σ to +28σ paired). Matches a K = 50 hippocampal exemplar buffer within 0.04 absolute full-softmax at 1/25th the storage.
|
|
21
|
+
- BF16 + int8 dream-archive: **157 KB total deployment** (network + manifold buffer), Δ ≤ 0.0008 lossless.
|
|
22
|
+
- Ship-wake-extend loop validated end-to-end at 23 tasks / 38 classes, **168 KB total**, original tasks preserved at task-aware ≥ 0.93.
|
|
23
|
+
- Multi-branch absorption: zero-shot composition of independently-trained donors via a 4-byte L0 handshake (R · S factorization), lossless on task-aware out to N = 5 donors.
|
|
24
|
+
|
|
25
|
+
Method and result details: `paper/paper.pdf` (built from `paper/paper.tex`).
|
|
26
|
+
|
|
27
|
+
## Quick install (use as a library)
|
|
28
|
+
|
|
29
|
+
Until the PyPI release lands, install straight from GitHub:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install git+https://github.com/marcrockhat/trioron-project.git
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Build your first donor:
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
from trioron.api import TaskData, TrioronConfig, build_donor
|
|
39
|
+
|
|
40
|
+
tasks = [
|
|
41
|
+
TaskData(
|
|
42
|
+
name="cats_vs_dogs",
|
|
43
|
+
X_train=Xtr, y_train=ytr, # (N, 784) float32, (N,) int64
|
|
44
|
+
X_test=Xte, y_test=yte,
|
|
45
|
+
classes=[0, 1],
|
|
46
|
+
),
|
|
47
|
+
TaskData(
|
|
48
|
+
name="birds_vs_fish",
|
|
49
|
+
X_train=..., y_train=...,
|
|
50
|
+
X_test=..., y_test=...,
|
|
51
|
+
classes=[2, 3],
|
|
52
|
+
),
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
donor = build_donor(
|
|
56
|
+
label="my_donor",
|
|
57
|
+
tasks=tasks,
|
|
58
|
+
seed=42, # shared L0 seed (paper §3.10)
|
|
59
|
+
config=TrioronConfig(cap_bytes=32_000),
|
|
60
|
+
out_path="my_donor.pt",
|
|
61
|
+
)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Compose donors with `trioron.api.absorb` and deploy with `trioron.api.deploy_agent`; see [MANUAL.md](MANUAL.md) for the full surface and the docstring in `trioron/api.py` for the three supported flows.
|
|
65
|
+
|
|
66
|
+
## Setup (WSL2)
|
|
67
|
+
|
|
68
|
+
The section below is for *reproducing the paper*, not library use. If you only need the API, the quick install above is enough.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Move into WSL filesystem (NOT /mnt/c — that's slow)
|
|
72
|
+
cd ~/trioron-project
|
|
73
|
+
|
|
74
|
+
# Use a venv
|
|
75
|
+
python3 -m venv .venv
|
|
76
|
+
source .venv/bin/activate
|
|
77
|
+
|
|
78
|
+
# Install
|
|
79
|
+
pip install -r requirements.txt
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Torch CPU wheel is ~750 MB. First install is the slow part.
|
|
83
|
+
|
|
84
|
+
## Run the unit tests
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
python3 test_node.py # TrioronLayer
|
|
88
|
+
python3 test_network.py # TrioronNetwork
|
|
89
|
+
python3 test_classification.py # multi-class head
|
|
90
|
+
python3 test_dreaming.py # dream block (replay/compress/purge/archive)
|
|
91
|
+
python3 test_frustration.py # plateau-counter multiplier
|
|
92
|
+
python3 test_pruner.py
|
|
93
|
+
python3 test_triggers.py # plateau / rank-saturation / grad-stability
|
|
94
|
+
python3 test_incubator.py
|
|
95
|
+
python3 test_ceilings.py # cap_bytes pre-flight
|
|
96
|
+
python3 test_packnet.py
|
|
97
|
+
python3 test_hat.py
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Expected: all PASS, 0 FAIL on each file.
|
|
101
|
+
|
|
102
|
+
## Reproduce the headline results
|
|
103
|
+
|
|
104
|
+
The n = 10 panels driving the paper's headline table run unattended via:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
bash experiments/run_n10_paper.sh
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
This sequentially runs the manifold-replay panel, the five-family competitor sweep (PackNet / HAT / Online EWC / LwF + EWC / hippocampal K = 50), and the dream-archive panel. Individual panels can also be launched directly:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# chained-15 manifold-grown panel, n = 10
|
|
114
|
+
python3 experiments/bench_manifold_replay_n10.py
|
|
115
|
+
|
|
116
|
+
# Competitor sweep on chained-15 (n = 10)
|
|
117
|
+
python3 experiments/bench_packnet_chained_15_n10.py
|
|
118
|
+
python3 experiments/bench_hat_chained_15_n10.py
|
|
119
|
+
python3 experiments/bench_online_ewc_chained_15_n10.py
|
|
120
|
+
python3 experiments/bench_lwf_chained_15_n10.py
|
|
121
|
+
|
|
122
|
+
# Dream-archive Phase 1 + Phase 2 (storage win, n = 3 pending rerun)
|
|
123
|
+
python3 experiments/bench_archive_n3.py
|
|
124
|
+
|
|
125
|
+
# Ship-wake-extend loop (chained-15 → +8 EMNIST K..R)
|
|
126
|
+
python3 experiments/bench_chained_extend.py
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
CSVs and `*_run*.log` files land in `outputs/`. Run logs from every reported panel are committed; CSVs are gitignored.
|
|
130
|
+
|
|
131
|
+
## Layout
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
trioron-project/
|
|
135
|
+
├── README.md # this file
|
|
136
|
+
├── trioron_blueprint.md # full design doc
|
|
137
|
+
├── trioron/ # core modules
|
|
138
|
+
│ ├── api.py # public build_donor / train / extend API
|
|
139
|
+
│ ├── cli.py # command-line entry point
|
|
140
|
+
│ ├── node.py # TrioronLayer (per-node λ, u, r)
|
|
141
|
+
│ ├── network.py # TrioronNetwork (multi-layer, EWC)
|
|
142
|
+
│ ├── classification.py # CE head + grow_class
|
|
143
|
+
│ ├── triggers.py # plateau / rank / grad-stability
|
|
144
|
+
│ ├── pruner.py # cellular pruning (cosine-nearest redistribute)
|
|
145
|
+
│ ├── incubator.py # growth probe
|
|
146
|
+
│ ├── ceilings.py # cap_bytes pre-flight
|
|
147
|
+
│ ├── dreaming.py # replay / compress / purge / archive
|
|
148
|
+
│ ├── frustration.py # plateau multiplier
|
|
149
|
+
│ ├── curriculum.py # chained-15 / chained-23 builders
|
|
150
|
+
│ ├── multibranch.py # multi-branch organism (zero-shot absorption)
|
|
151
|
+
│ ├── composition/ # L0 handshake translator (R · S factorization)
|
|
152
|
+
│ ├── senses/ # sensory-organism / CIFAR-side experiments
|
|
153
|
+
│ ├── bridge/ # cross-modal encoders (see BRIDGE.md)
|
|
154
|
+
│ ├── packnet.py # PackNet competitor
|
|
155
|
+
│ └── hat.py # HAT competitor
|
|
156
|
+
├── experiments/ # bench scripts (CSV + log outputs)
|
|
157
|
+
├── outputs/ # bench CSVs (gitignored) + run logs (committed)
|
|
158
|
+
├── paper/
|
|
159
|
+
│ ├── paper.tex # integrated paper source (compiles with pdflatex)
|
|
160
|
+
│ ├── paper.pdf # built artifact
|
|
161
|
+
│ └── refs.bib # bibliography
|
|
162
|
+
├── tour/ # static Canvas demo (13 scenes); GitHub Pages source
|
|
163
|
+
├── hf_space_build/ # Hugging Face Space deployment build
|
|
164
|
+
└── test_*.py # unit tests
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Status
|
|
168
|
+
|
|
169
|
+
- [x] Step 1: TrioronLayer + tests
|
|
170
|
+
- [x] Step 2: TrioronNetwork + 2-task continual-learning verification
|
|
171
|
+
- [x] Step 3: Scripted incubation environment
|
|
172
|
+
- [x] Step 4: Three-condition growth trigger (plateau / rank / grad-stability)
|
|
173
|
+
- [x] Step 5: Cellular division routine
|
|
174
|
+
- [x] Step 6: Pruning loop
|
|
175
|
+
- [x] Step 7: Hard ceilings (cap_bytes pre-flight)
|
|
176
|
+
- [x] Step 8: Benchmark vs same-param fixed MLP (falsification gate cleared)
|
|
177
|
+
- [x] Phase 4.5: Dreaming phase (replay / compress / purge / archive)
|
|
178
|
+
- [x] Manifold replay (storage-free pseudo-rehearsal)
|
|
179
|
+
- [x] Dream archive (Phase 1 row-lock + Phase 2 int8 quant)
|
|
180
|
+
- [x] BF16 mixed-precision deployment substrate
|
|
181
|
+
- [x] Ship-wake-extend loop (chained-15 → chained-23)
|
|
182
|
+
- [x] Five-family competitor sweep (PackNet / HAT / Online EWC / LwF / hippo) at n = 10
|
|
183
|
+
- [x] Multi-branch absorption + L0 handshake translator (R · S factorization)
|
|
184
|
+
- [x] Tour: 13-scene Canvas demo at <https://marcrockhat.github.io/trioron-project/tour/>
|
|
185
|
+
- [x] Full integrated paper draft (`paper/paper.tex`, 29 pages)
|
|
186
|
+
- [ ] ArXiv submission (pending endorsement)
|
|
187
|
+
- [ ] PyPI release (currently install via `pip install git+https://github.com/marcrockhat/trioron-project.git`)
|
|
188
|
+
- [ ] Deployment script + ready-to-use checkpoint for Orange Pi 5B
|
|
189
|
+
|
|
190
|
+
## Disclosure
|
|
191
|
+
|
|
192
|
+
This work was carried out in collaboration with two personified AI assistants
|
|
193
|
+
in defined supporting roles: **Gemma** (Gemini Pro 3.1, academic-advisory) and
|
|
194
|
+
**Chloe** (Claude Opus 4.7 1M-context, engineering). Human-led problem framing
|
|
195
|
+
and final decision-making; AI-supported implementation, analysis, and writing.
|
|
196
|
+
The human author holds sole responsibility for all claims, methodological
|
|
197
|
+
choices, and interpretations. Per recent editorial guidance
|
|
198
|
+
([Nature 2023](https://www.nature.com/articles/d41586-023-00191-1),
|
|
199
|
+
[WAME 2023](https://wame.org/page3.php?id=106)), AI systems are not listed
|
|
200
|
+
as authors of record.
|
|
201
|
+
|
|
202
|
+
## License
|
|
203
|
+
|
|
204
|
+
[MIT](LICENSE). Copyright © 2026 Marcelinus R Hatorangan.
|
|
File without changes
|