Vineetha00 commited on
Commit
33ac086
·
verified ·
1 Parent(s): 0782f5c

Initial release: 3 episodic-memory checkpoints (v1/v2/v4) + model card

Browse files
README.md ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ library_name: pytorch
4
+ tags:
5
+ - state-space-model
6
+ - sparse-attention
7
+ - episodic-memory
8
+ - long-context
9
+ - interpretability
10
+ language:
11
+ - en
12
+ ---
13
+
14
+ # SynapNet — Episodic Memory Checkpoints
15
+
16
+ Hybrid **SSM + sparse-attention + episodic-memory** architecture. This repo holds the base architectural checkpoints; the edge-deployment variants live at [`Vineetha00/synapnet-edge`](https://huggingface.co/Vineetha00/synapnet-edge).
17
+
18
+ 📦 **Code:** https://github.com/vineetha00/SynapNet_Exp
19
+ 🛠️ **Deployment companion:** https://github.com/vineetha00/SynapNet-Edge · 🤗 https://huggingface.co/Vineetha00/synapnet-edge
20
+
21
+ ---
22
+
23
+ ## Checkpoints in this repo
24
+
25
+ | File | Variant | Size | Notes |
26
+ |---|---|---|---|
27
+ | [`synapnet_memory_v4.pt`](synapnet_memory_v4.pt) | Track 3 v4 (current best) | 5.7 MB | Trained with salience supervision λ=0.01; near-perfect episodic recall |
28
+ | [`synapnet_memory_v2.pt`](synapnet_memory_v2.pt) | Track 3 v2 | 6.8 MB | Earlier episodic-recall checkpoint |
29
+ | [`synapnet_memory.pt`](synapnet_memory.pt) | Original episodic memory | 18.2 MB | Initial release of the WriteableMemory variant |
30
+
31
+ ---
32
+
33
+ ## Architecture (Track 3 v4 — recommended)
34
+
35
+ - `SimpleSSM` (depthwise conv, kernel_size=9) for local temporal dynamics
36
+ - `SparseEventAttention` (salience-gated top-K mixing)
37
+ - `WriteableMemory` (top-K hidden states written to a fixed-size bank, read via cross-attention)
38
+ - Gated fusion (α, β) over the three pathways
39
+ - 4 stacked blocks, dim=128, heads=4
40
+
41
+ ---
42
+
43
+ ## Key finding (λ-sweep, 5 seeds, ctx=2048, 32-class recall)
44
+
45
+ A small dose of salience supervision flips episodic recall from chance to near-perfect:
46
+
47
+ | λ (salience-supervision strength) | Accuracy | Write hit-rate (target token written?) |
48
+ |---|---|---|
49
+ | 0.00 | 0.723 ± 0.329 | 0.125 ± 0.109 |
50
+ | **0.01** | **0.968 ± 0.022** | **0.993 ± 0.002** |
51
+ | 0.10 | 0.970 ± 0.021 | 0.995 ± 0.001 |
52
+ | 1.00 | 0.838 ± 0.125 | 0.995 ± 0.002 |
53
+
54
+ The v4 checkpoint was trained at the sweet-spot λ=0.01.
55
+
56
+ ---
57
+
58
+ ## Loading
59
+
60
+ ```python
61
+ import torch
62
+ from huggingface_hub import hf_hub_download
63
+
64
+ # Make sure SynapNet_Exp is on your path:
65
+ # git clone https://github.com/vineetha00/SynapNet_Exp
66
+ # cd SynapNet_Exp
67
+ import sys; sys.path.insert(0, "/path/to/SynapNet_Exp")
68
+
69
+ from synapnet_memory import SynapEpisodicNet
70
+
71
+ ckpt_path = hf_hub_download(
72
+ repo_id="Vineetha00/synapnet",
73
+ filename="synapnet_memory_v4.pt",
74
+ )
75
+ state = torch.load(ckpt_path, map_location="cpu")
76
+
77
+ model = SynapEpisodicNet(
78
+ dim=128, depth=4, vocab_size=2048,
79
+ max_len=2048, num_classes=32, heads=4,
80
+ )
81
+ model.load_state_dict(state)
82
+ model.eval()
83
+ ```
84
+
85
+ ---
86
+
87
+ ## Training tasks (from the companion code)
88
+
89
+ - **Track 1** — LRA-style long-range classification (`train_track1_lra.py`)
90
+ - **Track 2** — biosignal regression / ECG reconstruction (`train_track2_biosignal.py`)
91
+ - **Track 3** — episodic recall (`train_track3_memory_v2/v3/v4.py`)
92
+ - **Track 4** — faithful-salience supervision for interpretability (`train_track4_interpret.py`)
93
+
94
+ ---
95
+
96
+ ## License
97
+
98
+ MIT — see [LICENSE](https://github.com/vineetha00/SynapNet_Exp/blob/main/LICENSE).
99
+
100
+ ## Citation
101
+
102
+ ```bibtex
103
+ @article{synapnet_2026,
104
+ title={SynapNet: Hybrid SSM + Sparse-Attention + Episodic Memory for Long-Range Sequence Modelling},
105
+ author={Vallish Kumar, Vineetha},
106
+ year={2026},
107
+ }
108
+ ```
synapnet_memory.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a92f36229b38ca71df9ef8e86202cd357085df0457901262f5471307c58a5f30
3
+ size 19115405
synapnet_memory_v2.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b74c8a63ea0974d15c45586ef55bafe82f5dd00490b2d0937af02bc26e272f20
3
+ size 7269463
synapnet_memory_v4.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9e548c7f7e2fb48364a33f85d2f8ae597bc6c79edd242103ffe443dbcd4f4d6
3
+ size 6021285