Views
No views yet
| Field | Value |
|---|---|
| Method | Knowledge distillation (teacher-labeled soft targets) |
| Architecture | 3 independent RandomForest classifiers (sklearn) |
| Input features | 12 numeric (EISV means, deltas, accelerations) + 9 shape one-hot |
| Training data | 4,320 teacher-labeled examples (9 shapes x 480 each) |
| Test data | 1,080 held-out examples |
| Formats | sklearn pickle (~22 MB) and zero-dependency JSON (~13 MB) |
| Target hardware | Raspberry Pi 4 (1.5 GHz ARM, 4 GB RAM) |
SINGLE, PAIR, REPETITION, QUESTION, TRIPLE~stillness~, ~warmth~, ~emergence~)PAIR yields two distinct tokens, REPETITION repeats
token-1 twice).| Metric | Student (RF) | Teacher (Qwen2.5-0.5B) | Random Baseline |
|---|---|---|---|
| Coherence | 0.986 | 0.952 | 0.495 |
| Token-1 agreement | 0.688 | -- | -- |
| Pattern agreement | 0.652 | -- | -- |
| Full agreement (all 3 match) | 0.403 | -- | -- |
Why does the student exceed the teacher? The RandomForest decision boundaries naturally cluster predictions toward high-affinity tokens for each trajectory shape. While the student disagrees with the teacher on exact token choices ~30% of the time, the tokens it picks are still coherent -- they belong to the same affinity region of EISV space. The coherence metric rewards any valid expression, not exact match.
exported/ directory contains JSON-serialized forests and a standalone
inference module. No pip packages required.1from student_inference import StudentInference
2
3student = StudentInference("path/to/exported/")
4
5result = student.predict("settled_presence", {
6 "mean_E": 0.7, "mean_I": 0.6, "mean_S": 0.2, "mean_V": 0.05,
7 "dE": 0.0, "dI": 0.0, "dS": 0.0, "dV": 0.0,
8 "d2E": 0.0, "d2I": 0.0, "d2S": 0.0, "d2V": 0.0,
9})
10# result = {"pattern": "SINGLE", "eisv_tokens": ["~stillness~"],
11# "token_1": "~stillness~", "token_2": "none"}json and os from the standard library are used. The inference
module walks each decision tree node-by-node and averages class
probabilities across all trees -- identical to sklearn's predict logic.1import pickle
2import numpy as np
3
4with open("pattern_clf.pkl", "rb") as f:
5 pattern_clf = pickle.load(f)
6with open("scaler.pkl", "rb") as f:
7 scaler = pickle.load(f)
8with open("pattern_encoder.pkl", "rb") as f:
9 pattern_enc = pickle.load(f)
10
11# Build feature vector: 12 numeric features + 9 shape one-hot
12numeric = np.array([[0.7, 0.6, 0.2, 0.05, 0, 0, 0, 0, 0, 0, 0, 0]])
13scaled = scaler.transform(numeric)
14shape_onehot = np.zeros((1, 9)) # index 7 = settled_presence
15shape_onehot[0, 7] = 1.0
16X = np.hstack([scaled, shape_onehot])
17
18pattern_idx = pattern_clf.predict(X)
19pattern = pattern_enc.inverse_transform(pattern_idx)[0]outputs/student_small/
|-- README.md # This file
|-- pattern_clf.pkl # sklearn RandomForest (4.3 MB)
|-- token1_clf.pkl # sklearn RandomForest (8.4 MB)
|-- token2_clf.pkl # sklearn RandomForest (9.8 MB)
|-- scaler.pkl # StandardScaler
|-- pattern_encoder.pkl # LabelEncoder for patterns
|-- token1_encoder.pkl # LabelEncoder for tokens
|-- token2_encoder.pkl # LabelEncoder for tokens+none
|-- shape_encoder.pkl # LabelEncoder for shapes
|-- training_metrics.json # Cross-validation metrics
|-- eval_results.json # Full evaluation results
|-- exported/ # Zero-dependency JSON format
|-- pattern_forest.json # Decision trees as JSON (3.0 MB)
|-- token1_forest.json # Decision trees as JSON (4.5 MB)
|-- token2_forest.json # Decision trees as JSON (5.1 MB)
|-- scaler.json # Scaler parameters (511 B)
|-- mappings.json # Label mappings (1.1 KB)
|-- student_inference.py # Standalone inference (4.9 KB)n_estimators=100, max_depth=None,
random_state=42 (sklearn defaults)StandardScaler,
plus 9-dimensional one-hot encoding of trajectory shape1@misc{eisv-lumen-student-2025,
2 title = {EISV-Lumen Student: Distilled RandomForest for Edge Deployment},
3 author = {hikewa},
4 year = {2025},
5 url = {https://huggingface.co/hikewa/eisv-lumen-student},
6 note = {Knowledge-distilled RandomForest ensemble for EISV expression
7 generation on Raspberry Pi}
8}