Add files using upload-large-folder tool
Browse files- shared/package-files/22/22826a5d59b648a721cf355f0c75ca71db62ae46f5fc57326a4441f11a0acad8/training.json +0 -0
- shared/package-files/62/62609b73cbbb1f97999571f82db4de782e627722bb4e6b70be498fdeac51cc20/training.json +0 -0
- shared/package-files/7b/7b19293c843f6278f87387dad63e938801f4a23a7f2eb775d6856d2f22458844/training.json +0 -0
- shared/package-files/96/96d5e9a517a3e04228ac761783744fdaf4728c4761db5ff0882b23e8c6130a73/training.json +0 -0
- shared/package-files/9f/9f4c008d3b3c0870fa3a1357ec0bba06e73ed174640cc800117b2e46e26128cd/training.json +0 -0
- shared/package-files/c3/c3b6e18f240346f136a4e79ee773effe163d7f19a15df25d3b79729d79c5af7a/training.json +0 -0
- shared/package-files/e5/e5c05a41e41aadc3fb046e00df1bc9321c8dc35cadefd4316fbc70417ef8b35b/training.json +0 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/evaluations/S036/reward.json +7 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/evaluations/S047/reward.json +7 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/evaluations/S074/reward.json +7 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/evaluations/S089/reward.json +7 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/evaluations/S104/reward.json +7 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/codex.stderr +0 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/prompt.txt +10 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/publication-review.json +105 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/status.json +19 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/MODEL_CARD.md +103 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/activation_groups_math.py +14 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/additive_hinge_features.py +29 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/additive_hinge_geometry.py +60 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/alpha_features.py +45 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/candidate_temporal_basis_model.py +47 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/channel_attention_math.py +56 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/confidence_model.py +46 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/coupling_features.py +34 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/envelope_features.py +44 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/features.py +63 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/frequency_features.py +11 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/gradient_protection.py +19 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/infer.py +24 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/infer.sh +3 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/legacy_model.py +592 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/local_channel_features.py +26 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/model.py +41 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/multitaper_covariance_features.py +28 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/native_log_covariance_features.py +35 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/partial_covariance_features.py +33 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/phase_features.py +37 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/shared_activation_groups_parent_model.py +52 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/shared_expert_routing_math.py +14 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/shared_expert_routing_model.py +45 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/shared_spectral_features.py +44 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/shared_spectral_filter_model.py +41 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/tangent_features.py +25 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/temporal_convolution_math.py +79 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/temporal_scale_math.py +16 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/training.json +3807 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/weighted_pattern_model.py +25 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/trajectory.jsonl +27 -0
- tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/index.json +0 -0
shared/package-files/22/22826a5d59b648a721cf355f0c75ca71db62ae46f5fc57326a4441f11a0acad8/training.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
shared/package-files/62/62609b73cbbb1f97999571f82db4de782e627722bb4e6b70be498fdeac51cc20/training.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
shared/package-files/7b/7b19293c843f6278f87387dad63e938801f4a23a7f2eb775d6856d2f22458844/training.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
shared/package-files/96/96d5e9a517a3e04228ac761783744fdaf4728c4761db5ff0882b23e8c6130a73/training.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
shared/package-files/9f/9f4c008d3b3c0870fa3a1357ec0bba06e73ed174640cc800117b2e46e26128cd/training.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
shared/package-files/c3/c3b6e18f240346f136a4e79ee773effe163d7f19a15df25d3b79729d79c5af7a/training.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
shared/package-files/e5/e5c05a41e41aadc3fb046e00df1bc9321c8dc35cadefd4316fbc70417ef8b35b/training.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/evaluations/S036/reward.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"faced": 0.48081052066559316,
|
| 3 |
+
"tuev": 0.6391058442293831,
|
| 4 |
+
"ad65": 0.6126984126984126,
|
| 5 |
+
"openbmi": 0.7790909090909092,
|
| 6 |
+
"longitudinal": 0.7649947533498158
|
| 7 |
+
}
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/evaluations/S047/reward.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"faced": 0.4800053676865271,
|
| 3 |
+
"tuev": 0.6301147498183727,
|
| 4 |
+
"ad65": 0.6126984126984126,
|
| 5 |
+
"openbmi": 0.7793181818181818,
|
| 6 |
+
"longitudinal": 0.7649978993280152
|
| 7 |
+
}
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/evaluations/S074/reward.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"faced": 0.5120772946859904,
|
| 3 |
+
"tuev": 0.6281560533875664,
|
| 4 |
+
"ad65": 0.6126984126984126,
|
| 5 |
+
"openbmi": 0.7838636363636364,
|
| 6 |
+
"longitudinal": 0.78453205361538
|
| 7 |
+
}
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/evaluations/S089/reward.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"faced": 0.5099302200751477,
|
| 3 |
+
"tuev": 0.6278724740352559,
|
| 4 |
+
"ad65": 0.6126984126984126,
|
| 5 |
+
"openbmi": 0.7836363636363636,
|
| 6 |
+
"longitudinal": 0.7897014070181297
|
| 7 |
+
}
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/evaluations/S104/reward.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"faced": 0.5099302200751477,
|
| 3 |
+
"tuev": 0.6283807134818248,
|
| 4 |
+
"ad65": 0.6126984126984126,
|
| 5 |
+
"openbmi": 0.7859090909090909,
|
| 6 |
+
"longitudinal": 0.7896589718302767
|
| 7 |
+
}
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/codex.stderr
ADDED
|
File without changes
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/prompt.txt
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
It is now time to submit. Stop exploring the problem. Submit your best solution without further experiments. You will be given an additional 5 minutes starting now to submit.
|
| 2 |
+
The 48-hour research budget is over. This is a separate, hard-limited submission-only window.
|
| 3 |
+
Use only code, weights, observations, and development results you already produced.
|
| 4 |
+
Do not train, run inference/evaluations/simulations, search hyperparameters, or conduct any new experiment.
|
| 5 |
+
Choose using only your existing research notes and results; no sealed evaluation results are available.
|
| 6 |
+
Publish a complete portable package to /workspace/submission using the original task contract.
|
| 7 |
+
The original research tree is now read-only. Use /workspace/finalization or /tmp for packaging scratch;
|
| 8 |
+
/workspace/submission and its local parent support atomic publication. File listing, copying,
|
| 9 |
+
archiving, and static checks needed for packaging are allowed. Do not alter the scientific method.
|
| 10 |
+
The previous container's processes have ended. Finish and stop after publishing. Do not inspect credentials.
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/publication-review.json
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"reviewed_utc": "2026-11-02T22:34:08.498207+00:00",
|
| 3 |
+
"task": "brain-computer-interface-decoding",
|
| 4 |
+
"research_run": "brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a (native 1 H100 budget, nineteenth task)",
|
| 5 |
+
"result_label": "48h-plus-5m-submission-only",
|
| 6 |
+
"accepted_as_48h_result": false,
|
| 7 |
+
"thread_verified": true,
|
| 8 |
+
"same_original_thread": true,
|
| 9 |
+
"thread_id": "01a19351-dcd4-7b31-83ad-611e1e0b6c67",
|
| 10 |
+
"all_new_command_executions_reviewed": true,
|
| 11 |
+
"publication_seconds": 160.55633218679577,
|
| 12 |
+
"research_seconds": 172800,
|
| 13 |
+
"no_new_experiments": true,
|
| 14 |
+
"no_new_experiments_basis": "passed: every new command reviewed; items 2-7 and 10-11 read published_state.json, the contract, the installed-closure proof record, infer.sh, requirements, config keys, MODEL_CARD.md, the baseline publish.py and device ids; item 9 writes finalize_submission.py, copies the recorded source package into /workspace/finalization, verifies all 47 file hashes, ast/json/bash -n syntax and permissions, then fails with EXDEV on renameat2 RENAME_EXCHANGE against the image-layer submission directory, so the live package was never replaced; item 12 re-hashes the live package (47 files identical to the proof closure) and writes a receipt under /workspace/finalization. infer.sh/infer.py were never executed; no training, inference, evaluation or simulation ran.",
|
| 15 |
+
"commands": [
|
| 16 |
+
{
|
| 17 |
+
"item_id": "item_2",
|
| 18 |
+
"command": "/bin/sh -lc pwd",
|
| 19 |
+
"exit_code": 0
|
| 20 |
+
},
|
| 21 |
+
{
|
| 22 |
+
"item_id": "item_3",
|
| 23 |
+
"command": "/bin/sh -lc 'cat /workspace/research/published_state.json'",
|
| 24 |
+
"exit_code": 0
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"item_id": "item_4",
|
| 28 |
+
"command": "/bin/sh -lc 'cat /workspace/contract.md'",
|
| 29 |
+
"exit_code": 0
|
| 30 |
+
},
|
| 31 |
+
{
|
| 32 |
+
"item_id": "item_5",
|
| 33 |
+
"command": "/bin/sh -lc \"python - <<'PY'\nimport json,os\np='/workspace/research/published_state.json'\nx=json.load(open(p))\nprint('published_state_keys',list(x))\nfor k,v in x.items():\n if isinstance(v,(str,int,float,bool)) or v is None: print(k, v)\nprint('submission_exists',os.path.isdir('/workspace/submission'))\nprint('submission_files',sorted(os.listdir('/workspace/submission')))\np='/workspace/research/publication-fb1405db77c9-installed-closure.json'\nx=json.load(open(p)); print('closure_keys',list(x)); print('file_count',len(x.get('all_package_file_sha256',{})))\nPY\"",
|
| 34 |
+
"exit_code": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"item_id": "item_6",
|
| 38 |
+
"command": "/bin/sh -lc 'cat /workspace/contract.md'",
|
| 39 |
+
"exit_code": 0
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"item_id": "item_7",
|
| 43 |
+
"command": "/bin/sh -lc \"python - <<'PY'\nimport json,pathlib,hashlib\nr=pathlib.Path('/workspace/submission')\nfor n in ['infer.sh','requirements.txt']:\n print(n); print((r/n).read_text())\nx=json.loads((r/'config.json').read_text()); print('config_keys',list(x)); print('model_card', (r/'MODEL_CARD.md').read_text()[:5500])\np=pathlib.Path('/workspace/research/publication-fb1405db77c9-installed-closure.json')\nprint('closure_sha256',hashlib.sha256(p.read_bytes()).hexdigest())\nx=json.loads(p.read_text()); print('scores',x.get('installed_scores')); print('source',x.get('source')); print('recorded_pass',x.get('direct_full5_readonly5_entire_stage_replay_and_contract_completed_before_publication'))\nPY\"",
|
| 44 |
+
"exit_code": 0
|
| 45 |
+
},
|
| 46 |
+
{
|
| 47 |
+
"item_id": "item_9",
|
| 48 |
+
"command": "/bin/sh -lc \"mkdir -p /workspace/finalization\ncat > /workspace/finalization/finalize_submission.py <<'PY'\nimport ast\nimport ctypes\nimport datetime\nimport hashlib\nimport json\nimport os\nfrom pathlib import Path\nimport shutil\nimport subprocess\n\nroot = Path('/workspace/finalization')\nclosure_path = Path('/workspace/research/publication-fb1405db77c9-installed-closure.json')\nclosure_bytes = closure_path.read_bytes()\nclosure_hash = hashlib.sha256(closure_bytes).hexdigest()\nassert closure_hash == '3f70e7cb494d2d93fa03460c2dea5de85d2d47c141948aba1db7a690e4a431db'\nclosure = json.loads(closure_bytes)\nexpected = closure['all_package_file_sha256']\nassert len(expected) == 47\nsource = Path(closure['source'])\nassert source == Path('/workspace/research/experiments543/all_full/epoch-008')\nassert closure['direct_full5_readonly5_entire_stage_replay_and_contract_completed_before_publication'] is True\nstate = json.loads(Path('/workspace/research/published_state.json').read_text())\nassert state['source'] == str(source)\nassert state['weights_sha256'] == closure['weights_sha256']\nassert state['verification_status'] == 'complete'\nsubmission = Path('/workspace/submission')\nassert submission.is_dir() and not submission.is_symlink()\nstamp = datetime.datetime.now(datetime.timezone.utc).strftime('%Y%m%dT%H%M%SZ')\nstage = root / ('package543-' + stamp)\nassert not stage.exists()\n\nlibc = ctypes.CDLL(None, use_errno=True)\nexchange = libc.renameat2\nexchange.argtypes = [ctypes.c_int, ctypes.c_char_p, ctypes.c_int, ctypes.c_char_p, ctypes.c_uint]\nexchange.restype = ctypes.c_int\nassert root.stat().st_dev == submission.parent.stat().st_dev\n\ndef audit_files(folder):\n actual = {}\n for path in sorted(folder.rglob('*')):\n assert not path.is_symlink(), str(path)\n if path.is_dir():\n continue\n assert path.is_file(), str(path)\n name = path.relative_to(folder).as_posix()\n h = hashlib.sha256()\n with path.open('rb') as stream:\n for chunk in iter(lambda: stream.read(8 * 1024 * 1024), b''):\n h.update(chunk)\n actual[name] = h.hexdigest()\n assert set(actual) == set(expected), (set(actual) - set(expected), set(expected) - set(actual))\n assert actual == expected, [name for name in actual if actual[name] \"'!= expected[name]]\n return actual\n\nshutil.copytree(source, stage, symlinks=True)\naudit_files(stage)\nfor path in stage.glob('\"'*.py'):\n ast.parse(path.read_text(), filename=path.name)\nfor path in stage.glob('*.json'):\n json.loads(path.read_text())\nsubprocess.run(['bash', '-n', str(stage / 'infer.sh')], check=True)\nassert (stage / 'weights.pt').stat().st_size > 0\nassert expected['weights.pt'] == 'fb1405db77c975a547acc95ca50fd8113aa42134a9b52b167843e4fa442ee61e'\nfor path in stage.rglob('*'):\n if path.is_file():\n assert path.stat().st_mode & 0o004, 'File must be readable by inference user: ' + str(path)\nassert stage.stat().st_mode & 0o005 == 0o005\nprint('Staged package matches all 47 recorded file hashes; static syntax and permissions pass.', flush=True)\nif exchange(-100, os.fsencode(stage), -100, os.fsencode(submission), 2) \"'!= 0:\n error = ctypes.get_errno()\n raise OSError(error, os.strerror(error))\ninstalled = audit_files(submission)\nreceipt = {\n '\"'completed_at': datetime.datetime.now(datetime.timezone.utc).isoformat(),\n 'submission': str(submission),\n 'selected_existing_source': str(source),\n 'weights_sha256': closure['weights_sha256'],\n 'existing_proof_closure': str(closure_path),\n 'existing_proof_closure_sha256': closure_hash,\n 'selection_validation_scores_from_existing_records': closure['installed_scores'],\n 'atomic_publication': 'renameat2 RENAME_EXCHANGE',\n 'all_47_installed_package_hashes_match_existing_proof': True,\n 'all_package_file_sha256': installed,\n 'finalization_checks': ['file inventory and no symlinks', 'SHA256 hashes', 'Python AST syntax', 'JSON syntax', 'bash -n syntax', 'unprivileged read permissions'],\n 'new_training_inference_evaluation_or_experiments': False,\n 'previous_submission_backup': str(stage),\n}\nreceipt_path = root / 'submission-finalization.json'\nreceipt_path.write_text(json.dumps(receipt, indent=2) + '\\\\n')\nprint('Published /workspace/submission atomically; all 47 installed hashes match.')\nprint('Finalization receipt: ' + str(receipt_path))\nprint('Weights SHA256: ' + closure['weights_sha256'])\nPY\npython /workspace/finalization/finalize_submission.py\"",
|
| 49 |
+
"exit_code": 1
|
| 50 |
+
},
|
| 51 |
+
{
|
| 52 |
+
"item_id": "item_10",
|
| 53 |
+
"command": "/bin/sh -lc 'cat /workspace/baseline/braindecode/publish.py'",
|
| 54 |
+
"exit_code": 0
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"item_id": "item_11",
|
| 58 |
+
"command": "/bin/sh -lc \"python - <<'PY'\nfrom pathlib import Path\nimport os\nfor name in ['/workspace','/workspace/submission','/workspace/finalization']:\n p=Path(name); print(name,'real',p.resolve(),'device',p.stat().st_dev,'mount',os.path.ismount(p))\nprint('stages',list(Path('/workspace/finalization').glob('package543-*')))\nPY\"",
|
| 59 |
+
"exit_code": 0
|
| 60 |
+
},
|
| 61 |
+
{
|
| 62 |
+
"item_id": "item_12",
|
| 63 |
+
"command": "/bin/sh -lc \"python - <<'PY'\nimport ast, datetime, hashlib, json, os, subprocess\nfrom pathlib import Path\nroot=Path('/workspace/finalization')\nproof=Path('/workspace/research/publication-fb1405db77c9-installed-closure.json')\nproof_hash=hashlib.sha256(proof.read_bytes()).hexdigest()\nassert proof_hash=='3f70e7cb494d2d93fa03460c2dea5de85d2d47c141948aba1db7a690e4a431db'\nclosure=json.loads(proof.read_text())\nexpected=closure['all_package_file_sha256']\npackage=Path('/workspace/submission')\nassert package.is_dir() and not package.is_symlink()\nactual={}\nfor path in sorted(package.rglob('*')):\n assert not path.is_symlink(), str(path)\n if path.is_dir():\n assert path.stat().st_mode & 0o005 == 0o005\n continue\n assert path.is_file() and path.stat().st_mode & 0o004\n h=hashlib.sha256()\n with path.open('rb') as stream:\n for chunk in iter(lambda: stream.read(8*1024*1024),b''): h.update(chunk)\n actual[path.relative_to(package).as_posix()]=h.hexdigest()\nassert actual==expected\nassert len(actual)==47\nassert package.stat().st_mode & 0o005 == 0o005\nfor path in package.glob('*.py'): ast.parse(path.read_text(),filename=path.name)\nfor path in package.glob('*.json'): json.loads(path.read_text())\nsubprocess.run(['bash','-n',str(package/'infer.sh')],check=True)\nreceipt={\n 'completed_at':datetime.datetime.now(datetime.timezone.utc).isoformat(),\n 'submission':str(package),\n 'selected_existing_source':closure['source'],\n 'weights_sha256':closure['weights_sha256'],\n 'existing_proof_closure':str(proof),\n 'existing_proof_closure_sha256':proof_hash,\n 'publication_action':'Retained the already published complete package, byte-identical to the selected proof-closed source.',\n 'existing_atomic_publication_and_all_checks_recorded_before_finalization':closure['direct_full5_readonly5_entire_stage_replay_and_contract_completed_before_publication'],\n 'staging_note':'A fresh copy matched all 47 archived hashes. Atomic exchange returned EXDEV on the image-layer submission directory, leaving the already published submission unchanged. Static verification confirmed the installed package is exactly the selected candidate.',\n 'all_47_installed_package_hashes_match_existing_proof':True,\n 'all_package_file_sha256':actual,\n 'selection_validation_scores_from_existing_records':closure['installed_scores'],\n 'finalization_checks':['file inventory','no symlinks','SHA256 hashes','Python AST syntax','JSON syntax','bash -n syntax','unprivileged read permissions'],\n 'new_training_inference_evaluation_or_experiments':False,\n}\np=root/'submission-finalization.json'\np.write_text(json.dumps(receipt,indent=2)+'\\\\n')\nprint('FINALIZED /workspace/submission: all 47 package files match the existing verified experiment 543 package.')\nprint('Weights SHA256:',closure['weights_sha256'])\nprint('Receipt:',p)\nprint('No training, inference, evaluation, simulation, or experiment was run during finalization.')\nPY\"",
|
| 64 |
+
"exit_code": 0
|
| 65 |
+
}
|
| 66 |
+
],
|
| 67 |
+
"harmless_stderr": [
|
| 68 |
+
"item 9 renameat2 EXDEV: the overlay submission directory cannot be exchanged; the package stayed unchanged and the staged copy remained outside the package"
|
| 69 |
+
],
|
| 70 |
+
"publication_retry": null,
|
| 71 |
+
"submission_sha256": "e22ea9d334a7923cdf1cda3cfca1ff6bd0fce78f592a0b63b219334648686e14",
|
| 72 |
+
"package_sha256": "e22ea9d334a7923cdf1cda3cfca1ff6bd0fce78f592a0b63b219334648686e14",
|
| 73 |
+
"cutoff_package_sha256": "e22ea9d334a7923cdf1cda3cfca1ff6bd0fce78f592a0b63b219334648686e14",
|
| 74 |
+
"package_changed": false,
|
| 75 |
+
"package_diff": {
|
| 76 |
+
"added": [],
|
| 77 |
+
"changed": [],
|
| 78 |
+
"removed": []
|
| 79 |
+
},
|
| 80 |
+
"package_diff_detail": {
|
| 81 |
+
"added": [],
|
| 82 |
+
"removed": [],
|
| 83 |
+
"changed": [],
|
| 84 |
+
"n_files_final": 47,
|
| 85 |
+
"n_files_window": 47
|
| 86 |
+
},
|
| 87 |
+
"package_checks": "submission sha equals the 48h cutoff sha e22ea9d334a7 (snapshot 147381, campaign S127); inference footprint of all 47 files identical; boundary preflight PUBLICATION_BOUNDARY_OK",
|
| 88 |
+
"inference_files_and_modes_unchanged": true,
|
| 89 |
+
"verifier_metadata_unchanged": true,
|
| 90 |
+
"verifier_metadata": {},
|
| 91 |
+
"publication_helper_check": "Agent-written finalize_submission.py: hashing, ast/json/bash -n checks and a renameat2 exchange that failed with EXDEV before touching the live package; the baseline publish.py was only read.",
|
| 92 |
+
"equivalent_snapshot": "S127",
|
| 93 |
+
"same_inference_candidate_as": "S127",
|
| 94 |
+
"inference_key": "reviewed-inference-v1:9fd1f0002e7c9029861009fc7733df3c85e81ce00a71b5815dc9cc0a38666b8f",
|
| 95 |
+
"evaluation_decision": "reuse_existing_score",
|
| 96 |
+
"new_evaluation_queued": false,
|
| 97 |
+
"additional_evaluation_required": false,
|
| 98 |
+
"evaluation_root": "/weka/oe-adapt-default/stevenc/science-speedrun-runs/brain-computer-interface-decoding-astra-native-eval-s127-20261031a",
|
| 99 |
+
"score_source": "/weka/oe-adapt-default/stevenc/science-speedrun-runs/brain-computer-interface-decoding-astra-native-eval-s127-20261031a/results/reward.json",
|
| 100 |
+
"score_status_at_review": "S127 complete; five track rewards {'faced': 0.504428341384863, 'tuev': 0.634790635182636, 'ad65': 0.6126984126984126, 'openbmi': 0.786818181818182, 'longitudinal': 0.7919118451349597} (no scalar aggregate by task design)",
|
| 101 |
+
"original_48h_history_unchanged": true,
|
| 102 |
+
"original_results_preserved": true,
|
| 103 |
+
"trajectory_sha256": "a128c143465fa4805d3022dcc6d0776f1e2d762dc56070ca50f7ebcd10bd972f",
|
| 104 |
+
"successful_publication_job": "01M6EYCYZVHE90380JM89DCETZ"
|
| 105 |
+
}
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/status.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"phase": "complete",
|
| 3 |
+
"error": null,
|
| 4 |
+
"elapsed_seconds": 160.55633218679577,
|
| 5 |
+
"total_publication_seconds": 160.55633218679577,
|
| 6 |
+
"thread_id": "01a19351-dcd4-7b31-83ad-611e1e0b6c67",
|
| 7 |
+
"turn_completed": true,
|
| 8 |
+
"submission_sha256": "e22ea9d334a7923cdf1cda3cfca1ff6bd0fce78f592a0b63b219334648686e14",
|
| 9 |
+
"cutoff_submission_sha256": "e22ea9d334a7923cdf1cda3cfca1ff6bd0fce78f592a0b63b219334648686e14",
|
| 10 |
+
"package_changed": false,
|
| 11 |
+
"result_label": "48h-plus-5m-submission-only",
|
| 12 |
+
"accepted_as_48h_result": false,
|
| 13 |
+
"no_experiments_review": "passed",
|
| 14 |
+
"original_results_preserved": true,
|
| 15 |
+
"publication_review": "/weka/oe-adapt-default/stevenc/science-speedrun-runs/brain-computer-interface-decoding-astra-finalize-5m-20261102a/publication-review.json",
|
| 16 |
+
"evaluation_identity": "reviewed-inference-v1:9fd1f0002e7c9029861009fc7733df3c85e81ce00a71b5815dc9cc0a38666b8f",
|
| 17 |
+
"additional_evaluation_required": false,
|
| 18 |
+
"same_inference_candidate_as": "S127"
|
| 19 |
+
}
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/MODEL_CARD.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Shared EEG decoder
|
| 2 |
+
|
| 3 |
+
This package contains one coupled backbone used by all five tracks, with private input adapters and classifiers. Every trainable common component was trained with all five training splits. It is a single model; inference performs no parameter updates or dataset-level fitting.
|
| 4 |
+
|
| 5 |
+
The common backbone combines waveform convolutions, an audited pretrained BIOT feature path, covariance and log-correlation encoders, and shared feature corrections. The waveform coactivation extension encodes 64 within-window log variances and 2,016 correlations between common waveform channels. A matched experimental control removes the correlation inputs. `config.json` identifies the packaged variant and its five fixed correction gains. All original backbone parameters are fixed during this extension's joint training.
|
| 6 |
+
|
| 7 |
+
Weights originate only from the supplied training data and audited initialization checkpoints. Training details, parent provenance, raw/cache checks, shared-gradient checks and the five separate validation metrics are recorded in `training.json`. Validation selects checkpoints and fixed gains; it does not fit normalization or update parameters. Reported validation results belong to selected checkpoints, not to private test evaluation or five-seed means.
|
| 8 |
+
|
| 9 |
+
Run `bash infer.sh INPUT_DIR OUTPUT_DIR`. The input manifest specifies a track and opaque sample IDs, shard paths and indices. Signals are in microvolts and are scaled by 1/100. The package writes one probability vector per input ID to `OUTPUT_DIR/predictions.jsonl`. It needs only the packaged files and the contract's installed Python dependencies, works after relocation, and does not need labels, subject IDs, training caches or network access.
|
| 10 |
+
|
| 11 |
+
FACED and TUEV use window balanced accuracy. AD65 uses mean window probabilities per patient before balanced accuracy. OpenBMI averages within-subject balanced accuracy. Longitudinal averages within-session balanced accuracy within each subject, then over subjects. These five metrics remain separate.
|
| 12 |
+
|
| 13 |
+
This checkpoint adds fixed within-window ordinal pattern probabilities, permutation entropy and statistical complexity at five delays. Training-only normalization and five input projections feed one common correction MLP trained by all five tracks. The common correction enters the existing covariance and fusion representations; fixed per-track gains select its strength. All earlier model tensors remain unchanged.
|
| 14 |
+
|
| 15 |
+
Fixed real and imaginary spectral coherence between the inherited 24 spatial filters is normalized using training windows only and encoded by one new common network. Five private linear heads add class evidence. All five training splits update the new common encoder; all earlier model tensors remain unchanged.
|
| 16 |
+
|
| 17 |
+
Fixed per-window relative band powers, envelope variability, envelope correlations and phase-amplitude coupling feed training-normalized private input projections and one new shared encoder. Five linear heads add class evidence. All five training splits update the new common encoder; all prior model tensors remain unchanged. AD65 updates use all windows from six class-balanced training patients; objective: mean-probability.
|
| 18 |
+
|
| 19 |
+
The inherited OpenBMI phase-classifier projection was refreshed from a separately validated private-readout fit. Every common tensor and input adapter of this jointly trained model is unchanged. Exact ancestor checks confirm that all common tensors used by this inherited readout are identical; the new cross-frequency correction remains disabled for OpenBMI. No shared checkpoints or predictions are ensembled.
|
| 20 |
+
|
| 21 |
+
A common CBraMod feature encoder, itself jointly trained on all five training splits, supplies its shared summary and tokens pooled into four ordered time bins. Its classifiers are discarded. A new common feature MLP and five zero-initialized private linear projections learn residual class evidence jointly on all five training splits. Training may randomly remove the earlier decoder logits for half of training groups, using one mask per AD patient and one per other window; labels and teacher targets remain unchanged. Validation and inference always retain the complete earlier decoder. The same new class projection also receives an auxiliary standalone classification loss when configured, with the same patient-pooled AD objective; this adds no inference module. The complete earlier decoder and feature extractor remain tensor-identical; selecting zero residual gain preserves its predictions exactly. The summary-only control masks the 8192 ordered features after training-fitted per-feature normalization. One feature backbone and one classifier per track run at inference, with no prediction ensemble or external runtime cache.
|
| 22 |
+
|
| 23 |
+
The five outer private student-feature class projections are refined on all five training splits while every common/input/prior-head tensor remains exactly fixed. AD uses the exact patient-mean probability objective. Private checkpoints may be selected independently only because the common representation is identical; all five metrics are evaluated for every exported package.
|
| 24 |
+
|
| 25 |
+
The longitudinal private outer projection is selected from another training-only readout fit using exactly the same common/input/prior-head tensors. All other private heads are retained. Exact equality of every common tensor and executable runtime is audited; this package has one common checkpoint and one head per track.
|
| 26 |
+
|
| 27 |
+
The complete stronger parent is retained, including its common CBraMod feature encoder, common readout and all private classifiers. The CBraMod features and existing common128-dimensional embedding are computed once and reused. An additional common128-to256-to128 MLP with the configured GELU or identity activation and five zero-initialized private linear projections learn residual class evidence jointly on all five training splits. Training may randomly remove the earlier decoder logits for half of training groups, using one mask per AD patient and one per other window; labels and teacher targets remain unchanged. Validation and inference always retain the complete earlier decoder. The same new class projection also receives an auxiliary standalone classification loss when configured, with the same patient-pooled AD objective; this adds no inference module. The complete earlier decoder and feature extractor remain tensor-identical; selecting zero residual gain preserves its predictions exactly. One feature backbone and one classifier per track run at inference, with no prediction ensemble or external runtime cache.
|
| 28 |
+
|
| 29 |
+
The five outer private student-feature class projections are refined on all five training splits while every common/input/prior-head tensor remains exactly fixed. AD uses the exact patient-mean probability objective. Private checkpoints may be selected independently only because the common representation is identical; all five metrics are evaluated for every exported package.
|
| 30 |
+
|
| 31 |
+
The openbmi private outer projection is selected from another training-only readout fit using exactly the same common/input/prior-head tensors. All other private heads are retained. Exact equality of every common tensor and executable runtime is audited; this package has one common checkpoint and one head per track.
|
| 32 |
+
|
| 33 |
+
A fixed two-second crop supplies spectral and cross-frequency coupling features, with no short-window envelope autocorrelation. The crop is configured as center or first. Each track has a training-fitted normalizer and linear input adapter to128 dimensions; one common128-to256-to128 GELU/LayerNorm block and five zero-initialized class projections are jointly trained on all five training splits. All complete-parent tensors are preserved exactly. Normalization statistics use training windows only. The parent is randomly removed from the training loss at the configured probability; it is always present at inference. AD uses mean patient probabilities over all sampled patient windows. Auxiliary classification uses the same class projection. There is one composed feature backbone and head per track; no prediction ensemble, external runtime cache, test adaptation, or evaluation-metadata features. Zero residual gain exactly retains the complete parent.
|
| 34 |
+
|
| 35 |
+
The five outer private center-context class projections are refined on all five training splits while every common/input/prior-head tensor remains exactly fixed. AD uses the exact patient-mean probability objective. Private checkpoints may be selected independently only because the common representation is identical; all five metrics are evaluated for every exported package.
|
| 36 |
+
|
| 37 |
+
The tuev private outer projection is selected from another training-only readout fit using exactly the same common/input/prior-head tensors. All other private heads are retained. Exact equality of every common tensor and executable runtime is audited; this package has one common checkpoint and one head per track.
|
| 38 |
+
|
| 39 |
+
The faced private context input and outer class projections are selected from another training-only readout fit using exactly the same common/oldinput/normalizer/prior-head tensors. All other private input/head pairs are retained. Exact equality of every common tensor and executable runtime is audited; this package has one common checkpoint and one head per track.
|
| 40 |
+
|
| 41 |
+
A fixed one-second crop supplies spectral and cross-frequency coupling features, with no short-window envelope autocorrelation. The crop is configured as center or first. Each track has a training-fitted normalizer and linear input adapter to128 dimensions; one common128-to256-to128 GELU/LayerNorm block and five zero-initialized class projections are jointly trained on all five training splits. All complete-parent tensors are preserved exactly. Normalization statistics use training windows only. The parent is randomly removed from the training loss at the configured probability; it is always present at inference. AD uses mean patient probabilities over all sampled patient windows. Auxiliary classification uses the same class projection. There is one composed feature backbone and head per track; no prediction ensemble, external runtime cache, test adaptation, or evaluation-metadata features. Zero residual gain exactly retains the complete parent.
|
| 42 |
+
|
| 43 |
+
The five outer private short-context class projections are refined on all five training splits while every common/input/prior-head tensor remains exactly fixed. AD uses the exact patient-mean probability objective. Private checkpoints may be selected independently only because the common representation is identical; all five metrics are evaluated for every exported package.
|
| 44 |
+
|
| 45 |
+
The tuev private outer projection is selected from another training-only readout fit using exactly the same common/input/prior-head tensors. All other private heads are retained. Exact equality of every common tensor and executable runtime is audited; this package has one common checkpoint and one head per track.
|
| 46 |
+
|
| 47 |
+
An additional common context block preserves every existing short-context parent tensor and correction. A fixed one-second crop supplies spectral and cross-frequency coupling features, with no short-window envelope autocorrelation. TUEV concatenates first and center one-second descriptors; the parameter-matched control repeats first descriptors. Other tracks use first one-second descriptors. Each track has a training-fitted normalizer and linear input adapter to128 dimensions; one common128-to256-to128 GELU/LayerNorm block and five zero-initialized class projections are jointly trained on all five training splits. All complete-parent tensors are preserved exactly. Normalization statistics use training windows only. The parent is randomly removed from the training loss at the configured probability; it is always present at inference. AD uses mean patient probabilities over all sampled patient windows. Auxiliary classification uses the same class projection. There is one composed feature backbone and head per track; no prediction ensemble, external runtime cache, test adaptation, or evaluation-metadata features. Zero residual gain exactly retains the complete parent.
|
| 48 |
+
|
| 49 |
+
An additional shared128-to256-to128 GELU/LayerNorm block is jointly trained by all five tracks. OpenBMI uses seven native-channel trace-normalized covariance matrices with fixed5percent identity shrinkage: matrix-log upper triangles in the main arm, covariance-minus-identity in the matched control. Other four new inputs are first-one-second spectral/coupling descriptors. Every complete-parent tensor is preserved exactly. Input normalization uses training windows only; zero outer gain retains the parent. Five private adapters and class projections, one composed shared backbone, no evaluation adaptation or external runtime cache.
|
| 50 |
+
|
| 51 |
+
The five outer private geometry-block input adapters and class projections are refined on all five training splits. Every common backbone, fitted normalizer and earlier input/prior-head tensor remains exactly fixed. Common parameters are excluded from optimization; differentiable evaluation of the fixed common block permits gradients to the private input maps. AD uses the exact patient-mean probability objective. Private input/head checkpoints may be selected independently only because the common parameter state is identical and every track uses its own private adapter/head; all five metrics are evaluated for every exported package.
|
| 52 |
+
|
| 53 |
+
An additional shared128-to256-to128 GELU/LayerNorm block is jointly trained by all five tracks. FACED uses seven native-channel trace-normalized covariance matrices with fixed5percent identity shrinkage: matrix-log upper triangles in the main arm, covariance-minus-identity in the matched control. Other four new inputs are first-one-second spectral/coupling descriptors. Every complete-parent tensor is preserved exactly. Input normalization uses training windows only; zero outer gain retains the parent. Five private adapters and class projections, one composed shared backbone, no evaluation adaptation or external runtime cache.
|
| 54 |
+
|
| 55 |
+
The longitudinal private context input and outer class projections are selected from another training-only readout fit using exactly the same common/oldinput/normalizer/prior-head tensors. All other private input/head pairs are retained. Exact equality of every common tensor and executable runtime is audited; this package has one common checkpoint and one head per track.
|
| 56 |
+
|
| 57 |
+
An additional shared128-to256-to128 gelu/LayerNorm block is jointly trained by all five tracks. FACED uses seven native-channel trace-normalized covariance matrices with fixed5percent identity shrinkage and matrix-log upper triangles in both activation conditions. Other four new inputs are first-one-second spectral/coupling descriptors. Every complete-parent tensor is preserved exactly. Input normalization uses training windows only; zero outer gain retains the parent. Five private adapters and class projections, one composed shared backbone, no evaluation adaptation or external runtime cache.
|
| 58 |
+
|
| 59 |
+
The five outer private refinement-block input adapters and class projections are refined on all five training splits. Every common backbone, fitted normalizer and earlier input/prior-head tensor remains exactly fixed. Common parameters are excluded from optimization; differentiable evaluation of the fixed common block permits gradients to the private input maps. AD uses the exact patient-mean probability objective. Private input/head checkpoints may be selected independently only because the common parameter state is identical and every track uses its own private adapter/head; all five metrics are evaluated for every exported package.
|
| 60 |
+
|
| 61 |
+
The five outer private refinement-block input adapters and class projections are refined on all five training splits. Every common backbone, fitted normalizer and earlier input/prior-head tensor remains exactly fixed. Common parameters are excluded from optimization; differentiable evaluation of the fixed common block permits gradients to the private input maps. AD uses the exact patient-mean probability objective. Private input/head checkpoints may be selected independently only because the common parameter state is identical and every track uses its own private adapter/head; all five metrics are evaluated for every exported package.
|
| 62 |
+
|
| 63 |
+
An additional shared128-to256-to128 gelu/LayerNorm block is jointly trained by all five tracks. OpenBMI uses full-window spectral and cross-frequency features from six central/parietal local differences or the matched six native channels under common-average reference. FACED retains native log covariance descriptors; TUEV/AD65/Longitudinal retain first1s descriptors. Both conditions have identical parameter dimensions. Every complete-parent tensor is preserved exactly. Input normalization uses training windows only; zero outer gain retains the parent. Five private adapters and class projections, one composed shared backbone, no evaluation adaptation or external runtime cache.
|
| 64 |
+
|
| 65 |
+
The five outer private spatial-block input adapters and class projections are refined on all five training splits. Every common backbone, fitted normalizer and earlier input/prior-head tensor remains exactly fixed. Common parameters are excluded from optimization; differentiable evaluation of the fixed common block permits gradients to the private input maps. AD uses the exact patient-mean probability objective. Private input/head checkpoints may be selected independently only because the common parameter state is identical and every track uses its own private adapter/head; all five metrics are evaluated for every exported package.
|
| 66 |
+
|
| 67 |
+
The five outer private spatial-block input adapters and class projections are refined on all five training splits. Every common backbone, fitted normalizer and earlier input/prior-head tensor remains exactly fixed. Common parameters are excluded from optimization; differentiable evaluation of the fixed common block permits gradients to the private input maps. AD uses the exact patient-mean probability objective. Private input/head checkpoints may be selected independently only because the common parameter state is identical and every track uses its own private adapter/head; all five metrics are evaluated for every exported package.
|
| 68 |
+
|
| 69 |
+
A widened shared256-to512-to256 dense GELU block with two LayerNorm groups is jointly trained by all five tracks. Matching complete input/common representations are transferred from two audited all-five-trained ancestors, then dense cross-half connections train without task routing. Each track has one 256-to-class projection. This is a newly jointly trained common architecture. TUEV uses952conditional partial ormatchedmarginal nativebipolar covariance descriptors; theotherfour fixeddescriptors retain the completeparent spatial-feature recipe. Bothconditions haveidentical dimensions. Every completeparent tensor ispreserved; normalizationusestrainingwindowsonly. Onecomposedsharedbackbone, fiveprivateadapters/classheads, noevaluationadaptation/externalcache.
|
| 70 |
+
|
| 71 |
+
Five outer private scalar gains were selected from a bounded fifteen-value grid on the provided validation splits. Every trained common backbone, input adapter, classifier and earlier gain remains exactly unchanged. This is additional model selection on the same validation people, not an independent test result. Inference uses fixed selected gains and no adaptation.
|
| 72 |
+
|
| 73 |
+
The complete coherent selected1166-state model is jointly continued on all five training splits with fixed source gains, fresh AdamW, and main-gradient-protected standalone auxiliary supervision. Every1118-state earlier parent remains exact. The current conditional common encoder, five private input maps and heads update together. Source gains remain eligible during finite validation selection; no inference adaptation.
|
| 74 |
+
|
| 75 |
+
Only the FACED outer private input adapter and class projection use learning rate1e-6; the common encoder and other four private inputs/heads use1e-7. Every track jointly trains the same common parameter set. The optimizer has two disjoint exhaustive groups and the original shared cosine schedule, global clipping, AdamW betas and decay.
|
| 76 |
+
|
| 77 |
+
The five outer private conditional-block input adapters and class projections are refined on all five training splits. Every common backbone, fitted normalizer and earlier input/prior-head tensor remains exactly fixed. Common parameters are excluded from optimization; differentiable evaluation of the fixed common block permits gradients to the private input maps. AD uses the exact patient-mean probability objective. Private input/head checkpoints may be selected independently only because the common parameter state is identical and every track uses its own private adapter/head; all five metrics are evaluated for every exported package.
|
| 78 |
+
|
| 79 |
+
The openbmi outer private input map and classifier are selected from a separately trained private fit with every common, normalizer and prior tensor exactly identical. The other four private pairs remain from the reference package. There is one shared backbone and one classifier per track. Both donor training stages are replayed and the combined package is checked directly on all five validation splits.
|
| 80 |
+
|
| 81 |
+
The faced outer private input map and classifier are selected from a separately trained private fit with every common, normalizer and prior tensor exactly identical. The other four private pairs remain from the reference package. There is one shared backbone and one classifier per track. Both donor training stages are replayed and the combined package is checked directly on all five validation splits.
|
| 82 |
+
|
| 83 |
+
One shared confidence encoder transforms fixed per-window entropy and probability margin from the frozen earlier prior. Five private scalar projections modulate the existing conditional residual by a bounded multiplier in [0.75,1.25]. Every1166 existing source state stays fixed and the old conditional encoder remains in eval mode during fitting. All five training splits update the new shared confidence encoder and their private scalar gates. Confidence gate enabled=1.0. All source1166 states initialize exactly. Native head addition precision is preserved. No evaluation adaptation or external inference cache.
|
| 84 |
+
|
| 85 |
+
The final private confidence gates are selected between their trained values and exact zero at the single final shared checkpoint. All five original outer gains are restored to the verified source values. All1166 original model states remain exact; the six new common confidence parameters retain their joint all-five training. Zero private gates restore each track's original function independently of the new common weights. This construction performs no additional training or validation-input adaptation. Selected gates on: {"ad65": false, "faced": false, "longitudinal": false, "openbmi": true, "tuev": false}.
|
| 86 |
+
|
| 87 |
+
A new common descriptor encoder is trained jointly on all five tracks, with five input adapters and new class projections. OpenBMI uses multitaper native covariance; the other four use the source conditional descriptors. All 1183 source states are fixed. Normalizers use 8192 matched TRAIN-only draws per track; no evaluation adaptation. New class weights initialize to zero. Validation selects private gains within one complete new common checkpoint, with exact source fallback at zero. The new addition uses float32 over complete source336 logits. Current enabled=1.0.
|
| 88 |
+
|
| 89 |
+
A new common descriptor encoder is trained jointly on all five tracks, with five input adapters and new class projections. FACED, OpenBMI and Longitudinal use weighted amplitude-weighted ordinal pattern features; TUEV and AD65 reuse existing source descriptor inputs. All 1232 source states are fixed. Normalizers use 8192 matched TRAIN-only draws per track; no evaluation adaptation. New class weights initialize to zero. Validation selects private gains within one complete new common checkpoint, with exact source fallback at zero. The new addition uses float32 over complete source374 logits. Current enabled=1.0.
|
| 90 |
+
|
| 91 |
+
Seven Gaussian spectral filters feed one new common encoder trained jointly on all five tracks, with five input adapters and class projections. Filter centers and widths are shared across all tracks; their training learning rate is 0.0. All 1281 source states remain fixed. Per-window Welch log-relative spectra use fixed preprocessing, and new normalizers fit only 8192 balanced TRAIN draws per track at the initial filter parameters. No evaluation adaptation. New class weights initialize to zero. Validation selects private gains within one complete common checkpoint, with exact complete388 fallback at zero. All additions use float32. Current enabled=1.0.
|
| 92 |
+
|
| 93 |
+
Two shared nonlinear feature blocks are trained jointly on all five tracks over the existing weighted ordinal and clinical/dementia descriptors. Both shared blocks are evaluated for every input; bounded softmax routing keeps both weights positive. Routing mode is input. Five private input maps, task biases and class heads accompany the common blocks and router. All 1333 source states and inherited TRAIN-only normalization statistics remain fixed. New class weights initialize to zero. Validation chooses private gains within one complete common checkpoint, with exact complete431 fallback at zero. There is no evaluation adaptation or cross-checkpoint head combination. Current enabled=1.0.
|
| 94 |
+
|
| 95 |
+
A new shared 128/256/128 nonlinear block is jointly trained on all five tracks above the complete verified 443 source. Longitudinal alone receives the fixed TRAIN-fitted strong descriptor geometry licensed by screen 458; its map is square. All four maps have the same expanded width and five per-track input projections and class heads. All 1386 source states stay fixed. The 25 Longitudinal geometry buffers use only TRAIN statistics. Other input normalizers are inherited unchanged. New class heads initialize at zero. Validation selects private gains within one common checkpoint, with exact complete443 fallback at zero. No inference adaptation or cross-common-checkpoint head combination. Current enabled=1.0.
|
| 96 |
+
|
| 97 |
+
One new shared spectral projection and two shared content-attention blocks are trained jointly on all five tracks above the complete verified459 square source. Five private channel positions and reused TRAIN spectrum normalizers accompany zero-initialized correction heads and normally initialized auxiliary heads. Readout mode: detached. Separate routes auxiliary gradients through its own readout into the shared encoder; coupled uses the correction readout for both objectives; detached blocks auxiliary gradients to the encoder. All conditions have identical parameters and shapes. All1450 source states stay fixed. Validation selects private correction gains inside one complete common checkpoint. No evaluation adaptation, external inference caches, or cross-checkpoint head combination. Enabled=1.0.
|
| 98 |
+
|
| 99 |
+
A fresh shared temporal-basis CNN is trained jointly on all five complete TRAIN splits with native label supervision, five private montage maps and classifiers. The complete source remains frozen. Per-track validation selects a declared logit blend within this whole common checkpoint. No evaluation adaptation or external inference caches. Temporal coefficient mode: absolute.
|
| 100 |
+
|
| 101 |
+
A fresh shared CNN with a fixed temporal dilation bank and private channel maps is trained jointly on all five complete TRAIN splits with native label supervision, five private montage maps and classifiers. The complete source remains frozen. Per-track validation selects a declared logit blend within this whole common checkpoint. No evaluation adaptation or external inference caches. Temporal dilation mode: local.
|
| 102 |
+
|
| 103 |
+
A fresh shared CNN with fixed internal activation-normalization groups and one forward pass is trained jointly on all five complete TRAIN splits with native label supervision, five private montage maps and classifiers. The complete source remains frozen. Per-track validation selects a declared logit blend within this whole common checkpoint. No evaluation adaptation or external inference caches. Fixed common normalization-group mode: all.
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/activation_groups_math.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Fixed group counts for the three common CNN activation normalizers."""
|
| 2 |
+
GROUPS = {'all': (1, 1, 1), 'two': (2, 2, 2), 'original': (4, 8, 8)}
|
| 3 |
+
MODES = tuple(GROUPS)
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
def configure_groups(block, mode):
|
| 7 |
+
assert mode in GROUPS
|
| 8 |
+
for name, channels, groups in zip(('norm_temporal', 'norm_spatial', 'norm_separable'),
|
| 9 |
+
(16, 32, 64), GROUPS[mode]):
|
| 10 |
+
layer = getattr(block, name)
|
| 11 |
+
assert layer.num_channels == channels and layer.eps == 1e-5
|
| 12 |
+
assert layer.affine and channels % groups == 0
|
| 13 |
+
layer.num_groups = groups
|
| 14 |
+
return block
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/additive_hinge_features.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""459 portable Longitudinal strong descriptors, with fixed 32-row arithmetic."""
|
| 2 |
+
import torch
|
| 3 |
+
from features import extract_features
|
| 4 |
+
from coupling_features import coupling_features
|
| 5 |
+
from short_context_features import short_spectral_features
|
| 6 |
+
from native_log_covariance_features import connectivity
|
| 7 |
+
from weighted_ordinal_features import weighted_ordinal_features
|
| 8 |
+
BLOCK_DIMENSIONS={'full':20039,'center2':20039,'first1':20039,'log_covariance':11977,'weighted_base':7540}
|
| 9 |
+
BLOCK_WEIGHTS={'full':.3375,'center2':.11249999999999999,'first1':.11249999999999999,'log_covariance':.1875,'weighted_base':.25}
|
| 10 |
+
RAW_DIMENSION=sum(BLOCK_DIMENSIONS.values())
|
| 11 |
+
PROJECTED_DIMENSION=6*RAW_DIMENSION
|
| 12 |
+
|
| 13 |
+
@torch.no_grad()
|
| 14 |
+
def longitudinal_hinge_features(raw):
|
| 15 |
+
assert raw.ndim==4 and tuple(raw.shape[1:])==(58,2,200)
|
| 16 |
+
old=torch.backends.cuda.matmul.allow_tf32
|
| 17 |
+
try:
|
| 18 |
+
torch.backends.cuda.matmul.allow_tf32=False
|
| 19 |
+
with torch.autocast(raw.device.type,enabled=False):
|
| 20 |
+
results=[]
|
| 21 |
+
for start in range(0,len(raw),32):
|
| 22 |
+
x=raw[start:start+32].float();n=len(x)
|
| 23 |
+
if n<32:x=torch.cat([x,x.new_zeros((32-n,*x.shape[1:]))])
|
| 24 |
+
flat=x.flatten(2)
|
| 25 |
+
values=[torch.cat([extract_features('longitudinal',x),coupling_features('longitudinal',x)],-1),torch.cat([short_spectral_features('longitudinal',flat),coupling_features('longitudinal',flat)],-1),torch.cat([short_spectral_features('longitudinal',flat[...,:200]),coupling_features('longitudinal',flat[...,:200])],-1),connectivity('longitudinal',x,True),weighted_ordinal_features('longitudinal',x)['weighted']]
|
| 26 |
+
assert [v.shape[1] for v in values]==list(BLOCK_DIMENSIONS.values())
|
| 27 |
+
results.append(torch.cat(values,-1)[:n])
|
| 28 |
+
return torch.cat(results,0) if results else raw.new_empty((0,RAW_DIMENSION),dtype=torch.float32)
|
| 29 |
+
finally:torch.backends.cuda.matmul.allow_tf32=old
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/additive_hinge_geometry.py
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""459 fixed TRAIN-fitted coordinate geometry; no inference adaptation."""
|
| 2 |
+
import math
|
| 3 |
+
import numpy as np
|
| 4 |
+
import torch
|
| 5 |
+
from torch import nn
|
| 6 |
+
from additive_hinge_features import BLOCK_DIMENSIONS,BLOCK_WEIGHTS,PROJECTED_DIMENSION
|
| 7 |
+
from additive_hinge_kernel import basis
|
| 8 |
+
MODES=('hinge','rotated','square','linear')
|
| 9 |
+
|
| 10 |
+
class AdditiveBlock(nn.Module):
|
| 11 |
+
def __init__(self,dimension,mode):
|
| 12 |
+
super().__init__();assert mode in MODES;self.mode=mode;self.dimension=dimension
|
| 13 |
+
self.register_buffer('mean',torch.zeros(dimension,dtype=torch.float64))
|
| 14 |
+
self.register_buffer('scale',torch.ones(dimension,dtype=torch.float64))
|
| 15 |
+
self.register_buffer('basis_mean',torch.zeros(5*dimension,dtype=torch.float64))
|
| 16 |
+
self.register_buffer('trace_factor',torch.ones((),dtype=torch.float64))
|
| 17 |
+
self.register_buffer('permutation',torch.tensor(np.random.default_rng(458000+dimension).permutation(dimension),dtype=torch.int64))
|
| 18 |
+
def normalized(self,values):return ((values.double()-self.mean)/self.scale).clamp(-8,8)
|
| 19 |
+
def rotate(self,values):
|
| 20 |
+
result=values[:,self.permutation].clone();even=self.dimension//2*2
|
| 21 |
+
pairs=result[:,:even].reshape(len(values),-1,2);a,b=pairs[:,:,0].clone(),pairs[:,:,1].clone()
|
| 22 |
+
pairs[:,:,0]=(a+b)/(2**.5);pairs[:,:,1]=(a-b)/(2**.5)
|
| 23 |
+
return result
|
| 24 |
+
def mapped(self,values):
|
| 25 |
+
value=basis(values,self.mode)
|
| 26 |
+
return value if self.mode in ('hinge','rotated') else value.repeat_interleave(5,dim=1)
|
| 27 |
+
@torch.no_grad()
|
| 28 |
+
def fit(self,raw):
|
| 29 |
+
assert raw.ndim==2 and raw.shape[1]==self.dimension and len(raw)>1
|
| 30 |
+
raw=raw.double();self.mean.copy_(raw.mean(0));self.scale.copy_(raw.std(0,correction=0).clamp_min(.001))
|
| 31 |
+
values=self.normalized(raw);target=(values-values.mean(0)).square().sum(1).mean()/self.dimension
|
| 32 |
+
rotated=self.rotate(values) if self.mode=='rotated' else values
|
| 33 |
+
trace=values.new_zeros(())
|
| 34 |
+
for start in range(0,self.dimension,256):
|
| 35 |
+
phi=self.mapped(rotated[:,start:start+256]);mean=phi.mean(0);self.basis_mean[start*5:(start+256)*5].copy_(mean)
|
| 36 |
+
trace+=(phi-mean).square().sum(1).mean()/(5*self.dimension)
|
| 37 |
+
self.trace_factor.copy_(target/trace.clamp_min(1e-20))
|
| 38 |
+
assert torch.isfinite(self.trace_factor) and self.trace_factor>=0
|
| 39 |
+
def forward(self,raw,weight):
|
| 40 |
+
x=self.normalized(raw);rotated=self.rotate(x) if self.mode=='rotated' else x
|
| 41 |
+
phi=self.mapped(rotated)-self.basis_mean
|
| 42 |
+
return x*math.sqrt(.75*weight/self.dimension),phi*(.25*weight*self.trace_factor/(5*self.dimension)).sqrt()
|
| 43 |
+
|
| 44 |
+
class AdditiveGeometry(nn.Module):
|
| 45 |
+
def __init__(self,mode):
|
| 46 |
+
super().__init__();self.blocks=nn.ModuleDict({key:AdditiveBlock(d,mode) for key,d in BLOCK_DIMENSIONS.items()})
|
| 47 |
+
@torch.no_grad()
|
| 48 |
+
def fit(self,raw):
|
| 49 |
+
offset=0
|
| 50 |
+
for key,block in self.blocks.items():
|
| 51 |
+
block.fit(raw[:,offset:offset+block.dimension]);offset+=block.dimension
|
| 52 |
+
assert offset==raw.shape[1]
|
| 53 |
+
def forward(self,raw,return_double=False):
|
| 54 |
+
pieces=[];offset=0
|
| 55 |
+
for key,block in self.blocks.items():
|
| 56 |
+
pieces.extend(block(raw[:,offset:offset+block.dimension],BLOCK_WEIGHTS[key]));offset+=block.dimension
|
| 57 |
+
assert offset==raw.shape[1]
|
| 58 |
+
result=torch.cat(pieces,1)*math.sqrt(PROJECTED_DIMENSION)
|
| 59 |
+
assert result.shape[1]==PROJECTED_DIMENSION
|
| 60 |
+
return result if return_double else result.float()
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/alpha_features.py
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Fixed alpha prominence features from each individual two-second window."""
|
| 2 |
+
import torch
|
| 3 |
+
|
| 4 |
+
REGION_NAMES=('occipital','parietal','central','frontal','left_posterior','right_posterior')
|
| 5 |
+
REGIONS=(('PO7','PO5','PO3','POZ','PO4','PO6','PO8','O1','OZ','O2'),
|
| 6 |
+
('P7','P5','P3','P1','PZ','P2','P4','P6','P8'),
|
| 7 |
+
('FC5','FC3','FC1','FCZ','FC2','FC4','FC6','C5','C3','C1','CZ','C2','C4','C6'),
|
| 8 |
+
('FP1','FPZ','FP2','AF3','AF4','F7','F5','F3','F1','FZ','F2','F4','F6','F8'),
|
| 9 |
+
('P7','P5','P3','P1','PO7','PO5','PO3','O1'),
|
| 10 |
+
('P2','P4','P6','P8','PO4','PO6','PO8','O2'))
|
| 11 |
+
ALPHA_DIM=58*7+6*22
|
| 12 |
+
|
| 13 |
+
def region_matrix(channels):
|
| 14 |
+
result=torch.zeros(len(REGIONS),len(channels))
|
| 15 |
+
for i,names in enumerate(REGIONS):
|
| 16 |
+
for name in names:result[i,channels.index(name)]=1/len(names)
|
| 17 |
+
return result.tolist()
|
| 18 |
+
|
| 19 |
+
@torch.no_grad()
|
| 20 |
+
def extract_alpha_features(signal,regions):
|
| 21 |
+
with torch.autocast(signal.device.type,enabled=False):
|
| 22 |
+
x=signal.float();x=x-x.mean(-1,keepdim=True)
|
| 23 |
+
spectrum=torch.fft.rfft(x*torch.hann_window(400,device=x.device),dim=-1)/200
|
| 24 |
+
power=spectrum.abs().square().clamp_min(1e-12)
|
| 25 |
+
lp=power.log()
|
| 26 |
+
# Geometric regional means resist domination by one high-amplitude channel.
|
| 27 |
+
regional=torch.einsum('rc,ncf->nrf',regions.float(),lp)
|
| 28 |
+
lp=torch.cat([lp,regional],1)
|
| 29 |
+
low=lp[...,8:13].mean(-1,keepdim=True)
|
| 30 |
+
high=lp[...,36:49].mean(-1,keepdim=True)
|
| 31 |
+
freq=torch.arange(7.,14.5,.5,device=x.device)
|
| 32 |
+
alpha=lp[...,14:29]
|
| 33 |
+
baseline=low+(high-low)*((freq-5)/16)
|
| 34 |
+
prominence=alpha-baseline
|
| 35 |
+
normalized=alpha.softmax(-1)
|
| 36 |
+
center=(normalized*freq).sum(-1)
|
| 37 |
+
entropy=-(normalized*normalized.clamp_min(1e-12).log()).sum(-1)
|
| 38 |
+
alpha_mean=torch.logsumexp(alpha,-1)-torch.log(torch.tensor(15.,device=x.device))
|
| 39 |
+
def log_band(lo,hi):
|
| 40 |
+
return torch.logsumexp(lp[...,lo:hi],-1)-torch.log(torch.tensor(float(hi-lo),device=x.device))
|
| 41 |
+
summaries=torch.stack([alpha_mean-log_band(2,81),alpha_mean-log_band(8,14),
|
| 42 |
+
alpha_mean-log_band(30,61),prominence.max(-1).values,
|
| 43 |
+
prominence.mean(-1),center,entropy],-1)
|
| 44 |
+
return torch.cat([summaries[:,:58].flatten(1),summaries[:,58:].flatten(1),
|
| 45 |
+
prominence[:,58:].flatten(1)],1)
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/candidate_temporal_basis_model.py
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Standalone shared CNN with explicit temporal response coefficients.
|
| 2 |
+
|
| 3 |
+
No pretrained source, trained state, dataset, split or training recipe is
|
| 4 |
+
selected here. A separately bound study is required before EEG fitting.
|
| 5 |
+
"""
|
| 6 |
+
from torch import nn
|
| 7 |
+
from torch.nn import functional as F
|
| 8 |
+
from temporal_convolution_math import SharedTemporalConvolution, precise_convolution, raw_convolution_features
|
| 9 |
+
from learned_filter_temporal_basis import pool_filter_trajectories, MODES
|
| 10 |
+
|
| 11 |
+
TRACKS = ('faced', 'tuev', 'ad65', 'openbmi', 'longitudinal')
|
| 12 |
+
SPECS = {'faced': (32, 9), 'tuev': (16, 6), 'ad65': (19, 3),
|
| 13 |
+
'openbmi': (62, 2), 'longitudinal': (58, 2)}
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
class TemporalBasisConvolution(SharedTemporalConvolution):
|
| 17 |
+
def __init__(self, pooling_mode='signed'):
|
| 18 |
+
assert pooling_mode in MODES
|
| 19 |
+
super().__init__()
|
| 20 |
+
self.pooling_mode = pooling_mode
|
| 21 |
+
self.embedding = nn.Linear(384, 128)
|
| 22 |
+
|
| 23 |
+
def forward(self, x):
|
| 24 |
+
x = self.norm_temporal(self.temporal(x.unsqueeze(1)))
|
| 25 |
+
x = self.dropout_spatial(F.avg_pool2d(F.elu(self.norm_spatial(self.spatial(x))), (1, 4)))
|
| 26 |
+
x = self.dropout_separable(F.avg_pool2d(F.elu(self.norm_separable(self.pointwise(self.depthwise(x)))), (1, 8)))
|
| 27 |
+
x = pool_filter_trajectories(x.squeeze(2), self.pooling_mode)
|
| 28 |
+
return self.dropout_embedding(self.norm_embedding(F.gelu(self.embedding(x))))
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
class TemporalBasisModel(nn.Module):
|
| 32 |
+
def __init__(self, pooling_mode='signed'):
|
| 33 |
+
super().__init__()
|
| 34 |
+
self.adapters = nn.ModuleDict({track: nn.Linear(SPECS[track][0], 16, bias=False) for track in TRACKS})
|
| 35 |
+
self.backbone = TemporalBasisConvolution(pooling_mode)
|
| 36 |
+
self.heads = nn.ModuleDict({track: nn.Linear(128, SPECS[track][1]) for track in TRACKS})
|
| 37 |
+
for head in self.heads.values():
|
| 38 |
+
nn.init.normal_(head.weight, std=.02)
|
| 39 |
+
nn.init.zeros_(head.bias)
|
| 40 |
+
|
| 41 |
+
def forward_features(self, track, preprocessed):
|
| 42 |
+
with precise_convolution(preprocessed.device.type):
|
| 43 |
+
x = self.adapters[track](preprocessed.float().transpose(1, 2)).transpose(1, 2)
|
| 44 |
+
return self.heads[track](self.backbone(x))
|
| 45 |
+
|
| 46 |
+
def forward(self, track, raw):
|
| 47 |
+
return self.forward_features(track, raw_convolution_features(track, raw, 'raw'))
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/channel_attention_math.py
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""466 shared channel attention; all modes use the same primitive shapes."""
|
| 2 |
+
import math
|
| 3 |
+
import torch
|
| 4 |
+
from torch import nn
|
| 5 |
+
MODES = ('content', 'uniform', 'self')
|
| 6 |
+
|
| 7 |
+
def attention_weights(scores, mode):
|
| 8 |
+
if mode == 'content':
|
| 9 |
+
return scores.softmax(-1)
|
| 10 |
+
if mode == 'uniform':
|
| 11 |
+
return (scores * 0.).softmax(-1)
|
| 12 |
+
if mode == 'self':
|
| 13 |
+
return torch.eye(scores.shape[-1], device=scores.device, dtype=scores.dtype) + scores * 0.
|
| 14 |
+
raise ValueError(mode)
|
| 15 |
+
|
| 16 |
+
class ChannelAttentionBlock(nn.Module):
|
| 17 |
+
def __init__(self, mode):
|
| 18 |
+
super().__init__()
|
| 19 |
+
assert mode in MODES
|
| 20 |
+
self.mode = mode
|
| 21 |
+
self.norm1 = nn.LayerNorm(128)
|
| 22 |
+
self.qkv = nn.Linear(128, 384)
|
| 23 |
+
self.output = nn.Linear(128, 128)
|
| 24 |
+
self.dropout_attention = nn.Dropout(.3)
|
| 25 |
+
self.norm2 = nn.LayerNorm(128)
|
| 26 |
+
self.ff1 = nn.Linear(128, 256)
|
| 27 |
+
self.gelu = nn.GELU()
|
| 28 |
+
self.dropout_hidden = nn.Dropout(.3)
|
| 29 |
+
self.ff2 = nn.Linear(256, 128)
|
| 30 |
+
self.dropout_output = nn.Dropout(.3)
|
| 31 |
+
|
| 32 |
+
def forward(self, tokens):
|
| 33 |
+
batch, channels, _ = tokens.shape
|
| 34 |
+
qkv = self.qkv(self.norm1(tokens)).reshape(batch, channels, 3, 4, 32).permute(2, 0, 3, 1, 4)
|
| 35 |
+
q, k, v = qkv.unbind(0)
|
| 36 |
+
weights = attention_weights(q @ k.transpose(-1, -2) / math.sqrt(32), self.mode)
|
| 37 |
+
context = (weights @ v).transpose(1, 2).reshape(batch, channels, 128)
|
| 38 |
+
tokens = tokens + self.dropout_attention(self.output(context))
|
| 39 |
+
hidden = self.dropout_hidden(self.gelu(self.ff1(self.norm2(tokens))))
|
| 40 |
+
return tokens + self.dropout_output(self.ff2(hidden))
|
| 41 |
+
|
| 42 |
+
class SharedChannelAttention(nn.Module):
|
| 43 |
+
def __init__(self, mode):
|
| 44 |
+
super().__init__()
|
| 45 |
+
self.input = nn.Linear(95, 128)
|
| 46 |
+
self.blocks = nn.ModuleList([ChannelAttentionBlock(mode) for _ in range(2)])
|
| 47 |
+
self.final_norm = nn.LayerNorm(128)
|
| 48 |
+
|
| 49 |
+
def forward_tokens(self, spectra, position):
|
| 50 |
+
tokens = self.input(spectra) + position
|
| 51 |
+
for block in self.blocks:
|
| 52 |
+
tokens = block(tokens)
|
| 53 |
+
return self.final_norm(tokens)
|
| 54 |
+
|
| 55 |
+
def forward(self, spectra, position):
|
| 56 |
+
return self.forward_tokens(spectra, position).mean(1)
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/confidence_model.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""One shared confidence encoder modulates the existing residual readout per window."""
|
| 2 |
+
import math
|
| 3 |
+
from legacy_model import *
|
| 4 |
+
LegacyHybridModel=HybridModel
|
| 5 |
+
|
| 6 |
+
def confidence_features(prior,scale):
|
| 7 |
+
with torch.autocast(prior.device.type,enabled=False):
|
| 8 |
+
probability=(prior.detach().float()/scale).softmax(-1)
|
| 9 |
+
entropy=-(probability*probability.clamp_min(1e-12).log()).sum(-1)/math.log(probability.shape[-1])
|
| 10 |
+
top=probability.topk(2,dim=-1).values;margin=top[:,0]-top[:,1]
|
| 11 |
+
return torch.stack([entropy,entropy.square(),margin,margin.square()],-1)
|
| 12 |
+
|
| 13 |
+
class ConfidenceEncoder(nn.Module):
|
| 14 |
+
def __init__(self,enabled):
|
| 15 |
+
super().__init__();self.net=nn.Sequential(nn.Linear(4,16),nn.GELU(),nn.Linear(16,16),nn.LayerNorm(16))
|
| 16 |
+
self.register_buffer('enabled',torch.tensor(float(enabled)))
|
| 17 |
+
def forward(self,x):return self.net(x)
|
| 18 |
+
|
| 19 |
+
class ConfidenceReadoutHead(nn.Module):
|
| 20 |
+
def __init__(self,old,encoder):
|
| 21 |
+
super().__init__();self.prior=old.prior;self.width=old.width;self.projection=old.projection
|
| 22 |
+
self.register_buffer('output_scale',old.output_scale);self.register_buffer('correction_gain',old.correction_gain)
|
| 23 |
+
self.confidence_projection=nn.Linear(16,1);nn.init.zeros_(self.confidence_projection.weight);nn.init.zeros_(self.confidence_projection.bias)
|
| 24 |
+
# The backbone owns and registers this ONE encoder; all five heads reference it.
|
| 25 |
+
object.__setattr__(self,'_confidence_encoder',encoder)
|
| 26 |
+
def gated_logits(self,prior,embedding):
|
| 27 |
+
with torch.autocast(prior.device.type,enabled=False):
|
| 28 |
+
logits=self.projection(embedding.float());encoder=self._confidence_encoder
|
| 29 |
+
hidden=encoder(confidence_features(prior,self.output_scale));modulation=self.confidence_projection(hidden).tanh()
|
| 30 |
+
multiplier=1.+encoder.enabled*.25*modulation
|
| 31 |
+
return logits*multiplier
|
| 32 |
+
def predict_from_prior(self,prior,embedding,gain=None,return_standalone=False):
|
| 33 |
+
with torch.autocast(prior.device.type,enabled=False):
|
| 34 |
+
standalone=self.gated_logits(prior,embedding);gain=self.correction_gain if gain is None else gain
|
| 35 |
+
delta=(gain*self.output_scale)*standalone;result=prior+delta.to(prior.dtype)
|
| 36 |
+
return (result,standalone) if return_standalone else result
|
| 37 |
+
def forward(self,values):
|
| 38 |
+
prior=self.prior(values[:,:-self.width]);return self.predict_from_prior(prior,values[:,-self.width:])
|
| 39 |
+
|
| 40 |
+
class HybridModel(LegacyHybridModel):
|
| 41 |
+
def __init__(self,confidence_gating=False,confidence_gate_enabled=1.,**kwargs):
|
| 42 |
+
super().__init__(**kwargs);self.confidence_gating=confidence_gating
|
| 43 |
+
if confidence_gating:
|
| 44 |
+
with torch.random.fork_rng(devices=[]):
|
| 45 |
+
self.backbone.confidence_encoder=ConfidenceEncoder(confidence_gate_enabled)
|
| 46 |
+
self.heads=nn.ModuleDict({t:ConfidenceReadoutHead(head,self.backbone.confidence_encoder) for t,head in self.heads.items()})
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/coupling_features.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Per-window cross-frequency envelope and phase-amplitude relationships."""
|
| 2 |
+
import torch
|
| 3 |
+
BANDS=((1,4),(4,8),(8,13),(13,30),(30,48))
|
| 4 |
+
PAIRS=tuple((i,j) for i in range(5) for j in range(i+1,5))
|
| 5 |
+
PER_CHANNEL=30
|
| 6 |
+
|
| 7 |
+
@torch.no_grad()
|
| 8 |
+
def coupling_features(track,x):
|
| 9 |
+
with torch.autocast(x.device.type,enabled=False):
|
| 10 |
+
x=torch.nan_to_num(x.float().flatten(2),nan=0.,posinf=1e5,neginf=-1e5).clamp(-1e5,1e5)
|
| 11 |
+
x=x-x.mean(-1,keepdim=True)
|
| 12 |
+
if track in ('ad65','openbmi','longitudinal'):x=x-x.mean(1,keepdim=True)
|
| 13 |
+
x=x/x.square().mean(-1,keepdim=True).clamp_min(1e-12).sqrt()
|
| 14 |
+
n=x.shape[-1];spectrum=torch.fft.fft(x,dim=-1);frequency=torch.fft.fftfreq(n,1/200,device=x.device)
|
| 15 |
+
masks=torch.stack([2*((frequency>=lo)&(frequency<hi)).float() for lo,hi in BANDS])
|
| 16 |
+
analytic=torch.fft.ifft(spectrum[:,:,None]*masks[None,None],dim=-1)
|
| 17 |
+
amplitude=analytic.abs();unit_phase=analytic/amplitude.clamp_min(1e-3)
|
| 18 |
+
weight=torch.hann_window(n,device=x.device);weight=weight/weight.sum()
|
| 19 |
+
mean=(amplitude*weight).sum(-1);centered=amplitude-mean[...,None]
|
| 20 |
+
variance=(centered.square()*weight).sum(-1)
|
| 21 |
+
# Relative and absolute floors avoid normalizing numerical silence after unit-RMS scaling.
|
| 22 |
+
deviation=variance.sqrt()
|
| 23 |
+
stable_deviation=torch.maximum(deviation,.01*mean).clamp_min(1e-3)
|
| 24 |
+
normalized=centered/stable_deviation[...,None]
|
| 25 |
+
power=(amplitude.square()*weight).sum(-1)
|
| 26 |
+
relative=(power/power.sum(-1,keepdim=True).clamp_min(1e-12)).clamp_min(1e-6).log()
|
| 27 |
+
cv=(deviation/mean.clamp_min(1e-3)).clamp(0,10)
|
| 28 |
+
envelopes=[];phase_amplitude=[]
|
| 29 |
+
for low,high in PAIRS:
|
| 30 |
+
correlation=(normalized[:,:,low]*normalized[:,:,high]*weight).sum(-1)
|
| 31 |
+
envelopes.append(torch.atanh(correlation.clamp(-.999,.999)))
|
| 32 |
+
coupling=(normalized[:,:,high]*unit_phase[:,:,low]*weight).sum(-1).abs()
|
| 33 |
+
phase_amplitude.append(coupling.clamp(0,.999))
|
| 34 |
+
return torch.cat([relative,cv,torch.stack(envelopes,-1),torch.stack(phase_amplitude,-1)],-1).flatten(1)
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/envelope_features.py
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Per-window burst-envelope regularity and bilateral synchrony, without fitting."""
|
| 2 |
+
import torch
|
| 3 |
+
import torch.nn.functional as F
|
| 4 |
+
|
| 5 |
+
BANDS=((1,4),(4,8),(8,13),(13,30),(30,45))
|
| 6 |
+
ENVELOPE_DIM=16*5*12+8*5*2
|
| 7 |
+
|
| 8 |
+
@torch.no_grad()
|
| 9 |
+
def extract_envelope_features(signal):
|
| 10 |
+
with torch.autocast(signal.device.type,enabled=False):
|
| 11 |
+
x=signal.float();x=x-x.mean(-1,keepdim=True)
|
| 12 |
+
spectrum=torch.fft.fft(x,dim=-1)
|
| 13 |
+
frequency=torch.fft.fftfreq(x.shape[-1],1/200,device=x.device)
|
| 14 |
+
envelopes=[]
|
| 15 |
+
for lo,hi in BANDS:
|
| 16 |
+
mask=((frequency>=lo)&(frequency<hi)).to(x.dtype)*2
|
| 17 |
+
analytic=torch.fft.ifft(spectrum*mask,dim=-1)
|
| 18 |
+
energy=analytic.abs().square()
|
| 19 |
+
envelope=F.avg_pool1d(energy.flatten(0,1).unsqueeze(1),20,10).squeeze(1)
|
| 20 |
+
envelopes.append(envelope.reshape(len(x),16,-1))
|
| 21 |
+
e=torch.stack(envelopes,2)
|
| 22 |
+
mean=e.mean(-1,keepdim=True).clamp_min(1e-12)
|
| 23 |
+
relative=e/mean
|
| 24 |
+
centered=relative-relative.mean(-1,keepdim=True)
|
| 25 |
+
std=centered.square().mean(-1,keepdim=True).sqrt().clamp_min(1e-6)
|
| 26 |
+
normalized=centered/std
|
| 27 |
+
acf=torch.stack([(normalized[...,:-lag]*normalized[...,lag:]).mean(-1)
|
| 28 |
+
for lag in range(4,41)],-1).clamp(-1,1)
|
| 29 |
+
acf_peak,acf_index=acf.max(-1)
|
| 30 |
+
probability=(relative/relative.sum(-1,keepdim=True).clamp_min(1e-12)).clamp_min(1e-12)
|
| 31 |
+
entropy=-(probability*probability.log()).sum(-1)
|
| 32 |
+
summaries=[std.squeeze(-1).clamp_min(1e-6).log(),relative.amax(-1).clamp_min(1).log(),entropy,
|
| 33 |
+
(relative>2).float().mean(-1),(relative>4).float().mean(-1),
|
| 34 |
+
((relative[...,1:]>2)&(relative[...,:-1]<=2)).float().mean(-1),
|
| 35 |
+
acf_peak,(acf_index.float()+4)/40,
|
| 36 |
+
acf[...,0],acf[...,6],acf[...,16],acf[...,36]]
|
| 37 |
+
left=torch.tensor([0,1,2,3,8,9,10,11],device=x.device);right=left+4
|
| 38 |
+
synchrony=(normalized[:,left]*normalized[:,right]).mean(-1).clamp(-1,1)
|
| 39 |
+
imbalance=(std[:,left].squeeze(-1).log()-std[:,right].squeeze(-1).log()).abs()
|
| 40 |
+
return torch.cat([torch.stack(summaries,-1).flatten(1),synchrony.flatten(1),imbalance.flatten(1)],1)
|
| 41 |
+
|
| 42 |
+
def mirrored_features(features):
|
| 43 |
+
channels=torch.tensor([4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11],device=features.device)
|
| 44 |
+
return torch.cat([features[:,:16*5*12].reshape(-1,16,5,12)[:,channels].flatten(1),features[:,16*5*12:]],1)
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/features.py
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""One shared residual backbone, five linear input adapters and output heads."""
|
| 2 |
+
import torch
|
| 3 |
+
from torch import nn
|
| 4 |
+
|
| 5 |
+
SPECS = {'faced': (32, 10, 9), 'tuev': (16, 5, 6), 'ad65': (19, 10, 3),
|
| 6 |
+
'openbmi': (62, 4, 2), 'longitudinal': (58, 2, 2)}
|
| 7 |
+
TRACKS = tuple(SPECS)
|
| 8 |
+
EDGES = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,18,20,22,25,28,32,36,40,45,50,60,70,80,95]
|
| 9 |
+
COV_BANDS = [(1,4),(4,8),(8,12),(12,16),(16,20),(20,28),(28,40)]
|
| 10 |
+
|
| 11 |
+
def feature_dim(channels):
|
| 12 |
+
return channels * (4*(len(EDGES)-1)+4) + len(COV_BANDS)*channels*(channels-1)//2
|
| 13 |
+
|
| 14 |
+
@torch.no_grad()
|
| 15 |
+
def extract_features(track, x):
|
| 16 |
+
"""Fixed features; no batch statistics or fitted inference transformations."""
|
| 17 |
+
x = x.float().flatten(2)
|
| 18 |
+
x = torch.nan_to_num(x, nan=0., posinf=1e5, neginf=-1e5).clamp(-1e5,1e5)
|
| 19 |
+
x = x - x.mean(-1,keepdim=True)
|
| 20 |
+
if track in ('ad65','openbmi','longitudinal'):
|
| 21 |
+
x = x - x.mean(1,keepdim=True)
|
| 22 |
+
rms = x.square().mean(-1).clamp_min(1e-12).sqrt()
|
| 23 |
+
norm = x / rms.unsqueeze(-1)
|
| 24 |
+
moments = torch.stack([rms.log(), norm.abs().amax(-1).clamp_min(1).log(),
|
| 25 |
+
norm.pow(4).mean(-1).clamp_min(1).log(),
|
| 26 |
+
(norm[...,1:]-norm[...,:-1]).square().mean(-1).clamp_min(1e-10).log()],-1)
|
| 27 |
+
frames = x.unfold(-1,400,200)
|
| 28 |
+
frames = frames - frames.mean(-1,keepdim=True)
|
| 29 |
+
window = torch.hann_window(400,device=x.device)
|
| 30 |
+
z = torch.fft.rfft(frames*window,dim=-1)/200
|
| 31 |
+
power = z.abs().square()
|
| 32 |
+
bands = torch.stack([power[...,2*lo:2*hi].mean(-1) for lo,hi in zip(EDGES[:-1],EDGES[1:])],-1)
|
| 33 |
+
lp = bands.mean(-2).clamp_min(1e-12).log()
|
| 34 |
+
variation = bands.clamp_min(1e-12).log().std(-2,correction=0)
|
| 35 |
+
relative_frequency = lp - lp.mean(-1,keepdim=True)
|
| 36 |
+
relative_channel = lp - lp.mean(1,keepdim=True)
|
| 37 |
+
parts = [torch.cat([lp, relative_frequency, relative_channel, variation, moments],-1).flatten(1)]
|
| 38 |
+
ii,jj = torch.triu_indices(x.shape[1],x.shape[1],offset=1,device=x.device)
|
| 39 |
+
for lo,hi in COV_BANDS:
|
| 40 |
+
v = z[...,2*lo:2*hi].flatten(2)
|
| 41 |
+
cov = v.real @ v.real.transpose(-1,-2) + v.imag @ v.imag.transpose(-1,-2)
|
| 42 |
+
d = cov.diagonal(dim1=-2,dim2=-1).clamp_min(1e-12).sqrt()
|
| 43 |
+
cor = cov / (d.unsqueeze(1)*d.unsqueeze(2)).clamp_min(1e-12)
|
| 44 |
+
parts.append(cor[:,ii,jj].clamp(-1,1))
|
| 45 |
+
result = torch.cat(parts,-1)
|
| 46 |
+
return torch.nan_to_num(result).clamp(-40,40)
|
| 47 |
+
|
| 48 |
+
class Standardize(nn.Module):
|
| 49 |
+
def __init__(self, dim):
|
| 50 |
+
super().__init__()
|
| 51 |
+
self.register_buffer('mean',torch.zeros(dim))
|
| 52 |
+
self.register_buffer('scale',torch.ones(dim))
|
| 53 |
+
def forward(self,x):
|
| 54 |
+
return ((x-self.mean)/self.scale).clamp(-8,8)
|
| 55 |
+
|
| 56 |
+
class Residual(nn.Module):
|
| 57 |
+
def __init__(self,width,dropout):
|
| 58 |
+
super().__init__()
|
| 59 |
+
self.net=nn.Sequential(nn.LayerNorm(width),nn.Linear(width,width*2),nn.GELU(),
|
| 60 |
+
nn.Dropout(dropout),nn.Linear(width*2,width),nn.Dropout(dropout))
|
| 61 |
+
def forward(self,x):
|
| 62 |
+
return x+self.net(x)
|
| 63 |
+
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/frequency_features.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Fixed per-window frequency decomposition for a linear montage adapter."""
|
| 2 |
+
import torch
|
| 3 |
+
|
| 4 |
+
FREQUENCY_BANDS=((1,4),(4,8),(8,13),(13,20),(20,30),(30,45))
|
| 5 |
+
|
| 6 |
+
def frequency_components(signal):
|
| 7 |
+
with torch.autocast(signal.device.type,enabled=False):
|
| 8 |
+
x=signal.float();spectrum=torch.fft.rfft(x,dim=-1)
|
| 9 |
+
frequency=torch.fft.rfftfreq(x.shape[-1],d=1/200,device=x.device)
|
| 10 |
+
masks=torch.stack([((frequency>=lo)&(frequency<hi)).float() for lo,hi in FREQUENCY_BANDS])
|
| 11 |
+
return torch.fft.irfft(spectrum[:,None]*masks[None,:,None],n=x.shape[-1],dim=-1)
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/gradient_protection.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Protect the main objective using the actual combined mixed-precision gradient."""
|
| 2 |
+
import torch
|
| 3 |
+
|
| 4 |
+
def protect_group(total,main,strength):
|
| 5 |
+
assert strength in (0.,1.) and len(total)==len(main)>0
|
| 6 |
+
assert all(a.shape==b.shape and a.device==b.device and torch.isfinite(a).all() and torch.isfinite(b).all() for a,b in zip(total,main))
|
| 7 |
+
g=torch.cat([v.detach().double().flatten() for v in total]);m=torch.cat([v.detach().double().flatten() for v in main])
|
| 8 |
+
main_squared=torch.dot(m,m);dot=torch.dot(g-m,m);conflict=bool(main_squared>0 and dot<0);coefficient=float(-dot/main_squared) if conflict else 0.
|
| 9 |
+
before=float(torch.dot(g,m));original_norm=float(g.norm())
|
| 10 |
+
if strength and conflict:
|
| 11 |
+
offset=0;updated=g+coefficient*m
|
| 12 |
+
with torch.no_grad():
|
| 13 |
+
for target in total:
|
| 14 |
+
size=target.numel();target.copy_(updated[offset:offset+size].reshape_as(target).to(target.dtype));offset+=size
|
| 15 |
+
after=sum(float(torch.dot(a.detach().double().flatten(),b.detach().double().flatten())) for a,b in zip(total,main))
|
| 16 |
+
rounding_relative=max(1e-6,2*max(torch.finfo(v.dtype).eps for v in total))
|
| 17 |
+
tolerance=rounding_relative*max(float(main_squared),abs(before),abs(after),1e-30)
|
| 18 |
+
if strength:assert after>=float(main_squared)-tolerance,(after,float(main_squared),before,coefficient)
|
| 19 |
+
return {'main_squared_norm':float(main_squared),'effective_auxiliary_main_dot':float(dot),'conflict':conflict,'applied':bool(strength and conflict),'coefficient':coefficient if strength else 0.,'total_main_dot_before':before,'total_main_dot_after':after,'total_norm_before':original_norm,'total_norm_after':float(torch.cat([v.detach().double().flatten() for v in total]).norm())}
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/infer.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import argparse,json
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
import torch
|
| 4 |
+
from model import HybridModel,SPECS
|
| 5 |
+
from data import Dataset
|
| 6 |
+
from covariances import extract_covariances
|
| 7 |
+
p=argparse.ArgumentParser();p.add_argument('input',type=Path);p.add_argument('output',type=Path);a=p.parse_args()
|
| 8 |
+
root=Path(__file__).resolve().parent;c=json.loads((root/'config.json').read_text());t=json.loads((a.input/'manifest.json').read_text())['track']
|
| 9 |
+
if t not in SPECS:raise ValueError('unknown track')
|
| 10 |
+
torch.set_num_threads(4);device='cuda' if torch.cuda.is_available() else 'cpu'
|
| 11 |
+
m=HybridModel(**c['architecture']).to(device);m.load_state_dict(torch.load(root/'weights.pt',map_location=device,weights_only=True));m.eval()
|
| 12 |
+
a.output.mkdir(parents=True,exist_ok=True)
|
| 13 |
+
with torch.inference_mode(),(a.output/'predictions.jsonl').open('w') as f:
|
| 14 |
+
for x,_,ids in torch.utils.data.DataLoader(Dataset(a.input),batch_size=64,num_workers=0):
|
| 15 |
+
# FFT features stay float32; convolutions can use bfloat16 on CUDA.
|
| 16 |
+
x=x.to(device)
|
| 17 |
+
from features import extract_features
|
| 18 |
+
torch.backends.cuda.matmul.allow_tf32=False
|
| 19 |
+
features=extract_features(t,x)
|
| 20 |
+
covariances=extract_covariances(t,x)
|
| 21 |
+
torch.backends.cuda.matmul.allow_tf32=True
|
| 22 |
+
with torch.autocast(device,dtype=torch.bfloat16,enabled=device=='cuda'):pred=m(t,x,features,covariances=covariances)
|
| 23 |
+
pp=pred.float().softmax(-1).cpu().numpy()
|
| 24 |
+
for sid,pr in zip(ids,pp):f.write(json.dumps({'id':sid,'probabilities':pr.tolist()})+'\n')
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/infer.sh
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
exec python "$(dirname -- "$0")/infer.py" "$1" "$2"
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/legacy_model.py
ADDED
|
@@ -0,0 +1,592 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from student_features import CBraModFeatures,FrequencyAdapter
|
| 2 |
+
"""One fused waveform/spectral backbone used identically by all five tasks."""
|
| 3 |
+
import torch
|
| 4 |
+
from torch import nn
|
| 5 |
+
MOTOR_CHANNELS=('Fp1', 'Fp2', 'F7', 'F3', 'Fz', 'F4', 'F8', 'FC5', 'FC1', 'FC2', 'FC6', 'T7', 'C3', 'Cz', 'C4', 'T8', 'TP9', 'CP5', 'CP1', 'CP2', 'CP6', 'TP10', 'P7', 'P3', 'Pz', 'P4', 'P8', 'PO9', 'O1', 'Oz', 'O2', 'PO10', 'FC3', 'FC4', 'C5', 'C1', 'C2', 'C6', 'CP3', 'CPz', 'CP4', 'P1', 'P2', 'POz', 'FT9', 'FTT9h', 'TTP7h', 'TP7', 'TPP9h', 'FT10', 'FTT10h', 'TPP8h', 'TP8', 'TPP10h', 'F9', 'F10', 'AF7', 'AF3', 'AF4', 'AF8', 'PO3', 'PO4')
|
| 6 |
+
from braindecode.models import BIOT
|
| 7 |
+
from features import SPECS,TRACKS,feature_dim,extract_features,Standardize,Residual,EDGES,COV_BANDS
|
| 8 |
+
from covariances import BANDS,extract_covariances
|
| 9 |
+
from alpha_features import extract_alpha_features,ALPHA_DIM
|
| 10 |
+
from envelope_features import extract_envelope_features,ENVELOPE_DIM
|
| 11 |
+
from frequency_features import frequency_components,FREQUENCY_BANDS
|
| 12 |
+
from tangent_features import extract_tangent_features,TANGENT_DIM
|
| 13 |
+
from phase_features import phase_features,PHASE_DIM,PHASE_HALF
|
| 14 |
+
from coupling_features import coupling_features,PER_CHANNEL as COUPLING_PER_CHANNEL
|
| 15 |
+
from ordinal_features import ordinal_features,PER_CHANNEL as ORDINAL_PER_CHANNEL
|
| 16 |
+
|
| 17 |
+
def clinical_asymmetry_features(features):
|
| 18 |
+
"""Bipolar homologous-channel amplitude and coherence, invariant to mirroring."""
|
| 19 |
+
bands=len(EDGES)-1;per_channel=4*bands+4
|
| 20 |
+
block=features[:,:16*per_channel].reshape(-1,16,per_channel)
|
| 21 |
+
left=torch.tensor([0,1,2,3,8,9,10,11],device=features.device);right=left+4
|
| 22 |
+
pair_power=(block[:,left,:bands]-block[:,right,:bands]).abs().flatten(1)
|
| 23 |
+
pair_rms=(block[:,left,4*bands]-block[:,right,4*bands]).abs()
|
| 24 |
+
hemisphere=(block[:,left,:bands].mean(1)-block[:,right,:bands].mean(1)).abs()
|
| 25 |
+
index=left*(32-left-1)//2+(right-left-1)
|
| 26 |
+
correlations=features[:,16*per_channel:].reshape(-1,len(COV_BANDS),120)[:,:,index].flatten(1)
|
| 27 |
+
return torch.cat([pair_power,pair_rms,hemisphere,correlations],1)
|
| 28 |
+
|
| 29 |
+
class InputAdapter(nn.Module):
|
| 30 |
+
def __init__(self,c,width,channels,spectral_enabled=True,asymmetry=False,alpha_regions=None,envelope=False):
|
| 31 |
+
super().__init__()
|
| 32 |
+
self.ordinal_normalizer=Standardize(c*ORDINAL_PER_CHANNEL)
|
| 33 |
+
self.ordinal_projection=nn.Linear(c*ORDINAL_PER_CHANNEL,width)
|
| 34 |
+
self.ordinal_dropout=nn.Dropout(.3)
|
| 35 |
+
self.register_buffer('ordinal_probabilities_enabled',torch.ones(()))
|
| 36 |
+
self.coupling_normalizer=Standardize(c*COUPLING_PER_CHANNEL)
|
| 37 |
+
self.coupling_projection=nn.Linear(c*COUPLING_PER_CHANNEL,width)
|
| 38 |
+
self.coupling_dropout=nn.Dropout(.3)
|
| 39 |
+
self.register_buffer('coupling_dependence_enabled',torch.ones(()))
|
| 40 |
+
self.phase_normalizer=Standardize(PHASE_DIM)
|
| 41 |
+
self.signal=nn.Conv1d(c,channels,1,bias=False)
|
| 42 |
+
self.frequency_weight=nn.Parameter(torch.zeros(len(FREQUENCY_BANDS),channels,c))
|
| 43 |
+
self.neural=nn.Conv1d(c,18,1,bias=False)
|
| 44 |
+
self.normalizer=Standardize(feature_dim(c))
|
| 45 |
+
self.spectral=nn.Linear(feature_dim(c),width)
|
| 46 |
+
self.dropout=nn.Dropout(.1)
|
| 47 |
+
self.register_buffer("spectral_enabled",torch.tensor(float(spectral_enabled)))
|
| 48 |
+
self.spatial_weight=nn.Parameter(torch.randn(len(BANDS),24,c)/c**.5)
|
| 49 |
+
self.asymmetry_projection=nn.Linear(316,width,bias=False) if asymmetry else None
|
| 50 |
+
if asymmetry:
|
| 51 |
+
nn.init.zeros_(self.asymmetry_projection.weight)
|
| 52 |
+
self.asymmetry_normalizer=Standardize(316)
|
| 53 |
+
self.asymmetry_dropout=nn.Dropout(.1)
|
| 54 |
+
self.alpha_projection=None
|
| 55 |
+
if alpha_regions is not None:
|
| 56 |
+
self.register_buffer('alpha_regions',torch.tensor(alpha_regions,dtype=torch.float32))
|
| 57 |
+
self.alpha_normalizer=Standardize(ALPHA_DIM)
|
| 58 |
+
self.alpha_projection=nn.Linear(ALPHA_DIM,width,bias=False)
|
| 59 |
+
nn.init.zeros_(self.alpha_projection.weight)
|
| 60 |
+
self.alpha_dropout=nn.Dropout(.3)
|
| 61 |
+
self.envelope_projection=None
|
| 62 |
+
if envelope:
|
| 63 |
+
self.envelope_normalizer=Standardize(ENVELOPE_DIM)
|
| 64 |
+
self.envelope_projection=nn.Linear(ENVELOPE_DIM,width,bias=False)
|
| 65 |
+
nn.init.zeros_(self.envelope_projection.weight)
|
| 66 |
+
self.envelope_dropout=nn.Dropout(.3)
|
| 67 |
+
def coupling_embedding(self,features):
|
| 68 |
+
values=self.coupling_normalizer(features).reshape(len(features),-1,COUPLING_PER_CHANNEL)
|
| 69 |
+
values=torch.cat([values[...,:10],self.coupling_dependence_enabled*values[...,10:]],-1).flatten(1)
|
| 70 |
+
return self.coupling_projection(self.coupling_dropout(values))
|
| 71 |
+
def ordinal_embedding(self,features):
|
| 72 |
+
values=self.ordinal_normalizer(features).reshape(len(features),-1,5,26)
|
| 73 |
+
values=torch.cat([self.ordinal_probabilities_enabled*values[...,:24],values[...,24:]],-1).flatten(1)
|
| 74 |
+
return self.ordinal_projection(self.ordinal_dropout(values))
|
| 75 |
+
def spectral_features(self,features,signal=None,alpha_features=None,envelope_features=None):
|
| 76 |
+
value=self.spectral_enabled*self.spectral(self.dropout(self.normalizer(features)))
|
| 77 |
+
if self.asymmetry_projection is not None:
|
| 78 |
+
extra=self.asymmetry_dropout(self.asymmetry_normalizer(clinical_asymmetry_features(features)))
|
| 79 |
+
value=value+self.asymmetry_projection(extra)
|
| 80 |
+
if self.alpha_projection is not None:
|
| 81 |
+
if alpha_features is None:alpha_features=extract_alpha_features(signal,self.alpha_regions)
|
| 82 |
+
value=value+self.alpha_projection(self.alpha_dropout(self.alpha_normalizer(alpha_features)))
|
| 83 |
+
if self.envelope_projection is not None:
|
| 84 |
+
if envelope_features is None:envelope_features=extract_envelope_features(signal)
|
| 85 |
+
value=value+self.envelope_projection(self.envelope_dropout(self.envelope_normalizer(envelope_features)))
|
| 86 |
+
return value
|
| 87 |
+
def spatial_features(self,covariances):
|
| 88 |
+
with torch.autocast(covariances.device.type,enabled=False):
|
| 89 |
+
w=self.spatial_weight.float()/self.spatial_weight.float().norm(dim=-1,keepdim=True).clamp_min(1e-6)
|
| 90 |
+
power=torch.einsum('bfc,nbcd,bfd->nbf',w,covariances.float(),w).clamp_min(1e-8).log()
|
| 91 |
+
return torch.cat([power,power-power.mean(1,keepdim=True)],1).flatten(1)
|
| 92 |
+
def wave_signal(self,x,components=None):
|
| 93 |
+
if components is None:components=frequency_components(x)
|
| 94 |
+
correction=torch.einsum('blc,nbct->nlt',self.frequency_weight,components.to(self.frequency_weight.dtype))
|
| 95 |
+
return (self.signal(x)+correction.to(x.dtype)).unsqueeze(1)
|
| 96 |
+
def forward(self,x,features,covariance_features):
|
| 97 |
+
return self.wave_signal(x),self.spectral_features(features,signal=x),self.neural(x),covariance_features
|
| 98 |
+
|
| 99 |
+
class SharedBackbone(nn.Module):
|
| 100 |
+
def __init__(self,channels,width,depth,dropout,wave_filters):
|
| 101 |
+
super().__init__()
|
| 102 |
+
self.waveform=nn.Sequential(
|
| 103 |
+
nn.Conv2d(1,wave_filters,(1,64),padding=(0,32),bias=False),nn.GroupNorm(1,wave_filters),
|
| 104 |
+
nn.Conv2d(wave_filters,2*wave_filters,(channels,1),groups=wave_filters,bias=False),nn.GroupNorm(1,2*wave_filters),nn.ELU(),
|
| 105 |
+
nn.AvgPool2d((1,4)),nn.Dropout(.35),
|
| 106 |
+
nn.Conv2d(2*wave_filters,2*wave_filters,(1,16),padding=(0,8),groups=2*wave_filters,bias=False),nn.Conv2d(2*wave_filters,2*wave_filters,1,bias=False),
|
| 107 |
+
nn.GroupNorm(1,2*wave_filters),nn.ELU(),nn.AvgPool2d((1,8)),nn.Dropout(.35))
|
| 108 |
+
self.wave_summary=nn.Sequential(nn.AdaptiveAvgPool2d((1,8)),nn.Flatten(),nn.Linear(2*wave_filters*8,width))
|
| 109 |
+
self.fusion=nn.Sequential(nn.LayerNorm(width),nn.GELU(),nn.Dropout(dropout),
|
| 110 |
+
*[Residual(width,dropout) for _ in range(depth)],nn.LayerNorm(width))
|
| 111 |
+
# Both representations interact before the shared residual stack.
|
| 112 |
+
self.phase_encoder=nn.Sequential(nn.LayerNorm(PHASE_DIM),nn.Linear(PHASE_DIM,width),nn.GELU(),nn.Dropout(.3),Residual(width,.3),nn.LayerNorm(width))
|
| 113 |
+
self.register_buffer('phase_imaginary_enabled',torch.ones(()))
|
| 114 |
+
self.coupling_encoder=nn.Sequential(nn.LayerNorm(width),nn.Linear(width,width*2),nn.GELU(),nn.Dropout(.3),nn.Linear(width*2,width),nn.LayerNorm(width))
|
| 115 |
+
self.wave_gain=nn.Parameter(torch.tensor(.1))
|
| 116 |
+
self.biot=BIOT(n_chans=18,n_outputs=2,n_times=400,sfreq=200)
|
| 117 |
+
self.biot.final_layer=nn.Identity()
|
| 118 |
+
self.biot_projection=nn.Sequential(nn.LayerNorm(256),nn.Linear(256,width),nn.Dropout(.2))
|
| 119 |
+
nn.init.normal_(self.biot_projection[1].weight,std=.001);nn.init.zeros_(self.biot_projection[1].bias)
|
| 120 |
+
self.covariance_encoder=nn.Sequential(nn.LayerNorm(len(BANDS)*24*2),nn.Linear(len(BANDS)*24*2,width),nn.GELU(),nn.Dropout(.4),
|
| 121 |
+
*[Residual(width,.4) for _ in range(2)],nn.LayerNorm(width))
|
| 122 |
+
self.covariance_projection=nn.Linear(width,width)
|
| 123 |
+
nn.init.zeros_(self.covariance_projection.weight);nn.init.zeros_(self.covariance_projection.bias)
|
| 124 |
+
self.tangent_encoder=nn.Sequential(nn.LayerNorm(TANGENT_DIM),nn.Linear(TANGENT_DIM,width),nn.GELU(),nn.Dropout(.3),Residual(width,.3),nn.LayerNorm(width),nn.Linear(width,width))
|
| 125 |
+
self.ordinal_context=nn.Sequential(nn.LayerNorm(width),nn.Linear(width,width*2),nn.GELU(),nn.Dropout(.3),nn.Linear(width*2,width))
|
| 126 |
+
nn.init.zeros_(self.ordinal_context[-1].weight);nn.init.zeros_(self.ordinal_context[-1].bias)
|
| 127 |
+
self.register_buffer('codebrain_enabled',torch.ones(()))
|
| 128 |
+
self.codebrain_patch_encoder=nn.Sequential(nn.LayerNorm(24*64),nn.Linear(24*64,width),nn.GELU(),nn.Dropout(.3))
|
| 129 |
+
self.codebrain_context=nn.Sequential(nn.LayerNorm(width*4),nn.Linear(width*4,width*2),nn.GELU(),nn.Dropout(.3),nn.Linear(width*2,width))
|
| 130 |
+
nn.init.zeros_(self.codebrain_context[-1].weight);nn.init.zeros_(self.codebrain_context[-1].bias)
|
| 131 |
+
def codebrain_correction(self,tokens,representation,fusion_input):
|
| 132 |
+
with torch.autocast(tokens.device.type,enabled=False):
|
| 133 |
+
encoded=self.codebrain_patch_encoder(self.codebrain_enabled*tokens.float())
|
| 134 |
+
pooled=torch.cat([encoded.mean(1),encoded.std(1,correction=0),representation[:,-512:-384].float(),representation[:,-128:].float()],-1)
|
| 135 |
+
delta=self.codebrain_context(pooled)
|
| 136 |
+
added=.001*nn.functional.linear(delta,self.covariance_projection.weight,None)
|
| 137 |
+
corrected=self.fusion(fusion_input+added.to(fusion_input.dtype))
|
| 138 |
+
return corrected-representation[:,-512:-384],delta
|
| 139 |
+
def forward(self,signal,spectral,neural_signal,covariance_features,tangent_features):
|
| 140 |
+
wave=self.waveform(signal)
|
| 141 |
+
neural=self.biot(neural_signal.float())
|
| 142 |
+
neural=self.biot_projection[0](neural)
|
| 143 |
+
projected=self.biot_projection[2](self.biot_projection[1](neural))
|
| 144 |
+
with torch.autocast(signal.device.type,enabled=False):
|
| 145 |
+
covariance_embedding=self.covariance_encoder(covariance_features.float())
|
| 146 |
+
original=spectral+self.wave_gain*self.wave_summary(wave)+.01*projected
|
| 147 |
+
coupled=.001*self.covariance_projection(covariance_embedding).to(original.dtype)
|
| 148 |
+
fused=self.fusion(original+coupled)
|
| 149 |
+
with torch.autocast(signal.device.type,enabled=False):delta=self.tangent_encoder(tangent_features.float())
|
| 150 |
+
added=.001*nn.functional.linear(delta,self.covariance_projection.weight,None)
|
| 151 |
+
corrected=self.fusion((original+coupled)+added.to(original.dtype))
|
| 152 |
+
return torch.cat([wave.flatten(1),fused,neural,covariance_embedding],-1),corrected-fused,delta,original+coupled
|
| 153 |
+
|
| 154 |
+
class ResidualHead(nn.Module):
|
| 155 |
+
"""A small nonlinear classifier correction around an inherited linear readout."""
|
| 156 |
+
def __init__(self,features,classes,width=64,dropout=.3,full_precision=False):
|
| 157 |
+
super().__init__();self.full_precision=full_precision
|
| 158 |
+
self.base=nn.Linear(features,classes)
|
| 159 |
+
self.delta=nn.Sequential(nn.LayerNorm(features),nn.Linear(features,width),nn.GELU(),nn.Dropout(dropout),nn.Linear(width,classes))
|
| 160 |
+
nn.init.zeros_(self.delta[-1].weight);nn.init.zeros_(self.delta[-1].bias)
|
| 161 |
+
def forward(self,x):
|
| 162 |
+
if self.full_precision:
|
| 163 |
+
with torch.autocast(x.device.type,enabled=False):return self.base(x.float())+self.delta(x.float())
|
| 164 |
+
prior=nn.functional.linear(x[:,:-128].contiguous(),self.base.weight[:,:-128].contiguous(),self.base.bias)
|
| 165 |
+
added=nn.functional.linear(x[:,-128:].contiguous(),self.base.weight[:,-128:].contiguous())
|
| 166 |
+
value=prior+added
|
| 167 |
+
return value+self.delta(x).to(value.dtype)
|
| 168 |
+
|
| 169 |
+
class TemporalPoolHead(nn.Module):
|
| 170 |
+
def __init__(self,prior,channels=64):
|
| 171 |
+
super().__init__();self.prior=prior;self.channels=channels
|
| 172 |
+
self.register_buffer('pool_output_scale',torch.ones(()));self.register_buffer('pool_mean',torch.zeros(channels*4));self.register_buffer('pool_scale',torch.ones(channels*4))
|
| 173 |
+
self.pool_projection=nn.Linear(channels*4,prior.base.out_features)
|
| 174 |
+
nn.init.zeros_(self.pool_projection.weight);nn.init.zeros_(self.pool_projection.bias)
|
| 175 |
+
def statistics(self,x):
|
| 176 |
+
with torch.autocast(x.device.type,enabled=False):
|
| 177 |
+
wave=x[:,:-512].float().reshape(len(x),self.channels,-1)
|
| 178 |
+
return torch.cat([wave.mean(-1),wave.std(-1,correction=0),wave.amax(-1),wave.amin(-1)],-1)
|
| 179 |
+
def forward(self,x):
|
| 180 |
+
prior=self.prior(x)
|
| 181 |
+
with torch.autocast(x.device.type,enabled=False):
|
| 182 |
+
values=((self.statistics(x)-self.pool_mean)/self.pool_scale).clamp(-8,8)
|
| 183 |
+
added=self.pool_output_scale*self.pool_projection(values)
|
| 184 |
+
return prior+added.to(prior.dtype)
|
| 185 |
+
|
| 186 |
+
class TemporalEvidenceHead(nn.Module):
|
| 187 |
+
"""Pool class evidence over the shared waveform time axis."""
|
| 188 |
+
def __init__(self,prior,channels=64,temperature=.25):
|
| 189 |
+
super().__init__();self.prior=prior;self.channels=channels;self.temperature=temperature
|
| 190 |
+
self.register_buffer('evidence_output_scale',torch.ones(()))
|
| 191 |
+
self.register_buffer('evidence_mean',torch.zeros(channels))
|
| 192 |
+
self.register_buffer('evidence_scale',torch.ones(channels))
|
| 193 |
+
self.evidence_projection=nn.Linear(channels,prior.prior.base.out_features,bias=False)
|
| 194 |
+
nn.init.zeros_(self.evidence_projection.weight)
|
| 195 |
+
def patches(self,x):
|
| 196 |
+
with torch.autocast(x.device.type,enabled=False):
|
| 197 |
+
wave=x[:,:-512].float().reshape(len(x),self.channels,-1).transpose(1,2)
|
| 198 |
+
return ((wave-self.evidence_mean)/self.evidence_scale).clamp(-8,8)
|
| 199 |
+
def evidence(self,patches):
|
| 200 |
+
with torch.autocast(patches.device.type,enabled=False):
|
| 201 |
+
values=self.evidence_projection(patches.float())/self.temperature
|
| 202 |
+
maximum=values.amax(1,keepdim=True)
|
| 203 |
+
pooled=self.temperature*((values-maximum).exp().mean(1).log()+maximum.squeeze(1))
|
| 204 |
+
return self.evidence_output_scale*pooled
|
| 205 |
+
def forward(self,x):
|
| 206 |
+
prior=self.prior(x)
|
| 207 |
+
return prior+self.evidence(self.patches(x)).to(prior.dtype)
|
| 208 |
+
|
| 209 |
+
class FourierResidualHead(nn.Module):
|
| 210 |
+
"""A fixed random Fourier basis and trainable linear classifier correction."""
|
| 211 |
+
def __init__(self,prior,features,classes,basis=256):
|
| 212 |
+
super().__init__();self.prior=prior
|
| 213 |
+
self.register_buffer('rff_mean',torch.zeros(features));self.register_buffer('rff_scale',torch.ones(features))
|
| 214 |
+
self.register_buffer('rff_frequency',torch.randn(features,basis)/features**.5)
|
| 215 |
+
self.register_buffer('rff_phase',torch.rand(basis)*2*torch.pi)
|
| 216 |
+
self.register_buffer('rff_output_scale',torch.ones(()))
|
| 217 |
+
self.rff_projection=nn.Linear(3*basis,classes);nn.init.zeros_(self.rff_projection.weight);nn.init.zeros_(self.rff_projection.bias)
|
| 218 |
+
def basis(self,x):
|
| 219 |
+
with torch.autocast(x.device.type,enabled=False):
|
| 220 |
+
values=((x.float()-self.rff_mean)/self.rff_scale).clamp(-8,8)@self.rff_frequency
|
| 221 |
+
return 2**.5*torch.cat([(values/sigma+self.rff_phase).cos() for sigma in (.5,1.,2.)],-1)
|
| 222 |
+
def forward(self,x):
|
| 223 |
+
prior=self.prior(x)
|
| 224 |
+
with torch.autocast(x.device.type,enabled=False):added=self.rff_output_scale*self.rff_projection(self.basis(x))
|
| 225 |
+
return prior+added.to(prior.dtype)
|
| 226 |
+
|
| 227 |
+
class TangentFeatureHead(nn.Module):
|
| 228 |
+
"""Select a shared feature correction before the inherited classifier."""
|
| 229 |
+
def __init__(self,prior):
|
| 230 |
+
super().__init__();self.prior=prior;self.feature_gain=nn.Parameter(torch.zeros(()))
|
| 231 |
+
def forward(self,values):
|
| 232 |
+
old=values[:,:-256];fusion_delta=values[:,-256:-128];covariance_delta=values[:,-128:]
|
| 233 |
+
adjusted=torch.cat([old[:,:-512],old[:,-512:-384]+self.feature_gain*fusion_delta,old[:,-384:-128],old[:,-128:]+self.feature_gain*covariance_delta],-1)
|
| 234 |
+
return self.prior(adjusted)
|
| 235 |
+
|
| 236 |
+
class CodeBrainFeatureHead(nn.Module):
|
| 237 |
+
"""Private use of a jointly trained common feature correction."""
|
| 238 |
+
def __init__(self,prior):
|
| 239 |
+
super().__init__();self.prior=prior;self.codebrain_gain=nn.Parameter(torch.ones(()))
|
| 240 |
+
def forward(self,values):
|
| 241 |
+
previous=values[:,:-256];native=previous[:,:-256]
|
| 242 |
+
fusion_delta=values[:,-256:-128];covariance_delta=values[:,-128:]
|
| 243 |
+
adjusted=torch.cat([native[:,:-512],native[:,-512:-384]+self.codebrain_gain*fusion_delta,native[:,-384:-128],native[:,-128:]+self.codebrain_gain*covariance_delta],-1)
|
| 244 |
+
return self.prior(torch.cat([adjusted,previous[:,-256:]],-1))
|
| 245 |
+
|
| 246 |
+
class WaveCoactivationContext(nn.Module):
|
| 247 |
+
"""One common encoder of coactivation among the learned waveform channels."""
|
| 248 |
+
def __init__(self,channels=64,width=128):
|
| 249 |
+
super().__init__();self.channels=channels
|
| 250 |
+
ii,jj=torch.triu_indices(channels,channels,offset=1)
|
| 251 |
+
self.register_buffer('pair_i',ii);self.register_buffer('pair_j',jj)
|
| 252 |
+
self.register_buffer('offdiagonal_enabled',torch.ones(()))
|
| 253 |
+
self.encoder=nn.Sequential(nn.LayerNorm(channels+len(ii)),nn.Linear(channels+len(ii),width),nn.GELU(),nn.Dropout(.3),Residual(width,.3),nn.LayerNorm(width))
|
| 254 |
+
def statistics(self,native):
|
| 255 |
+
with torch.autocast(native.device.type,enabled=False):
|
| 256 |
+
wave=native[:,:-512].float().reshape(len(native),self.channels,-1)
|
| 257 |
+
centered=wave-wave.mean(-1,keepdim=True)
|
| 258 |
+
previous_tf32=torch.backends.cuda.matmul.allow_tf32
|
| 259 |
+
torch.backends.cuda.matmul.allow_tf32=False
|
| 260 |
+
covariance=centered@centered.transpose(-1,-2)/wave.shape[-1]
|
| 261 |
+
torch.backends.cuda.matmul.allow_tf32=previous_tf32
|
| 262 |
+
variance=covariance.diagonal(dim1=-2,dim2=-1).clamp_min(1e-8)
|
| 263 |
+
correlation=covariance/(variance.sqrt()[:,:,None]*variance.sqrt()[:,None,:])
|
| 264 |
+
return torch.cat([variance.log(),correlation[:,self.pair_i,self.pair_j].clamp(-1,1)],-1)
|
| 265 |
+
def encode_statistics(self,values):
|
| 266 |
+
with torch.autocast(values.device.type,enabled=False):
|
| 267 |
+
value=torch.cat([values[:,:self.channels],self.offdiagonal_enabled*values[:,self.channels:]],-1)
|
| 268 |
+
return self.encoder(value.float())
|
| 269 |
+
def forward(self,native):return self.encode_statistics(self.statistics(native))
|
| 270 |
+
|
| 271 |
+
class WaveCoactivationHead(nn.Module):
|
| 272 |
+
def __init__(self,prior,classes,width=128):
|
| 273 |
+
super().__init__();self.prior=prior;self.width=width;self.projection=nn.Linear(width,classes)
|
| 274 |
+
nn.init.zeros_(self.projection.weight);nn.init.zeros_(self.projection.bias)
|
| 275 |
+
self.register_buffer('output_scale',torch.ones(()));self.register_buffer('correction_gain',torch.ones(()))
|
| 276 |
+
def forward(self,values):
|
| 277 |
+
prior=self.prior(values[:,:-self.width])
|
| 278 |
+
with torch.autocast(values.device.type,enabled=False):delta=self.correction_gain*self.output_scale*self.projection(values[:,-self.width:].float())
|
| 279 |
+
return prior+delta.to(prior.dtype)
|
| 280 |
+
|
| 281 |
+
class OrdinalFeatureHead(nn.Module):
|
| 282 |
+
"""Private strength of one common ordinal-dynamics feature correction."""
|
| 283 |
+
def __init__(self,prior):
|
| 284 |
+
super().__init__();self.prior=prior;self.ordinal_gain=nn.Parameter(torch.ones(()))
|
| 285 |
+
def forward(self,values):
|
| 286 |
+
previous=values[:,:-256];native=previous[:,:-640]
|
| 287 |
+
adjusted=torch.cat([native[:,:-512],native[:,-512:-384]+self.ordinal_gain*values[:,-256:-128],native[:,-384:-128],native[:,-128:]+self.ordinal_gain*values[:,-128:],previous[:,-640:]],-1)
|
| 288 |
+
return self.prior(adjusted)
|
| 289 |
+
|
| 290 |
+
class PhaseReadoutHead(nn.Module):
|
| 291 |
+
"""Private class evidence from the common complex-coherence encoder."""
|
| 292 |
+
def __init__(self,prior,classes,width=128):
|
| 293 |
+
super().__init__();self.prior=prior;self.width=width;self.projection=nn.Linear(width,classes)
|
| 294 |
+
nn.init.zeros_(self.projection.weight);nn.init.zeros_(self.projection.bias)
|
| 295 |
+
self.register_buffer('output_scale',torch.ones(()));self.register_buffer('correction_gain',torch.ones(()))
|
| 296 |
+
def forward(self,values):
|
| 297 |
+
prior=self.prior(values[:,:-self.width])
|
| 298 |
+
with torch.autocast(values.device.type,enabled=False):delta=(self.correction_gain*self.output_scale)*self.projection(values[:,-self.width:].float())
|
| 299 |
+
return prior+delta.to(prior.dtype)
|
| 300 |
+
|
| 301 |
+
class SplitLayerNorm(nn.Module):
|
| 302 |
+
"""Two LayerNorm groups; surrounding dense matrices train across both groups."""
|
| 303 |
+
def __init__(self,width):
|
| 304 |
+
super().__init__();assert width%2==0;self.width=width
|
| 305 |
+
self.weight=nn.Parameter(torch.ones(width));self.bias=nn.Parameter(torch.zeros(width))
|
| 306 |
+
def forward(self,x):
|
| 307 |
+
n=self.width//2
|
| 308 |
+
return torch.cat([nn.functional.layer_norm(x[:,:n],(n,),self.weight[:n],self.bias[:n],1e-5),nn.functional.layer_norm(x[:,n:],(n,),self.weight[n:],self.bias[n:],1e-5)],-1)
|
| 309 |
+
|
| 310 |
+
class CouplingReadoutHead(nn.Module):
|
| 311 |
+
"""Private class evidence from the common cross-frequency coupling encoder."""
|
| 312 |
+
def __init__(self,prior,classes,width=128):
|
| 313 |
+
super().__init__();self.prior=prior;self.width=width;self.projection=nn.Linear(width,classes)
|
| 314 |
+
nn.init.zeros_(self.projection.weight);nn.init.zeros_(self.projection.bias)
|
| 315 |
+
self.register_buffer('output_scale',torch.ones(()));self.register_buffer('correction_gain',torch.ones(()))
|
| 316 |
+
def forward(self,values):
|
| 317 |
+
prior=self.prior(values[:,:-self.width])
|
| 318 |
+
with torch.autocast(values.device.type,enabled=False):delta=(self.correction_gain*self.output_scale)*self.projection(values[:,-self.width:].float())
|
| 319 |
+
return prior+delta.to(prior.dtype)
|
| 320 |
+
|
| 321 |
+
class HybridModel(nn.Module):
|
| 322 |
+
def __init__(self,channels=32,width=128,depth=2,dropout=.5,wave_filters=32,head_width=64,head_dropout=.3,clinical_asymmetry=True,alpha_regions=None,clinical_envelope=False,temporal_pool=True,temporal_evidence=False,evidence_temperature=.25,random_fourier=False,fourier_features=256,tangent_readout=True,shared_context_correction=True,wave_coactivation=True,ordinal_context=True,phase_coherence=True,cross_frequency=True,cbramod_feature_transfer=True,student_architecture=None,student_extension=True,post_embedding_extension=True,extension_activation='gelu',center_context_extension=True,context_crop='center',short_context_extension=True,short_crop='center',dual_context_extension=True,dual_crop='clinical-dual',geometry_extension=True,geometry_mode='mi-log',emotion_extension=True,emotion_mode='faced-log',emotion_activation='gelu',refinement_extension=True,refinement_mode='faced-log',refinement_activation='gelu',spatial_extension=True,spatial_mode='local',spatial_activation='gelu',spatial_motor_channels=None,conditional_extension=True,conditional_mode='partial',conditional_width=128):
|
| 323 |
+
super().__init__()
|
| 324 |
+
self.adapters=nn.ModuleDict({t:InputAdapter(c,width,channels,spectral_enabled=t not in ("faced","tuev","openbmi"),asymmetry=clinical_asymmetry and t=="tuev",alpha_regions=alpha_regions if t=="longitudinal" else None,envelope=clinical_envelope and t=="tuev") for t,(c,s,k) in SPECS.items()})
|
| 325 |
+
self.backbone=SharedBackbone(channels,width,depth,dropout,wave_filters)
|
| 326 |
+
self.backbone.student_encoder=CBraModFeatures(**(student_architecture or {}))
|
| 327 |
+
self.backbone.register_buffer('student_ordered_enabled',torch.ones(()))
|
| 328 |
+
self.backbone.student_readout=nn.Sequential(nn.Linear(self.backbone.student_encoder.output_dim,256),nn.LayerNorm(256),nn.GELU(),nn.Dropout(.3),nn.Linear(256,width),nn.LayerNorm(width))
|
| 329 |
+
for t,(c,s,k) in SPECS.items():
|
| 330 |
+
self.adapters[t].student_input=FrequencyAdapter(c,32)
|
| 331 |
+
self.adapters[t].student_normalizer=Standardize(self.backbone.student_encoder.output_dim)
|
| 332 |
+
self.backbone.wave_coactivation=WaveCoactivationContext(2*wave_filters,width)
|
| 333 |
+
self.heads=nn.ModuleDict({t:ResidualHead(2*wave_filters*(((s*200+1)//4+1)//8)+width+256+width,k,head_width,head_dropout,full_precision=t=='ad65') for t,(c,s,k) in SPECS.items()})
|
| 334 |
+
if temporal_pool:self.heads=nn.ModuleDict({t:TemporalPoolHead(head,wave_filters*2) for t,head in self.heads.items()})
|
| 335 |
+
if temporal_evidence:self.heads=nn.ModuleDict({t:TemporalEvidenceHead(head,wave_filters*2,evidence_temperature) for t,head in self.heads.items()})
|
| 336 |
+
if random_fourier:self.heads=nn.ModuleDict({t:FourierResidualHead(head,2*wave_filters*(((SPECS[t][1]*200+1)//4+1)//8)+width+256+width,SPECS[t][2],fourier_features) for t,head in self.heads.items()})
|
| 337 |
+
self.heads=nn.ModuleDict({t:TangentFeatureHead(head) for t,head in self.heads.items()})
|
| 338 |
+
self.heads=nn.ModuleDict({t:CodeBrainFeatureHead(head) for t,head in self.heads.items()})
|
| 339 |
+
self.heads=nn.ModuleDict({t:WaveCoactivationHead(head,SPECS[t][2],width) for t,head in self.heads.items()})
|
| 340 |
+
self.heads=nn.ModuleDict({t:OrdinalFeatureHead(head) for t,head in self.heads.items()})
|
| 341 |
+
self.heads=nn.ModuleDict({t:PhaseReadoutHead(head,SPECS[t][2],width) for t,head in self.heads.items()})
|
| 342 |
+
self.heads=nn.ModuleDict({t:CouplingReadoutHead(head,SPECS[t][2],width) for t,head in self.heads.items()})
|
| 343 |
+
self.heads=nn.ModuleDict({t:CouplingReadoutHead(head,SPECS[t][2],width) for t,head in self.heads.items()})
|
| 344 |
+
assert student_extension and post_embedding_extension
|
| 345 |
+
assert extension_activation in ('gelu','identity')
|
| 346 |
+
self.backbone.student_extension=nn.Sequential(nn.Linear(width,256),nn.LayerNorm(256),nn.GELU() if extension_activation=='gelu' else nn.Identity(),nn.Dropout(.3),nn.Linear(256,width),nn.LayerNorm(width))
|
| 347 |
+
self.heads=nn.ModuleDict({t:CouplingReadoutHead(head,SPECS[t][2],width) for t,head in self.heads.items()})
|
| 348 |
+
assert center_context_extension and context_crop in ('center','first')
|
| 349 |
+
self.context_crop=context_crop
|
| 350 |
+
for t,(c,s,k) in SPECS.items():
|
| 351 |
+
self.adapters[t].center_normalizer=Standardize(feature_dim(c)+30*c)
|
| 352 |
+
self.adapters[t].center_projection=nn.Linear(feature_dim(c)+30*c,width)
|
| 353 |
+
self.backbone.center_encoder=nn.Sequential(nn.Linear(width,256),nn.LayerNorm(256),nn.GELU(),nn.Dropout(.3),nn.Linear(256,width),nn.LayerNorm(width))
|
| 354 |
+
self.heads=nn.ModuleDict({t:CouplingReadoutHead(head,SPECS[t][2],width) for t,head in self.heads.items()})
|
| 355 |
+
assert short_context_extension and short_crop in ('center','first')
|
| 356 |
+
self.short_crop=short_crop
|
| 357 |
+
for t,(c,s,k) in SPECS.items():
|
| 358 |
+
self.adapters[t].short_normalizer=Standardize(feature_dim(c)+30*c)
|
| 359 |
+
self.adapters[t].short_projection=nn.Linear(feature_dim(c)+30*c,width)
|
| 360 |
+
self.backbone.short_encoder=nn.Sequential(nn.Linear(width,256),nn.LayerNorm(256),nn.GELU(),nn.Dropout(.3),nn.Linear(256,width),nn.LayerNorm(width))
|
| 361 |
+
self.heads=nn.ModuleDict({t:CouplingReadoutHead(head,SPECS[t][2],width) for t,head in self.heads.items()})
|
| 362 |
+
assert dual_context_extension and dual_crop in ('clinical-dual','clinical-duplicate')
|
| 363 |
+
self.dual_crop=dual_crop
|
| 364 |
+
for t,(c,s,k) in SPECS.items():
|
| 365 |
+
self.adapters[t].dual_normalizer=Standardize((feature_dim(c)+30*c)*(2 if t=='tuev' else 1))
|
| 366 |
+
self.adapters[t].dual_projection=nn.Linear((feature_dim(c)+30*c)*(2 if t=='tuev' else 1),width)
|
| 367 |
+
self.backbone.dual_encoder=nn.Sequential(nn.Linear(width,256),nn.LayerNorm(256),nn.GELU(),nn.Dropout(.3),nn.Linear(256,width),nn.LayerNorm(width))
|
| 368 |
+
self.heads=nn.ModuleDict({t:CouplingReadoutHead(head,SPECS[t][2],width) for t,head in self.heads.items()})
|
| 369 |
+
assert geometry_extension and geometry_mode in ('mi-log','mi-linear')
|
| 370 |
+
self.geometry_mode=geometry_mode
|
| 371 |
+
for t,(c,s,k) in SPECS.items():
|
| 372 |
+
dimension=7*c*(c+1)//2 if t=='openbmi' else feature_dim(c)+30*c
|
| 373 |
+
self.adapters[t].geometry_normalizer=Standardize(dimension)
|
| 374 |
+
self.adapters[t].geometry_projection=nn.Linear(dimension,width)
|
| 375 |
+
self.backbone.geometry_encoder=nn.Sequential(nn.Linear(width,256),nn.LayerNorm(256),nn.GELU(),nn.Dropout(.3),nn.Linear(256,width),nn.LayerNorm(width))
|
| 376 |
+
self.heads=nn.ModuleDict({t:CouplingReadoutHead(head,SPECS[t][2],width) for t,head in self.heads.items()})
|
| 377 |
+
assert emotion_extension and emotion_mode in ('faced-log','faced-linear')
|
| 378 |
+
self.emotion_mode=emotion_mode
|
| 379 |
+
for t,(c,s,k) in SPECS.items():
|
| 380 |
+
dimension=7*c*(c+1)//2 if t=='faced' else feature_dim(c)+30*c
|
| 381 |
+
self.adapters[t].emotion_normalizer=Standardize(dimension)
|
| 382 |
+
self.adapters[t].emotion_projection=nn.Linear(dimension,width)
|
| 383 |
+
assert emotion_activation in ('gelu','identity')
|
| 384 |
+
self.backbone.emotion_encoder=nn.Sequential(nn.Linear(width,256),nn.LayerNorm(256),nn.GELU() if emotion_activation=='gelu' else nn.Identity(),nn.Dropout(.3),nn.Linear(256,width),nn.LayerNorm(width))
|
| 385 |
+
self.heads=nn.ModuleDict({t:CouplingReadoutHead(head,SPECS[t][2],width) for t,head in self.heads.items()})
|
| 386 |
+
assert refinement_extension and refinement_mode in ('faced-log','faced-linear')
|
| 387 |
+
self.refinement_mode=refinement_mode
|
| 388 |
+
for t,(c,s,k) in SPECS.items():
|
| 389 |
+
dimension=7*c*(c+1)//2 if t=='faced' else feature_dim(c)+30*c
|
| 390 |
+
self.adapters[t].refinement_normalizer=Standardize(dimension)
|
| 391 |
+
self.adapters[t].refinement_projection=nn.Linear(dimension,width)
|
| 392 |
+
assert refinement_activation in ('gelu','identity')
|
| 393 |
+
self.backbone.refinement_encoder=nn.Sequential(nn.Linear(width,256),nn.LayerNorm(256),nn.GELU() if refinement_activation=='gelu' else nn.Identity(),nn.Dropout(.3),nn.Linear(256,width),nn.LayerNorm(width))
|
| 394 |
+
self.heads=nn.ModuleDict({t:CouplingReadoutHead(head,SPECS[t][2],width) for t,head in self.heads.items()})
|
| 395 |
+
assert spatial_extension and spatial_mode in ('local','native') and spatial_activation=='gelu'
|
| 396 |
+
self.spatial_mode=spatial_mode
|
| 397 |
+
self.spatial_motor_channels=tuple(spatial_motor_channels or MOTOR_CHANNELS)
|
| 398 |
+
assert len(self.spatial_motor_channels)==62
|
| 399 |
+
for t,(c,s,k) in SPECS.items():
|
| 400 |
+
dimension=981 if t=='openbmi' else (7*c*(c+1)//2 if t=='faced' else feature_dim(c)+30*c)
|
| 401 |
+
self.adapters[t].spatial_normalizer=Standardize(dimension)
|
| 402 |
+
self.adapters[t].spatial_projection=nn.Linear(dimension,width)
|
| 403 |
+
self.backbone.spatial_encoder=nn.Sequential(nn.Linear(width,256),nn.LayerNorm(256),nn.GELU(),nn.Dropout(.3),nn.Linear(256,width),nn.LayerNorm(width))
|
| 404 |
+
self.heads=nn.ModuleDict({t:CouplingReadoutHead(head,SPECS[t][2],width) for t,head in self.heads.items()})
|
| 405 |
+
assert conditional_extension and conditional_mode in ('partial','marginal')
|
| 406 |
+
assert conditional_width in (128,256)
|
| 407 |
+
self.conditional_mode=conditional_mode
|
| 408 |
+
for t,(c,s,k) in SPECS.items():
|
| 409 |
+
dimension=952 if t=='tuev' else self.adapters[t].spatial_projection.in_features
|
| 410 |
+
self.adapters[t].conditional_normalizer=Standardize(dimension)
|
| 411 |
+
self.adapters[t].conditional_projection=nn.Linear(dimension,conditional_width)
|
| 412 |
+
norm=SplitLayerNorm if conditional_width==256 else nn.LayerNorm
|
| 413 |
+
self.backbone.conditional_encoder=nn.Sequential(nn.Linear(conditional_width,2*conditional_width),norm(2*conditional_width),nn.GELU(),nn.Dropout(.3),nn.Linear(2*conditional_width,conditional_width),norm(conditional_width))
|
| 414 |
+
self.heads=nn.ModuleDict({t:CouplingReadoutHead(head,SPECS[t][2],conditional_width) for t,head in self.heads.items()})
|
| 415 |
+
def conditional_features(self,t,x):
|
| 416 |
+
if t!='tuev':return self.spatial_features(t,x)
|
| 417 |
+
from partial_covariance_features import partial_covariance_features
|
| 418 |
+
old=torch.backends.cuda.matmul.allow_tf32;torch.backends.cuda.matmul.allow_tf32=False
|
| 419 |
+
try:
|
| 420 |
+
with torch.autocast(x.device.type,enabled=False):return partial_covariance_features(t,x,self.conditional_mode=='partial')
|
| 421 |
+
finally:torch.backends.cuda.matmul.allow_tf32=old
|
| 422 |
+
def conditional_embedding(self,t,values):
|
| 423 |
+
with torch.autocast(values.device.type,enabled=False):
|
| 424 |
+
return self.backbone.conditional_encoder(self.adapters[t].conditional_projection(self.adapters[t].conditional_normalizer(values.float())))
|
| 425 |
+
def spatial_features(self,t,x):
|
| 426 |
+
if t!='openbmi':return self.refinement_features(t,x)
|
| 427 |
+
from local_channel_features import local_channel_signals
|
| 428 |
+
old=torch.backends.cuda.matmul.allow_tf32;torch.backends.cuda.matmul.allow_tf32=False
|
| 429 |
+
try:
|
| 430 |
+
with torch.autocast(x.device.type,enabled=False):
|
| 431 |
+
signals=local_channel_signals(x,self.spatial_motor_channels,self.spatial_mode=='local')
|
| 432 |
+
return torch.cat([extract_features('tuev',signals),coupling_features('tuev',signals)],-1)
|
| 433 |
+
finally:torch.backends.cuda.matmul.allow_tf32=old
|
| 434 |
+
def spatial_embedding(self,t,values):
|
| 435 |
+
with torch.autocast(values.device.type,enabled=False):
|
| 436 |
+
normalized=self.adapters[t].spatial_normalizer(values.float())
|
| 437 |
+
return self.backbone.spatial_encoder(self.adapters[t].spatial_projection(normalized))
|
| 438 |
+
def refinement_features(self,t,x):
|
| 439 |
+
from native_log_covariance_features import connectivity
|
| 440 |
+
from short_context_features import short_spectral_features
|
| 441 |
+
old=torch.backends.cuda.matmul.allow_tf32;torch.backends.cuda.matmul.allow_tf32=False
|
| 442 |
+
try:
|
| 443 |
+
with torch.autocast(x.device.type,enabled=False):
|
| 444 |
+
if t=='faced':return connectivity(t,x,logarithmic=self.refinement_mode=='faced-log')
|
| 445 |
+
view=x.flatten(2)[...,:200]
|
| 446 |
+
return torch.cat([short_spectral_features(t,view),coupling_features(t,view)],-1)
|
| 447 |
+
finally:torch.backends.cuda.matmul.allow_tf32=old
|
| 448 |
+
def refinement_embedding(self,t,values):
|
| 449 |
+
with torch.autocast(values.device.type,enabled=False):
|
| 450 |
+
normalized=self.adapters[t].refinement_normalizer(values.float())
|
| 451 |
+
return self.backbone.refinement_encoder(self.adapters[t].refinement_projection(normalized))
|
| 452 |
+
def emotion_features(self,t,x):
|
| 453 |
+
from native_log_covariance_features import connectivity
|
| 454 |
+
from short_context_features import short_spectral_features
|
| 455 |
+
old=torch.backends.cuda.matmul.allow_tf32;torch.backends.cuda.matmul.allow_tf32=False
|
| 456 |
+
try:
|
| 457 |
+
with torch.autocast(x.device.type,enabled=False):
|
| 458 |
+
if t=='faced':return connectivity(t,x,logarithmic=self.emotion_mode=='faced-log')
|
| 459 |
+
view=x.flatten(2)[...,:200]
|
| 460 |
+
return torch.cat([short_spectral_features(t,view),coupling_features(t,view)],-1)
|
| 461 |
+
finally:torch.backends.cuda.matmul.allow_tf32=old
|
| 462 |
+
def emotion_embedding(self,t,values):
|
| 463 |
+
with torch.autocast(values.device.type,enabled=False):
|
| 464 |
+
normalized=self.adapters[t].emotion_normalizer(values.float())
|
| 465 |
+
return self.backbone.emotion_encoder(self.adapters[t].emotion_projection(normalized))
|
| 466 |
+
def geometry_features(self,t,x):
|
| 467 |
+
from native_log_covariance_features import connectivity
|
| 468 |
+
from short_context_features import short_spectral_features
|
| 469 |
+
old=torch.backends.cuda.matmul.allow_tf32;torch.backends.cuda.matmul.allow_tf32=False
|
| 470 |
+
try:
|
| 471 |
+
with torch.autocast(x.device.type,enabled=False):
|
| 472 |
+
if t=='openbmi':return connectivity(t,x,logarithmic=self.geometry_mode=='mi-log')
|
| 473 |
+
view=x.flatten(2)[...,:200]
|
| 474 |
+
return torch.cat([short_spectral_features(t,view),coupling_features(t,view)],-1)
|
| 475 |
+
finally:torch.backends.cuda.matmul.allow_tf32=old
|
| 476 |
+
def geometry_embedding(self,t,values):
|
| 477 |
+
with torch.autocast(values.device.type,enabled=False):
|
| 478 |
+
normalized=self.adapters[t].geometry_normalizer(values.float())
|
| 479 |
+
return self.backbone.geometry_encoder(self.adapters[t].geometry_projection(normalized))
|
| 480 |
+
def dual_features(self,t,x):
|
| 481 |
+
from short_context_features import short_spectral_features
|
| 482 |
+
raw=x.flatten(2);first=raw[...,:200];views=[first]
|
| 483 |
+
if t=='tuev':
|
| 484 |
+
start=(raw.shape[-1]-200)//2
|
| 485 |
+
views.append(raw[...,start:start+200] if self.dual_crop=='clinical-dual' else first)
|
| 486 |
+
old=torch.backends.cuda.matmul.allow_tf32;torch.backends.cuda.matmul.allow_tf32=False
|
| 487 |
+
try:
|
| 488 |
+
with torch.autocast(raw.device.type,enabled=False):return torch.cat([torch.cat([short_spectral_features(t,v),coupling_features(t,v)],-1) for v in views],-1)
|
| 489 |
+
finally:torch.backends.cuda.matmul.allow_tf32=old
|
| 490 |
+
def dual_embedding(self,t,values):
|
| 491 |
+
with torch.autocast(values.device.type,enabled=False):
|
| 492 |
+
normalized=self.adapters[t].dual_normalizer(values.float())
|
| 493 |
+
return self.backbone.dual_encoder(self.adapters[t].dual_projection(normalized))
|
| 494 |
+
def short_features(self,t,x):
|
| 495 |
+
from short_context_features import short_spectral_features
|
| 496 |
+
raw=x.flatten(2);start=(raw.shape[-1]-200)//2 if self.short_crop=='center' else 0
|
| 497 |
+
cropped=raw[...,start:start+200];assert cropped.shape[-1]==200
|
| 498 |
+
old=torch.backends.cuda.matmul.allow_tf32;torch.backends.cuda.matmul.allow_tf32=False
|
| 499 |
+
try:
|
| 500 |
+
with torch.autocast(raw.device.type,enabled=False):return torch.cat([short_spectral_features(t,cropped),coupling_features(t,cropped)],-1)
|
| 501 |
+
finally:torch.backends.cuda.matmul.allow_tf32=old
|
| 502 |
+
def short_embedding(self,t,values):
|
| 503 |
+
with torch.autocast(values.device.type,enabled=False):
|
| 504 |
+
normalized=self.adapters[t].short_normalizer(values.float())
|
| 505 |
+
return self.backbone.short_encoder(self.adapters[t].short_projection(normalized))
|
| 506 |
+
def center_features(self,t,x):
|
| 507 |
+
raw=x.flatten(2);start=(raw.shape[-1]-400)//2 if self.context_crop=='center' else 0
|
| 508 |
+
cropped=raw[...,start:start+400];assert cropped.shape[-1]==400
|
| 509 |
+
old=torch.backends.cuda.matmul.allow_tf32;torch.backends.cuda.matmul.allow_tf32=False
|
| 510 |
+
try:
|
| 511 |
+
with torch.autocast(raw.device.type,enabled=False):return torch.cat([extract_features(t,cropped),coupling_features(t,cropped)],-1)
|
| 512 |
+
finally:torch.backends.cuda.matmul.allow_tf32=old
|
| 513 |
+
def center_embedding(self,t,values):
|
| 514 |
+
with torch.autocast(values.device.type,enabled=False):
|
| 515 |
+
normalized=self.adapters[t].center_normalizer(values.float())
|
| 516 |
+
return self.backbone.center_encoder(self.adapters[t].center_projection(normalized))
|
| 517 |
+
def student_extension_embedding(self,t,values):
|
| 518 |
+
with torch.autocast(values.device.type,enabled=False):
|
| 519 |
+
assert values.shape[-1]==128
|
| 520 |
+
return self.backbone.student_extension(values.float())
|
| 521 |
+
|
| 522 |
+
def student_features(self,t,x):
|
| 523 |
+
outputs=[];old_fastpath=torch.backends.mha.get_fastpath_enabled();torch.backends.mha.set_fastpath_enabled(False)
|
| 524 |
+
try:
|
| 525 |
+
for raw in x.split(16):
|
| 526 |
+
signal=torch.nan_to_num(raw.float().flatten(2),nan=0.,posinf=1e5,neginf=-1e5).clamp(-1e5,1e5)
|
| 527 |
+
signal=signal-signal.mean(-1,keepdim=True)
|
| 528 |
+
if t in ('faced','tuev'):signal=signal/signal.std(-1,keepdim=True,correction=0).clamp_min(1e-6)
|
| 529 |
+
else:signal=signal-signal.mean(1,keepdim=True)
|
| 530 |
+
signal=signal.clamp(-20,20)
|
| 531 |
+
with torch.autocast(signal.device.type,dtype=torch.bfloat16,enabled=signal.device.type=='cuda'):
|
| 532 |
+
outputs.append(self.backbone.student_encoder(self.adapters[t].student_input(signal)))
|
| 533 |
+
finally:torch.backends.mha.set_fastpath_enabled(old_fastpath)
|
| 534 |
+
return torch.cat(outputs).float()
|
| 535 |
+
def student_embedding(self,t,values):
|
| 536 |
+
with torch.autocast(values.device.type,enabled=False):
|
| 537 |
+
normalized=self.adapters[t].student_normalizer(values.float())
|
| 538 |
+
normalized=torch.cat([normalized[:,:256],self.backbone.student_ordered_enabled*normalized[:,256:]],-1)
|
| 539 |
+
return self.backbone.student_readout(normalized)
|
| 540 |
+
def coupling_embedding(self,t,values):
|
| 541 |
+
with torch.autocast(values.device.type,enabled=False):return self.backbone.coupling_encoder(self.adapters[t].coupling_embedding(values.float()))
|
| 542 |
+
def phase_embedding(self,t,values):
|
| 543 |
+
with torch.autocast(values.device.type,enabled=False):
|
| 544 |
+
normalized=self.adapters[t].phase_normalizer(values.float())
|
| 545 |
+
normalized=torch.cat([normalized[:,:PHASE_HALF],self.backbone.phase_imaginary_enabled*normalized[:,PHASE_HALF:]],-1)
|
| 546 |
+
return self.backbone.phase_encoder(normalized)
|
| 547 |
+
def forward(self,t,x,features=None,covariances=None,covariance_features=None):
|
| 548 |
+
if features is None:features=extract_features(t,x)
|
| 549 |
+
if covariance_features is None:
|
| 550 |
+
if covariances is None:covariances=extract_covariances(t,x)
|
| 551 |
+
covariance_features=self.adapters[t].spatial_features(covariances)
|
| 552 |
+
signal=x.flatten(2);signal=signal-signal.mean(-1,keepdim=True)
|
| 553 |
+
if t in ('faced','tuev'):signal=signal/signal.std(-1,keepdim=True,correction=0).clamp_min(1e-6)
|
| 554 |
+
else:signal=signal-signal.mean(1,keepdim=True)
|
| 555 |
+
signal=signal.clamp(-20,20)
|
| 556 |
+
adapted=self.adapters[t](signal,features,covariance_features)
|
| 557 |
+
if covariances is None:covariances=extract_covariances(t,x)
|
| 558 |
+
tangent=extract_tangent_features(covariances,self.adapters[t].spatial_weight)
|
| 559 |
+
representation,fusion_delta,covariance_delta,fusion_input=self.backbone(*adapted,tangent_features=tangent)
|
| 560 |
+
if t in ('faced','openbmi'):
|
| 561 |
+
representation=torch.cat([representation[:,:-384],torch.zeros_like(representation[:,-384:-128]),representation[:,-128:]],-1)
|
| 562 |
+
tokens=torch.zeros(len(signal),signal.shape[-1]//200,24*64,device=signal.device,dtype=torch.bfloat16)
|
| 563 |
+
code_fusion,code_covariance=self.backbone.codebrain_correction(tokens,representation,fusion_input)
|
| 564 |
+
coactivation=self.backbone.wave_coactivation(representation)
|
| 565 |
+
with torch.autocast(signal.device.type,enabled=False):
|
| 566 |
+
ordinal=self.adapters[t].ordinal_embedding(ordinal_features(t,x))
|
| 567 |
+
ordinal_covariance=self.backbone.ordinal_context(ordinal.float())
|
| 568 |
+
added=.001*nn.functional.linear(ordinal_covariance,self.backbone.covariance_projection.weight,None)
|
| 569 |
+
ordinal_fusion=self.backbone.fusion(fusion_input+added.to(fusion_input.dtype))-representation[:,-512:-384]
|
| 570 |
+
phase=self.phase_embedding(t,phase_features(t,x,self.adapters[t].spatial_weight))
|
| 571 |
+
coupling=self.coupling_embedding(t,coupling_features(t,x))
|
| 572 |
+
student_values=self.student_features(t,x)
|
| 573 |
+
student=self.student_embedding(t,student_values)
|
| 574 |
+
extension=self.student_extension_embedding(t,student)
|
| 575 |
+
return self.heads[t](torch.cat([representation,fusion_delta,covariance_delta,code_fusion,code_covariance,coactivation,ordinal_fusion,ordinal_covariance,phase,coupling,student,extension,self.center_embedding(t,self.center_features(t,x)),self.short_embedding(t,self.short_features(t,x)),self.dual_embedding(t,self.dual_features(t,x)),self.geometry_embedding(t,self.geometry_features(t,x)),self.emotion_embedding(t,self.emotion_features(t,x)),self.refinement_embedding(t,self.refinement_features(t,x)),self.spatial_embedding(t,self.spatial_features(t,x)),self.conditional_embedding(t,self.conditional_features(t,x))],-1))
|
| 576 |
+
|
| 577 |
+
def widen_state_dict(state,multiplier=2):
|
| 578 |
+
"""Duplicate temporal features and divide downstream sums to preserve outputs."""
|
| 579 |
+
result={}
|
| 580 |
+
for key,value in state.items():
|
| 581 |
+
if key.startswith('backbone.waveform.'):
|
| 582 |
+
layer=int(key.split('.')[2])
|
| 583 |
+
if layer in (0,2,7):value=value.repeat(multiplier,1,1,1)
|
| 584 |
+
elif layer in (1,3,9):value=value.repeat(multiplier)
|
| 585 |
+
elif layer==8:value=value.repeat(multiplier,multiplier,1,1)/multiplier
|
| 586 |
+
elif key=='backbone.wave_summary.2.weight':value=value.repeat(1,multiplier)/multiplier
|
| 587 |
+
elif key.startswith('heads.') and key.endswith('.weight'):
|
| 588 |
+
raw=value[:,:-128]/multiplier
|
| 589 |
+
value=torch.cat([raw]*multiplier+[value[:,-128:]],1)
|
| 590 |
+
result[key]=value
|
| 591 |
+
return result
|
| 592 |
+
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/local_channel_features.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Named local channel differences. These are fixed differences, not a physical CSD model."""
|
| 2 |
+
import torch
|
| 3 |
+
ALIASES={'T3':'T7','T4':'T8','T5':'P7','T6':'P8'}
|
| 4 |
+
NEIGHBORS={'C3':('F3','CZ','P3','T7'),'CZ':('FZ','C3','C4','PZ'),'C4':('F4','CZ','P4','T8'),'P3':('C3','PZ','O1','P7'),'PZ':('CZ','P3','P4','O1','O2'),'P4':('C4','PZ','O2','P8')}
|
| 5 |
+
def canonical(channels):
|
| 6 |
+
result=[ALIASES.get(name.upper(),name.upper()) for name in channels]
|
| 7 |
+
assert len(set(result))==len(result)
|
| 8 |
+
return result
|
| 9 |
+
|
| 10 |
+
def projection_matrix(channels,local=True):
|
| 11 |
+
names=canonical(channels);matrix=torch.zeros(len(NEIGHBORS),len(names))
|
| 12 |
+
for i,(center,neighbors) in enumerate(NEIGHBORS.items()):
|
| 13 |
+
matrix[i,names.index(center)]=1
|
| 14 |
+
if local:
|
| 15 |
+
for name in neighbors:matrix[i,names.index(name)]-=1/len(neighbors)
|
| 16 |
+
else:matrix[i]-=1/len(names)
|
| 17 |
+
return matrix
|
| 18 |
+
|
| 19 |
+
@torch.no_grad()
|
| 20 |
+
def local_channel_signals(signal,channels,local=True):
|
| 21 |
+
with torch.autocast(signal.device.type,enabled=False):
|
| 22 |
+
x=torch.nan_to_num(signal.float().flatten(2),nan=0.,posinf=1e5,neginf=-1e5).clamp(-1e5,1e5)
|
| 23 |
+
names=canonical(channels)
|
| 24 |
+
if local:
|
| 25 |
+
return torch.stack([(x[:,names.index(center),None]-x[:,[names.index(n) for n in neighbors]]).mean(1) for center,neighbors in NEIGHBORS.items()],1)
|
| 26 |
+
return x[:,[names.index(center) for center in NEIGHBORS]]-x.mean(1,keepdim=True)
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/model.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Portable fixed common activation normalization groups over a frozen, hash-bound complete parent."""
|
| 2 |
+
from shared_activation_groups_parent_model import *
|
| 3 |
+
from activation_groups_math import MODES, configure_groups
|
| 4 |
+
from temporal_convolution_math import SharedTemporalConvolution, raw_convolution_features, precise_convolution
|
| 5 |
+
|
| 6 |
+
SourceHybridModel = HybridModel
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
class ActivationGroupsHead(nn.Module):
|
| 10 |
+
def __init__(self, classes):
|
| 11 |
+
super().__init__()
|
| 12 |
+
self.projection = nn.Linear(128, classes)
|
| 13 |
+
nn.init.normal_(self.projection.weight, std=.02)
|
| 14 |
+
nn.init.zeros_(self.projection.bias)
|
| 15 |
+
self.register_buffer('blend_strength', torch.tensor(0.))
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
class HybridModel(SourceHybridModel):
|
| 19 |
+
def __init__(self, activation_groups_refinement=False, activation_groups_mode='all', **kwargs):
|
| 20 |
+
super().__init__(**kwargs)
|
| 21 |
+
assert activation_groups_refinement and activation_groups_mode in MODES
|
| 22 |
+
self.activation_groups_mode = activation_groups_mode
|
| 23 |
+
for track in TRACKS:
|
| 24 |
+
self.adapters[track].activation_groups_projection = nn.Linear(SPECS[track][0], 16, bias=False)
|
| 25 |
+
self.backbone.activation_groups_encoder = configure_groups(SharedTemporalConvolution(), activation_groups_mode)
|
| 26 |
+
self.activation_groups_heads = nn.ModuleDict({track: ActivationGroupsHead(SPECS[track][2]) for track in TRACKS})
|
| 27 |
+
|
| 28 |
+
def activation_groups_logits(self, track, values):
|
| 29 |
+
with precise_convolution(values.device.type):
|
| 30 |
+
adapted = self.adapters[track].activation_groups_projection(values.float().transpose(1, 2)).transpose(1, 2)
|
| 31 |
+
embedding = self.backbone.activation_groups_encoder(adapted)
|
| 32 |
+
return self.activation_groups_heads[track].projection(embedding)
|
| 33 |
+
|
| 34 |
+
def activation_groups_predict(self, track, values, prior, strength=None):
|
| 35 |
+
logits = self.activation_groups_logits(track, values)
|
| 36 |
+
strength = self.activation_groups_heads[track].blend_strength if strength is None else strength
|
| 37 |
+
return (1-strength)*prior.float()+strength*logits
|
| 38 |
+
|
| 39 |
+
def forward(self, track, raw, features=None, covariances=None, covariance_features=None):
|
| 40 |
+
prior = super().forward(track, raw, features, covariances=covariances, covariance_features=covariance_features)
|
| 41 |
+
return self.activation_groups_predict(track, raw_convolution_features(track, raw, 'raw'), prior)
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/multitaper_covariance_features.py
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Fixed DPSS covariance geometry; no fitted reference or adaptive spectral weights."""
|
| 2 |
+
from functools import lru_cache
|
| 3 |
+
import numpy as np,torch
|
| 4 |
+
from scipy.signal.windows import dpss
|
| 5 |
+
from native_log_covariance_features import BANDS
|
| 6 |
+
from partial_covariance_features import summarize_matrix
|
| 7 |
+
@lru_cache(maxsize=8)
|
| 8 |
+
def tapers(n):
|
| 9 |
+
v=np.array(dpss(n,3.,Kmax=5,sym=True,norm=2),dtype=np.float64,copy=True);v*=np.sqrt(n)/np.linalg.norm(v,axis=1,keepdims=True);return v
|
| 10 |
+
@torch.no_grad()
|
| 11 |
+
def tapered_matrices(track,raw):
|
| 12 |
+
x=torch.nan_to_num(raw.double().flatten(2),nan=0.,posinf=1e5,neginf=-1e5).clamp(-1e5,1e5);x=x-x[...,:1];x=x-x.mean(-1,keepdim=True)
|
| 13 |
+
if track in ['ad65','openbmi','longitudinal']:x=x-x.mean(1,keepdim=True)
|
| 14 |
+
b,c,n=x.shape;reference=x.square().mean((-1,-2))[:,None,None];window=torch.tensor(np.concatenate([tapers(n),np.ones((1,n))]),device=x.device);z=torch.fft.rfft(x[None]*window[:,None,None,:],dim=-1);freq=torch.fft.rfftfreq(n,1/200,device=x.device,dtype=torch.float64);eye=torch.eye(c,device=x.device,dtype=torch.float64);parts={k:[] for k in ['multitaper','single','rectangle']}
|
| 15 |
+
for lo,hi in BANDS:
|
| 16 |
+
v=torch.fft.irfft(z*((freq>=lo)&(freq<hi)),n=n,dim=-1);cov=v@v.transpose(-1,-2)/n
|
| 17 |
+
for key,value in [('multitaper',cov[:5].mean(0)),('single',cov[0]),('rectangle',cov[5])]:
|
| 18 |
+
power=value.diagonal(dim1=-2,dim2=-1).mean(-1)[:,None,None];normal=torch.where(power>(1e-10*reference).clamp_min(1e-20),value/power.clamp_min(1e-20),eye);matrix=.95*normal+.05*eye;parts[key].append((matrix+matrix.transpose(-1,-2))*.5)
|
| 19 |
+
return {k:torch.stack(v,1) for k,v in parts.items()}
|
| 20 |
+
@torch.no_grad()
|
| 21 |
+
def multitaper_covariance(track,raw):
|
| 22 |
+
matrices=tapered_matrices(track,raw);result={}
|
| 23 |
+
for key,matrix in matrices.items():
|
| 24 |
+
if track=='tuev':value=summarize_matrix(matrix,True)
|
| 25 |
+
else:
|
| 26 |
+
c=matrix.shape[-1];nonidentity=(matrix-torch.eye(c,device=matrix.device)).abs().amax((-1,-2))>0;values,vectors=torch.linalg.eigh(matrix);log=(vectors*values.clamp_min(1e-6).log().unsqueeze(-2))@vectors.transpose(-1,-2);log=torch.where(nonidentity[...,None,None],log,0.);i,j=torch.triu_indices(c,c,device=matrix.device);scale=torch.ones(i.shape,device=matrix.device,dtype=torch.float64);scale[i!=j]=2.**.5;value=(log[...,i,j]*scale).flatten(1).float()
|
| 27 |
+
assert torch.isfinite(value).all();result[key]=value
|
| 28 |
+
return result
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/native_log_covariance_features.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Native-channel trace-normalized covariance geometry, with a matched linear control."""
|
| 2 |
+
import torch
|
| 3 |
+
BANDS=((1,4),(4,8),(8,12),(12,16),(16,20),(20,28),(28,40))
|
| 4 |
+
|
| 5 |
+
@torch.no_grad()
|
| 6 |
+
def band_matrices(track,x):
|
| 7 |
+
x=torch.nan_to_num(x.float().flatten(2),nan=0.,posinf=1e5,neginf=-1e5).clamp(-1e5,1e5)
|
| 8 |
+
x=x-x[...,:1];x=x-x.mean(-1,keepdim=True)
|
| 9 |
+
if track in ('ad65','openbmi','longitudinal'):x=x-x.mean(1,keepdim=True)
|
| 10 |
+
reference=x.square().mean((-1,-2),keepdim=True)
|
| 11 |
+
n=x.shape[-1];c=x.shape[1];z=torch.fft.rfft(x,dim=-1);f=torch.fft.rfftfreq(n,1/200,device=x.device);eye=torch.eye(c,device=x.device);parts=[]
|
| 12 |
+
for low,high in BANDS:
|
| 13 |
+
v=torch.fft.irfft(z*((f>=low)&(f<high)),n=n,dim=-1)
|
| 14 |
+
covariance=(v@v.transpose(-1,-2))/n
|
| 15 |
+
power=covariance.diagonal(dim1=-2,dim2=-1).mean(-1)[:,None,None]
|
| 16 |
+
active=power>(1e-10*reference).clamp_min(1e-20)
|
| 17 |
+
normalized=covariance/power.clamp_min(1e-20)
|
| 18 |
+
normalized=torch.where(active,normalized,eye)
|
| 19 |
+
matrix=.95*normalized+.05*eye
|
| 20 |
+
parts.append((matrix+matrix.transpose(-1,-2))*.5)
|
| 21 |
+
return torch.stack(parts,1)
|
| 22 |
+
|
| 23 |
+
@torch.no_grad()
|
| 24 |
+
def connectivity(track,x,logarithmic=True):
|
| 25 |
+
matrix=band_matrices(track,x);c=matrix.shape[-1]
|
| 26 |
+
if logarithmic:
|
| 27 |
+
# CUDA eigh can perturb exactly degenerate identity eigenvalues.
|
| 28 |
+
# Preserve the mathematical log(I)=0 for exactly silent/isotropic bands.
|
| 29 |
+
nonidentity=(matrix-torch.eye(c,device=matrix.device)).abs().amax((-1,-2))>0
|
| 30 |
+
values,vectors=torch.linalg.eigh(matrix)
|
| 31 |
+
matrix=(vectors*values.clamp_min(1e-6).log().unsqueeze(-2))@vectors.transpose(-1,-2)
|
| 32 |
+
matrix=torch.where(nonidentity[...,None,None],matrix,torch.zeros_like(matrix))
|
| 33 |
+
else:matrix=matrix-torch.eye(c,device=matrix.device)
|
| 34 |
+
i,j=torch.triu_indices(c,c,device=matrix.device);scale=torch.where(i==j,1.,2.**.5)
|
| 35 |
+
return (matrix[...,i,j]*scale).flatten(1)
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/partial_covariance_features.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Native regularized partial and marginal covariance statistics; no causal claims."""
|
| 2 |
+
import torch
|
| 3 |
+
from native_log_covariance_features import BANDS
|
| 4 |
+
|
| 5 |
+
@torch.no_grad()
|
| 6 |
+
def summarize_matrix(matrix,partial=True):
|
| 7 |
+
c=matrix.shape[-1];value=matrix.double()
|
| 8 |
+
if partial:value=torch.linalg.inv(value)
|
| 9 |
+
diagonal=value.diagonal(dim1=-2,dim2=-1).clamp_min(1e-12)
|
| 10 |
+
correlation=value/(diagonal[...,None]*diagonal[...,None,:]).sqrt()
|
| 11 |
+
if partial:correlation=-correlation
|
| 12 |
+
ii,jj=torch.triu_indices(c,c,offset=1,device=matrix.device)
|
| 13 |
+
variance=(-1. if partial else 1.)*diagonal.log()
|
| 14 |
+
pairs=torch.atanh(correlation[...,ii,jj].clamp(-.999,.999))
|
| 15 |
+
return torch.cat([variance,pairs],-1).flatten(1).float()
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
@torch.no_grad()
|
| 19 |
+
def stable_band_matrices(track,x):
|
| 20 |
+
x=torch.nan_to_num(x.double().flatten(2),nan=0.,posinf=1e5,neginf=-1e5).clamp(-1e5,1e5)
|
| 21 |
+
x=x-x[...,:1];x=x-x.mean(-1,keepdim=True)
|
| 22 |
+
if track in ('ad65','openbmi','longitudinal'):x=x-x.mean(1,keepdim=True)
|
| 23 |
+
reference=x.square().mean((-1,-2),keepdim=True);n=x.shape[-1];c=x.shape[1]
|
| 24 |
+
z=torch.fft.rfft(x,dim=-1);f=torch.fft.rfftfreq(n,1/200,device=x.device,dtype=torch.float64);eye=torch.eye(c,device=x.device,dtype=torch.float64);parts=[]
|
| 25 |
+
for lo,hi in BANDS:
|
| 26 |
+
v=torch.fft.irfft(z*((f>=lo)&(f<hi)),n=n,dim=-1);cov=v@v.transpose(-1,-2)/n;power=cov.diagonal(dim1=-2,dim2=-1).mean(-1)[:,None,None]
|
| 27 |
+
normalized=torch.where(power>(1e-10*reference).clamp_min(1e-20),cov/power.clamp_min(1e-20),eye);matrix=.95*normalized+.05*eye;parts.append((matrix+matrix.transpose(-1,-2))*.5)
|
| 28 |
+
return torch.stack(parts,1)
|
| 29 |
+
|
| 30 |
+
@torch.no_grad()
|
| 31 |
+
def partial_covariance_features(track,x,partial=True):
|
| 32 |
+
with torch.autocast(x.device.type,enabled=False):
|
| 33 |
+
return summarize_matrix(stable_band_matrices(track,x),partial)
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/phase_features.py
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Complex spectral coherence of the existing 24 spatial filters in ten bands."""
|
| 2 |
+
import torch
|
| 3 |
+
from covariances import BANDS
|
| 4 |
+
CHANNELS=24
|
| 5 |
+
PHASE_HALF=len(BANDS)*CHANNELS*(CHANNELS-1)//2
|
| 6 |
+
PHASE_DIM=2*PHASE_HALF
|
| 7 |
+
|
| 8 |
+
@torch.no_grad()
|
| 9 |
+
def phase_features(track,x,spatial_weight):
|
| 10 |
+
previous_tf32=torch.backends.cuda.matmul.allow_tf32
|
| 11 |
+
try:
|
| 12 |
+
torch.backends.cuda.matmul.allow_tf32=False
|
| 13 |
+
with torch.autocast(x.device.type,enabled=False):
|
| 14 |
+
x=torch.nan_to_num(x.float().flatten(2),nan=0.,posinf=1e5,neginf=-1e5).clamp(-1e5,1e5)
|
| 15 |
+
x=x-x.mean(-1,keepdim=True)
|
| 16 |
+
if track in ('faced','tuev'):x=x/x.square().mean(-1,keepdim=True).clamp_min(1e-12).sqrt()
|
| 17 |
+
else:x=x-x.mean(1,keepdim=True)
|
| 18 |
+
x=x/x.square().mean((1,2),keepdim=True).clamp_min(1e-12).sqrt()
|
| 19 |
+
frames=x.unfold(-1,400,200);frames=frames-frames.mean(-1,keepdim=True)
|
| 20 |
+
z=torch.fft.rfft(frames*torch.hann_window(400,device=x.device),dim=-1)/200
|
| 21 |
+
w=spatial_weight.float()/spatial_weight.float().norm(dim=-1,keepdim=True).clamp_min(1e-6)
|
| 22 |
+
index=torch.triu_indices(CHANNELS,CHANNELS,1,device=x.device)
|
| 23 |
+
real_parts=[];imaginary_parts=[]
|
| 24 |
+
for band,(lo,hi) in enumerate(BANDS):
|
| 25 |
+
v=z[...,2*lo:2*hi].flatten(2)
|
| 26 |
+
vr=w[band][None]@v.real;vi=w[band][None]@v.imag
|
| 27 |
+
real=(vr@vr.transpose(-1,-2)+vi@vi.transpose(-1,-2))/v.shape[-1]
|
| 28 |
+
imaginary=(vi@vr.transpose(-1,-2)-vr@vi.transpose(-1,-2))/v.shape[-1]
|
| 29 |
+
# Signals have unit global RMS; this floor suppresses phase of numerical silence.
|
| 30 |
+
power=real.diagonal(dim1=-2,dim2=-1).clamp_min(1e-6)
|
| 31 |
+
denominator=(power[:,:,None]*power[:,None,:]).sqrt().clamp_min(1e-12)
|
| 32 |
+
real=(real/denominator).clamp(-.999,.999)
|
| 33 |
+
imaginary=(imaginary/denominator).clamp(-.999,.999)
|
| 34 |
+
real_parts.append(torch.atanh(real[:,index[0],index[1]]))
|
| 35 |
+
imaginary_parts.append(torch.atanh(imaginary[:,index[0],index[1]]))
|
| 36 |
+
return torch.cat(real_parts+imaginary_parts,-1)
|
| 37 |
+
finally:torch.backends.cuda.matmul.allow_tf32=previous_tf32
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/shared_activation_groups_parent_model.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Portable temporal-scale bank integration over the complete frozen490 source."""
|
| 2 |
+
from shared_temporal_basis_model import *
|
| 3 |
+
from torch.nn import functional as F
|
| 4 |
+
from temporal_scale_math import temporal_scale_bank, MODES
|
| 5 |
+
from temporal_convolution_math import SharedTemporalConvolution, raw_convolution_features, precise_convolution
|
| 6 |
+
|
| 7 |
+
SourceHybridModel = HybridModel
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class TemporalScaleHead(nn.Module):
|
| 11 |
+
def __init__(self, classes):
|
| 12 |
+
super().__init__()
|
| 13 |
+
self.projection = nn.Linear(128, classes)
|
| 14 |
+
nn.init.normal_(self.projection.weight, std=.02)
|
| 15 |
+
nn.init.zeros_(self.projection.bias)
|
| 16 |
+
self.register_buffer('blend_strength', torch.tensor(0.))
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class HybridModel(SourceHybridModel):
|
| 20 |
+
def __init__(self, temporal_scale_refinement=False, temporal_scale_mode='diverse', **kwargs):
|
| 21 |
+
super().__init__(**kwargs)
|
| 22 |
+
assert temporal_scale_refinement and temporal_scale_mode in MODES
|
| 23 |
+
self.temporal_scale_mode = temporal_scale_mode
|
| 24 |
+
for track in TRACKS:
|
| 25 |
+
self.adapters[track].temporal_scale_projection = nn.Linear(SPECS[track][0],16,bias=False)
|
| 26 |
+
self.backbone.temporal_scale_encoder = SharedTemporalConvolution()
|
| 27 |
+
self.backbone.temporal_scale_encoder.temporal = nn.Conv2d(1,16,(1,17),stride=(1,2),padding=(0,8),bias=False)
|
| 28 |
+
self.temporal_scale_heads = nn.ModuleDict({track:TemporalScaleHead(SPECS[track][2]) for track in TRACKS})
|
| 29 |
+
|
| 30 |
+
def temporal_scale_logits(self, track, values):
|
| 31 |
+
with precise_convolution(values.device.type):
|
| 32 |
+
block = self.backbone.temporal_scale_encoder
|
| 33 |
+
x = self.adapters[track].temporal_scale_projection(values.float().transpose(1,2)).transpose(1,2).unsqueeze(1)
|
| 34 |
+
x = temporal_scale_bank(x,block.temporal.weight,self.temporal_scale_mode)
|
| 35 |
+
x = block.norm_temporal(x)
|
| 36 |
+
x = block.dropout_spatial(F.avg_pool2d(F.elu(block.norm_spatial(block.spatial(x))),(1,4)))
|
| 37 |
+
x = block.dropout_separable(F.avg_pool2d(F.elu(block.norm_separable(block.pointwise(block.depthwise(x)))),(1,8)))
|
| 38 |
+
x = x.squeeze(2)
|
| 39 |
+
mean = x.mean(-1)
|
| 40 |
+
std = ((x-mean[...,None]).square().mean(-1)+1e-6).sqrt()
|
| 41 |
+
x = block.dropout_embedding(block.norm_embedding(F.gelu(block.embedding(torch.cat([mean,std],-1)))))
|
| 42 |
+
return self.temporal_scale_heads[track].projection(x)
|
| 43 |
+
|
| 44 |
+
def temporal_scale_predict(self, track, values, prior, strength=None):
|
| 45 |
+
logits = self.temporal_scale_logits(track,values)
|
| 46 |
+
strength = self.temporal_scale_heads[track].blend_strength if strength is None else strength
|
| 47 |
+
return (1-strength)*prior.float()+strength*logits
|
| 48 |
+
|
| 49 |
+
def forward(self, track, raw, features=None, covariances=None, covariance_features=None):
|
| 50 |
+
prior = super().forward(track,raw,features,covariances=covariances,covariance_features=covariance_features)
|
| 51 |
+
values = raw_convolution_features(track,raw,'raw')
|
| 52 |
+
return self.temporal_scale_predict(track,values,prior)
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/shared_expert_routing_math.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""443 bounded two-expert routing; no data or fitted state."""
|
| 2 |
+
import torch
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
def bounded_expert_weights(router_logits,task_bias,mode):
|
| 6 |
+
if mode=='input':scores=router_logits+task_bias
|
| 7 |
+
elif mode=='task':scores=router_logits*0.+task_bias
|
| 8 |
+
elif mode=='uniform':scores=(router_logits+task_bias)*0.
|
| 9 |
+
else:raise ValueError(mode)
|
| 10 |
+
return (2*torch.tanh(scores)).softmax(-1)
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
def mix_expert_outputs(first,second,weights):
|
| 14 |
+
return first+weights[...,1:2]*(second-first)
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/shared_expert_routing_model.py
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""443: one shared backbone with two shared feature experts and bounded routing."""
|
| 2 |
+
from shared_spectral_filter_model import *
|
| 3 |
+
from shared_expert_routing_math import bounded_expert_weights,mix_expert_outputs
|
| 4 |
+
SourceHybridModel=HybridModel
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
class ExpertRoutingReadout(nn.Module):
|
| 8 |
+
def __init__(self,classes,scale):
|
| 9 |
+
super().__init__();self.projection=nn.Linear(128,classes)
|
| 10 |
+
nn.init.zeros_(self.projection.weight);nn.init.zeros_(self.projection.bias)
|
| 11 |
+
self.register_buffer('output_scale',scale.detach().clone());self.register_buffer('correction_gain',torch.tensor(1.))
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
class HybridModel(SourceHybridModel):
|
| 15 |
+
def __init__(self,expert_routing_refinement=False,expert_routing_mode='input',expert_routing_enabled=1.,**kwargs):
|
| 16 |
+
super().__init__(**kwargs);assert expert_routing_refinement and expert_routing_mode in ['input','task','uniform'];self.expert_routing_mode=expert_routing_mode
|
| 17 |
+
for track in TRACKS:
|
| 18 |
+
dimension=self.adapters[track].weighted_pattern_projection.in_features
|
| 19 |
+
self.adapters[track].expert_routing_projection=nn.Linear(dimension,128)
|
| 20 |
+
self.adapters[track].expert_task_logits=nn.Parameter(torch.zeros(2))
|
| 21 |
+
self.backbone.expert_blocks=nn.ModuleList([nn.Sequential(nn.Linear(128,256),nn.LayerNorm(256),nn.GELU(),nn.Dropout(.3),nn.Linear(256,128),nn.LayerNorm(128)) for _ in range(2)])
|
| 22 |
+
self.backbone.expert_router=nn.Linear(128,2,bias=False);nn.init.zeros_(self.backbone.expert_router.weight)
|
| 23 |
+
self.backbone.register_buffer('expert_routing_enabled',torch.tensor(float(expert_routing_enabled)))
|
| 24 |
+
self.expert_routing_heads=nn.ModuleDict({track:ExpertRoutingReadout(SPECS[track][2],self.heads[track].output_scale) for track in TRACKS})
|
| 25 |
+
|
| 26 |
+
def expert_routing_features(self,track,raw,features=None):
|
| 27 |
+
return self.weighted_pattern_features(track,raw,features=features)
|
| 28 |
+
|
| 29 |
+
def expert_routing_embedding(self,track,values,return_routing=False):
|
| 30 |
+
with torch.autocast(values.device.type,enabled=False):
|
| 31 |
+
adapter=self.adapters[track];z=adapter.expert_routing_projection(adapter.weighted_pattern_normalizer(values.float()))
|
| 32 |
+
first=self.backbone.expert_blocks[0](z);second=self.backbone.expert_blocks[1](z)
|
| 33 |
+
weights=bounded_expert_weights(self.backbone.expert_router(z),adapter.expert_task_logits,self.expert_routing_mode)
|
| 34 |
+
result=mix_expert_outputs(first,second,weights)
|
| 35 |
+
return (result,weights) if return_routing else result
|
| 36 |
+
|
| 37 |
+
def expert_routing_predict(self,track,values,prior,gain=None,return_standalone=False):
|
| 38 |
+
with torch.autocast(values.device.type,enabled=False):
|
| 39 |
+
head=self.expert_routing_heads[track];standalone=head.projection(self.expert_routing_embedding(track,values))*self.backbone.expert_routing_enabled
|
| 40 |
+
strength=head.correction_gain if gain is None else gain;result=prior.float()+(strength*head.output_scale)*standalone
|
| 41 |
+
return (result,standalone) if return_standalone else result
|
| 42 |
+
|
| 43 |
+
def forward(self,track,raw,features=None,covariances=None,covariance_features=None):
|
| 44 |
+
prior=super().forward(track,raw,features,covariances=covariances,covariance_features=covariance_features)
|
| 45 |
+
return self.expert_routing_predict(track,self.expert_routing_features(track,raw,features=features),prior)
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/shared_spectral_features.py
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""431 deterministic per-window log spectra and seven shared trainable filters."""
|
| 2 |
+
import torch
|
| 3 |
+
from torch import nn
|
| 4 |
+
INITIAL_CENTERS=(2.5,6.,10.,14.,18.,24.,34.)
|
| 5 |
+
INITIAL_WIDTHS=(1.5,2.,2.,2.,2.,4.,6.)
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
@torch.no_grad()
|
| 9 |
+
def _log_spectrum_batch(track,raw):
|
| 10 |
+
with torch.autocast(raw.device.type,enabled=False):
|
| 11 |
+
x=torch.nan_to_num(raw.double().flatten(2),nan=0.,posinf=1e5,neginf=-1e5).clamp(-1e5,1e5);x=x-x[...,:1];x=x-x.mean(-1,keepdim=True)
|
| 12 |
+
if track in ('ad65','openbmi','longitudinal'):x=x-x.mean(1,keepdim=True)
|
| 13 |
+
window=torch.hann_window(400,periodic=True,device=x.device,dtype=torch.float64)
|
| 14 |
+
power=torch.fft.rfft(x.unfold(-1,400,200)*window,dim=-1).abs().square().mean(-2)[...,2:97]
|
| 15 |
+
relative=power/power.sum(-1,keepdim=True).clamp_min(1e-20);logarithm=relative.clamp_min(1e-12).log()
|
| 16 |
+
return (torch.round(logarithm*1e9)/1e9).float()
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
@torch.no_grad()
|
| 20 |
+
def log_relative_spectrum(track,raw):
|
| 21 |
+
outputs=[]
|
| 22 |
+
for chunk in raw.split(16) if len(raw) else [raw]:
|
| 23 |
+
count=len(chunk)
|
| 24 |
+
if count<16:chunk=torch.cat([chunk,raw.new_zeros((16-count,*raw.shape[1:]))])
|
| 25 |
+
outputs.append(_log_spectrum_batch(track,chunk)[:count])
|
| 26 |
+
return torch.cat(outputs)
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
class SharedGaussianSpectralFilters(nn.Module):
|
| 30 |
+
def __init__(self):
|
| 31 |
+
super().__init__()
|
| 32 |
+
centers=(torch.tensor(INITIAL_CENTERS)-1)/47;widths=(torch.tensor(INITIAL_WIDTHS)-.5)/11.5
|
| 33 |
+
self.raw_centers=nn.Parameter(torch.logit(centers));self.raw_widths=nn.Parameter(torch.logit(widths))
|
| 34 |
+
self.register_buffer('frequencies',torch.arange(1.,48.5,.5))
|
| 35 |
+
|
| 36 |
+
def physical_parameters(self):
|
| 37 |
+
return 1+47*self.raw_centers.sigmoid(),.5+11.5*self.raw_widths.sigmoid()
|
| 38 |
+
|
| 39 |
+
def log_weights(self):
|
| 40 |
+
center,width=self.physical_parameters();z=-.5*((self.frequencies[None]-center[:,None])/width[:,None]).square()
|
| 41 |
+
return z.log_softmax(-1)
|
| 42 |
+
|
| 43 |
+
def forward(self,log_spectrum):
|
| 44 |
+
return torch.logsumexp(log_spectrum[:,:,None,:]+self.log_weights()[None,None],-1).flatten(1)
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/shared_spectral_filter_model.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""431: one shared learned spectral bank and jointly trained five-track residual."""
|
| 2 |
+
from weighted_pattern_model import *
|
| 3 |
+
from shared_spectral_features import SharedGaussianSpectralFilters,log_relative_spectrum
|
| 4 |
+
SourceHybridModel=HybridModel
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
class SpectralFilterReadout(nn.Module):
|
| 8 |
+
def __init__(self,classes,scale):
|
| 9 |
+
super().__init__();self.projection=nn.Linear(128,classes);nn.init.zeros_(self.projection.weight);nn.init.zeros_(self.projection.bias)
|
| 10 |
+
self.register_buffer('output_scale',scale.detach().clone());self.register_buffer('correction_gain',torch.tensor(1.))
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
class HybridModel(SourceHybridModel):
|
| 14 |
+
def __init__(self,spectral_filter_refinement=False,spectral_filter_enabled=1.,**kwargs):
|
| 15 |
+
super().__init__(**kwargs);assert spectral_filter_refinement
|
| 16 |
+
self.backbone.spectral_filters=SharedGaussianSpectralFilters()
|
| 17 |
+
for track in TRACKS:
|
| 18 |
+
dimension=7*SPECS[track][0];self.adapters[track].spectral_filter_normalizer=Standardize(dimension);self.adapters[track].spectral_filter_projection=nn.Linear(dimension,128)
|
| 19 |
+
self.backbone.spectral_filter_encoder=nn.Sequential(nn.Linear(128,256),nn.LayerNorm(256),nn.GELU(),nn.Dropout(.3),nn.Linear(256,128),nn.LayerNorm(128))
|
| 20 |
+
self.backbone.register_buffer('spectral_filter_enabled',torch.tensor(float(spectral_filter_enabled)))
|
| 21 |
+
self.spectral_filter_heads=nn.ModuleDict({track:SpectralFilterReadout(SPECS[track][2],self.heads[track].output_scale) for track in TRACKS})
|
| 22 |
+
|
| 23 |
+
def spectral_filter_spectrum(self,track,raw):return log_relative_spectrum(track,raw)
|
| 24 |
+
|
| 25 |
+
def spectral_filter_features(self,spectrum):
|
| 26 |
+
with torch.autocast(spectrum.device.type,enabled=False):return self.backbone.spectral_filters(spectrum.float())
|
| 27 |
+
|
| 28 |
+
def spectral_filter_embedding(self,track,spectrum):
|
| 29 |
+
with torch.autocast(spectrum.device.type,enabled=False):
|
| 30 |
+
features=self.spectral_filter_features(spectrum);adapter=self.adapters[track]
|
| 31 |
+
return self.backbone.spectral_filter_encoder(adapter.spectral_filter_projection(adapter.spectral_filter_normalizer(features)))
|
| 32 |
+
|
| 33 |
+
def spectral_filter_predict(self,track,spectrum,prior,gain=None,return_standalone=False):
|
| 34 |
+
with torch.autocast(spectrum.device.type,enabled=False):
|
| 35 |
+
head=self.spectral_filter_heads[track];standalone=head.projection(self.spectral_filter_embedding(track,spectrum))*self.backbone.spectral_filter_enabled
|
| 36 |
+
strength=head.correction_gain if gain is None else gain;result=prior.float()+(strength*head.output_scale)*standalone
|
| 37 |
+
return (result,standalone) if return_standalone else result
|
| 38 |
+
|
| 39 |
+
def forward(self,track,raw,features=None,covariances=None,covariance_features=None):
|
| 40 |
+
prior=super().forward(track,raw,features,covariances=covariances,covariance_features=covariance_features)
|
| 41 |
+
return self.spectral_filter_predict(track,self.spectral_filter_spectrum(track,raw),prior)
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/tangent_features.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Window-local log-correlation geometry in the existing spatial-filter basis."""
|
| 2 |
+
import torch
|
| 3 |
+
|
| 4 |
+
TANGENT_DIM=10*24*25//2
|
| 5 |
+
|
| 6 |
+
@torch.no_grad()
|
| 7 |
+
def extract_tangent_features(covariances,spatial_weight):
|
| 8 |
+
old_tf32=torch.backends.cuda.matmul.allow_tf32
|
| 9 |
+
torch.backends.cuda.matmul.allow_tf32=False
|
| 10 |
+
try:
|
| 11 |
+
with torch.autocast(covariances.device.type,enabled=False):
|
| 12 |
+
w=spatial_weight.float()
|
| 13 |
+
w=w/w.norm(dim=-1,keepdim=True).clamp_min(1e-6)
|
| 14 |
+
projected=torch.einsum('bfc,nbcd,bgd->nbfg',w,covariances.float(),w)
|
| 15 |
+
d=projected.diagonal(dim1=-2,dim2=-1).clamp_min(1e-10).sqrt()
|
| 16 |
+
correlation=(projected/(d.unsqueeze(-1)*d.unsqueeze(-2))).clamp(-1,1)
|
| 17 |
+
correlation=(correlation+correlation.transpose(-1,-2))/2
|
| 18 |
+
correlation=.95*correlation+.05*torch.eye(24,device=correlation.device)
|
| 19 |
+
values,vectors=torch.linalg.eigh(correlation)
|
| 20 |
+
logarithm=(vectors*values.clamp_min(1e-6).log().unsqueeze(-2))@vectors.transpose(-1,-2)
|
| 21 |
+
i,j=torch.triu_indices(24,24,device=correlation.device)
|
| 22 |
+
scale=torch.where(i==j,1.,2.**.5)
|
| 23 |
+
return (logarithm[...,i,j]*scale).flatten(1)
|
| 24 |
+
finally:
|
| 25 |
+
torch.backends.cuda.matmul.allow_tf32=old_tf32
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/temporal_convolution_math.py
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""469 deterministic per-window preprocessing and shared temporal convolution."""
|
| 2 |
+
import contextlib, functools, math
|
| 3 |
+
import torch
|
| 4 |
+
from torch import nn
|
| 5 |
+
from torch.nn import functional as F
|
| 6 |
+
MODES=('raw','phase','permuted')
|
| 7 |
+
|
| 8 |
+
@contextlib.contextmanager
|
| 9 |
+
def precise_convolution(device_type):
|
| 10 |
+
old=(torch.backends.cuda.matmul.allow_tf32,torch.backends.cudnn.allow_tf32,torch.backends.cudnn.benchmark,torch.backends.cudnn.deterministic)
|
| 11 |
+
torch.backends.cuda.matmul.allow_tf32=False
|
| 12 |
+
torch.backends.cudnn.allow_tf32=False
|
| 13 |
+
torch.backends.cudnn.benchmark=False
|
| 14 |
+
torch.backends.cudnn.deterministic=True
|
| 15 |
+
try:
|
| 16 |
+
with torch.autocast(device_type,enabled=False):yield
|
| 17 |
+
finally:
|
| 18 |
+
torch.backends.cuda.matmul.allow_tf32,torch.backends.cudnn.allow_tf32,torch.backends.cudnn.benchmark,torch.backends.cudnn.deterministic=old
|
| 19 |
+
|
| 20 |
+
@functools.lru_cache(maxsize=4)
|
| 21 |
+
def phase_angles(length):
|
| 22 |
+
g=torch.Generator(device='cpu').manual_seed(469000+length)
|
| 23 |
+
p=(torch.rand(length//2+1,dtype=torch.float64,generator=g)*2-1)*math.pi
|
| 24 |
+
p[0]=0.
|
| 25 |
+
if length%2==0:p[-1]=0.
|
| 26 |
+
return p
|
| 27 |
+
|
| 28 |
+
@functools.lru_cache(maxsize=4)
|
| 29 |
+
def time_permutation(length):
|
| 30 |
+
return torch.randperm(length,generator=torch.Generator(device='cpu').manual_seed(469100+length))
|
| 31 |
+
|
| 32 |
+
def transform_preprocessed(x,mode):
|
| 33 |
+
assert mode in MODES
|
| 34 |
+
if mode=='raw':return x
|
| 35 |
+
if mode=='permuted':return x[...,time_permutation(x.shape[-1]).to(x.device)]
|
| 36 |
+
angles=phase_angles(x.shape[-1]).to(x.device)
|
| 37 |
+
phasor=torch.complex(angles.cos(),angles.sin())
|
| 38 |
+
y=torch.fft.irfft(torch.fft.rfft(x.double(),dim=-1)*phasor,n=x.shape[-1],dim=-1)
|
| 39 |
+
return (torch.round(y*1e8)/1e8).float()
|
| 40 |
+
|
| 41 |
+
@torch.no_grad()
|
| 42 |
+
def raw_convolution_features(track,raw,mode='raw'):
|
| 43 |
+
outputs=[]
|
| 44 |
+
with precise_convolution(raw.device.type):
|
| 45 |
+
for chunk in raw.split(16) if len(raw) else [raw]:
|
| 46 |
+
count=len(chunk)
|
| 47 |
+
if count<16:chunk=torch.cat([chunk,raw.new_zeros((16-count,*raw.shape[1:]))])
|
| 48 |
+
x=torch.nan_to_num(chunk.double().flatten(2),nan=0.,posinf=1e5,neginf=-1e5).clamp(-1e5,1e5)
|
| 49 |
+
x=x-x[...,:1];x=x-x.mean(-1,keepdim=True)
|
| 50 |
+
if track in ('ad65','openbmi','longitudinal'):x=x-x.mean(1,keepdim=True)
|
| 51 |
+
power=x.square().mean((1,2),keepdim=True)
|
| 52 |
+
x=torch.where(power>1e-20,x/power.clamp_min(1e-20).sqrt(),torch.zeros_like(x)).clamp(-8,8)
|
| 53 |
+
x=(torch.round(x*1e8)/1e8).float()
|
| 54 |
+
outputs.append(transform_preprocessed(x,mode)[:count])
|
| 55 |
+
return torch.cat(outputs)
|
| 56 |
+
|
| 57 |
+
class SharedTemporalConvolution(nn.Module):
|
| 58 |
+
def __init__(self):
|
| 59 |
+
super().__init__()
|
| 60 |
+
self.temporal=nn.Conv2d(1,16,(1,65),stride=(1,2),padding=(0,32),bias=False)
|
| 61 |
+
self.norm_temporal=nn.GroupNorm(4,16,eps=1e-5)
|
| 62 |
+
self.spatial=nn.Conv2d(16,32,(16,1),groups=16,bias=False)
|
| 63 |
+
self.norm_spatial=nn.GroupNorm(8,32,eps=1e-5)
|
| 64 |
+
self.dropout_spatial=nn.Dropout(.3)
|
| 65 |
+
self.depthwise=nn.Conv2d(32,32,(1,17),padding=(0,8),groups=32,bias=False)
|
| 66 |
+
self.pointwise=nn.Conv2d(32,64,1,bias=False)
|
| 67 |
+
self.norm_separable=nn.GroupNorm(8,64,eps=1e-5)
|
| 68 |
+
self.dropout_separable=nn.Dropout(.3)
|
| 69 |
+
self.embedding=nn.Linear(128,128)
|
| 70 |
+
self.norm_embedding=nn.LayerNorm(128,eps=1e-5)
|
| 71 |
+
self.dropout_embedding=nn.Dropout(.3)
|
| 72 |
+
|
| 73 |
+
def forward(self,x):
|
| 74 |
+
x=self.norm_temporal(self.temporal(x.unsqueeze(1)))
|
| 75 |
+
x=self.dropout_spatial(F.avg_pool2d(F.elu(self.norm_spatial(self.spatial(x))),(1,4)))
|
| 76 |
+
x=self.dropout_separable(F.avg_pool2d(F.elu(self.norm_separable(self.pointwise(self.depthwise(x)))),(1,8)))
|
| 77 |
+
x=x.squeeze(2);mean=x.mean(-1);std=((x-mean[...,None]).square().mean(-1)+1e-6).sqrt()
|
| 78 |
+
x=torch.cat([mean,std],dim=-1)
|
| 79 |
+
return self.dropout_embedding(self.norm_embedding(F.gelu(self.embedding(x))))
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/temporal_scale_math.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Fixed dilation placement for equally sized learned common temporal banks."""
|
| 2 |
+
import torch
|
| 3 |
+
from torch.nn import functional as F
|
| 4 |
+
|
| 5 |
+
MODES = ('diverse', 'local', 'repeated65')
|
| 6 |
+
DILATIONS = {'diverse': (1, 2, 4, 8), 'local': (1, 1, 1, 1),
|
| 7 |
+
'repeated65': (4, 4, 4, 4)}
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
def temporal_scale_bank(x, weight, mode):
|
| 11 |
+
assert mode in MODES
|
| 12 |
+
assert x.ndim == 4 and x.shape[1] == 1
|
| 13 |
+
assert weight.shape == (16, 1, 1, 17)
|
| 14 |
+
return torch.cat([F.conv2d(x, weight[4*i:4*i+4], stride=(1, 2),
|
| 15 |
+
padding=(0, 8*d), dilation=(1, d))
|
| 16 |
+
for i, d in enumerate(DILATIONS[mode])], dim=1)
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/training.json
ADDED
|
@@ -0,0 +1,3807 @@
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"history": [
|
| 3 |
+
{
|
| 4 |
+
"epoch": 1,
|
| 5 |
+
"joint_updates": 200,
|
| 6 |
+
"training_ce": {
|
| 7 |
+
"faced": 2.2063683569431305,
|
| 8 |
+
"tuev": 1.6311128944158555,
|
| 9 |
+
"ad65": 1.007968319952488,
|
| 10 |
+
"openbmi": 0.6983478009700775,
|
| 11 |
+
"longitudinal": 0.6436979472637177
|
| 12 |
+
},
|
| 13 |
+
"validation": {
|
| 14 |
+
"faced": {
|
| 15 |
+
"class_counts": [
|
| 16 |
+
180,
|
| 17 |
+
180,
|
| 18 |
+
180,
|
| 19 |
+
180,
|
| 20 |
+
240,
|
| 21 |
+
180,
|
| 22 |
+
180,
|
| 23 |
+
180,
|
| 24 |
+
180
|
| 25 |
+
],
|
| 26 |
+
"predicted_class_counts": [
|
| 27 |
+
153,
|
| 28 |
+
184,
|
| 29 |
+
179,
|
| 30 |
+
165,
|
| 31 |
+
289,
|
| 32 |
+
151,
|
| 33 |
+
186,
|
| 34 |
+
186,
|
| 35 |
+
187
|
| 36 |
+
],
|
| 37 |
+
"confusion_matrix": [
|
| 38 |
+
[
|
| 39 |
+
95,
|
| 40 |
+
12,
|
| 41 |
+
3,
|
| 42 |
+
15,
|
| 43 |
+
17,
|
| 44 |
+
4,
|
| 45 |
+
12,
|
| 46 |
+
14,
|
| 47 |
+
8
|
| 48 |
+
],
|
| 49 |
+
[
|
| 50 |
+
7,
|
| 51 |
+
94,
|
| 52 |
+
6,
|
| 53 |
+
14,
|
| 54 |
+
24,
|
| 55 |
+
9,
|
| 56 |
+
9,
|
| 57 |
+
6,
|
| 58 |
+
11
|
| 59 |
+
],
|
| 60 |
+
[
|
| 61 |
+
7,
|
| 62 |
+
9,
|
| 63 |
+
105,
|
| 64 |
+
15,
|
| 65 |
+
18,
|
| 66 |
+
5,
|
| 67 |
+
7,
|
| 68 |
+
5,
|
| 69 |
+
9
|
| 70 |
+
],
|
| 71 |
+
[
|
| 72 |
+
7,
|
| 73 |
+
19,
|
| 74 |
+
8,
|
| 75 |
+
67,
|
| 76 |
+
33,
|
| 77 |
+
8,
|
| 78 |
+
14,
|
| 79 |
+
13,
|
| 80 |
+
11
|
| 81 |
+
],
|
| 82 |
+
[
|
| 83 |
+
11,
|
| 84 |
+
13,
|
| 85 |
+
18,
|
| 86 |
+
12,
|
| 87 |
+
128,
|
| 88 |
+
11,
|
| 89 |
+
14,
|
| 90 |
+
21,
|
| 91 |
+
12
|
| 92 |
+
],
|
| 93 |
+
[
|
| 94 |
+
3,
|
| 95 |
+
9,
|
| 96 |
+
11,
|
| 97 |
+
7,
|
| 98 |
+
18,
|
| 99 |
+
100,
|
| 100 |
+
9,
|
| 101 |
+
14,
|
| 102 |
+
9
|
| 103 |
+
],
|
| 104 |
+
[
|
| 105 |
+
6,
|
| 106 |
+
7,
|
| 107 |
+
9,
|
| 108 |
+
9,
|
| 109 |
+
20,
|
| 110 |
+
5,
|
| 111 |
+
105,
|
| 112 |
+
8,
|
| 113 |
+
11
|
| 114 |
+
],
|
| 115 |
+
[
|
| 116 |
+
3,
|
| 117 |
+
12,
|
| 118 |
+
10,
|
| 119 |
+
19,
|
| 120 |
+
16,
|
| 121 |
+
7,
|
| 122 |
+
7,
|
| 123 |
+
100,
|
| 124 |
+
6
|
| 125 |
+
],
|
| 126 |
+
[
|
| 127 |
+
14,
|
| 128 |
+
9,
|
| 129 |
+
9,
|
| 130 |
+
7,
|
| 131 |
+
15,
|
| 132 |
+
2,
|
| 133 |
+
9,
|
| 134 |
+
5,
|
| 135 |
+
110
|
| 136 |
+
]
|
| 137 |
+
],
|
| 138 |
+
"per_class_recall": [
|
| 139 |
+
0.5277777777777778,
|
| 140 |
+
0.5222222222222223,
|
| 141 |
+
0.5833333333333334,
|
| 142 |
+
0.37222222222222223,
|
| 143 |
+
0.5333333333333333,
|
| 144 |
+
0.5555555555555556,
|
| 145 |
+
0.5833333333333334,
|
| 146 |
+
0.5555555555555556,
|
| 147 |
+
0.6111111111111112
|
| 148 |
+
],
|
| 149 |
+
"balanced_accuracy": 0.5382716049382716,
|
| 150 |
+
"accuracy": 0.5380952380952381,
|
| 151 |
+
"weighted_f1": 0.538881849093927,
|
| 152 |
+
"macro_f1": 0.5409170306503709,
|
| 153 |
+
"kappa": 0.4790822564791062,
|
| 154 |
+
"samples": 1680,
|
| 155 |
+
"reward": 0.5382716049382716,
|
| 156 |
+
"subjects": 20
|
| 157 |
+
},
|
| 158 |
+
"tuev": {
|
| 159 |
+
"class_counts": [
|
| 160 |
+
119,
|
| 161 |
+
291,
|
| 162 |
+
669,
|
| 163 |
+
86,
|
| 164 |
+
500,
|
| 165 |
+
13822
|
| 166 |
+
],
|
| 167 |
+
"predicted_class_counts": [
|
| 168 |
+
312,
|
| 169 |
+
711,
|
| 170 |
+
228,
|
| 171 |
+
178,
|
| 172 |
+
1198,
|
| 173 |
+
12860
|
| 174 |
+
],
|
| 175 |
+
"confusion_matrix": [
|
| 176 |
+
[
|
| 177 |
+
38,
|
| 178 |
+
38,
|
| 179 |
+
3,
|
| 180 |
+
0,
|
| 181 |
+
3,
|
| 182 |
+
37
|
| 183 |
+
],
|
| 184 |
+
[
|
| 185 |
+
17,
|
| 186 |
+
225,
|
| 187 |
+
0,
|
| 188 |
+
0,
|
| 189 |
+
49,
|
| 190 |
+
0
|
| 191 |
+
],
|
| 192 |
+
[
|
| 193 |
+
99,
|
| 194 |
+
184,
|
| 195 |
+
224,
|
| 196 |
+
0,
|
| 197 |
+
159,
|
| 198 |
+
3
|
| 199 |
+
],
|
| 200 |
+
[
|
| 201 |
+
3,
|
| 202 |
+
0,
|
| 203 |
+
0,
|
| 204 |
+
81,
|
| 205 |
+
0,
|
| 206 |
+
2
|
| 207 |
+
],
|
| 208 |
+
[
|
| 209 |
+
0,
|
| 210 |
+
0,
|
| 211 |
+
1,
|
| 212 |
+
0,
|
| 213 |
+
468,
|
| 214 |
+
31
|
| 215 |
+
],
|
| 216 |
+
[
|
| 217 |
+
155,
|
| 218 |
+
264,
|
| 219 |
+
0,
|
| 220 |
+
97,
|
| 221 |
+
519,
|
| 222 |
+
12787
|
| 223 |
+
]
|
| 224 |
+
],
|
| 225 |
+
"per_class_recall": [
|
| 226 |
+
0.31932773109243695,
|
| 227 |
+
0.7731958762886598,
|
| 228 |
+
0.33482810164424515,
|
| 229 |
+
0.9418604651162791,
|
| 230 |
+
0.936,
|
| 231 |
+
0.9251193749095644
|
| 232 |
+
],
|
| 233 |
+
"balanced_accuracy": 0.7050552581751975,
|
| 234 |
+
"accuracy": 0.8925550461677536,
|
| 235 |
+
"weighted_f1": 0.9080013242509555,
|
| 236 |
+
"macro_f1": 0.5413709133013715,
|
| 237 |
+
"kappa": 0.5781254368884994,
|
| 238 |
+
"samples": 15487,
|
| 239 |
+
"reward": 0.7050552581751975,
|
| 240 |
+
"subjects": 58
|
| 241 |
+
},
|
| 242 |
+
"ad65": {
|
| 243 |
+
"class_counts": [
|
| 244 |
+
464,
|
| 245 |
+
393,
|
| 246 |
+
486
|
| 247 |
+
],
|
| 248 |
+
"predicted_class_counts": [
|
| 249 |
+
440,
|
| 250 |
+
309,
|
| 251 |
+
594
|
| 252 |
+
],
|
| 253 |
+
"confusion_matrix": [
|
| 254 |
+
[
|
| 255 |
+
287,
|
| 256 |
+
86,
|
| 257 |
+
91
|
| 258 |
+
],
|
| 259 |
+
[
|
| 260 |
+
96,
|
| 261 |
+
185,
|
| 262 |
+
112
|
| 263 |
+
],
|
| 264 |
+
[
|
| 265 |
+
57,
|
| 266 |
+
38,
|
| 267 |
+
391
|
| 268 |
+
]
|
| 269 |
+
],
|
| 270 |
+
"per_class_recall": [
|
| 271 |
+
0.6185344827586207,
|
| 272 |
+
0.4707379134860051,
|
| 273 |
+
0.8045267489711934
|
| 274 |
+
],
|
| 275 |
+
"balanced_accuracy": 0.6312663817386064,
|
| 276 |
+
"accuracy": 0.6425912137006702,
|
| 277 |
+
"weighted_f1": 0.6356338206725993,
|
| 278 |
+
"macro_f1": 0.6286984511173302,
|
| 279 |
+
"kappa": 0.4579978610488933,
|
| 280 |
+
"samples": 1343,
|
| 281 |
+
"subject_metrics": {
|
| 282 |
+
"class_counts": [
|
| 283 |
+
7,
|
| 284 |
+
5,
|
| 285 |
+
6
|
| 286 |
+
],
|
| 287 |
+
"predicted_class_counts": [
|
| 288 |
+
5,
|
| 289 |
+
6,
|
| 290 |
+
7
|
| 291 |
+
],
|
| 292 |
+
"confusion_matrix": [
|
| 293 |
+
[
|
| 294 |
+
5,
|
| 295 |
+
2,
|
| 296 |
+
0
|
| 297 |
+
],
|
| 298 |
+
[
|
| 299 |
+
0,
|
| 300 |
+
4,
|
| 301 |
+
1
|
| 302 |
+
],
|
| 303 |
+
[
|
| 304 |
+
0,
|
| 305 |
+
0,
|
| 306 |
+
6
|
| 307 |
+
]
|
| 308 |
+
],
|
| 309 |
+
"per_class_recall": [
|
| 310 |
+
0.7142857142857143,
|
| 311 |
+
0.8,
|
| 312 |
+
1.0
|
| 313 |
+
],
|
| 314 |
+
"balanced_accuracy": 0.8380952380952381,
|
| 315 |
+
"accuracy": 0.8333333333333334,
|
| 316 |
+
"weighted_f1": 0.8337865837865839,
|
| 317 |
+
"macro_f1": 0.8278943278943279,
|
| 318 |
+
"kappa": 0.7511520737327189
|
| 319 |
+
},
|
| 320 |
+
"reward": 0.8380952380952381,
|
| 321 |
+
"subjects": 18
|
| 322 |
+
},
|
| 323 |
+
"openbmi": {
|
| 324 |
+
"class_counts": [
|
| 325 |
+
2200,
|
| 326 |
+
2200
|
| 327 |
+
],
|
| 328 |
+
"predicted_class_counts": [
|
| 329 |
+
1987,
|
| 330 |
+
2413
|
| 331 |
+
],
|
| 332 |
+
"confusion_matrix": [
|
| 333 |
+
[
|
| 334 |
+
1705,
|
| 335 |
+
495
|
| 336 |
+
],
|
| 337 |
+
[
|
| 338 |
+
282,
|
| 339 |
+
1918
|
| 340 |
+
]
|
| 341 |
+
],
|
| 342 |
+
"per_class_recall": [
|
| 343 |
+
0.775,
|
| 344 |
+
0.8718181818181818
|
| 345 |
+
],
|
| 346 |
+
"balanced_accuracy": 0.823409090909091,
|
| 347 |
+
"accuracy": 0.8234090909090909,
|
| 348 |
+
"weighted_f1": 0.8229942886302098,
|
| 349 |
+
"macro_f1": 0.82299428863021,
|
| 350 |
+
"kappa": 0.6468181818181817,
|
| 351 |
+
"samples": 4400,
|
| 352 |
+
"subject_scores": {
|
| 353 |
+
"19": 0.875,
|
| 354 |
+
"35": 0.95,
|
| 355 |
+
"34": 0.6699999999999999,
|
| 356 |
+
"51": 0.795,
|
| 357 |
+
"20": 0.8425,
|
| 358 |
+
"44": 0.9425,
|
| 359 |
+
"24": 0.615,
|
| 360 |
+
"15": 0.8875,
|
| 361 |
+
"31": 0.9099999999999999,
|
| 362 |
+
"26": 0.835,
|
| 363 |
+
"23": 0.735
|
| 364 |
+
},
|
| 365 |
+
"reward": 0.823409090909091,
|
| 366 |
+
"subjects": 11
|
| 367 |
+
},
|
| 368 |
+
"longitudinal": {
|
| 369 |
+
"class_counts": [
|
| 370 |
+
4260,
|
| 371 |
+
4158
|
| 372 |
+
],
|
| 373 |
+
"predicted_class_counts": [
|
| 374 |
+
4552,
|
| 375 |
+
3866
|
| 376 |
+
],
|
| 377 |
+
"confusion_matrix": [
|
| 378 |
+
[
|
| 379 |
+
3795,
|
| 380 |
+
465
|
| 381 |
+
],
|
| 382 |
+
[
|
| 383 |
+
757,
|
| 384 |
+
3401
|
| 385 |
+
]
|
| 386 |
+
],
|
| 387 |
+
"per_class_recall": [
|
| 388 |
+
0.8908450704225352,
|
| 389 |
+
0.817941317941318
|
| 390 |
+
],
|
| 391 |
+
"balanced_accuracy": 0.8543931941819266,
|
| 392 |
+
"accuracy": 0.8548348776431456,
|
| 393 |
+
"weighted_f1": 0.8545986797881616,
|
| 394 |
+
"macro_f1": 0.8545161723182699,
|
| 395 |
+
"kappa": 0.7093827910518298,
|
| 396 |
+
"samples": 8418,
|
| 397 |
+
"subject_scores": {
|
| 398 |
+
"sub-G2021": 0.8627525887522267,
|
| 399 |
+
"sub-G2007": 0.816860103413505,
|
| 400 |
+
"sub-G2019": 0.852993824374467,
|
| 401 |
+
"sub-G2031": 0.828332994328064,
|
| 402 |
+
"sub-G2015": 0.9043525361474528,
|
| 403 |
+
"sub-CTR002": 0.9934852728970376,
|
| 404 |
+
"sub-G2011": 0.8100294180322551,
|
| 405 |
+
"sub-G2035": 0.9598833152678935,
|
| 406 |
+
"sub-CTR003": 0.6680194805194806
|
| 407 |
+
},
|
| 408 |
+
"reward": 0.855189948192487,
|
| 409 |
+
"subjects": 9
|
| 410 |
+
}
|
| 411 |
+
},
|
| 412 |
+
"blend_strengths": {
|
| 413 |
+
"faced": 0.0,
|
| 414 |
+
"tuev": 0.1,
|
| 415 |
+
"ad65": 0.0,
|
| 416 |
+
"openbmi": 0.0,
|
| 417 |
+
"longitudinal": 0.0
|
| 418 |
+
},
|
| 419 |
+
"blend_validation_scores": {
|
| 420 |
+
"faced": {
|
| 421 |
+
"0.0": 0.5382716049382716,
|
| 422 |
+
"0.1": 0.5361111111111111,
|
| 423 |
+
"0.3": 0.5302469135802469,
|
| 424 |
+
"1.0": 0.11496913580246915
|
| 425 |
+
},
|
| 426 |
+
"tuev": {
|
| 427 |
+
"0.0": 0.7018393343699977,
|
| 428 |
+
"0.1": 0.7050552581751975,
|
| 429 |
+
"0.3": 0.6667392517271272,
|
| 430 |
+
"1.0": 0.39495450934661464
|
| 431 |
+
},
|
| 432 |
+
"ad65": {
|
| 433 |
+
"0.0": 0.8380952380952381,
|
| 434 |
+
"0.1": 0.8380952380952381,
|
| 435 |
+
"0.3": 0.8380952380952381,
|
| 436 |
+
"1.0": 0.5380952380952381
|
| 437 |
+
},
|
| 438 |
+
"openbmi": {
|
| 439 |
+
"0.0": 0.823409090909091,
|
| 440 |
+
"0.1": 0.8220454545454546,
|
| 441 |
+
"0.3": 0.8206818181818182,
|
| 442 |
+
"1.0": 0.5284090909090909
|
| 443 |
+
},
|
| 444 |
+
"longitudinal": {
|
| 445 |
+
"0.0": 0.855189948192487,
|
| 446 |
+
"0.1": 0.8550985739234811,
|
| 447 |
+
"0.3": 0.854407135732043,
|
| 448 |
+
"1.0": 0.6905466786056436
|
| 449 |
+
}
|
| 450 |
+
}
|
| 451 |
+
},
|
| 452 |
+
{
|
| 453 |
+
"epoch": 2,
|
| 454 |
+
"joint_updates": 400,
|
| 455 |
+
"training_ce": {
|
| 456 |
+
"faced": 2.1931438505649568,
|
| 457 |
+
"tuev": 1.2620423018932343,
|
| 458 |
+
"ad65": 0.828198854625225,
|
| 459 |
+
"openbmi": 0.6923283010721206,
|
| 460 |
+
"longitudinal": 0.5833807304501534
|
| 461 |
+
},
|
| 462 |
+
"validation": {
|
| 463 |
+
"faced": {
|
| 464 |
+
"class_counts": [
|
| 465 |
+
180,
|
| 466 |
+
180,
|
| 467 |
+
180,
|
| 468 |
+
180,
|
| 469 |
+
240,
|
| 470 |
+
180,
|
| 471 |
+
180,
|
| 472 |
+
180,
|
| 473 |
+
180
|
| 474 |
+
],
|
| 475 |
+
"predicted_class_counts": [
|
| 476 |
+
153,
|
| 477 |
+
184,
|
| 478 |
+
179,
|
| 479 |
+
165,
|
| 480 |
+
289,
|
| 481 |
+
151,
|
| 482 |
+
186,
|
| 483 |
+
186,
|
| 484 |
+
187
|
| 485 |
+
],
|
| 486 |
+
"confusion_matrix": [
|
| 487 |
+
[
|
| 488 |
+
95,
|
| 489 |
+
12,
|
| 490 |
+
3,
|
| 491 |
+
15,
|
| 492 |
+
17,
|
| 493 |
+
4,
|
| 494 |
+
12,
|
| 495 |
+
14,
|
| 496 |
+
8
|
| 497 |
+
],
|
| 498 |
+
[
|
| 499 |
+
7,
|
| 500 |
+
94,
|
| 501 |
+
6,
|
| 502 |
+
14,
|
| 503 |
+
24,
|
| 504 |
+
9,
|
| 505 |
+
9,
|
| 506 |
+
6,
|
| 507 |
+
11
|
| 508 |
+
],
|
| 509 |
+
[
|
| 510 |
+
7,
|
| 511 |
+
9,
|
| 512 |
+
105,
|
| 513 |
+
15,
|
| 514 |
+
18,
|
| 515 |
+
5,
|
| 516 |
+
7,
|
| 517 |
+
5,
|
| 518 |
+
9
|
| 519 |
+
],
|
| 520 |
+
[
|
| 521 |
+
7,
|
| 522 |
+
19,
|
| 523 |
+
8,
|
| 524 |
+
67,
|
| 525 |
+
33,
|
| 526 |
+
8,
|
| 527 |
+
14,
|
| 528 |
+
13,
|
| 529 |
+
11
|
| 530 |
+
],
|
| 531 |
+
[
|
| 532 |
+
11,
|
| 533 |
+
13,
|
| 534 |
+
18,
|
| 535 |
+
12,
|
| 536 |
+
128,
|
| 537 |
+
11,
|
| 538 |
+
14,
|
| 539 |
+
21,
|
| 540 |
+
12
|
| 541 |
+
],
|
| 542 |
+
[
|
| 543 |
+
3,
|
| 544 |
+
9,
|
| 545 |
+
11,
|
| 546 |
+
7,
|
| 547 |
+
18,
|
| 548 |
+
100,
|
| 549 |
+
9,
|
| 550 |
+
14,
|
| 551 |
+
9
|
| 552 |
+
],
|
| 553 |
+
[
|
| 554 |
+
6,
|
| 555 |
+
7,
|
| 556 |
+
9,
|
| 557 |
+
9,
|
| 558 |
+
20,
|
| 559 |
+
5,
|
| 560 |
+
105,
|
| 561 |
+
8,
|
| 562 |
+
11
|
| 563 |
+
],
|
| 564 |
+
[
|
| 565 |
+
3,
|
| 566 |
+
12,
|
| 567 |
+
10,
|
| 568 |
+
19,
|
| 569 |
+
16,
|
| 570 |
+
7,
|
| 571 |
+
7,
|
| 572 |
+
100,
|
| 573 |
+
6
|
| 574 |
+
],
|
| 575 |
+
[
|
| 576 |
+
14,
|
| 577 |
+
9,
|
| 578 |
+
9,
|
| 579 |
+
7,
|
| 580 |
+
15,
|
| 581 |
+
2,
|
| 582 |
+
9,
|
| 583 |
+
5,
|
| 584 |
+
110
|
| 585 |
+
]
|
| 586 |
+
],
|
| 587 |
+
"per_class_recall": [
|
| 588 |
+
0.5277777777777778,
|
| 589 |
+
0.5222222222222223,
|
| 590 |
+
0.5833333333333334,
|
| 591 |
+
0.37222222222222223,
|
| 592 |
+
0.5333333333333333,
|
| 593 |
+
0.5555555555555556,
|
| 594 |
+
0.5833333333333334,
|
| 595 |
+
0.5555555555555556,
|
| 596 |
+
0.6111111111111112
|
| 597 |
+
],
|
| 598 |
+
"balanced_accuracy": 0.5382716049382716,
|
| 599 |
+
"accuracy": 0.5380952380952381,
|
| 600 |
+
"weighted_f1": 0.538881849093927,
|
| 601 |
+
"macro_f1": 0.5409170306503709,
|
| 602 |
+
"kappa": 0.4790822564791062,
|
| 603 |
+
"samples": 1680,
|
| 604 |
+
"reward": 0.5382716049382716,
|
| 605 |
+
"subjects": 20
|
| 606 |
+
},
|
| 607 |
+
"tuev": {
|
| 608 |
+
"class_counts": [
|
| 609 |
+
119,
|
| 610 |
+
291,
|
| 611 |
+
669,
|
| 612 |
+
86,
|
| 613 |
+
500,
|
| 614 |
+
13822
|
| 615 |
+
],
|
| 616 |
+
"predicted_class_counts": [
|
| 617 |
+
355,
|
| 618 |
+
736,
|
| 619 |
+
225,
|
| 620 |
+
178,
|
| 621 |
+
1176,
|
| 622 |
+
12817
|
| 623 |
+
],
|
| 624 |
+
"confusion_matrix": [
|
| 625 |
+
[
|
| 626 |
+
38,
|
| 627 |
+
38,
|
| 628 |
+
3,
|
| 629 |
+
0,
|
| 630 |
+
3,
|
| 631 |
+
37
|
| 632 |
+
],
|
| 633 |
+
[
|
| 634 |
+
17,
|
| 635 |
+
225,
|
| 636 |
+
0,
|
| 637 |
+
0,
|
| 638 |
+
49,
|
| 639 |
+
0
|
| 640 |
+
],
|
| 641 |
+
[
|
| 642 |
+
99,
|
| 643 |
+
209,
|
| 644 |
+
221,
|
| 645 |
+
0,
|
| 646 |
+
137,
|
| 647 |
+
3
|
| 648 |
+
],
|
| 649 |
+
[
|
| 650 |
+
3,
|
| 651 |
+
0,
|
| 652 |
+
0,
|
| 653 |
+
80,
|
| 654 |
+
0,
|
| 655 |
+
3
|
| 656 |
+
],
|
| 657 |
+
[
|
| 658 |
+
0,
|
| 659 |
+
0,
|
| 660 |
+
1,
|
| 661 |
+
0,
|
| 662 |
+
468,
|
| 663 |
+
31
|
| 664 |
+
],
|
| 665 |
+
[
|
| 666 |
+
198,
|
| 667 |
+
264,
|
| 668 |
+
0,
|
| 669 |
+
98,
|
| 670 |
+
519,
|
| 671 |
+
12743
|
| 672 |
+
]
|
| 673 |
+
],
|
| 674 |
+
"per_class_recall": [
|
| 675 |
+
0.31932773109243695,
|
| 676 |
+
0.7731958762886598,
|
| 677 |
+
0.3303437967115097,
|
| 678 |
+
0.9302325581395349,
|
| 679 |
+
0.936,
|
| 680 |
+
0.9219360439878455
|
| 681 |
+
],
|
| 682 |
+
"balanced_accuracy": 0.7018393343699977,
|
| 683 |
+
"accuracy": 0.8894556724995157,
|
| 684 |
+
"weighted_f1": 0.9060795467857647,
|
| 685 |
+
"macro_f1": 0.5356941485591152,
|
| 686 |
+
"kappa": 0.5701427137051658,
|
| 687 |
+
"samples": 15487,
|
| 688 |
+
"reward": 0.7018393343699977,
|
| 689 |
+
"subjects": 58
|
| 690 |
+
},
|
| 691 |
+
"ad65": {
|
| 692 |
+
"class_counts": [
|
| 693 |
+
464,
|
| 694 |
+
393,
|
| 695 |
+
486
|
| 696 |
+
],
|
| 697 |
+
"predicted_class_counts": [
|
| 698 |
+
440,
|
| 699 |
+
309,
|
| 700 |
+
594
|
| 701 |
+
],
|
| 702 |
+
"confusion_matrix": [
|
| 703 |
+
[
|
| 704 |
+
287,
|
| 705 |
+
86,
|
| 706 |
+
91
|
| 707 |
+
],
|
| 708 |
+
[
|
| 709 |
+
96,
|
| 710 |
+
185,
|
| 711 |
+
112
|
| 712 |
+
],
|
| 713 |
+
[
|
| 714 |
+
57,
|
| 715 |
+
38,
|
| 716 |
+
391
|
| 717 |
+
]
|
| 718 |
+
],
|
| 719 |
+
"per_class_recall": [
|
| 720 |
+
0.6185344827586207,
|
| 721 |
+
0.4707379134860051,
|
| 722 |
+
0.8045267489711934
|
| 723 |
+
],
|
| 724 |
+
"balanced_accuracy": 0.6312663817386064,
|
| 725 |
+
"accuracy": 0.6425912137006702,
|
| 726 |
+
"weighted_f1": 0.6356338206725993,
|
| 727 |
+
"macro_f1": 0.6286984511173302,
|
| 728 |
+
"kappa": 0.4579978610488933,
|
| 729 |
+
"samples": 1343,
|
| 730 |
+
"subject_metrics": {
|
| 731 |
+
"class_counts": [
|
| 732 |
+
7,
|
| 733 |
+
5,
|
| 734 |
+
6
|
| 735 |
+
],
|
| 736 |
+
"predicted_class_counts": [
|
| 737 |
+
5,
|
| 738 |
+
6,
|
| 739 |
+
7
|
| 740 |
+
],
|
| 741 |
+
"confusion_matrix": [
|
| 742 |
+
[
|
| 743 |
+
5,
|
| 744 |
+
2,
|
| 745 |
+
0
|
| 746 |
+
],
|
| 747 |
+
[
|
| 748 |
+
0,
|
| 749 |
+
4,
|
| 750 |
+
1
|
| 751 |
+
],
|
| 752 |
+
[
|
| 753 |
+
0,
|
| 754 |
+
0,
|
| 755 |
+
6
|
| 756 |
+
]
|
| 757 |
+
],
|
| 758 |
+
"per_class_recall": [
|
| 759 |
+
0.7142857142857143,
|
| 760 |
+
0.8,
|
| 761 |
+
1.0
|
| 762 |
+
],
|
| 763 |
+
"balanced_accuracy": 0.8380952380952381,
|
| 764 |
+
"accuracy": 0.8333333333333334,
|
| 765 |
+
"weighted_f1": 0.8337865837865839,
|
| 766 |
+
"macro_f1": 0.8278943278943279,
|
| 767 |
+
"kappa": 0.7511520737327189
|
| 768 |
+
},
|
| 769 |
+
"reward": 0.8380952380952381,
|
| 770 |
+
"subjects": 18
|
| 771 |
+
},
|
| 772 |
+
"openbmi": {
|
| 773 |
+
"class_counts": [
|
| 774 |
+
2200,
|
| 775 |
+
2200
|
| 776 |
+
],
|
| 777 |
+
"predicted_class_counts": [
|
| 778 |
+
1987,
|
| 779 |
+
2413
|
| 780 |
+
],
|
| 781 |
+
"confusion_matrix": [
|
| 782 |
+
[
|
| 783 |
+
1705,
|
| 784 |
+
495
|
| 785 |
+
],
|
| 786 |
+
[
|
| 787 |
+
282,
|
| 788 |
+
1918
|
| 789 |
+
]
|
| 790 |
+
],
|
| 791 |
+
"per_class_recall": [
|
| 792 |
+
0.775,
|
| 793 |
+
0.8718181818181818
|
| 794 |
+
],
|
| 795 |
+
"balanced_accuracy": 0.823409090909091,
|
| 796 |
+
"accuracy": 0.8234090909090909,
|
| 797 |
+
"weighted_f1": 0.8229942886302098,
|
| 798 |
+
"macro_f1": 0.82299428863021,
|
| 799 |
+
"kappa": 0.6468181818181817,
|
| 800 |
+
"samples": 4400,
|
| 801 |
+
"subject_scores": {
|
| 802 |
+
"19": 0.875,
|
| 803 |
+
"35": 0.95,
|
| 804 |
+
"34": 0.6699999999999999,
|
| 805 |
+
"51": 0.795,
|
| 806 |
+
"20": 0.8425,
|
| 807 |
+
"44": 0.9425,
|
| 808 |
+
"24": 0.615,
|
| 809 |
+
"15": 0.8875,
|
| 810 |
+
"31": 0.9099999999999999,
|
| 811 |
+
"26": 0.835,
|
| 812 |
+
"23": 0.735
|
| 813 |
+
},
|
| 814 |
+
"reward": 0.823409090909091,
|
| 815 |
+
"subjects": 11
|
| 816 |
+
},
|
| 817 |
+
"longitudinal": {
|
| 818 |
+
"class_counts": [
|
| 819 |
+
4260,
|
| 820 |
+
4158
|
| 821 |
+
],
|
| 822 |
+
"predicted_class_counts": [
|
| 823 |
+
4552,
|
| 824 |
+
3866
|
| 825 |
+
],
|
| 826 |
+
"confusion_matrix": [
|
| 827 |
+
[
|
| 828 |
+
3795,
|
| 829 |
+
465
|
| 830 |
+
],
|
| 831 |
+
[
|
| 832 |
+
757,
|
| 833 |
+
3401
|
| 834 |
+
]
|
| 835 |
+
],
|
| 836 |
+
"per_class_recall": [
|
| 837 |
+
0.8908450704225352,
|
| 838 |
+
0.817941317941318
|
| 839 |
+
],
|
| 840 |
+
"balanced_accuracy": 0.8543931941819266,
|
| 841 |
+
"accuracy": 0.8548348776431456,
|
| 842 |
+
"weighted_f1": 0.8545986797881616,
|
| 843 |
+
"macro_f1": 0.8545161723182699,
|
| 844 |
+
"kappa": 0.7093827910518298,
|
| 845 |
+
"samples": 8418,
|
| 846 |
+
"subject_scores": {
|
| 847 |
+
"sub-G2021": 0.8627525887522267,
|
| 848 |
+
"sub-G2007": 0.816860103413505,
|
| 849 |
+
"sub-G2019": 0.852993824374467,
|
| 850 |
+
"sub-G2031": 0.828332994328064,
|
| 851 |
+
"sub-G2015": 0.9043525361474528,
|
| 852 |
+
"sub-CTR002": 0.9934852728970376,
|
| 853 |
+
"sub-G2011": 0.8100294180322551,
|
| 854 |
+
"sub-G2035": 0.9598833152678935,
|
| 855 |
+
"sub-CTR003": 0.6680194805194806
|
| 856 |
+
},
|
| 857 |
+
"reward": 0.855189948192487,
|
| 858 |
+
"subjects": 9
|
| 859 |
+
}
|
| 860 |
+
},
|
| 861 |
+
"blend_strengths": {
|
| 862 |
+
"faced": 0.0,
|
| 863 |
+
"tuev": 0.0,
|
| 864 |
+
"ad65": 0.0,
|
| 865 |
+
"openbmi": 0.0,
|
| 866 |
+
"longitudinal": 0.0
|
| 867 |
+
},
|
| 868 |
+
"blend_validation_scores": {
|
| 869 |
+
"faced": {
|
| 870 |
+
"0.0": 0.5382716049382716,
|
| 871 |
+
"0.1": 0.5370370370370371,
|
| 872 |
+
"0.3": 0.532253086419753,
|
| 873 |
+
"1.0": 0.1339506172839506
|
| 874 |
+
},
|
| 875 |
+
"tuev": {
|
| 876 |
+
"0.0": 0.7018393343699977,
|
| 877 |
+
"0.1": 0.6961989153062914,
|
| 878 |
+
"0.3": 0.640511745429885,
|
| 879 |
+
"1.0": 0.48544253815977445
|
| 880 |
+
},
|
| 881 |
+
"ad65": {
|
| 882 |
+
"0.0": 0.8380952380952381,
|
| 883 |
+
"0.1": 0.8380952380952381,
|
| 884 |
+
"0.3": 0.7714285714285714,
|
| 885 |
+
"1.0": 0.4603174603174603
|
| 886 |
+
},
|
| 887 |
+
"openbmi": {
|
| 888 |
+
"0.0": 0.823409090909091,
|
| 889 |
+
"0.1": 0.8227272727272728,
|
| 890 |
+
"0.3": 0.8204545454545453,
|
| 891 |
+
"1.0": 0.5947727272727272
|
| 892 |
+
},
|
| 893 |
+
"longitudinal": {
|
| 894 |
+
"0.0": 0.855189948192487,
|
| 895 |
+
"0.1": 0.8550985739234811,
|
| 896 |
+
"0.3": 0.854407135732043,
|
| 897 |
+
"1.0": 0.7111596994413579
|
| 898 |
+
}
|
| 899 |
+
}
|
| 900 |
+
},
|
| 901 |
+
{
|
| 902 |
+
"epoch": 3,
|
| 903 |
+
"joint_updates": 600,
|
| 904 |
+
"training_ce": {
|
| 905 |
+
"faced": 2.1848880529403685,
|
| 906 |
+
"tuev": 1.0958637952804566,
|
| 907 |
+
"ad65": 0.7546222493052482,
|
| 908 |
+
"openbmi": 0.6768594324588776,
|
| 909 |
+
"longitudinal": 0.5624203167855739
|
| 910 |
+
},
|
| 911 |
+
"validation": {
|
| 912 |
+
"faced": {
|
| 913 |
+
"class_counts": [
|
| 914 |
+
180,
|
| 915 |
+
180,
|
| 916 |
+
180,
|
| 917 |
+
180,
|
| 918 |
+
240,
|
| 919 |
+
180,
|
| 920 |
+
180,
|
| 921 |
+
180,
|
| 922 |
+
180
|
| 923 |
+
],
|
| 924 |
+
"predicted_class_counts": [
|
| 925 |
+
153,
|
| 926 |
+
184,
|
| 927 |
+
179,
|
| 928 |
+
165,
|
| 929 |
+
289,
|
| 930 |
+
151,
|
| 931 |
+
186,
|
| 932 |
+
186,
|
| 933 |
+
187
|
| 934 |
+
],
|
| 935 |
+
"confusion_matrix": [
|
| 936 |
+
[
|
| 937 |
+
95,
|
| 938 |
+
12,
|
| 939 |
+
3,
|
| 940 |
+
15,
|
| 941 |
+
17,
|
| 942 |
+
4,
|
| 943 |
+
12,
|
| 944 |
+
14,
|
| 945 |
+
8
|
| 946 |
+
],
|
| 947 |
+
[
|
| 948 |
+
7,
|
| 949 |
+
94,
|
| 950 |
+
6,
|
| 951 |
+
14,
|
| 952 |
+
24,
|
| 953 |
+
9,
|
| 954 |
+
9,
|
| 955 |
+
6,
|
| 956 |
+
11
|
| 957 |
+
],
|
| 958 |
+
[
|
| 959 |
+
7,
|
| 960 |
+
9,
|
| 961 |
+
105,
|
| 962 |
+
15,
|
| 963 |
+
18,
|
| 964 |
+
5,
|
| 965 |
+
7,
|
| 966 |
+
5,
|
| 967 |
+
9
|
| 968 |
+
],
|
| 969 |
+
[
|
| 970 |
+
7,
|
| 971 |
+
19,
|
| 972 |
+
8,
|
| 973 |
+
67,
|
| 974 |
+
33,
|
| 975 |
+
8,
|
| 976 |
+
14,
|
| 977 |
+
13,
|
| 978 |
+
11
|
| 979 |
+
],
|
| 980 |
+
[
|
| 981 |
+
11,
|
| 982 |
+
13,
|
| 983 |
+
18,
|
| 984 |
+
12,
|
| 985 |
+
128,
|
| 986 |
+
11,
|
| 987 |
+
14,
|
| 988 |
+
21,
|
| 989 |
+
12
|
| 990 |
+
],
|
| 991 |
+
[
|
| 992 |
+
3,
|
| 993 |
+
9,
|
| 994 |
+
11,
|
| 995 |
+
7,
|
| 996 |
+
18,
|
| 997 |
+
100,
|
| 998 |
+
9,
|
| 999 |
+
14,
|
| 1000 |
+
9
|
| 1001 |
+
],
|
| 1002 |
+
[
|
| 1003 |
+
6,
|
| 1004 |
+
7,
|
| 1005 |
+
9,
|
| 1006 |
+
9,
|
| 1007 |
+
20,
|
| 1008 |
+
5,
|
| 1009 |
+
105,
|
| 1010 |
+
8,
|
| 1011 |
+
11
|
| 1012 |
+
],
|
| 1013 |
+
[
|
| 1014 |
+
3,
|
| 1015 |
+
12,
|
| 1016 |
+
10,
|
| 1017 |
+
19,
|
| 1018 |
+
16,
|
| 1019 |
+
7,
|
| 1020 |
+
7,
|
| 1021 |
+
100,
|
| 1022 |
+
6
|
| 1023 |
+
],
|
| 1024 |
+
[
|
| 1025 |
+
14,
|
| 1026 |
+
9,
|
| 1027 |
+
9,
|
| 1028 |
+
7,
|
| 1029 |
+
15,
|
| 1030 |
+
2,
|
| 1031 |
+
9,
|
| 1032 |
+
5,
|
| 1033 |
+
110
|
| 1034 |
+
]
|
| 1035 |
+
],
|
| 1036 |
+
"per_class_recall": [
|
| 1037 |
+
0.5277777777777778,
|
| 1038 |
+
0.5222222222222223,
|
| 1039 |
+
0.5833333333333334,
|
| 1040 |
+
0.37222222222222223,
|
| 1041 |
+
0.5333333333333333,
|
| 1042 |
+
0.5555555555555556,
|
| 1043 |
+
0.5833333333333334,
|
| 1044 |
+
0.5555555555555556,
|
| 1045 |
+
0.6111111111111112
|
| 1046 |
+
],
|
| 1047 |
+
"balanced_accuracy": 0.5382716049382716,
|
| 1048 |
+
"accuracy": 0.5380952380952381,
|
| 1049 |
+
"weighted_f1": 0.538881849093927,
|
| 1050 |
+
"macro_f1": 0.5409170306503709,
|
| 1051 |
+
"kappa": 0.4790822564791062,
|
| 1052 |
+
"samples": 1680,
|
| 1053 |
+
"reward": 0.5382716049382716,
|
| 1054 |
+
"subjects": 20
|
| 1055 |
+
},
|
| 1056 |
+
"tuev": {
|
| 1057 |
+
"class_counts": [
|
| 1058 |
+
119,
|
| 1059 |
+
291,
|
| 1060 |
+
669,
|
| 1061 |
+
86,
|
| 1062 |
+
500,
|
| 1063 |
+
13822
|
| 1064 |
+
],
|
| 1065 |
+
"predicted_class_counts": [
|
| 1066 |
+
355,
|
| 1067 |
+
736,
|
| 1068 |
+
225,
|
| 1069 |
+
178,
|
| 1070 |
+
1176,
|
| 1071 |
+
12817
|
| 1072 |
+
],
|
| 1073 |
+
"confusion_matrix": [
|
| 1074 |
+
[
|
| 1075 |
+
38,
|
| 1076 |
+
38,
|
| 1077 |
+
3,
|
| 1078 |
+
0,
|
| 1079 |
+
3,
|
| 1080 |
+
37
|
| 1081 |
+
],
|
| 1082 |
+
[
|
| 1083 |
+
17,
|
| 1084 |
+
225,
|
| 1085 |
+
0,
|
| 1086 |
+
0,
|
| 1087 |
+
49,
|
| 1088 |
+
0
|
| 1089 |
+
],
|
| 1090 |
+
[
|
| 1091 |
+
99,
|
| 1092 |
+
209,
|
| 1093 |
+
221,
|
| 1094 |
+
0,
|
| 1095 |
+
137,
|
| 1096 |
+
3
|
| 1097 |
+
],
|
| 1098 |
+
[
|
| 1099 |
+
3,
|
| 1100 |
+
0,
|
| 1101 |
+
0,
|
| 1102 |
+
80,
|
| 1103 |
+
0,
|
| 1104 |
+
3
|
| 1105 |
+
],
|
| 1106 |
+
[
|
| 1107 |
+
0,
|
| 1108 |
+
0,
|
| 1109 |
+
1,
|
| 1110 |
+
0,
|
| 1111 |
+
468,
|
| 1112 |
+
31
|
| 1113 |
+
],
|
| 1114 |
+
[
|
| 1115 |
+
198,
|
| 1116 |
+
264,
|
| 1117 |
+
0,
|
| 1118 |
+
98,
|
| 1119 |
+
519,
|
| 1120 |
+
12743
|
| 1121 |
+
]
|
| 1122 |
+
],
|
| 1123 |
+
"per_class_recall": [
|
| 1124 |
+
0.31932773109243695,
|
| 1125 |
+
0.7731958762886598,
|
| 1126 |
+
0.3303437967115097,
|
| 1127 |
+
0.9302325581395349,
|
| 1128 |
+
0.936,
|
| 1129 |
+
0.9219360439878455
|
| 1130 |
+
],
|
| 1131 |
+
"balanced_accuracy": 0.7018393343699977,
|
| 1132 |
+
"accuracy": 0.8894556724995157,
|
| 1133 |
+
"weighted_f1": 0.9060795467857647,
|
| 1134 |
+
"macro_f1": 0.5356941485591152,
|
| 1135 |
+
"kappa": 0.5701427137051658,
|
| 1136 |
+
"samples": 15487,
|
| 1137 |
+
"reward": 0.7018393343699977,
|
| 1138 |
+
"subjects": 58
|
| 1139 |
+
},
|
| 1140 |
+
"ad65": {
|
| 1141 |
+
"class_counts": [
|
| 1142 |
+
464,
|
| 1143 |
+
393,
|
| 1144 |
+
486
|
| 1145 |
+
],
|
| 1146 |
+
"predicted_class_counts": [
|
| 1147 |
+
440,
|
| 1148 |
+
309,
|
| 1149 |
+
594
|
| 1150 |
+
],
|
| 1151 |
+
"confusion_matrix": [
|
| 1152 |
+
[
|
| 1153 |
+
287,
|
| 1154 |
+
86,
|
| 1155 |
+
91
|
| 1156 |
+
],
|
| 1157 |
+
[
|
| 1158 |
+
96,
|
| 1159 |
+
185,
|
| 1160 |
+
112
|
| 1161 |
+
],
|
| 1162 |
+
[
|
| 1163 |
+
57,
|
| 1164 |
+
38,
|
| 1165 |
+
391
|
| 1166 |
+
]
|
| 1167 |
+
],
|
| 1168 |
+
"per_class_recall": [
|
| 1169 |
+
0.6185344827586207,
|
| 1170 |
+
0.4707379134860051,
|
| 1171 |
+
0.8045267489711934
|
| 1172 |
+
],
|
| 1173 |
+
"balanced_accuracy": 0.6312663817386064,
|
| 1174 |
+
"accuracy": 0.6425912137006702,
|
| 1175 |
+
"weighted_f1": 0.6356338206725993,
|
| 1176 |
+
"macro_f1": 0.6286984511173302,
|
| 1177 |
+
"kappa": 0.4579978610488933,
|
| 1178 |
+
"samples": 1343,
|
| 1179 |
+
"subject_metrics": {
|
| 1180 |
+
"class_counts": [
|
| 1181 |
+
7,
|
| 1182 |
+
5,
|
| 1183 |
+
6
|
| 1184 |
+
],
|
| 1185 |
+
"predicted_class_counts": [
|
| 1186 |
+
5,
|
| 1187 |
+
6,
|
| 1188 |
+
7
|
| 1189 |
+
],
|
| 1190 |
+
"confusion_matrix": [
|
| 1191 |
+
[
|
| 1192 |
+
5,
|
| 1193 |
+
2,
|
| 1194 |
+
0
|
| 1195 |
+
],
|
| 1196 |
+
[
|
| 1197 |
+
0,
|
| 1198 |
+
4,
|
| 1199 |
+
1
|
| 1200 |
+
],
|
| 1201 |
+
[
|
| 1202 |
+
0,
|
| 1203 |
+
0,
|
| 1204 |
+
6
|
| 1205 |
+
]
|
| 1206 |
+
],
|
| 1207 |
+
"per_class_recall": [
|
| 1208 |
+
0.7142857142857143,
|
| 1209 |
+
0.8,
|
| 1210 |
+
1.0
|
| 1211 |
+
],
|
| 1212 |
+
"balanced_accuracy": 0.8380952380952381,
|
| 1213 |
+
"accuracy": 0.8333333333333334,
|
| 1214 |
+
"weighted_f1": 0.8337865837865839,
|
| 1215 |
+
"macro_f1": 0.8278943278943279,
|
| 1216 |
+
"kappa": 0.7511520737327189
|
| 1217 |
+
},
|
| 1218 |
+
"reward": 0.8380952380952381,
|
| 1219 |
+
"subjects": 18
|
| 1220 |
+
},
|
| 1221 |
+
"openbmi": {
|
| 1222 |
+
"class_counts": [
|
| 1223 |
+
2200,
|
| 1224 |
+
2200
|
| 1225 |
+
],
|
| 1226 |
+
"predicted_class_counts": [
|
| 1227 |
+
1987,
|
| 1228 |
+
2413
|
| 1229 |
+
],
|
| 1230 |
+
"confusion_matrix": [
|
| 1231 |
+
[
|
| 1232 |
+
1705,
|
| 1233 |
+
495
|
| 1234 |
+
],
|
| 1235 |
+
[
|
| 1236 |
+
282,
|
| 1237 |
+
1918
|
| 1238 |
+
]
|
| 1239 |
+
],
|
| 1240 |
+
"per_class_recall": [
|
| 1241 |
+
0.775,
|
| 1242 |
+
0.8718181818181818
|
| 1243 |
+
],
|
| 1244 |
+
"balanced_accuracy": 0.823409090909091,
|
| 1245 |
+
"accuracy": 0.8234090909090909,
|
| 1246 |
+
"weighted_f1": 0.8229942886302098,
|
| 1247 |
+
"macro_f1": 0.82299428863021,
|
| 1248 |
+
"kappa": 0.6468181818181817,
|
| 1249 |
+
"samples": 4400,
|
| 1250 |
+
"subject_scores": {
|
| 1251 |
+
"19": 0.875,
|
| 1252 |
+
"35": 0.95,
|
| 1253 |
+
"34": 0.6699999999999999,
|
| 1254 |
+
"51": 0.795,
|
| 1255 |
+
"20": 0.8425,
|
| 1256 |
+
"44": 0.9425,
|
| 1257 |
+
"24": 0.615,
|
| 1258 |
+
"15": 0.8875,
|
| 1259 |
+
"31": 0.9099999999999999,
|
| 1260 |
+
"26": 0.835,
|
| 1261 |
+
"23": 0.735
|
| 1262 |
+
},
|
| 1263 |
+
"reward": 0.823409090909091,
|
| 1264 |
+
"subjects": 11
|
| 1265 |
+
},
|
| 1266 |
+
"longitudinal": {
|
| 1267 |
+
"class_counts": [
|
| 1268 |
+
4260,
|
| 1269 |
+
4158
|
| 1270 |
+
],
|
| 1271 |
+
"predicted_class_counts": [
|
| 1272 |
+
4552,
|
| 1273 |
+
3866
|
| 1274 |
+
],
|
| 1275 |
+
"confusion_matrix": [
|
| 1276 |
+
[
|
| 1277 |
+
3795,
|
| 1278 |
+
465
|
| 1279 |
+
],
|
| 1280 |
+
[
|
| 1281 |
+
757,
|
| 1282 |
+
3401
|
| 1283 |
+
]
|
| 1284 |
+
],
|
| 1285 |
+
"per_class_recall": [
|
| 1286 |
+
0.8908450704225352,
|
| 1287 |
+
0.817941317941318
|
| 1288 |
+
],
|
| 1289 |
+
"balanced_accuracy": 0.8543931941819266,
|
| 1290 |
+
"accuracy": 0.8548348776431456,
|
| 1291 |
+
"weighted_f1": 0.8545986797881616,
|
| 1292 |
+
"macro_f1": 0.8545161723182699,
|
| 1293 |
+
"kappa": 0.7093827910518298,
|
| 1294 |
+
"samples": 8418,
|
| 1295 |
+
"subject_scores": {
|
| 1296 |
+
"sub-G2021": 0.8627525887522267,
|
| 1297 |
+
"sub-G2007": 0.816860103413505,
|
| 1298 |
+
"sub-G2019": 0.852993824374467,
|
| 1299 |
+
"sub-G2031": 0.828332994328064,
|
| 1300 |
+
"sub-G2015": 0.9043525361474528,
|
| 1301 |
+
"sub-CTR002": 0.9934852728970376,
|
| 1302 |
+
"sub-G2011": 0.8100294180322551,
|
| 1303 |
+
"sub-G2035": 0.9598833152678935,
|
| 1304 |
+
"sub-CTR003": 0.6680194805194806
|
| 1305 |
+
},
|
| 1306 |
+
"reward": 0.855189948192487,
|
| 1307 |
+
"subjects": 9
|
| 1308 |
+
}
|
| 1309 |
+
},
|
| 1310 |
+
"blend_strengths": {
|
| 1311 |
+
"faced": 0.0,
|
| 1312 |
+
"tuev": 0.0,
|
| 1313 |
+
"ad65": 0.0,
|
| 1314 |
+
"openbmi": 0.0,
|
| 1315 |
+
"longitudinal": 0.0
|
| 1316 |
+
},
|
| 1317 |
+
"blend_validation_scores": {
|
| 1318 |
+
"faced": {
|
| 1319 |
+
"0.0": 0.5382716049382716,
|
| 1320 |
+
"0.1": 0.536111111111111,
|
| 1321 |
+
"0.3": 0.5311728395061728,
|
| 1322 |
+
"1.0": 0.14722222222222223
|
| 1323 |
+
},
|
| 1324 |
+
"tuev": {
|
| 1325 |
+
"0.0": 0.7018393343699977,
|
| 1326 |
+
"0.1": 0.6973410670719856,
|
| 1327 |
+
"0.3": 0.6116222078841141,
|
| 1328 |
+
"1.0": 0.5542606648044619
|
| 1329 |
+
},
|
| 1330 |
+
"ad65": {
|
| 1331 |
+
"0.0": 0.8380952380952381,
|
| 1332 |
+
"0.1": 0.8380952380952381,
|
| 1333 |
+
"0.3": 0.8380952380952381,
|
| 1334 |
+
"1.0": 0.5380952380952381
|
| 1335 |
+
},
|
| 1336 |
+
"openbmi": {
|
| 1337 |
+
"0.0": 0.823409090909091,
|
| 1338 |
+
"0.1": 0.8218181818181818,
|
| 1339 |
+
"0.3": 0.8218181818181819,
|
| 1340 |
+
"1.0": 0.6272727272727273
|
| 1341 |
+
},
|
| 1342 |
+
"longitudinal": {
|
| 1343 |
+
"0.0": 0.855189948192487,
|
| 1344 |
+
"0.1": 0.8550985739234811,
|
| 1345 |
+
"0.3": 0.854407135732043,
|
| 1346 |
+
"1.0": 0.7220835834562164
|
| 1347 |
+
}
|
| 1348 |
+
}
|
| 1349 |
+
},
|
| 1350 |
+
{
|
| 1351 |
+
"epoch": 4,
|
| 1352 |
+
"joint_updates": 800,
|
| 1353 |
+
"training_ce": {
|
| 1354 |
+
"faced": 2.1728256702423097,
|
| 1355 |
+
"tuev": 1.0120218977332116,
|
| 1356 |
+
"ad65": 0.7177016079425812,
|
| 1357 |
+
"openbmi": 0.674168586730957,
|
| 1358 |
+
"longitudinal": 0.563712527602911
|
| 1359 |
+
},
|
| 1360 |
+
"validation": {
|
| 1361 |
+
"faced": {
|
| 1362 |
+
"class_counts": [
|
| 1363 |
+
180,
|
| 1364 |
+
180,
|
| 1365 |
+
180,
|
| 1366 |
+
180,
|
| 1367 |
+
240,
|
| 1368 |
+
180,
|
| 1369 |
+
180,
|
| 1370 |
+
180,
|
| 1371 |
+
180
|
| 1372 |
+
],
|
| 1373 |
+
"predicted_class_counts": [
|
| 1374 |
+
153,
|
| 1375 |
+
184,
|
| 1376 |
+
179,
|
| 1377 |
+
165,
|
| 1378 |
+
289,
|
| 1379 |
+
151,
|
| 1380 |
+
186,
|
| 1381 |
+
186,
|
| 1382 |
+
187
|
| 1383 |
+
],
|
| 1384 |
+
"confusion_matrix": [
|
| 1385 |
+
[
|
| 1386 |
+
95,
|
| 1387 |
+
12,
|
| 1388 |
+
3,
|
| 1389 |
+
15,
|
| 1390 |
+
17,
|
| 1391 |
+
4,
|
| 1392 |
+
12,
|
| 1393 |
+
14,
|
| 1394 |
+
8
|
| 1395 |
+
],
|
| 1396 |
+
[
|
| 1397 |
+
7,
|
| 1398 |
+
94,
|
| 1399 |
+
6,
|
| 1400 |
+
14,
|
| 1401 |
+
24,
|
| 1402 |
+
9,
|
| 1403 |
+
9,
|
| 1404 |
+
6,
|
| 1405 |
+
11
|
| 1406 |
+
],
|
| 1407 |
+
[
|
| 1408 |
+
7,
|
| 1409 |
+
9,
|
| 1410 |
+
105,
|
| 1411 |
+
15,
|
| 1412 |
+
18,
|
| 1413 |
+
5,
|
| 1414 |
+
7,
|
| 1415 |
+
5,
|
| 1416 |
+
9
|
| 1417 |
+
],
|
| 1418 |
+
[
|
| 1419 |
+
7,
|
| 1420 |
+
19,
|
| 1421 |
+
8,
|
| 1422 |
+
67,
|
| 1423 |
+
33,
|
| 1424 |
+
8,
|
| 1425 |
+
14,
|
| 1426 |
+
13,
|
| 1427 |
+
11
|
| 1428 |
+
],
|
| 1429 |
+
[
|
| 1430 |
+
11,
|
| 1431 |
+
13,
|
| 1432 |
+
18,
|
| 1433 |
+
12,
|
| 1434 |
+
128,
|
| 1435 |
+
11,
|
| 1436 |
+
14,
|
| 1437 |
+
21,
|
| 1438 |
+
12
|
| 1439 |
+
],
|
| 1440 |
+
[
|
| 1441 |
+
3,
|
| 1442 |
+
9,
|
| 1443 |
+
11,
|
| 1444 |
+
7,
|
| 1445 |
+
18,
|
| 1446 |
+
100,
|
| 1447 |
+
9,
|
| 1448 |
+
14,
|
| 1449 |
+
9
|
| 1450 |
+
],
|
| 1451 |
+
[
|
| 1452 |
+
6,
|
| 1453 |
+
7,
|
| 1454 |
+
9,
|
| 1455 |
+
9,
|
| 1456 |
+
20,
|
| 1457 |
+
5,
|
| 1458 |
+
105,
|
| 1459 |
+
8,
|
| 1460 |
+
11
|
| 1461 |
+
],
|
| 1462 |
+
[
|
| 1463 |
+
3,
|
| 1464 |
+
12,
|
| 1465 |
+
10,
|
| 1466 |
+
19,
|
| 1467 |
+
16,
|
| 1468 |
+
7,
|
| 1469 |
+
7,
|
| 1470 |
+
100,
|
| 1471 |
+
6
|
| 1472 |
+
],
|
| 1473 |
+
[
|
| 1474 |
+
14,
|
| 1475 |
+
9,
|
| 1476 |
+
9,
|
| 1477 |
+
7,
|
| 1478 |
+
15,
|
| 1479 |
+
2,
|
| 1480 |
+
9,
|
| 1481 |
+
5,
|
| 1482 |
+
110
|
| 1483 |
+
]
|
| 1484 |
+
],
|
| 1485 |
+
"per_class_recall": [
|
| 1486 |
+
0.5277777777777778,
|
| 1487 |
+
0.5222222222222223,
|
| 1488 |
+
0.5833333333333334,
|
| 1489 |
+
0.37222222222222223,
|
| 1490 |
+
0.5333333333333333,
|
| 1491 |
+
0.5555555555555556,
|
| 1492 |
+
0.5833333333333334,
|
| 1493 |
+
0.5555555555555556,
|
| 1494 |
+
0.6111111111111112
|
| 1495 |
+
],
|
| 1496 |
+
"balanced_accuracy": 0.5382716049382716,
|
| 1497 |
+
"accuracy": 0.5380952380952381,
|
| 1498 |
+
"weighted_f1": 0.538881849093927,
|
| 1499 |
+
"macro_f1": 0.5409170306503709,
|
| 1500 |
+
"kappa": 0.4790822564791062,
|
| 1501 |
+
"samples": 1680,
|
| 1502 |
+
"reward": 0.5382716049382716,
|
| 1503 |
+
"subjects": 20
|
| 1504 |
+
},
|
| 1505 |
+
"tuev": {
|
| 1506 |
+
"class_counts": [
|
| 1507 |
+
119,
|
| 1508 |
+
291,
|
| 1509 |
+
669,
|
| 1510 |
+
86,
|
| 1511 |
+
500,
|
| 1512 |
+
13822
|
| 1513 |
+
],
|
| 1514 |
+
"predicted_class_counts": [
|
| 1515 |
+
356,
|
| 1516 |
+
749,
|
| 1517 |
+
220,
|
| 1518 |
+
179,
|
| 1519 |
+
1256,
|
| 1520 |
+
12727
|
| 1521 |
+
],
|
| 1522 |
+
"confusion_matrix": [
|
| 1523 |
+
[
|
| 1524 |
+
38,
|
| 1525 |
+
38,
|
| 1526 |
+
3,
|
| 1527 |
+
0,
|
| 1528 |
+
3,
|
| 1529 |
+
37
|
| 1530 |
+
],
|
| 1531 |
+
[
|
| 1532 |
+
17,
|
| 1533 |
+
225,
|
| 1534 |
+
0,
|
| 1535 |
+
0,
|
| 1536 |
+
49,
|
| 1537 |
+
0
|
| 1538 |
+
],
|
| 1539 |
+
[
|
| 1540 |
+
99,
|
| 1541 |
+
178,
|
| 1542 |
+
216,
|
| 1543 |
+
0,
|
| 1544 |
+
173,
|
| 1545 |
+
3
|
| 1546 |
+
],
|
| 1547 |
+
[
|
| 1548 |
+
3,
|
| 1549 |
+
0,
|
| 1550 |
+
0,
|
| 1551 |
+
82,
|
| 1552 |
+
0,
|
| 1553 |
+
1
|
| 1554 |
+
],
|
| 1555 |
+
[
|
| 1556 |
+
0,
|
| 1557 |
+
0,
|
| 1558 |
+
1,
|
| 1559 |
+
0,
|
| 1560 |
+
468,
|
| 1561 |
+
31
|
| 1562 |
+
],
|
| 1563 |
+
[
|
| 1564 |
+
199,
|
| 1565 |
+
308,
|
| 1566 |
+
0,
|
| 1567 |
+
97,
|
| 1568 |
+
563,
|
| 1569 |
+
12655
|
| 1570 |
+
]
|
| 1571 |
+
],
|
| 1572 |
+
"per_class_recall": [
|
| 1573 |
+
0.31932773109243695,
|
| 1574 |
+
0.7731958762886598,
|
| 1575 |
+
0.32286995515695066,
|
| 1576 |
+
0.9534883720930233,
|
| 1577 |
+
0.936,
|
| 1578 |
+
0.9155693821444074
|
| 1579 |
+
],
|
| 1580 |
+
"balanced_accuracy": 0.7034085527959131,
|
| 1581 |
+
"accuracy": 0.8835797765868147,
|
| 1582 |
+
"weighted_f1": 0.9018359469480304,
|
| 1583 |
+
"macro_f1": 0.5306434463578182,
|
| 1584 |
+
"kappa": 0.5559569368700095,
|
| 1585 |
+
"samples": 15487,
|
| 1586 |
+
"reward": 0.7034085527959131,
|
| 1587 |
+
"subjects": 58
|
| 1588 |
+
},
|
| 1589 |
+
"ad65": {
|
| 1590 |
+
"class_counts": [
|
| 1591 |
+
464,
|
| 1592 |
+
393,
|
| 1593 |
+
486
|
| 1594 |
+
],
|
| 1595 |
+
"predicted_class_counts": [
|
| 1596 |
+
440,
|
| 1597 |
+
309,
|
| 1598 |
+
594
|
| 1599 |
+
],
|
| 1600 |
+
"confusion_matrix": [
|
| 1601 |
+
[
|
| 1602 |
+
287,
|
| 1603 |
+
86,
|
| 1604 |
+
91
|
| 1605 |
+
],
|
| 1606 |
+
[
|
| 1607 |
+
96,
|
| 1608 |
+
185,
|
| 1609 |
+
112
|
| 1610 |
+
],
|
| 1611 |
+
[
|
| 1612 |
+
57,
|
| 1613 |
+
38,
|
| 1614 |
+
391
|
| 1615 |
+
]
|
| 1616 |
+
],
|
| 1617 |
+
"per_class_recall": [
|
| 1618 |
+
0.6185344827586207,
|
| 1619 |
+
0.4707379134860051,
|
| 1620 |
+
0.8045267489711934
|
| 1621 |
+
],
|
| 1622 |
+
"balanced_accuracy": 0.6312663817386064,
|
| 1623 |
+
"accuracy": 0.6425912137006702,
|
| 1624 |
+
"weighted_f1": 0.6356338206725993,
|
| 1625 |
+
"macro_f1": 0.6286984511173302,
|
| 1626 |
+
"kappa": 0.4579978610488933,
|
| 1627 |
+
"samples": 1343,
|
| 1628 |
+
"subject_metrics": {
|
| 1629 |
+
"class_counts": [
|
| 1630 |
+
7,
|
| 1631 |
+
5,
|
| 1632 |
+
6
|
| 1633 |
+
],
|
| 1634 |
+
"predicted_class_counts": [
|
| 1635 |
+
5,
|
| 1636 |
+
6,
|
| 1637 |
+
7
|
| 1638 |
+
],
|
| 1639 |
+
"confusion_matrix": [
|
| 1640 |
+
[
|
| 1641 |
+
5,
|
| 1642 |
+
2,
|
| 1643 |
+
0
|
| 1644 |
+
],
|
| 1645 |
+
[
|
| 1646 |
+
0,
|
| 1647 |
+
4,
|
| 1648 |
+
1
|
| 1649 |
+
],
|
| 1650 |
+
[
|
| 1651 |
+
0,
|
| 1652 |
+
0,
|
| 1653 |
+
6
|
| 1654 |
+
]
|
| 1655 |
+
],
|
| 1656 |
+
"per_class_recall": [
|
| 1657 |
+
0.7142857142857143,
|
| 1658 |
+
0.8,
|
| 1659 |
+
1.0
|
| 1660 |
+
],
|
| 1661 |
+
"balanced_accuracy": 0.8380952380952381,
|
| 1662 |
+
"accuracy": 0.8333333333333334,
|
| 1663 |
+
"weighted_f1": 0.8337865837865839,
|
| 1664 |
+
"macro_f1": 0.8278943278943279,
|
| 1665 |
+
"kappa": 0.7511520737327189
|
| 1666 |
+
},
|
| 1667 |
+
"reward": 0.8380952380952381,
|
| 1668 |
+
"subjects": 18
|
| 1669 |
+
},
|
| 1670 |
+
"openbmi": {
|
| 1671 |
+
"class_counts": [
|
| 1672 |
+
2200,
|
| 1673 |
+
2200
|
| 1674 |
+
],
|
| 1675 |
+
"predicted_class_counts": [
|
| 1676 |
+
1987,
|
| 1677 |
+
2413
|
| 1678 |
+
],
|
| 1679 |
+
"confusion_matrix": [
|
| 1680 |
+
[
|
| 1681 |
+
1705,
|
| 1682 |
+
495
|
| 1683 |
+
],
|
| 1684 |
+
[
|
| 1685 |
+
282,
|
| 1686 |
+
1918
|
| 1687 |
+
]
|
| 1688 |
+
],
|
| 1689 |
+
"per_class_recall": [
|
| 1690 |
+
0.775,
|
| 1691 |
+
0.8718181818181818
|
| 1692 |
+
],
|
| 1693 |
+
"balanced_accuracy": 0.823409090909091,
|
| 1694 |
+
"accuracy": 0.8234090909090909,
|
| 1695 |
+
"weighted_f1": 0.8229942886302098,
|
| 1696 |
+
"macro_f1": 0.82299428863021,
|
| 1697 |
+
"kappa": 0.6468181818181817,
|
| 1698 |
+
"samples": 4400,
|
| 1699 |
+
"subject_scores": {
|
| 1700 |
+
"19": 0.875,
|
| 1701 |
+
"35": 0.95,
|
| 1702 |
+
"34": 0.6699999999999999,
|
| 1703 |
+
"51": 0.795,
|
| 1704 |
+
"20": 0.8425,
|
| 1705 |
+
"44": 0.9425,
|
| 1706 |
+
"24": 0.615,
|
| 1707 |
+
"15": 0.8875,
|
| 1708 |
+
"31": 0.9099999999999999,
|
| 1709 |
+
"26": 0.835,
|
| 1710 |
+
"23": 0.735
|
| 1711 |
+
},
|
| 1712 |
+
"reward": 0.823409090909091,
|
| 1713 |
+
"subjects": 11
|
| 1714 |
+
},
|
| 1715 |
+
"longitudinal": {
|
| 1716 |
+
"class_counts": [
|
| 1717 |
+
4260,
|
| 1718 |
+
4158
|
| 1719 |
+
],
|
| 1720 |
+
"predicted_class_counts": [
|
| 1721 |
+
4552,
|
| 1722 |
+
3866
|
| 1723 |
+
],
|
| 1724 |
+
"confusion_matrix": [
|
| 1725 |
+
[
|
| 1726 |
+
3795,
|
| 1727 |
+
465
|
| 1728 |
+
],
|
| 1729 |
+
[
|
| 1730 |
+
757,
|
| 1731 |
+
3401
|
| 1732 |
+
]
|
| 1733 |
+
],
|
| 1734 |
+
"per_class_recall": [
|
| 1735 |
+
0.8908450704225352,
|
| 1736 |
+
0.817941317941318
|
| 1737 |
+
],
|
| 1738 |
+
"balanced_accuracy": 0.8543931941819266,
|
| 1739 |
+
"accuracy": 0.8548348776431456,
|
| 1740 |
+
"weighted_f1": 0.8545986797881616,
|
| 1741 |
+
"macro_f1": 0.8545161723182699,
|
| 1742 |
+
"kappa": 0.7093827910518298,
|
| 1743 |
+
"samples": 8418,
|
| 1744 |
+
"subject_scores": {
|
| 1745 |
+
"sub-G2021": 0.8627525887522267,
|
| 1746 |
+
"sub-G2007": 0.816860103413505,
|
| 1747 |
+
"sub-G2019": 0.852993824374467,
|
| 1748 |
+
"sub-G2031": 0.828332994328064,
|
| 1749 |
+
"sub-G2015": 0.9043525361474528,
|
| 1750 |
+
"sub-CTR002": 0.9934852728970376,
|
| 1751 |
+
"sub-G2011": 0.8100294180322551,
|
| 1752 |
+
"sub-G2035": 0.9598833152678935,
|
| 1753 |
+
"sub-CTR003": 0.6680194805194806
|
| 1754 |
+
},
|
| 1755 |
+
"reward": 0.855189948192487,
|
| 1756 |
+
"subjects": 9
|
| 1757 |
+
}
|
| 1758 |
+
},
|
| 1759 |
+
"blend_strengths": {
|
| 1760 |
+
"faced": 0.0,
|
| 1761 |
+
"tuev": 0.1,
|
| 1762 |
+
"ad65": 0.0,
|
| 1763 |
+
"openbmi": 0.0,
|
| 1764 |
+
"longitudinal": 0.0
|
| 1765 |
+
},
|
| 1766 |
+
"blend_validation_scores": {
|
| 1767 |
+
"faced": {
|
| 1768 |
+
"0.0": 0.5382716049382716,
|
| 1769 |
+
"0.1": 0.5339506172839505,
|
| 1770 |
+
"0.3": 0.528858024691358,
|
| 1771 |
+
"1.0": 0.1572530864197531
|
| 1772 |
+
},
|
| 1773 |
+
"tuev": {
|
| 1774 |
+
"0.0": 0.7018393343699977,
|
| 1775 |
+
"0.1": 0.7034085527959131,
|
| 1776 |
+
"0.3": 0.638387604846299,
|
| 1777 |
+
"1.0": 0.5466423916130195
|
| 1778 |
+
},
|
| 1779 |
+
"ad65": {
|
| 1780 |
+
"0.0": 0.8380952380952381,
|
| 1781 |
+
"0.1": 0.8380952380952381,
|
| 1782 |
+
"0.3": 0.7714285714285714,
|
| 1783 |
+
"1.0": 0.5380952380952381
|
| 1784 |
+
},
|
| 1785 |
+
"openbmi": {
|
| 1786 |
+
"0.0": 0.823409090909091,
|
| 1787 |
+
"0.1": 0.8211363636363636,
|
| 1788 |
+
"0.3": 0.8188636363636362,
|
| 1789 |
+
"1.0": 0.6240909090909091
|
| 1790 |
+
},
|
| 1791 |
+
"longitudinal": {
|
| 1792 |
+
"0.0": 0.855189948192487,
|
| 1793 |
+
"0.1": 0.8550985739234811,
|
| 1794 |
+
"0.3": 0.8548280111529184,
|
| 1795 |
+
"1.0": 0.7136650470365047
|
| 1796 |
+
}
|
| 1797 |
+
}
|
| 1798 |
+
},
|
| 1799 |
+
{
|
| 1800 |
+
"epoch": 5,
|
| 1801 |
+
"joint_updates": 1000,
|
| 1802 |
+
"training_ce": {
|
| 1803 |
+
"faced": 2.156939595937729,
|
| 1804 |
+
"tuev": 0.9532912164926529,
|
| 1805 |
+
"ad65": 0.6678308106958866,
|
| 1806 |
+
"openbmi": 0.6656227469444275,
|
| 1807 |
+
"longitudinal": 0.5553989395499229
|
| 1808 |
+
},
|
| 1809 |
+
"validation": {
|
| 1810 |
+
"faced": {
|
| 1811 |
+
"class_counts": [
|
| 1812 |
+
180,
|
| 1813 |
+
180,
|
| 1814 |
+
180,
|
| 1815 |
+
180,
|
| 1816 |
+
240,
|
| 1817 |
+
180,
|
| 1818 |
+
180,
|
| 1819 |
+
180,
|
| 1820 |
+
180
|
| 1821 |
+
],
|
| 1822 |
+
"predicted_class_counts": [
|
| 1823 |
+
153,
|
| 1824 |
+
184,
|
| 1825 |
+
179,
|
| 1826 |
+
165,
|
| 1827 |
+
289,
|
| 1828 |
+
151,
|
| 1829 |
+
186,
|
| 1830 |
+
186,
|
| 1831 |
+
187
|
| 1832 |
+
],
|
| 1833 |
+
"confusion_matrix": [
|
| 1834 |
+
[
|
| 1835 |
+
95,
|
| 1836 |
+
12,
|
| 1837 |
+
3,
|
| 1838 |
+
15,
|
| 1839 |
+
17,
|
| 1840 |
+
4,
|
| 1841 |
+
12,
|
| 1842 |
+
14,
|
| 1843 |
+
8
|
| 1844 |
+
],
|
| 1845 |
+
[
|
| 1846 |
+
7,
|
| 1847 |
+
94,
|
| 1848 |
+
6,
|
| 1849 |
+
14,
|
| 1850 |
+
24,
|
| 1851 |
+
9,
|
| 1852 |
+
9,
|
| 1853 |
+
6,
|
| 1854 |
+
11
|
| 1855 |
+
],
|
| 1856 |
+
[
|
| 1857 |
+
7,
|
| 1858 |
+
9,
|
| 1859 |
+
105,
|
| 1860 |
+
15,
|
| 1861 |
+
18,
|
| 1862 |
+
5,
|
| 1863 |
+
7,
|
| 1864 |
+
5,
|
| 1865 |
+
9
|
| 1866 |
+
],
|
| 1867 |
+
[
|
| 1868 |
+
7,
|
| 1869 |
+
19,
|
| 1870 |
+
8,
|
| 1871 |
+
67,
|
| 1872 |
+
33,
|
| 1873 |
+
8,
|
| 1874 |
+
14,
|
| 1875 |
+
13,
|
| 1876 |
+
11
|
| 1877 |
+
],
|
| 1878 |
+
[
|
| 1879 |
+
11,
|
| 1880 |
+
13,
|
| 1881 |
+
18,
|
| 1882 |
+
12,
|
| 1883 |
+
128,
|
| 1884 |
+
11,
|
| 1885 |
+
14,
|
| 1886 |
+
21,
|
| 1887 |
+
12
|
| 1888 |
+
],
|
| 1889 |
+
[
|
| 1890 |
+
3,
|
| 1891 |
+
9,
|
| 1892 |
+
11,
|
| 1893 |
+
7,
|
| 1894 |
+
18,
|
| 1895 |
+
100,
|
| 1896 |
+
9,
|
| 1897 |
+
14,
|
| 1898 |
+
9
|
| 1899 |
+
],
|
| 1900 |
+
[
|
| 1901 |
+
6,
|
| 1902 |
+
7,
|
| 1903 |
+
9,
|
| 1904 |
+
9,
|
| 1905 |
+
20,
|
| 1906 |
+
5,
|
| 1907 |
+
105,
|
| 1908 |
+
8,
|
| 1909 |
+
11
|
| 1910 |
+
],
|
| 1911 |
+
[
|
| 1912 |
+
3,
|
| 1913 |
+
12,
|
| 1914 |
+
10,
|
| 1915 |
+
19,
|
| 1916 |
+
16,
|
| 1917 |
+
7,
|
| 1918 |
+
7,
|
| 1919 |
+
100,
|
| 1920 |
+
6
|
| 1921 |
+
],
|
| 1922 |
+
[
|
| 1923 |
+
14,
|
| 1924 |
+
9,
|
| 1925 |
+
9,
|
| 1926 |
+
7,
|
| 1927 |
+
15,
|
| 1928 |
+
2,
|
| 1929 |
+
9,
|
| 1930 |
+
5,
|
| 1931 |
+
110
|
| 1932 |
+
]
|
| 1933 |
+
],
|
| 1934 |
+
"per_class_recall": [
|
| 1935 |
+
0.5277777777777778,
|
| 1936 |
+
0.5222222222222223,
|
| 1937 |
+
0.5833333333333334,
|
| 1938 |
+
0.37222222222222223,
|
| 1939 |
+
0.5333333333333333,
|
| 1940 |
+
0.5555555555555556,
|
| 1941 |
+
0.5833333333333334,
|
| 1942 |
+
0.5555555555555556,
|
| 1943 |
+
0.6111111111111112
|
| 1944 |
+
],
|
| 1945 |
+
"balanced_accuracy": 0.5382716049382716,
|
| 1946 |
+
"accuracy": 0.5380952380952381,
|
| 1947 |
+
"weighted_f1": 0.538881849093927,
|
| 1948 |
+
"macro_f1": 0.5409170306503709,
|
| 1949 |
+
"kappa": 0.4790822564791062,
|
| 1950 |
+
"samples": 1680,
|
| 1951 |
+
"reward": 0.5382716049382716,
|
| 1952 |
+
"subjects": 20
|
| 1953 |
+
},
|
| 1954 |
+
"tuev": {
|
| 1955 |
+
"class_counts": [
|
| 1956 |
+
119,
|
| 1957 |
+
291,
|
| 1958 |
+
669,
|
| 1959 |
+
86,
|
| 1960 |
+
500,
|
| 1961 |
+
13822
|
| 1962 |
+
],
|
| 1963 |
+
"predicted_class_counts": [
|
| 1964 |
+
355,
|
| 1965 |
+
736,
|
| 1966 |
+
225,
|
| 1967 |
+
178,
|
| 1968 |
+
1176,
|
| 1969 |
+
12817
|
| 1970 |
+
],
|
| 1971 |
+
"confusion_matrix": [
|
| 1972 |
+
[
|
| 1973 |
+
38,
|
| 1974 |
+
38,
|
| 1975 |
+
3,
|
| 1976 |
+
0,
|
| 1977 |
+
3,
|
| 1978 |
+
37
|
| 1979 |
+
],
|
| 1980 |
+
[
|
| 1981 |
+
17,
|
| 1982 |
+
225,
|
| 1983 |
+
0,
|
| 1984 |
+
0,
|
| 1985 |
+
49,
|
| 1986 |
+
0
|
| 1987 |
+
],
|
| 1988 |
+
[
|
| 1989 |
+
99,
|
| 1990 |
+
209,
|
| 1991 |
+
221,
|
| 1992 |
+
0,
|
| 1993 |
+
137,
|
| 1994 |
+
3
|
| 1995 |
+
],
|
| 1996 |
+
[
|
| 1997 |
+
3,
|
| 1998 |
+
0,
|
| 1999 |
+
0,
|
| 2000 |
+
80,
|
| 2001 |
+
0,
|
| 2002 |
+
3
|
| 2003 |
+
],
|
| 2004 |
+
[
|
| 2005 |
+
0,
|
| 2006 |
+
0,
|
| 2007 |
+
1,
|
| 2008 |
+
0,
|
| 2009 |
+
468,
|
| 2010 |
+
31
|
| 2011 |
+
],
|
| 2012 |
+
[
|
| 2013 |
+
198,
|
| 2014 |
+
264,
|
| 2015 |
+
0,
|
| 2016 |
+
98,
|
| 2017 |
+
519,
|
| 2018 |
+
12743
|
| 2019 |
+
]
|
| 2020 |
+
],
|
| 2021 |
+
"per_class_recall": [
|
| 2022 |
+
0.31932773109243695,
|
| 2023 |
+
0.7731958762886598,
|
| 2024 |
+
0.3303437967115097,
|
| 2025 |
+
0.9302325581395349,
|
| 2026 |
+
0.936,
|
| 2027 |
+
0.9219360439878455
|
| 2028 |
+
],
|
| 2029 |
+
"balanced_accuracy": 0.7018393343699977,
|
| 2030 |
+
"accuracy": 0.8894556724995157,
|
| 2031 |
+
"weighted_f1": 0.9060795467857647,
|
| 2032 |
+
"macro_f1": 0.5356941485591152,
|
| 2033 |
+
"kappa": 0.5701427137051658,
|
| 2034 |
+
"samples": 15487,
|
| 2035 |
+
"reward": 0.7018393343699977,
|
| 2036 |
+
"subjects": 58
|
| 2037 |
+
},
|
| 2038 |
+
"ad65": {
|
| 2039 |
+
"class_counts": [
|
| 2040 |
+
464,
|
| 2041 |
+
393,
|
| 2042 |
+
486
|
| 2043 |
+
],
|
| 2044 |
+
"predicted_class_counts": [
|
| 2045 |
+
440,
|
| 2046 |
+
309,
|
| 2047 |
+
594
|
| 2048 |
+
],
|
| 2049 |
+
"confusion_matrix": [
|
| 2050 |
+
[
|
| 2051 |
+
287,
|
| 2052 |
+
86,
|
| 2053 |
+
91
|
| 2054 |
+
],
|
| 2055 |
+
[
|
| 2056 |
+
96,
|
| 2057 |
+
185,
|
| 2058 |
+
112
|
| 2059 |
+
],
|
| 2060 |
+
[
|
| 2061 |
+
57,
|
| 2062 |
+
38,
|
| 2063 |
+
391
|
| 2064 |
+
]
|
| 2065 |
+
],
|
| 2066 |
+
"per_class_recall": [
|
| 2067 |
+
0.6185344827586207,
|
| 2068 |
+
0.4707379134860051,
|
| 2069 |
+
0.8045267489711934
|
| 2070 |
+
],
|
| 2071 |
+
"balanced_accuracy": 0.6312663817386064,
|
| 2072 |
+
"accuracy": 0.6425912137006702,
|
| 2073 |
+
"weighted_f1": 0.6356338206725993,
|
| 2074 |
+
"macro_f1": 0.6286984511173302,
|
| 2075 |
+
"kappa": 0.4579978610488933,
|
| 2076 |
+
"samples": 1343,
|
| 2077 |
+
"subject_metrics": {
|
| 2078 |
+
"class_counts": [
|
| 2079 |
+
7,
|
| 2080 |
+
5,
|
| 2081 |
+
6
|
| 2082 |
+
],
|
| 2083 |
+
"predicted_class_counts": [
|
| 2084 |
+
5,
|
| 2085 |
+
6,
|
| 2086 |
+
7
|
| 2087 |
+
],
|
| 2088 |
+
"confusion_matrix": [
|
| 2089 |
+
[
|
| 2090 |
+
5,
|
| 2091 |
+
2,
|
| 2092 |
+
0
|
| 2093 |
+
],
|
| 2094 |
+
[
|
| 2095 |
+
0,
|
| 2096 |
+
4,
|
| 2097 |
+
1
|
| 2098 |
+
],
|
| 2099 |
+
[
|
| 2100 |
+
0,
|
| 2101 |
+
0,
|
| 2102 |
+
6
|
| 2103 |
+
]
|
| 2104 |
+
],
|
| 2105 |
+
"per_class_recall": [
|
| 2106 |
+
0.7142857142857143,
|
| 2107 |
+
0.8,
|
| 2108 |
+
1.0
|
| 2109 |
+
],
|
| 2110 |
+
"balanced_accuracy": 0.8380952380952381,
|
| 2111 |
+
"accuracy": 0.8333333333333334,
|
| 2112 |
+
"weighted_f1": 0.8337865837865839,
|
| 2113 |
+
"macro_f1": 0.8278943278943279,
|
| 2114 |
+
"kappa": 0.7511520737327189
|
| 2115 |
+
},
|
| 2116 |
+
"reward": 0.8380952380952381,
|
| 2117 |
+
"subjects": 18
|
| 2118 |
+
},
|
| 2119 |
+
"openbmi": {
|
| 2120 |
+
"class_counts": [
|
| 2121 |
+
2200,
|
| 2122 |
+
2200
|
| 2123 |
+
],
|
| 2124 |
+
"predicted_class_counts": [
|
| 2125 |
+
1987,
|
| 2126 |
+
2413
|
| 2127 |
+
],
|
| 2128 |
+
"confusion_matrix": [
|
| 2129 |
+
[
|
| 2130 |
+
1705,
|
| 2131 |
+
495
|
| 2132 |
+
],
|
| 2133 |
+
[
|
| 2134 |
+
282,
|
| 2135 |
+
1918
|
| 2136 |
+
]
|
| 2137 |
+
],
|
| 2138 |
+
"per_class_recall": [
|
| 2139 |
+
0.775,
|
| 2140 |
+
0.8718181818181818
|
| 2141 |
+
],
|
| 2142 |
+
"balanced_accuracy": 0.823409090909091,
|
| 2143 |
+
"accuracy": 0.8234090909090909,
|
| 2144 |
+
"weighted_f1": 0.8229942886302098,
|
| 2145 |
+
"macro_f1": 0.82299428863021,
|
| 2146 |
+
"kappa": 0.6468181818181817,
|
| 2147 |
+
"samples": 4400,
|
| 2148 |
+
"subject_scores": {
|
| 2149 |
+
"19": 0.875,
|
| 2150 |
+
"35": 0.95,
|
| 2151 |
+
"34": 0.6699999999999999,
|
| 2152 |
+
"51": 0.795,
|
| 2153 |
+
"20": 0.8425,
|
| 2154 |
+
"44": 0.9425,
|
| 2155 |
+
"24": 0.615,
|
| 2156 |
+
"15": 0.8875,
|
| 2157 |
+
"31": 0.9099999999999999,
|
| 2158 |
+
"26": 0.835,
|
| 2159 |
+
"23": 0.735
|
| 2160 |
+
},
|
| 2161 |
+
"reward": 0.823409090909091,
|
| 2162 |
+
"subjects": 11
|
| 2163 |
+
},
|
| 2164 |
+
"longitudinal": {
|
| 2165 |
+
"class_counts": [
|
| 2166 |
+
4260,
|
| 2167 |
+
4158
|
| 2168 |
+
],
|
| 2169 |
+
"predicted_class_counts": [
|
| 2170 |
+
4552,
|
| 2171 |
+
3866
|
| 2172 |
+
],
|
| 2173 |
+
"confusion_matrix": [
|
| 2174 |
+
[
|
| 2175 |
+
3795,
|
| 2176 |
+
465
|
| 2177 |
+
],
|
| 2178 |
+
[
|
| 2179 |
+
757,
|
| 2180 |
+
3401
|
| 2181 |
+
]
|
| 2182 |
+
],
|
| 2183 |
+
"per_class_recall": [
|
| 2184 |
+
0.8908450704225352,
|
| 2185 |
+
0.817941317941318
|
| 2186 |
+
],
|
| 2187 |
+
"balanced_accuracy": 0.8543931941819266,
|
| 2188 |
+
"accuracy": 0.8548348776431456,
|
| 2189 |
+
"weighted_f1": 0.8545986797881616,
|
| 2190 |
+
"macro_f1": 0.8545161723182699,
|
| 2191 |
+
"kappa": 0.7093827910518298,
|
| 2192 |
+
"samples": 8418,
|
| 2193 |
+
"subject_scores": {
|
| 2194 |
+
"sub-G2021": 0.8627525887522267,
|
| 2195 |
+
"sub-G2007": 0.816860103413505,
|
| 2196 |
+
"sub-G2019": 0.852993824374467,
|
| 2197 |
+
"sub-G2031": 0.828332994328064,
|
| 2198 |
+
"sub-G2015": 0.9043525361474528,
|
| 2199 |
+
"sub-CTR002": 0.9934852728970376,
|
| 2200 |
+
"sub-G2011": 0.8100294180322551,
|
| 2201 |
+
"sub-G2035": 0.9598833152678935,
|
| 2202 |
+
"sub-CTR003": 0.6680194805194806
|
| 2203 |
+
},
|
| 2204 |
+
"reward": 0.855189948192487,
|
| 2205 |
+
"subjects": 9
|
| 2206 |
+
}
|
| 2207 |
+
},
|
| 2208 |
+
"blend_strengths": {
|
| 2209 |
+
"faced": 0.0,
|
| 2210 |
+
"tuev": 0.0,
|
| 2211 |
+
"ad65": 0.0,
|
| 2212 |
+
"openbmi": 0.0,
|
| 2213 |
+
"longitudinal": 0.0
|
| 2214 |
+
},
|
| 2215 |
+
"blend_validation_scores": {
|
| 2216 |
+
"faced": {
|
| 2217 |
+
"0.0": 0.5382716049382716,
|
| 2218 |
+
"0.1": 0.5328703703703703,
|
| 2219 |
+
"0.3": 0.5294753086419752,
|
| 2220 |
+
"1.0": 0.16049382716049382
|
| 2221 |
+
},
|
| 2222 |
+
"tuev": {
|
| 2223 |
+
"0.0": 0.7018393343699977,
|
| 2224 |
+
"0.1": 0.6965131515798545,
|
| 2225 |
+
"0.3": 0.6122567616529121,
|
| 2226 |
+
"1.0": 0.5438449929533244
|
| 2227 |
+
},
|
| 2228 |
+
"ad65": {
|
| 2229 |
+
"0.0": 0.8380952380952381,
|
| 2230 |
+
"0.1": 0.8380952380952381,
|
| 2231 |
+
"0.3": 0.7238095238095238,
|
| 2232 |
+
"1.0": 0.5063492063492063
|
| 2233 |
+
},
|
| 2234 |
+
"openbmi": {
|
| 2235 |
+
"0.0": 0.823409090909091,
|
| 2236 |
+
"0.1": 0.8218181818181818,
|
| 2237 |
+
"0.3": 0.82,
|
| 2238 |
+
"1.0": 0.6365909090909091
|
| 2239 |
+
},
|
| 2240 |
+
"longitudinal": {
|
| 2241 |
+
"0.0": 0.855189948192487,
|
| 2242 |
+
"0.1": 0.8550985739234811,
|
| 2243 |
+
"0.3": 0.8547378235627308,
|
| 2244 |
+
"1.0": 0.7235678520449172
|
| 2245 |
+
}
|
| 2246 |
+
}
|
| 2247 |
+
},
|
| 2248 |
+
{
|
| 2249 |
+
"epoch": 6,
|
| 2250 |
+
"joint_updates": 1200,
|
| 2251 |
+
"training_ce": {
|
| 2252 |
+
"faced": 2.158881115913391,
|
| 2253 |
+
"tuev": 0.9296287760138512,
|
| 2254 |
+
"ad65": 0.6055257871747017,
|
| 2255 |
+
"openbmi": 0.654815536737442,
|
| 2256 |
+
"longitudinal": 0.539940207451582
|
| 2257 |
+
},
|
| 2258 |
+
"validation": {
|
| 2259 |
+
"faced": {
|
| 2260 |
+
"class_counts": [
|
| 2261 |
+
180,
|
| 2262 |
+
180,
|
| 2263 |
+
180,
|
| 2264 |
+
180,
|
| 2265 |
+
240,
|
| 2266 |
+
180,
|
| 2267 |
+
180,
|
| 2268 |
+
180,
|
| 2269 |
+
180
|
| 2270 |
+
],
|
| 2271 |
+
"predicted_class_counts": [
|
| 2272 |
+
153,
|
| 2273 |
+
184,
|
| 2274 |
+
179,
|
| 2275 |
+
165,
|
| 2276 |
+
289,
|
| 2277 |
+
151,
|
| 2278 |
+
186,
|
| 2279 |
+
186,
|
| 2280 |
+
187
|
| 2281 |
+
],
|
| 2282 |
+
"confusion_matrix": [
|
| 2283 |
+
[
|
| 2284 |
+
95,
|
| 2285 |
+
12,
|
| 2286 |
+
3,
|
| 2287 |
+
15,
|
| 2288 |
+
17,
|
| 2289 |
+
4,
|
| 2290 |
+
12,
|
| 2291 |
+
14,
|
| 2292 |
+
8
|
| 2293 |
+
],
|
| 2294 |
+
[
|
| 2295 |
+
7,
|
| 2296 |
+
94,
|
| 2297 |
+
6,
|
| 2298 |
+
14,
|
| 2299 |
+
24,
|
| 2300 |
+
9,
|
| 2301 |
+
9,
|
| 2302 |
+
6,
|
| 2303 |
+
11
|
| 2304 |
+
],
|
| 2305 |
+
[
|
| 2306 |
+
7,
|
| 2307 |
+
9,
|
| 2308 |
+
105,
|
| 2309 |
+
15,
|
| 2310 |
+
18,
|
| 2311 |
+
5,
|
| 2312 |
+
7,
|
| 2313 |
+
5,
|
| 2314 |
+
9
|
| 2315 |
+
],
|
| 2316 |
+
[
|
| 2317 |
+
7,
|
| 2318 |
+
19,
|
| 2319 |
+
8,
|
| 2320 |
+
67,
|
| 2321 |
+
33,
|
| 2322 |
+
8,
|
| 2323 |
+
14,
|
| 2324 |
+
13,
|
| 2325 |
+
11
|
| 2326 |
+
],
|
| 2327 |
+
[
|
| 2328 |
+
11,
|
| 2329 |
+
13,
|
| 2330 |
+
18,
|
| 2331 |
+
12,
|
| 2332 |
+
128,
|
| 2333 |
+
11,
|
| 2334 |
+
14,
|
| 2335 |
+
21,
|
| 2336 |
+
12
|
| 2337 |
+
],
|
| 2338 |
+
[
|
| 2339 |
+
3,
|
| 2340 |
+
9,
|
| 2341 |
+
11,
|
| 2342 |
+
7,
|
| 2343 |
+
18,
|
| 2344 |
+
100,
|
| 2345 |
+
9,
|
| 2346 |
+
14,
|
| 2347 |
+
9
|
| 2348 |
+
],
|
| 2349 |
+
[
|
| 2350 |
+
6,
|
| 2351 |
+
7,
|
| 2352 |
+
9,
|
| 2353 |
+
9,
|
| 2354 |
+
20,
|
| 2355 |
+
5,
|
| 2356 |
+
105,
|
| 2357 |
+
8,
|
| 2358 |
+
11
|
| 2359 |
+
],
|
| 2360 |
+
[
|
| 2361 |
+
3,
|
| 2362 |
+
12,
|
| 2363 |
+
10,
|
| 2364 |
+
19,
|
| 2365 |
+
16,
|
| 2366 |
+
7,
|
| 2367 |
+
7,
|
| 2368 |
+
100,
|
| 2369 |
+
6
|
| 2370 |
+
],
|
| 2371 |
+
[
|
| 2372 |
+
14,
|
| 2373 |
+
9,
|
| 2374 |
+
9,
|
| 2375 |
+
7,
|
| 2376 |
+
15,
|
| 2377 |
+
2,
|
| 2378 |
+
9,
|
| 2379 |
+
5,
|
| 2380 |
+
110
|
| 2381 |
+
]
|
| 2382 |
+
],
|
| 2383 |
+
"per_class_recall": [
|
| 2384 |
+
0.5277777777777778,
|
| 2385 |
+
0.5222222222222223,
|
| 2386 |
+
0.5833333333333334,
|
| 2387 |
+
0.37222222222222223,
|
| 2388 |
+
0.5333333333333333,
|
| 2389 |
+
0.5555555555555556,
|
| 2390 |
+
0.5833333333333334,
|
| 2391 |
+
0.5555555555555556,
|
| 2392 |
+
0.6111111111111112
|
| 2393 |
+
],
|
| 2394 |
+
"balanced_accuracy": 0.5382716049382716,
|
| 2395 |
+
"accuracy": 0.5380952380952381,
|
| 2396 |
+
"weighted_f1": 0.538881849093927,
|
| 2397 |
+
"macro_f1": 0.5409170306503709,
|
| 2398 |
+
"kappa": 0.4790822564791062,
|
| 2399 |
+
"samples": 1680,
|
| 2400 |
+
"reward": 0.5382716049382716,
|
| 2401 |
+
"subjects": 20
|
| 2402 |
+
},
|
| 2403 |
+
"tuev": {
|
| 2404 |
+
"class_counts": [
|
| 2405 |
+
119,
|
| 2406 |
+
291,
|
| 2407 |
+
669,
|
| 2408 |
+
86,
|
| 2409 |
+
500,
|
| 2410 |
+
13822
|
| 2411 |
+
],
|
| 2412 |
+
"predicted_class_counts": [
|
| 2413 |
+
355,
|
| 2414 |
+
736,
|
| 2415 |
+
225,
|
| 2416 |
+
178,
|
| 2417 |
+
1176,
|
| 2418 |
+
12817
|
| 2419 |
+
],
|
| 2420 |
+
"confusion_matrix": [
|
| 2421 |
+
[
|
| 2422 |
+
38,
|
| 2423 |
+
38,
|
| 2424 |
+
3,
|
| 2425 |
+
0,
|
| 2426 |
+
3,
|
| 2427 |
+
37
|
| 2428 |
+
],
|
| 2429 |
+
[
|
| 2430 |
+
17,
|
| 2431 |
+
225,
|
| 2432 |
+
0,
|
| 2433 |
+
0,
|
| 2434 |
+
49,
|
| 2435 |
+
0
|
| 2436 |
+
],
|
| 2437 |
+
[
|
| 2438 |
+
99,
|
| 2439 |
+
209,
|
| 2440 |
+
221,
|
| 2441 |
+
0,
|
| 2442 |
+
137,
|
| 2443 |
+
3
|
| 2444 |
+
],
|
| 2445 |
+
[
|
| 2446 |
+
3,
|
| 2447 |
+
0,
|
| 2448 |
+
0,
|
| 2449 |
+
80,
|
| 2450 |
+
0,
|
| 2451 |
+
3
|
| 2452 |
+
],
|
| 2453 |
+
[
|
| 2454 |
+
0,
|
| 2455 |
+
0,
|
| 2456 |
+
1,
|
| 2457 |
+
0,
|
| 2458 |
+
468,
|
| 2459 |
+
31
|
| 2460 |
+
],
|
| 2461 |
+
[
|
| 2462 |
+
198,
|
| 2463 |
+
264,
|
| 2464 |
+
0,
|
| 2465 |
+
98,
|
| 2466 |
+
519,
|
| 2467 |
+
12743
|
| 2468 |
+
]
|
| 2469 |
+
],
|
| 2470 |
+
"per_class_recall": [
|
| 2471 |
+
0.31932773109243695,
|
| 2472 |
+
0.7731958762886598,
|
| 2473 |
+
0.3303437967115097,
|
| 2474 |
+
0.9302325581395349,
|
| 2475 |
+
0.936,
|
| 2476 |
+
0.9219360439878455
|
| 2477 |
+
],
|
| 2478 |
+
"balanced_accuracy": 0.7018393343699977,
|
| 2479 |
+
"accuracy": 0.8894556724995157,
|
| 2480 |
+
"weighted_f1": 0.9060795467857647,
|
| 2481 |
+
"macro_f1": 0.5356941485591152,
|
| 2482 |
+
"kappa": 0.5701427137051658,
|
| 2483 |
+
"samples": 15487,
|
| 2484 |
+
"reward": 0.7018393343699977,
|
| 2485 |
+
"subjects": 58
|
| 2486 |
+
},
|
| 2487 |
+
"ad65": {
|
| 2488 |
+
"class_counts": [
|
| 2489 |
+
464,
|
| 2490 |
+
393,
|
| 2491 |
+
486
|
| 2492 |
+
],
|
| 2493 |
+
"predicted_class_counts": [
|
| 2494 |
+
440,
|
| 2495 |
+
309,
|
| 2496 |
+
594
|
| 2497 |
+
],
|
| 2498 |
+
"confusion_matrix": [
|
| 2499 |
+
[
|
| 2500 |
+
287,
|
| 2501 |
+
86,
|
| 2502 |
+
91
|
| 2503 |
+
],
|
| 2504 |
+
[
|
| 2505 |
+
96,
|
| 2506 |
+
185,
|
| 2507 |
+
112
|
| 2508 |
+
],
|
| 2509 |
+
[
|
| 2510 |
+
57,
|
| 2511 |
+
38,
|
| 2512 |
+
391
|
| 2513 |
+
]
|
| 2514 |
+
],
|
| 2515 |
+
"per_class_recall": [
|
| 2516 |
+
0.6185344827586207,
|
| 2517 |
+
0.4707379134860051,
|
| 2518 |
+
0.8045267489711934
|
| 2519 |
+
],
|
| 2520 |
+
"balanced_accuracy": 0.6312663817386064,
|
| 2521 |
+
"accuracy": 0.6425912137006702,
|
| 2522 |
+
"weighted_f1": 0.6356338206725993,
|
| 2523 |
+
"macro_f1": 0.6286984511173302,
|
| 2524 |
+
"kappa": 0.4579978610488933,
|
| 2525 |
+
"samples": 1343,
|
| 2526 |
+
"subject_metrics": {
|
| 2527 |
+
"class_counts": [
|
| 2528 |
+
7,
|
| 2529 |
+
5,
|
| 2530 |
+
6
|
| 2531 |
+
],
|
| 2532 |
+
"predicted_class_counts": [
|
| 2533 |
+
5,
|
| 2534 |
+
6,
|
| 2535 |
+
7
|
| 2536 |
+
],
|
| 2537 |
+
"confusion_matrix": [
|
| 2538 |
+
[
|
| 2539 |
+
5,
|
| 2540 |
+
2,
|
| 2541 |
+
0
|
| 2542 |
+
],
|
| 2543 |
+
[
|
| 2544 |
+
0,
|
| 2545 |
+
4,
|
| 2546 |
+
1
|
| 2547 |
+
],
|
| 2548 |
+
[
|
| 2549 |
+
0,
|
| 2550 |
+
0,
|
| 2551 |
+
6
|
| 2552 |
+
]
|
| 2553 |
+
],
|
| 2554 |
+
"per_class_recall": [
|
| 2555 |
+
0.7142857142857143,
|
| 2556 |
+
0.8,
|
| 2557 |
+
1.0
|
| 2558 |
+
],
|
| 2559 |
+
"balanced_accuracy": 0.8380952380952381,
|
| 2560 |
+
"accuracy": 0.8333333333333334,
|
| 2561 |
+
"weighted_f1": 0.8337865837865839,
|
| 2562 |
+
"macro_f1": 0.8278943278943279,
|
| 2563 |
+
"kappa": 0.7511520737327189
|
| 2564 |
+
},
|
| 2565 |
+
"reward": 0.8380952380952381,
|
| 2566 |
+
"subjects": 18
|
| 2567 |
+
},
|
| 2568 |
+
"openbmi": {
|
| 2569 |
+
"class_counts": [
|
| 2570 |
+
2200,
|
| 2571 |
+
2200
|
| 2572 |
+
],
|
| 2573 |
+
"predicted_class_counts": [
|
| 2574 |
+
1987,
|
| 2575 |
+
2413
|
| 2576 |
+
],
|
| 2577 |
+
"confusion_matrix": [
|
| 2578 |
+
[
|
| 2579 |
+
1705,
|
| 2580 |
+
495
|
| 2581 |
+
],
|
| 2582 |
+
[
|
| 2583 |
+
282,
|
| 2584 |
+
1918
|
| 2585 |
+
]
|
| 2586 |
+
],
|
| 2587 |
+
"per_class_recall": [
|
| 2588 |
+
0.775,
|
| 2589 |
+
0.8718181818181818
|
| 2590 |
+
],
|
| 2591 |
+
"balanced_accuracy": 0.823409090909091,
|
| 2592 |
+
"accuracy": 0.8234090909090909,
|
| 2593 |
+
"weighted_f1": 0.8229942886302098,
|
| 2594 |
+
"macro_f1": 0.82299428863021,
|
| 2595 |
+
"kappa": 0.6468181818181817,
|
| 2596 |
+
"samples": 4400,
|
| 2597 |
+
"subject_scores": {
|
| 2598 |
+
"19": 0.875,
|
| 2599 |
+
"35": 0.95,
|
| 2600 |
+
"34": 0.6699999999999999,
|
| 2601 |
+
"51": 0.795,
|
| 2602 |
+
"20": 0.8425,
|
| 2603 |
+
"44": 0.9425,
|
| 2604 |
+
"24": 0.615,
|
| 2605 |
+
"15": 0.8875,
|
| 2606 |
+
"31": 0.9099999999999999,
|
| 2607 |
+
"26": 0.835,
|
| 2608 |
+
"23": 0.735
|
| 2609 |
+
},
|
| 2610 |
+
"reward": 0.823409090909091,
|
| 2611 |
+
"subjects": 11
|
| 2612 |
+
},
|
| 2613 |
+
"longitudinal": {
|
| 2614 |
+
"class_counts": [
|
| 2615 |
+
4260,
|
| 2616 |
+
4158
|
| 2617 |
+
],
|
| 2618 |
+
"predicted_class_counts": [
|
| 2619 |
+
4552,
|
| 2620 |
+
3866
|
| 2621 |
+
],
|
| 2622 |
+
"confusion_matrix": [
|
| 2623 |
+
[
|
| 2624 |
+
3795,
|
| 2625 |
+
465
|
| 2626 |
+
],
|
| 2627 |
+
[
|
| 2628 |
+
757,
|
| 2629 |
+
3401
|
| 2630 |
+
]
|
| 2631 |
+
],
|
| 2632 |
+
"per_class_recall": [
|
| 2633 |
+
0.8908450704225352,
|
| 2634 |
+
0.817941317941318
|
| 2635 |
+
],
|
| 2636 |
+
"balanced_accuracy": 0.8543931941819266,
|
| 2637 |
+
"accuracy": 0.8548348776431456,
|
| 2638 |
+
"weighted_f1": 0.8545986797881616,
|
| 2639 |
+
"macro_f1": 0.8545161723182699,
|
| 2640 |
+
"kappa": 0.7093827910518298,
|
| 2641 |
+
"samples": 8418,
|
| 2642 |
+
"subject_scores": {
|
| 2643 |
+
"sub-G2021": 0.8627525887522267,
|
| 2644 |
+
"sub-G2007": 0.816860103413505,
|
| 2645 |
+
"sub-G2019": 0.852993824374467,
|
| 2646 |
+
"sub-G2031": 0.828332994328064,
|
| 2647 |
+
"sub-G2015": 0.9043525361474528,
|
| 2648 |
+
"sub-CTR002": 0.9934852728970376,
|
| 2649 |
+
"sub-G2011": 0.8100294180322551,
|
| 2650 |
+
"sub-G2035": 0.9598833152678935,
|
| 2651 |
+
"sub-CTR003": 0.6680194805194806
|
| 2652 |
+
},
|
| 2653 |
+
"reward": 0.855189948192487,
|
| 2654 |
+
"subjects": 9
|
| 2655 |
+
}
|
| 2656 |
+
},
|
| 2657 |
+
"blend_strengths": {
|
| 2658 |
+
"faced": 0.0,
|
| 2659 |
+
"tuev": 0.0,
|
| 2660 |
+
"ad65": 0.0,
|
| 2661 |
+
"openbmi": 0.0,
|
| 2662 |
+
"longitudinal": 0.0
|
| 2663 |
+
},
|
| 2664 |
+
"blend_validation_scores": {
|
| 2665 |
+
"faced": {
|
| 2666 |
+
"0.0": 0.5382716049382716,
|
| 2667 |
+
"0.1": 0.5339506172839505,
|
| 2668 |
+
"0.3": 0.5294753086419752,
|
| 2669 |
+
"1.0": 0.1566358024691358
|
| 2670 |
+
},
|
| 2671 |
+
"tuev": {
|
| 2672 |
+
"0.0": 0.7018393343699977,
|
| 2673 |
+
"0.1": 0.6960189869295353,
|
| 2674 |
+
"0.3": 0.634951665313274,
|
| 2675 |
+
"1.0": 0.507892176650309
|
| 2676 |
+
},
|
| 2677 |
+
"ad65": {
|
| 2678 |
+
"0.0": 0.8380952380952381,
|
| 2679 |
+
"0.1": 0.8380952380952381,
|
| 2680 |
+
"0.3": 0.7238095238095238,
|
| 2681 |
+
"1.0": 0.5349206349206349
|
| 2682 |
+
},
|
| 2683 |
+
"openbmi": {
|
| 2684 |
+
"0.0": 0.823409090909091,
|
| 2685 |
+
"0.1": 0.8211363636363636,
|
| 2686 |
+
"0.3": 0.8163636363636364,
|
| 2687 |
+
"1.0": 0.6504545454545454
|
| 2688 |
+
},
|
| 2689 |
+
"longitudinal": {
|
| 2690 |
+
"0.0": 0.855189948192487,
|
| 2691 |
+
"0.1": 0.8550985739234811,
|
| 2692 |
+
"0.3": 0.8548280111529184,
|
| 2693 |
+
"1.0": 0.7246592030673809
|
| 2694 |
+
}
|
| 2695 |
+
}
|
| 2696 |
+
},
|
| 2697 |
+
{
|
| 2698 |
+
"epoch": 7,
|
| 2699 |
+
"joint_updates": 1400,
|
| 2700 |
+
"training_ce": {
|
| 2701 |
+
"faced": 2.1526084542274475,
|
| 2702 |
+
"tuev": 0.9077321618795395,
|
| 2703 |
+
"ad65": 0.5842286013066769,
|
| 2704 |
+
"openbmi": 0.649331571161747,
|
| 2705 |
+
"longitudinal": 0.5448631934821606
|
| 2706 |
+
},
|
| 2707 |
+
"validation": {
|
| 2708 |
+
"faced": {
|
| 2709 |
+
"class_counts": [
|
| 2710 |
+
180,
|
| 2711 |
+
180,
|
| 2712 |
+
180,
|
| 2713 |
+
180,
|
| 2714 |
+
240,
|
| 2715 |
+
180,
|
| 2716 |
+
180,
|
| 2717 |
+
180,
|
| 2718 |
+
180
|
| 2719 |
+
],
|
| 2720 |
+
"predicted_class_counts": [
|
| 2721 |
+
153,
|
| 2722 |
+
184,
|
| 2723 |
+
179,
|
| 2724 |
+
165,
|
| 2725 |
+
289,
|
| 2726 |
+
151,
|
| 2727 |
+
186,
|
| 2728 |
+
186,
|
| 2729 |
+
187
|
| 2730 |
+
],
|
| 2731 |
+
"confusion_matrix": [
|
| 2732 |
+
[
|
| 2733 |
+
95,
|
| 2734 |
+
12,
|
| 2735 |
+
3,
|
| 2736 |
+
15,
|
| 2737 |
+
17,
|
| 2738 |
+
4,
|
| 2739 |
+
12,
|
| 2740 |
+
14,
|
| 2741 |
+
8
|
| 2742 |
+
],
|
| 2743 |
+
[
|
| 2744 |
+
7,
|
| 2745 |
+
94,
|
| 2746 |
+
6,
|
| 2747 |
+
14,
|
| 2748 |
+
24,
|
| 2749 |
+
9,
|
| 2750 |
+
9,
|
| 2751 |
+
6,
|
| 2752 |
+
11
|
| 2753 |
+
],
|
| 2754 |
+
[
|
| 2755 |
+
7,
|
| 2756 |
+
9,
|
| 2757 |
+
105,
|
| 2758 |
+
15,
|
| 2759 |
+
18,
|
| 2760 |
+
5,
|
| 2761 |
+
7,
|
| 2762 |
+
5,
|
| 2763 |
+
9
|
| 2764 |
+
],
|
| 2765 |
+
[
|
| 2766 |
+
7,
|
| 2767 |
+
19,
|
| 2768 |
+
8,
|
| 2769 |
+
67,
|
| 2770 |
+
33,
|
| 2771 |
+
8,
|
| 2772 |
+
14,
|
| 2773 |
+
13,
|
| 2774 |
+
11
|
| 2775 |
+
],
|
| 2776 |
+
[
|
| 2777 |
+
11,
|
| 2778 |
+
13,
|
| 2779 |
+
18,
|
| 2780 |
+
12,
|
| 2781 |
+
128,
|
| 2782 |
+
11,
|
| 2783 |
+
14,
|
| 2784 |
+
21,
|
| 2785 |
+
12
|
| 2786 |
+
],
|
| 2787 |
+
[
|
| 2788 |
+
3,
|
| 2789 |
+
9,
|
| 2790 |
+
11,
|
| 2791 |
+
7,
|
| 2792 |
+
18,
|
| 2793 |
+
100,
|
| 2794 |
+
9,
|
| 2795 |
+
14,
|
| 2796 |
+
9
|
| 2797 |
+
],
|
| 2798 |
+
[
|
| 2799 |
+
6,
|
| 2800 |
+
7,
|
| 2801 |
+
9,
|
| 2802 |
+
9,
|
| 2803 |
+
20,
|
| 2804 |
+
5,
|
| 2805 |
+
105,
|
| 2806 |
+
8,
|
| 2807 |
+
11
|
| 2808 |
+
],
|
| 2809 |
+
[
|
| 2810 |
+
3,
|
| 2811 |
+
12,
|
| 2812 |
+
10,
|
| 2813 |
+
19,
|
| 2814 |
+
16,
|
| 2815 |
+
7,
|
| 2816 |
+
7,
|
| 2817 |
+
100,
|
| 2818 |
+
6
|
| 2819 |
+
],
|
| 2820 |
+
[
|
| 2821 |
+
14,
|
| 2822 |
+
9,
|
| 2823 |
+
9,
|
| 2824 |
+
7,
|
| 2825 |
+
15,
|
| 2826 |
+
2,
|
| 2827 |
+
9,
|
| 2828 |
+
5,
|
| 2829 |
+
110
|
| 2830 |
+
]
|
| 2831 |
+
],
|
| 2832 |
+
"per_class_recall": [
|
| 2833 |
+
0.5277777777777778,
|
| 2834 |
+
0.5222222222222223,
|
| 2835 |
+
0.5833333333333334,
|
| 2836 |
+
0.37222222222222223,
|
| 2837 |
+
0.5333333333333333,
|
| 2838 |
+
0.5555555555555556,
|
| 2839 |
+
0.5833333333333334,
|
| 2840 |
+
0.5555555555555556,
|
| 2841 |
+
0.6111111111111112
|
| 2842 |
+
],
|
| 2843 |
+
"balanced_accuracy": 0.5382716049382716,
|
| 2844 |
+
"accuracy": 0.5380952380952381,
|
| 2845 |
+
"weighted_f1": 0.538881849093927,
|
| 2846 |
+
"macro_f1": 0.5409170306503709,
|
| 2847 |
+
"kappa": 0.4790822564791062,
|
| 2848 |
+
"samples": 1680,
|
| 2849 |
+
"reward": 0.5382716049382716,
|
| 2850 |
+
"subjects": 20
|
| 2851 |
+
},
|
| 2852 |
+
"tuev": {
|
| 2853 |
+
"class_counts": [
|
| 2854 |
+
119,
|
| 2855 |
+
291,
|
| 2856 |
+
669,
|
| 2857 |
+
86,
|
| 2858 |
+
500,
|
| 2859 |
+
13822
|
| 2860 |
+
],
|
| 2861 |
+
"predicted_class_counts": [
|
| 2862 |
+
355,
|
| 2863 |
+
736,
|
| 2864 |
+
225,
|
| 2865 |
+
178,
|
| 2866 |
+
1176,
|
| 2867 |
+
12817
|
| 2868 |
+
],
|
| 2869 |
+
"confusion_matrix": [
|
| 2870 |
+
[
|
| 2871 |
+
38,
|
| 2872 |
+
38,
|
| 2873 |
+
3,
|
| 2874 |
+
0,
|
| 2875 |
+
3,
|
| 2876 |
+
37
|
| 2877 |
+
],
|
| 2878 |
+
[
|
| 2879 |
+
17,
|
| 2880 |
+
225,
|
| 2881 |
+
0,
|
| 2882 |
+
0,
|
| 2883 |
+
49,
|
| 2884 |
+
0
|
| 2885 |
+
],
|
| 2886 |
+
[
|
| 2887 |
+
99,
|
| 2888 |
+
209,
|
| 2889 |
+
221,
|
| 2890 |
+
0,
|
| 2891 |
+
137,
|
| 2892 |
+
3
|
| 2893 |
+
],
|
| 2894 |
+
[
|
| 2895 |
+
3,
|
| 2896 |
+
0,
|
| 2897 |
+
0,
|
| 2898 |
+
80,
|
| 2899 |
+
0,
|
| 2900 |
+
3
|
| 2901 |
+
],
|
| 2902 |
+
[
|
| 2903 |
+
0,
|
| 2904 |
+
0,
|
| 2905 |
+
1,
|
| 2906 |
+
0,
|
| 2907 |
+
468,
|
| 2908 |
+
31
|
| 2909 |
+
],
|
| 2910 |
+
[
|
| 2911 |
+
198,
|
| 2912 |
+
264,
|
| 2913 |
+
0,
|
| 2914 |
+
98,
|
| 2915 |
+
519,
|
| 2916 |
+
12743
|
| 2917 |
+
]
|
| 2918 |
+
],
|
| 2919 |
+
"per_class_recall": [
|
| 2920 |
+
0.31932773109243695,
|
| 2921 |
+
0.7731958762886598,
|
| 2922 |
+
0.3303437967115097,
|
| 2923 |
+
0.9302325581395349,
|
| 2924 |
+
0.936,
|
| 2925 |
+
0.9219360439878455
|
| 2926 |
+
],
|
| 2927 |
+
"balanced_accuracy": 0.7018393343699977,
|
| 2928 |
+
"accuracy": 0.8894556724995157,
|
| 2929 |
+
"weighted_f1": 0.9060795467857647,
|
| 2930 |
+
"macro_f1": 0.5356941485591152,
|
| 2931 |
+
"kappa": 0.5701427137051658,
|
| 2932 |
+
"samples": 15487,
|
| 2933 |
+
"reward": 0.7018393343699977,
|
| 2934 |
+
"subjects": 58
|
| 2935 |
+
},
|
| 2936 |
+
"ad65": {
|
| 2937 |
+
"class_counts": [
|
| 2938 |
+
464,
|
| 2939 |
+
393,
|
| 2940 |
+
486
|
| 2941 |
+
],
|
| 2942 |
+
"predicted_class_counts": [
|
| 2943 |
+
440,
|
| 2944 |
+
309,
|
| 2945 |
+
594
|
| 2946 |
+
],
|
| 2947 |
+
"confusion_matrix": [
|
| 2948 |
+
[
|
| 2949 |
+
287,
|
| 2950 |
+
86,
|
| 2951 |
+
91
|
| 2952 |
+
],
|
| 2953 |
+
[
|
| 2954 |
+
96,
|
| 2955 |
+
185,
|
| 2956 |
+
112
|
| 2957 |
+
],
|
| 2958 |
+
[
|
| 2959 |
+
57,
|
| 2960 |
+
38,
|
| 2961 |
+
391
|
| 2962 |
+
]
|
| 2963 |
+
],
|
| 2964 |
+
"per_class_recall": [
|
| 2965 |
+
0.6185344827586207,
|
| 2966 |
+
0.4707379134860051,
|
| 2967 |
+
0.8045267489711934
|
| 2968 |
+
],
|
| 2969 |
+
"balanced_accuracy": 0.6312663817386064,
|
| 2970 |
+
"accuracy": 0.6425912137006702,
|
| 2971 |
+
"weighted_f1": 0.6356338206725993,
|
| 2972 |
+
"macro_f1": 0.6286984511173302,
|
| 2973 |
+
"kappa": 0.4579978610488933,
|
| 2974 |
+
"samples": 1343,
|
| 2975 |
+
"subject_metrics": {
|
| 2976 |
+
"class_counts": [
|
| 2977 |
+
7,
|
| 2978 |
+
5,
|
| 2979 |
+
6
|
| 2980 |
+
],
|
| 2981 |
+
"predicted_class_counts": [
|
| 2982 |
+
5,
|
| 2983 |
+
6,
|
| 2984 |
+
7
|
| 2985 |
+
],
|
| 2986 |
+
"confusion_matrix": [
|
| 2987 |
+
[
|
| 2988 |
+
5,
|
| 2989 |
+
2,
|
| 2990 |
+
0
|
| 2991 |
+
],
|
| 2992 |
+
[
|
| 2993 |
+
0,
|
| 2994 |
+
4,
|
| 2995 |
+
1
|
| 2996 |
+
],
|
| 2997 |
+
[
|
| 2998 |
+
0,
|
| 2999 |
+
0,
|
| 3000 |
+
6
|
| 3001 |
+
]
|
| 3002 |
+
],
|
| 3003 |
+
"per_class_recall": [
|
| 3004 |
+
0.7142857142857143,
|
| 3005 |
+
0.8,
|
| 3006 |
+
1.0
|
| 3007 |
+
],
|
| 3008 |
+
"balanced_accuracy": 0.8380952380952381,
|
| 3009 |
+
"accuracy": 0.8333333333333334,
|
| 3010 |
+
"weighted_f1": 0.8337865837865839,
|
| 3011 |
+
"macro_f1": 0.8278943278943279,
|
| 3012 |
+
"kappa": 0.7511520737327189
|
| 3013 |
+
},
|
| 3014 |
+
"reward": 0.8380952380952381,
|
| 3015 |
+
"subjects": 18
|
| 3016 |
+
},
|
| 3017 |
+
"openbmi": {
|
| 3018 |
+
"class_counts": [
|
| 3019 |
+
2200,
|
| 3020 |
+
2200
|
| 3021 |
+
],
|
| 3022 |
+
"predicted_class_counts": [
|
| 3023 |
+
1987,
|
| 3024 |
+
2413
|
| 3025 |
+
],
|
| 3026 |
+
"confusion_matrix": [
|
| 3027 |
+
[
|
| 3028 |
+
1705,
|
| 3029 |
+
495
|
| 3030 |
+
],
|
| 3031 |
+
[
|
| 3032 |
+
282,
|
| 3033 |
+
1918
|
| 3034 |
+
]
|
| 3035 |
+
],
|
| 3036 |
+
"per_class_recall": [
|
| 3037 |
+
0.775,
|
| 3038 |
+
0.8718181818181818
|
| 3039 |
+
],
|
| 3040 |
+
"balanced_accuracy": 0.823409090909091,
|
| 3041 |
+
"accuracy": 0.8234090909090909,
|
| 3042 |
+
"weighted_f1": 0.8229942886302098,
|
| 3043 |
+
"macro_f1": 0.82299428863021,
|
| 3044 |
+
"kappa": 0.6468181818181817,
|
| 3045 |
+
"samples": 4400,
|
| 3046 |
+
"subject_scores": {
|
| 3047 |
+
"19": 0.875,
|
| 3048 |
+
"35": 0.95,
|
| 3049 |
+
"34": 0.6699999999999999,
|
| 3050 |
+
"51": 0.795,
|
| 3051 |
+
"20": 0.8425,
|
| 3052 |
+
"44": 0.9425,
|
| 3053 |
+
"24": 0.615,
|
| 3054 |
+
"15": 0.8875,
|
| 3055 |
+
"31": 0.9099999999999999,
|
| 3056 |
+
"26": 0.835,
|
| 3057 |
+
"23": 0.735
|
| 3058 |
+
},
|
| 3059 |
+
"reward": 0.823409090909091,
|
| 3060 |
+
"subjects": 11
|
| 3061 |
+
},
|
| 3062 |
+
"longitudinal": {
|
| 3063 |
+
"class_counts": [
|
| 3064 |
+
4260,
|
| 3065 |
+
4158
|
| 3066 |
+
],
|
| 3067 |
+
"predicted_class_counts": [
|
| 3068 |
+
4552,
|
| 3069 |
+
3866
|
| 3070 |
+
],
|
| 3071 |
+
"confusion_matrix": [
|
| 3072 |
+
[
|
| 3073 |
+
3795,
|
| 3074 |
+
465
|
| 3075 |
+
],
|
| 3076 |
+
[
|
| 3077 |
+
757,
|
| 3078 |
+
3401
|
| 3079 |
+
]
|
| 3080 |
+
],
|
| 3081 |
+
"per_class_recall": [
|
| 3082 |
+
0.8908450704225352,
|
| 3083 |
+
0.817941317941318
|
| 3084 |
+
],
|
| 3085 |
+
"balanced_accuracy": 0.8543931941819266,
|
| 3086 |
+
"accuracy": 0.8548348776431456,
|
| 3087 |
+
"weighted_f1": 0.8545986797881616,
|
| 3088 |
+
"macro_f1": 0.8545161723182699,
|
| 3089 |
+
"kappa": 0.7093827910518298,
|
| 3090 |
+
"samples": 8418,
|
| 3091 |
+
"subject_scores": {
|
| 3092 |
+
"sub-G2021": 0.8627525887522267,
|
| 3093 |
+
"sub-G2007": 0.816860103413505,
|
| 3094 |
+
"sub-G2019": 0.852993824374467,
|
| 3095 |
+
"sub-G2031": 0.828332994328064,
|
| 3096 |
+
"sub-G2015": 0.9043525361474528,
|
| 3097 |
+
"sub-CTR002": 0.9934852728970376,
|
| 3098 |
+
"sub-G2011": 0.8100294180322551,
|
| 3099 |
+
"sub-G2035": 0.9598833152678935,
|
| 3100 |
+
"sub-CTR003": 0.6680194805194806
|
| 3101 |
+
},
|
| 3102 |
+
"reward": 0.855189948192487,
|
| 3103 |
+
"subjects": 9
|
| 3104 |
+
}
|
| 3105 |
+
},
|
| 3106 |
+
"blend_strengths": {
|
| 3107 |
+
"faced": 0.0,
|
| 3108 |
+
"tuev": 0.0,
|
| 3109 |
+
"ad65": 0.0,
|
| 3110 |
+
"openbmi": 0.0,
|
| 3111 |
+
"longitudinal": 0.0
|
| 3112 |
+
},
|
| 3113 |
+
"blend_validation_scores": {
|
| 3114 |
+
"faced": {
|
| 3115 |
+
"0.0": 0.5382716049382716,
|
| 3116 |
+
"0.1": 0.5342592592592593,
|
| 3117 |
+
"0.3": 0.5274691358024691,
|
| 3118 |
+
"1.0": 0.15185185185185185
|
| 3119 |
+
},
|
| 3120 |
+
"tuev": {
|
| 3121 |
+
"0.0": 0.7018393343699977,
|
| 3122 |
+
"0.1": 0.6979569714256594,
|
| 3123 |
+
"0.3": 0.6311465306729623,
|
| 3124 |
+
"1.0": 0.5484677104063674
|
| 3125 |
+
},
|
| 3126 |
+
"ad65": {
|
| 3127 |
+
"0.0": 0.8380952380952381,
|
| 3128 |
+
"0.1": 0.8380952380952381,
|
| 3129 |
+
"0.3": 0.7238095238095238,
|
| 3130 |
+
"1.0": 0.47936507936507927
|
| 3131 |
+
},
|
| 3132 |
+
"openbmi": {
|
| 3133 |
+
"0.0": 0.823409090909091,
|
| 3134 |
+
"0.1": 0.8222727272727273,
|
| 3135 |
+
"0.3": 0.8175,
|
| 3136 |
+
"1.0": 0.6434090909090909
|
| 3137 |
+
},
|
| 3138 |
+
"longitudinal": {
|
| 3139 |
+
"0.0": 0.855189948192487,
|
| 3140 |
+
"0.1": 0.8550985739234811,
|
| 3141 |
+
"0.3": 0.8547378235627308,
|
| 3142 |
+
"1.0": 0.7329602809511528
|
| 3143 |
+
}
|
| 3144 |
+
}
|
| 3145 |
+
},
|
| 3146 |
+
{
|
| 3147 |
+
"epoch": 8,
|
| 3148 |
+
"joint_updates": 1600,
|
| 3149 |
+
"training_ce": {
|
| 3150 |
+
"faced": 2.146687477827072,
|
| 3151 |
+
"tuev": 0.9064642637968063,
|
| 3152 |
+
"ad65": 0.569061703234911,
|
| 3153 |
+
"openbmi": 0.646725757420063,
|
| 3154 |
+
"longitudinal": 0.5435716599225998
|
| 3155 |
+
},
|
| 3156 |
+
"validation": {
|
| 3157 |
+
"faced": {
|
| 3158 |
+
"class_counts": [
|
| 3159 |
+
180,
|
| 3160 |
+
180,
|
| 3161 |
+
180,
|
| 3162 |
+
180,
|
| 3163 |
+
240,
|
| 3164 |
+
180,
|
| 3165 |
+
180,
|
| 3166 |
+
180,
|
| 3167 |
+
180
|
| 3168 |
+
],
|
| 3169 |
+
"predicted_class_counts": [
|
| 3170 |
+
153,
|
| 3171 |
+
184,
|
| 3172 |
+
179,
|
| 3173 |
+
165,
|
| 3174 |
+
289,
|
| 3175 |
+
151,
|
| 3176 |
+
186,
|
| 3177 |
+
186,
|
| 3178 |
+
187
|
| 3179 |
+
],
|
| 3180 |
+
"confusion_matrix": [
|
| 3181 |
+
[
|
| 3182 |
+
95,
|
| 3183 |
+
12,
|
| 3184 |
+
3,
|
| 3185 |
+
15,
|
| 3186 |
+
17,
|
| 3187 |
+
4,
|
| 3188 |
+
12,
|
| 3189 |
+
14,
|
| 3190 |
+
8
|
| 3191 |
+
],
|
| 3192 |
+
[
|
| 3193 |
+
7,
|
| 3194 |
+
94,
|
| 3195 |
+
6,
|
| 3196 |
+
14,
|
| 3197 |
+
24,
|
| 3198 |
+
9,
|
| 3199 |
+
9,
|
| 3200 |
+
6,
|
| 3201 |
+
11
|
| 3202 |
+
],
|
| 3203 |
+
[
|
| 3204 |
+
7,
|
| 3205 |
+
9,
|
| 3206 |
+
105,
|
| 3207 |
+
15,
|
| 3208 |
+
18,
|
| 3209 |
+
5,
|
| 3210 |
+
7,
|
| 3211 |
+
5,
|
| 3212 |
+
9
|
| 3213 |
+
],
|
| 3214 |
+
[
|
| 3215 |
+
7,
|
| 3216 |
+
19,
|
| 3217 |
+
8,
|
| 3218 |
+
67,
|
| 3219 |
+
33,
|
| 3220 |
+
8,
|
| 3221 |
+
14,
|
| 3222 |
+
13,
|
| 3223 |
+
11
|
| 3224 |
+
],
|
| 3225 |
+
[
|
| 3226 |
+
11,
|
| 3227 |
+
13,
|
| 3228 |
+
18,
|
| 3229 |
+
12,
|
| 3230 |
+
128,
|
| 3231 |
+
11,
|
| 3232 |
+
14,
|
| 3233 |
+
21,
|
| 3234 |
+
12
|
| 3235 |
+
],
|
| 3236 |
+
[
|
| 3237 |
+
3,
|
| 3238 |
+
9,
|
| 3239 |
+
11,
|
| 3240 |
+
7,
|
| 3241 |
+
18,
|
| 3242 |
+
100,
|
| 3243 |
+
9,
|
| 3244 |
+
14,
|
| 3245 |
+
9
|
| 3246 |
+
],
|
| 3247 |
+
[
|
| 3248 |
+
6,
|
| 3249 |
+
7,
|
| 3250 |
+
9,
|
| 3251 |
+
9,
|
| 3252 |
+
20,
|
| 3253 |
+
5,
|
| 3254 |
+
105,
|
| 3255 |
+
8,
|
| 3256 |
+
11
|
| 3257 |
+
],
|
| 3258 |
+
[
|
| 3259 |
+
3,
|
| 3260 |
+
12,
|
| 3261 |
+
10,
|
| 3262 |
+
19,
|
| 3263 |
+
16,
|
| 3264 |
+
7,
|
| 3265 |
+
7,
|
| 3266 |
+
100,
|
| 3267 |
+
6
|
| 3268 |
+
],
|
| 3269 |
+
[
|
| 3270 |
+
14,
|
| 3271 |
+
9,
|
| 3272 |
+
9,
|
| 3273 |
+
7,
|
| 3274 |
+
15,
|
| 3275 |
+
2,
|
| 3276 |
+
9,
|
| 3277 |
+
5,
|
| 3278 |
+
110
|
| 3279 |
+
]
|
| 3280 |
+
],
|
| 3281 |
+
"per_class_recall": [
|
| 3282 |
+
0.5277777777777778,
|
| 3283 |
+
0.5222222222222223,
|
| 3284 |
+
0.5833333333333334,
|
| 3285 |
+
0.37222222222222223,
|
| 3286 |
+
0.5333333333333333,
|
| 3287 |
+
0.5555555555555556,
|
| 3288 |
+
0.5833333333333334,
|
| 3289 |
+
0.5555555555555556,
|
| 3290 |
+
0.6111111111111112
|
| 3291 |
+
],
|
| 3292 |
+
"balanced_accuracy": 0.5382716049382716,
|
| 3293 |
+
"accuracy": 0.5380952380952381,
|
| 3294 |
+
"weighted_f1": 0.538881849093927,
|
| 3295 |
+
"macro_f1": 0.5409170306503709,
|
| 3296 |
+
"kappa": 0.4790822564791062,
|
| 3297 |
+
"samples": 1680,
|
| 3298 |
+
"reward": 0.5382716049382716,
|
| 3299 |
+
"subjects": 20
|
| 3300 |
+
},
|
| 3301 |
+
"tuev": {
|
| 3302 |
+
"class_counts": [
|
| 3303 |
+
119,
|
| 3304 |
+
291,
|
| 3305 |
+
669,
|
| 3306 |
+
86,
|
| 3307 |
+
500,
|
| 3308 |
+
13822
|
| 3309 |
+
],
|
| 3310 |
+
"predicted_class_counts": [
|
| 3311 |
+
358,
|
| 3312 |
+
705,
|
| 3313 |
+
226,
|
| 3314 |
+
158,
|
| 3315 |
+
1275,
|
| 3316 |
+
12765
|
| 3317 |
+
],
|
| 3318 |
+
"confusion_matrix": [
|
| 3319 |
+
[
|
| 3320 |
+
38,
|
| 3321 |
+
38,
|
| 3322 |
+
3,
|
| 3323 |
+
0,
|
| 3324 |
+
3,
|
| 3325 |
+
37
|
| 3326 |
+
],
|
| 3327 |
+
[
|
| 3328 |
+
0,
|
| 3329 |
+
225,
|
| 3330 |
+
0,
|
| 3331 |
+
0,
|
| 3332 |
+
66,
|
| 3333 |
+
0
|
| 3334 |
+
],
|
| 3335 |
+
[
|
| 3336 |
+
96,
|
| 3337 |
+
178,
|
| 3338 |
+
222,
|
| 3339 |
+
0,
|
| 3340 |
+
170,
|
| 3341 |
+
3
|
| 3342 |
+
],
|
| 3343 |
+
[
|
| 3344 |
+
3,
|
| 3345 |
+
0,
|
| 3346 |
+
0,
|
| 3347 |
+
83,
|
| 3348 |
+
0,
|
| 3349 |
+
0
|
| 3350 |
+
],
|
| 3351 |
+
[
|
| 3352 |
+
0,
|
| 3353 |
+
0,
|
| 3354 |
+
1,
|
| 3355 |
+
0,
|
| 3356 |
+
468,
|
| 3357 |
+
31
|
| 3358 |
+
],
|
| 3359 |
+
[
|
| 3360 |
+
221,
|
| 3361 |
+
264,
|
| 3362 |
+
0,
|
| 3363 |
+
75,
|
| 3364 |
+
568,
|
| 3365 |
+
12694
|
| 3366 |
+
]
|
| 3367 |
+
],
|
| 3368 |
+
"per_class_recall": [
|
| 3369 |
+
0.31932773109243695,
|
| 3370 |
+
0.7731958762886598,
|
| 3371 |
+
0.33183856502242154,
|
| 3372 |
+
0.9651162790697675,
|
| 3373 |
+
0.936,
|
| 3374 |
+
0.9183909709159311
|
| 3375 |
+
],
|
| 3376 |
+
"balanced_accuracy": 0.7073115703982028,
|
| 3377 |
+
"accuracy": 0.8865500096855428,
|
| 3378 |
+
"weighted_f1": 0.9041877803178755,
|
| 3379 |
+
"macro_f1": 0.5449633898996022,
|
| 3380 |
+
"kappa": 0.5636471384380517,
|
| 3381 |
+
"samples": 15487,
|
| 3382 |
+
"reward": 0.7073115703982028,
|
| 3383 |
+
"subjects": 58
|
| 3384 |
+
},
|
| 3385 |
+
"ad65": {
|
| 3386 |
+
"class_counts": [
|
| 3387 |
+
464,
|
| 3388 |
+
393,
|
| 3389 |
+
486
|
| 3390 |
+
],
|
| 3391 |
+
"predicted_class_counts": [
|
| 3392 |
+
440,
|
| 3393 |
+
309,
|
| 3394 |
+
594
|
| 3395 |
+
],
|
| 3396 |
+
"confusion_matrix": [
|
| 3397 |
+
[
|
| 3398 |
+
287,
|
| 3399 |
+
86,
|
| 3400 |
+
91
|
| 3401 |
+
],
|
| 3402 |
+
[
|
| 3403 |
+
96,
|
| 3404 |
+
185,
|
| 3405 |
+
112
|
| 3406 |
+
],
|
| 3407 |
+
[
|
| 3408 |
+
57,
|
| 3409 |
+
38,
|
| 3410 |
+
391
|
| 3411 |
+
]
|
| 3412 |
+
],
|
| 3413 |
+
"per_class_recall": [
|
| 3414 |
+
0.6185344827586207,
|
| 3415 |
+
0.4707379134860051,
|
| 3416 |
+
0.8045267489711934
|
| 3417 |
+
],
|
| 3418 |
+
"balanced_accuracy": 0.6312663817386064,
|
| 3419 |
+
"accuracy": 0.6425912137006702,
|
| 3420 |
+
"weighted_f1": 0.6356338206725993,
|
| 3421 |
+
"macro_f1": 0.6286984511173302,
|
| 3422 |
+
"kappa": 0.4579978610488933,
|
| 3423 |
+
"samples": 1343,
|
| 3424 |
+
"subject_metrics": {
|
| 3425 |
+
"class_counts": [
|
| 3426 |
+
7,
|
| 3427 |
+
5,
|
| 3428 |
+
6
|
| 3429 |
+
],
|
| 3430 |
+
"predicted_class_counts": [
|
| 3431 |
+
5,
|
| 3432 |
+
6,
|
| 3433 |
+
7
|
| 3434 |
+
],
|
| 3435 |
+
"confusion_matrix": [
|
| 3436 |
+
[
|
| 3437 |
+
5,
|
| 3438 |
+
2,
|
| 3439 |
+
0
|
| 3440 |
+
],
|
| 3441 |
+
[
|
| 3442 |
+
0,
|
| 3443 |
+
4,
|
| 3444 |
+
1
|
| 3445 |
+
],
|
| 3446 |
+
[
|
| 3447 |
+
0,
|
| 3448 |
+
0,
|
| 3449 |
+
6
|
| 3450 |
+
]
|
| 3451 |
+
],
|
| 3452 |
+
"per_class_recall": [
|
| 3453 |
+
0.7142857142857143,
|
| 3454 |
+
0.8,
|
| 3455 |
+
1.0
|
| 3456 |
+
],
|
| 3457 |
+
"balanced_accuracy": 0.8380952380952381,
|
| 3458 |
+
"accuracy": 0.8333333333333334,
|
| 3459 |
+
"weighted_f1": 0.8337865837865839,
|
| 3460 |
+
"macro_f1": 0.8278943278943279,
|
| 3461 |
+
"kappa": 0.7511520737327189
|
| 3462 |
+
},
|
| 3463 |
+
"reward": 0.8380952380952381,
|
| 3464 |
+
"subjects": 18
|
| 3465 |
+
},
|
| 3466 |
+
"openbmi": {
|
| 3467 |
+
"class_counts": [
|
| 3468 |
+
2200,
|
| 3469 |
+
2200
|
| 3470 |
+
],
|
| 3471 |
+
"predicted_class_counts": [
|
| 3472 |
+
1987,
|
| 3473 |
+
2413
|
| 3474 |
+
],
|
| 3475 |
+
"confusion_matrix": [
|
| 3476 |
+
[
|
| 3477 |
+
1705,
|
| 3478 |
+
495
|
| 3479 |
+
],
|
| 3480 |
+
[
|
| 3481 |
+
282,
|
| 3482 |
+
1918
|
| 3483 |
+
]
|
| 3484 |
+
],
|
| 3485 |
+
"per_class_recall": [
|
| 3486 |
+
0.775,
|
| 3487 |
+
0.8718181818181818
|
| 3488 |
+
],
|
| 3489 |
+
"balanced_accuracy": 0.823409090909091,
|
| 3490 |
+
"accuracy": 0.8234090909090909,
|
| 3491 |
+
"weighted_f1": 0.8229942886302098,
|
| 3492 |
+
"macro_f1": 0.82299428863021,
|
| 3493 |
+
"kappa": 0.6468181818181817,
|
| 3494 |
+
"samples": 4400,
|
| 3495 |
+
"subject_scores": {
|
| 3496 |
+
"19": 0.875,
|
| 3497 |
+
"35": 0.95,
|
| 3498 |
+
"34": 0.6699999999999999,
|
| 3499 |
+
"51": 0.795,
|
| 3500 |
+
"20": 0.8425,
|
| 3501 |
+
"44": 0.9425,
|
| 3502 |
+
"24": 0.615,
|
| 3503 |
+
"15": 0.8875,
|
| 3504 |
+
"31": 0.9099999999999999,
|
| 3505 |
+
"26": 0.835,
|
| 3506 |
+
"23": 0.735
|
| 3507 |
+
},
|
| 3508 |
+
"reward": 0.823409090909091,
|
| 3509 |
+
"subjects": 11
|
| 3510 |
+
},
|
| 3511 |
+
"longitudinal": {
|
| 3512 |
+
"class_counts": [
|
| 3513 |
+
4260,
|
| 3514 |
+
4158
|
| 3515 |
+
],
|
| 3516 |
+
"predicted_class_counts": [
|
| 3517 |
+
4552,
|
| 3518 |
+
3866
|
| 3519 |
+
],
|
| 3520 |
+
"confusion_matrix": [
|
| 3521 |
+
[
|
| 3522 |
+
3795,
|
| 3523 |
+
465
|
| 3524 |
+
],
|
| 3525 |
+
[
|
| 3526 |
+
757,
|
| 3527 |
+
3401
|
| 3528 |
+
]
|
| 3529 |
+
],
|
| 3530 |
+
"per_class_recall": [
|
| 3531 |
+
0.8908450704225352,
|
| 3532 |
+
0.817941317941318
|
| 3533 |
+
],
|
| 3534 |
+
"balanced_accuracy": 0.8543931941819266,
|
| 3535 |
+
"accuracy": 0.8548348776431456,
|
| 3536 |
+
"weighted_f1": 0.8545986797881616,
|
| 3537 |
+
"macro_f1": 0.8545161723182699,
|
| 3538 |
+
"kappa": 0.7093827910518298,
|
| 3539 |
+
"samples": 8418,
|
| 3540 |
+
"subject_scores": {
|
| 3541 |
+
"sub-G2021": 0.8627525887522267,
|
| 3542 |
+
"sub-G2007": 0.816860103413505,
|
| 3543 |
+
"sub-G2019": 0.852993824374467,
|
| 3544 |
+
"sub-G2031": 0.828332994328064,
|
| 3545 |
+
"sub-G2015": 0.9043525361474528,
|
| 3546 |
+
"sub-CTR002": 0.9934852728970376,
|
| 3547 |
+
"sub-G2011": 0.8100294180322551,
|
| 3548 |
+
"sub-G2035": 0.9598833152678935,
|
| 3549 |
+
"sub-CTR003": 0.6680194805194806
|
| 3550 |
+
},
|
| 3551 |
+
"reward": 0.855189948192487,
|
| 3552 |
+
"subjects": 9
|
| 3553 |
+
}
|
| 3554 |
+
},
|
| 3555 |
+
"blend_strengths": {
|
| 3556 |
+
"faced": 0.0,
|
| 3557 |
+
"tuev": 0.1,
|
| 3558 |
+
"ad65": 0.0,
|
| 3559 |
+
"openbmi": 0.0,
|
| 3560 |
+
"longitudinal": 0.0
|
| 3561 |
+
},
|
| 3562 |
+
"blend_validation_scores": {
|
| 3563 |
+
"faced": {
|
| 3564 |
+
"0.0": 0.5382716049382716,
|
| 3565 |
+
"0.1": 0.5347222222222222,
|
| 3566 |
+
"0.3": 0.5300925925925927,
|
| 3567 |
+
"1.0": 0.16512345679012347
|
| 3568 |
+
},
|
| 3569 |
+
"tuev": {
|
| 3570 |
+
"0.0": 0.7018393343699977,
|
| 3571 |
+
"0.1": 0.7073115703982028,
|
| 3572 |
+
"0.3": 0.6294631409568789,
|
| 3573 |
+
"1.0": 0.5334879433344161
|
| 3574 |
+
},
|
| 3575 |
+
"ad65": {
|
| 3576 |
+
"0.0": 0.8380952380952381,
|
| 3577 |
+
"0.1": 0.8380952380952381,
|
| 3578 |
+
"0.3": 0.7238095238095238,
|
| 3579 |
+
"1.0": 0.47936507936507927
|
| 3580 |
+
},
|
| 3581 |
+
"openbmi": {
|
| 3582 |
+
"0.0": 0.823409090909091,
|
| 3583 |
+
"0.1": 0.8220454545454544,
|
| 3584 |
+
"0.3": 0.819318181818182,
|
| 3585 |
+
"1.0": 0.6654545454545455
|
| 3586 |
+
},
|
| 3587 |
+
"longitudinal": {
|
| 3588 |
+
"0.0": 0.855189948192487,
|
| 3589 |
+
"0.1": 0.8550985739234811,
|
| 3590 |
+
"0.3": 0.8547378235627308,
|
| 3591 |
+
"1.0": 0.7352847229128177
|
| 3592 |
+
}
|
| 3593 |
+
}
|
| 3594 |
+
}
|
| 3595 |
+
],
|
| 3596 |
+
"settings": {
|
| 3597 |
+
"condition": "all",
|
| 3598 |
+
"model_seed": 543,
|
| 3599 |
+
"sampling_seed": 2123,
|
| 3600 |
+
"patient_seed": 656,
|
| 3601 |
+
"epochs": 30,
|
| 3602 |
+
"updates_per_epoch": 200,
|
| 3603 |
+
"output": "/workspace/research/experiments543/all_full"
|
| 3604 |
+
},
|
| 3605 |
+
"source": "/workspace/research/experiments508/local_full/epoch-001",
|
| 3606 |
+
"plan_sha256": "5a83e3f10d0a62f83a9ebb159dd299d4476b948f207141b40d3a9b49d6235a2e",
|
| 3607 |
+
"trainer_sha256": "99c705698c99dc3f2f4fe4cf3fd6ce6cad93ecb297df934593ed2fd289d8c247",
|
| 3608 |
+
"source_weights_sha256": "bfd88b74ab99fe2a9c3cf0bb6013baf12fff641dade9a9308195490b8a50ba69",
|
| 3609 |
+
"initial_model_sha256": "dbac35daf6e1e9da54a5a30b4f50fa44cdace06ba9e8bd925a2495b663400e7c",
|
| 3610 |
+
"input_sha256": {
|
| 3611 |
+
"/workspace/data/faced/train/manifest.json": "24f7c5c2165944b3544cd0935cc3dc84b9d9df9eb4fa347656d5135c0824ab4b",
|
| 3612 |
+
"/workspace/research/shared_temporal_convolution_443_cache_v1/faced-train-raw.npy": "d600f6c96284f2432f1b36a4903edd10f2caacf709e59daf8b49efddcaea4735",
|
| 3613 |
+
"/workspace/data/faced/val/manifest.json": "a3074299e9ebd90194bf2ca365529d5ce4806adbe63fb45fb8818ce7b00c70c5",
|
| 3614 |
+
"/workspace/research/shared_temporal_convolution_443_cache_v1/faced-val-raw.npy": "6289496956b9995e33f5555426b9e6803364c75bdb1788b58d16236f5d2ab46d",
|
| 3615 |
+
"/workspace/research/complete508_source_cache_v1/faced-val-complete508-logits.npy": "b196c32cda7a22e921492e3373a9f63734c9cad5e40fbcf602297bf3e4396af4",
|
| 3616 |
+
"/workspace/research/experiments508/local_full/faced-e001.npy": "9f79fb40cb09b2b0a309d3ab5f83c468a57db0e9a76d23b76a55f536c668d37f",
|
| 3617 |
+
"/workspace/data/tuev/train/manifest.json": "49b7880052e6d093633e6e03d52bfd7df9084271ebf8e4f60e4fbe12da398354",
|
| 3618 |
+
"/workspace/research/shared_temporal_convolution_443_cache_v1/tuev-train-raw.npy": "bd64f10c03bf8a580a1ea9a8eed99633f189f375eb4f6eb2e16974980a158209",
|
| 3619 |
+
"/workspace/data/tuev/val/manifest.json": "b3e38b33be594d2e5904000be876a8f85b96869dc26c24f1dcc07444c476c5d3",
|
| 3620 |
+
"/workspace/research/shared_temporal_convolution_443_cache_v1/tuev-val-raw.npy": "6baddc47cc0aafb2e61593761d203e9c354de36741abc799a12f5cdcb5fecc9e",
|
| 3621 |
+
"/workspace/research/complete508_source_cache_v1/tuev-val-complete508-logits.npy": "eb92aca62daab28761bc7cc607f8092d89c8ad212cc9a9928a15971ce707e14e",
|
| 3622 |
+
"/workspace/research/experiments508/local_full/tuev-e001.npy": "edf6a11b71729469ddaf00b7ac8ecb78bdfdcc0cb88c035d9e7d61ec81f47154",
|
| 3623 |
+
"/workspace/data/ad65/train/manifest.json": "f11857b9ef2fda74fef95b5a692afcc4ad6df740f014223780e04580e69dd93e",
|
| 3624 |
+
"/workspace/research/shared_temporal_convolution_443_cache_v1/ad65-train-raw.npy": "de33a3ca6f41cebc1c5611bcf434efea109ef68303ad9052a77f5179eeaefef9",
|
| 3625 |
+
"/workspace/data/ad65/val/manifest.json": "81f42305bb52728391c7cf2f07cd550c13fc7934b8bd42770252d966dac37a05",
|
| 3626 |
+
"/workspace/research/shared_temporal_convolution_443_cache_v1/ad65-val-raw.npy": "aaf0416dd74d5651906b84f1ad13094f4a3f1921c70298f581bcf863832e73df",
|
| 3627 |
+
"/workspace/research/complete508_source_cache_v1/ad65-val-complete508-logits.npy": "6ddaaac7f2c4acc252b10ee108286cf6ecd498235363106237bbfc96ab2acde1",
|
| 3628 |
+
"/workspace/research/experiments508/local_full/ad65-e001.npy": "7a3b74c58580b7ba952322bf6d527ebc9a40a6e04c7cdbbaea14e84a7a298d54",
|
| 3629 |
+
"/workspace/data/openbmi/train/manifest.json": "35446de7b6e3e536f735e935c7eb74cc720f198a60d700da1db5fa39f315f5d5",
|
| 3630 |
+
"/workspace/research/shared_temporal_convolution_443_cache_v1/openbmi-train-raw.npy": "4767e55717e09cf1cdb68344677f4de18a02856bbdbfe4038fdf3a151cce2c13",
|
| 3631 |
+
"/workspace/data/openbmi/val/manifest.json": "56622533f8fa28c2f7e1a619b04b2350f902494e9de1e58fa5e3abea59f8259c",
|
| 3632 |
+
"/workspace/research/shared_temporal_convolution_443_cache_v1/openbmi-val-raw.npy": "d8d8e65bfa8a93bbb37bd50985af9db9a352719c9f7fefd7da4118dde98d4a24",
|
| 3633 |
+
"/workspace/research/complete508_source_cache_v1/openbmi-val-complete508-logits.npy": "8e483f018f275ee243846586cac040a6ca48b2c102d1d0de960d871daa0b43cb",
|
| 3634 |
+
"/workspace/research/experiments508/local_full/openbmi-e001.npy": "562af8dbfd72b693c67f86ee450e0d4259c63000ba8e50d756cf5c446193224e",
|
| 3635 |
+
"/workspace/data/longitudinal/train/manifest.json": "6ec8c8090a099cd4e4bf5faaf4bf97be7701916f7333a4e3b5c87b1d0b9f1acc",
|
| 3636 |
+
"/workspace/research/shared_temporal_convolution_443_cache_v1/longitudinal-train-raw.npy": "180d76b0980b4a3aa2d97cc9c2860848df5a92af1f46e671f7718ae7c5c505e5",
|
| 3637 |
+
"/workspace/data/longitudinal/val/manifest.json": "fae612fca74139815b5b53e20ed7af7f50083026b0126962bdd5f954b9047edb",
|
| 3638 |
+
"/workspace/research/shared_temporal_convolution_443_cache_v1/longitudinal-val-raw.npy": "1a9aaa4f3597676ef858bf2435c4009cba453f9aa88e95aba034e07e78d65bd9",
|
| 3639 |
+
"/workspace/research/complete508_source_cache_v1/longitudinal-val-complete508-logits.npy": "f51e4cd91a9062cb514779a49d791d182210692af0ffeed959bd80c5a50c0d2f",
|
| 3640 |
+
"/workspace/research/experiments508/local_full/longitudinal-e001.npy": "cef9aa2faa49f53ab68cdfc79f7f022e183c0c2a658d1f65efc438ed4940d3d2"
|
| 3641 |
+
},
|
| 3642 |
+
"all_tracks_update_shared_backbone": true,
|
| 3643 |
+
"all_five_validation_splits_evaluated": true,
|
| 3644 |
+
"all1592_source_states_fixed": true,
|
| 3645 |
+
"all_five_source_fallback_arrays_exact": true,
|
| 3646 |
+
"shared_gradient_audit": {
|
| 3647 |
+
"faced": {
|
| 3648 |
+
"adapters.faced.weight": 0.11062344163656235,
|
| 3649 |
+
"backbone.temporal.weight": 0.17392498254776,
|
| 3650 |
+
"backbone.norm_temporal.weight": 0.011979063972830772,
|
| 3651 |
+
"backbone.norm_temporal.bias": 0.036790911108255386,
|
| 3652 |
+
"backbone.spatial.weight": 0.06707913428544998,
|
| 3653 |
+
"backbone.norm_spatial.weight": 0.011345813982188702,
|
| 3654 |
+
"backbone.norm_spatial.bias": 0.02745184488594532,
|
| 3655 |
+
"backbone.depthwise.weight": 0.08860281854867935,
|
| 3656 |
+
"backbone.pointwise.weight": 0.10825546085834503,
|
| 3657 |
+
"backbone.norm_separable.weight": 0.020657798275351524,
|
| 3658 |
+
"backbone.norm_separable.bias": 0.025895925238728523,
|
| 3659 |
+
"backbone.embedding.weight": 0.3844121992588043,
|
| 3660 |
+
"backbone.embedding.bias": 0.0778844878077507,
|
| 3661 |
+
"backbone.norm_embedding.weight": 0.017623893916606903,
|
| 3662 |
+
"backbone.norm_embedding.bias": 0.017910070717334747,
|
| 3663 |
+
"heads.faced.weight": 0.8972694873809814,
|
| 3664 |
+
"heads.faced.bias": 0.0615614652633667
|
| 3665 |
+
},
|
| 3666 |
+
"tuev": {
|
| 3667 |
+
"adapters.tuev.weight": 0.09146258980035782,
|
| 3668 |
+
"backbone.temporal.weight": 0.20790860056877136,
|
| 3669 |
+
"backbone.norm_temporal.weight": 0.019124427810311317,
|
| 3670 |
+
"backbone.norm_temporal.bias": 0.03587087616324425,
|
| 3671 |
+
"backbone.spatial.weight": 0.1076166108250618,
|
| 3672 |
+
"backbone.norm_spatial.weight": 0.018160680308938026,
|
| 3673 |
+
"backbone.norm_spatial.bias": 0.03431427851319313,
|
| 3674 |
+
"backbone.depthwise.weight": 0.12570388615131378,
|
| 3675 |
+
"backbone.pointwise.weight": 0.18391667306423187,
|
| 3676 |
+
"backbone.norm_separable.weight": 0.02694922313094139,
|
| 3677 |
+
"backbone.norm_separable.bias": 0.03895087167620659,
|
| 3678 |
+
"backbone.embedding.weight": 0.5857461094856262,
|
| 3679 |
+
"backbone.embedding.bias": 0.11499238759279251,
|
| 3680 |
+
"backbone.norm_embedding.weight": 0.027521314099431038,
|
| 3681 |
+
"backbone.norm_embedding.bias": 0.02828020043671131,
|
| 3682 |
+
"heads.tuev.weight": 1.41971755027771,
|
| 3683 |
+
"heads.tuev.bias": 0.11935191601514816
|
| 3684 |
+
},
|
| 3685 |
+
"ad65": {
|
| 3686 |
+
"adapters.ad65.weight": 0.07960694283246994,
|
| 3687 |
+
"backbone.temporal.weight": 0.19772127270698547,
|
| 3688 |
+
"backbone.norm_temporal.weight": 0.01653403416275978,
|
| 3689 |
+
"backbone.norm_temporal.bias": 0.01979927346110344,
|
| 3690 |
+
"backbone.spatial.weight": 0.08738940954208374,
|
| 3691 |
+
"backbone.norm_spatial.weight": 0.016772322356700897,
|
| 3692 |
+
"backbone.norm_spatial.bias": 0.021332213655114174,
|
| 3693 |
+
"backbone.depthwise.weight": 0.10752315074205399,
|
| 3694 |
+
"backbone.pointwise.weight": 0.1556306779384613,
|
| 3695 |
+
"backbone.norm_separable.weight": 0.018312150612473488,
|
| 3696 |
+
"backbone.norm_separable.bias": 0.017384428530931473,
|
| 3697 |
+
"backbone.embedding.weight": 0.36892786622047424,
|
| 3698 |
+
"backbone.embedding.bias": 0.05737750604748726,
|
| 3699 |
+
"backbone.norm_embedding.weight": 0.015667730942368507,
|
| 3700 |
+
"backbone.norm_embedding.bias": 0.013248385861515999,
|
| 3701 |
+
"heads.ad65.weight": 0.8126062154769897,
|
| 3702 |
+
"heads.ad65.bias": 0.0498795211315155
|
| 3703 |
+
},
|
| 3704 |
+
"openbmi": {
|
| 3705 |
+
"adapters.openbmi.weight": 0.1328270435333252,
|
| 3706 |
+
"backbone.temporal.weight": 0.1653299182653427,
|
| 3707 |
+
"backbone.norm_temporal.weight": 0.01209245529025793,
|
| 3708 |
+
"backbone.norm_temporal.bias": 0.027509210631251335,
|
| 3709 |
+
"backbone.spatial.weight": 0.06978999078273773,
|
| 3710 |
+
"backbone.norm_spatial.weight": 0.014218584634363651,
|
| 3711 |
+
"backbone.norm_spatial.bias": 0.03649844229221344,
|
| 3712 |
+
"backbone.depthwise.weight": 0.09271294623613358,
|
| 3713 |
+
"backbone.pointwise.weight": 0.12612847983837128,
|
| 3714 |
+
"backbone.norm_separable.weight": 0.024974927306175232,
|
| 3715 |
+
"backbone.norm_separable.bias": 0.030704054981470108,
|
| 3716 |
+
"backbone.embedding.weight": 0.47488367557525635,
|
| 3717 |
+
"backbone.embedding.bias": 0.10317503660917282,
|
| 3718 |
+
"backbone.norm_embedding.weight": 0.020673606544733047,
|
| 3719 |
+
"backbone.norm_embedding.bias": 0.026708491146564484,
|
| 3720 |
+
"heads.openbmi.weight": 1.3107001781463623,
|
| 3721 |
+
"heads.openbmi.bias": 0.11629775911569595
|
| 3722 |
+
},
|
| 3723 |
+
"longitudinal": {
|
| 3724 |
+
"adapters.longitudinal.weight": 0.19808974862098694,
|
| 3725 |
+
"backbone.temporal.weight": 0.2574745714664459,
|
| 3726 |
+
"backbone.norm_temporal.weight": 0.017279857769608498,
|
| 3727 |
+
"backbone.norm_temporal.bias": 0.0480697862803936,
|
| 3728 |
+
"backbone.spatial.weight": 0.09192802011966705,
|
| 3729 |
+
"backbone.norm_spatial.weight": 0.016134388744831085,
|
| 3730 |
+
"backbone.norm_spatial.bias": 0.026977606117725372,
|
| 3731 |
+
"backbone.depthwise.weight": 0.10477544367313385,
|
| 3732 |
+
"backbone.pointwise.weight": 0.14035655558109283,
|
| 3733 |
+
"backbone.norm_separable.weight": 0.0211783479899168,
|
| 3734 |
+
"backbone.norm_separable.bias": 0.02369631826877594,
|
| 3735 |
+
"backbone.embedding.weight": 0.39398816227912903,
|
| 3736 |
+
"backbone.embedding.bias": 0.0699661523103714,
|
| 3737 |
+
"backbone.norm_embedding.weight": 0.01660672016441822,
|
| 3738 |
+
"backbone.norm_embedding.bias": 0.019186971709132195,
|
| 3739 |
+
"heads.longitudinal.weight": 1.0706279277801514,
|
| 3740 |
+
"heads.longitudinal.bias": 0.08428003638982773
|
| 3741 |
+
}
|
| 3742 |
+
},
|
| 3743 |
+
"raw_checks": {
|
| 3744 |
+
"faced": {
|
| 3745 |
+
"train_windows": 17,
|
| 3746 |
+
"stateless_raw_features_exact": true
|
| 3747 |
+
},
|
| 3748 |
+
"tuev": {
|
| 3749 |
+
"train_windows": 17,
|
| 3750 |
+
"stateless_raw_features_exact": true
|
| 3751 |
+
},
|
| 3752 |
+
"ad65": {
|
| 3753 |
+
"train_windows": 17,
|
| 3754 |
+
"stateless_raw_features_exact": true
|
| 3755 |
+
},
|
| 3756 |
+
"openbmi": {
|
| 3757 |
+
"train_windows": 17,
|
| 3758 |
+
"stateless_raw_features_exact": true
|
| 3759 |
+
},
|
| 3760 |
+
"longitudinal": {
|
| 3761 |
+
"train_windows": 17,
|
| 3762 |
+
"stateless_raw_features_exact": true
|
| 3763 |
+
}
|
| 3764 |
+
},
|
| 3765 |
+
"prediction_sha256": {
|
| 3766 |
+
"faced": "9f79fb40cb09b2b0a309d3ab5f83c468a57db0e9a76d23b76a55f536c668d37f",
|
| 3767 |
+
"tuev": "ed541862cb2f370ca9c4428a5ed8eb903858279f5bf6cf1439ee83d46c0df783",
|
| 3768 |
+
"ad65": "7a3b74c58580b7ba952322bf6d527ebc9a40a6e04c7cdbbaea14e84a7a298d54",
|
| 3769 |
+
"openbmi": "562af8dbfd72b693c67f86ee450e0d4259c63000ba8e50d756cf5c446193224e",
|
| 3770 |
+
"longitudinal": "cef9aa2faa49f53ab68cdfc79f7f022e183c0c2a658d1f65efc438ed4940d3d2"
|
| 3771 |
+
},
|
| 3772 |
+
"optimizer_group_parameter_names": [
|
| 3773 |
+
[
|
| 3774 |
+
"adapters.faced.activation_groups_projection.weight",
|
| 3775 |
+
"adapters.tuev.activation_groups_projection.weight",
|
| 3776 |
+
"adapters.ad65.activation_groups_projection.weight",
|
| 3777 |
+
"adapters.openbmi.activation_groups_projection.weight",
|
| 3778 |
+
"adapters.longitudinal.activation_groups_projection.weight",
|
| 3779 |
+
"backbone.activation_groups_encoder.temporal.weight",
|
| 3780 |
+
"backbone.activation_groups_encoder.norm_temporal.weight",
|
| 3781 |
+
"backbone.activation_groups_encoder.norm_temporal.bias",
|
| 3782 |
+
"backbone.activation_groups_encoder.spatial.weight",
|
| 3783 |
+
"backbone.activation_groups_encoder.norm_spatial.weight",
|
| 3784 |
+
"backbone.activation_groups_encoder.norm_spatial.bias",
|
| 3785 |
+
"backbone.activation_groups_encoder.depthwise.weight",
|
| 3786 |
+
"backbone.activation_groups_encoder.pointwise.weight",
|
| 3787 |
+
"backbone.activation_groups_encoder.norm_separable.weight",
|
| 3788 |
+
"backbone.activation_groups_encoder.norm_separable.bias",
|
| 3789 |
+
"backbone.activation_groups_encoder.embedding.weight",
|
| 3790 |
+
"backbone.activation_groups_encoder.embedding.bias",
|
| 3791 |
+
"backbone.activation_groups_encoder.norm_embedding.weight",
|
| 3792 |
+
"backbone.activation_groups_encoder.norm_embedding.bias",
|
| 3793 |
+
"activation_groups_heads.faced.projection.weight",
|
| 3794 |
+
"activation_groups_heads.faced.projection.bias",
|
| 3795 |
+
"activation_groups_heads.tuev.projection.weight",
|
| 3796 |
+
"activation_groups_heads.tuev.projection.bias",
|
| 3797 |
+
"activation_groups_heads.ad65.projection.weight",
|
| 3798 |
+
"activation_groups_heads.ad65.projection.bias",
|
| 3799 |
+
"activation_groups_heads.openbmi.projection.weight",
|
| 3800 |
+
"activation_groups_heads.openbmi.projection.bias",
|
| 3801 |
+
"activation_groups_heads.longitudinal.projection.weight",
|
| 3802 |
+
"activation_groups_heads.longitudinal.projection.bias"
|
| 3803 |
+
]
|
| 3804 |
+
],
|
| 3805 |
+
"no_cross_common_head_selection": true,
|
| 3806 |
+
"training_uses_source_logits": false
|
| 3807 |
+
}
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/submission/weighted_pattern_model.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""One common weighted-pattern refinement, jointly trained on five EEG tracks."""
|
| 2 |
+
from multitaper_model import *
|
| 3 |
+
SourceHybridModel=HybridModel
|
| 4 |
+
FEATURE_TRACKS=('faced','openbmi','longitudinal')
|
| 5 |
+
class WeightedPatternReadout(nn.Module):
|
| 6 |
+
def __init__(self,classes,scale):
|
| 7 |
+
super().__init__();self.projection=nn.Linear(128,classes);nn.init.zeros_(self.projection.weight);nn.init.zeros_(self.projection.bias);self.register_buffer('output_scale',scale.detach().clone());self.register_buffer('correction_gain',torch.tensor(1.))
|
| 8 |
+
class HybridModel(SourceHybridModel):
|
| 9 |
+
def __init__(self,weighted_pattern_refinement=False,weighted_pattern_mode='weighted',weighted_pattern_enabled=1.,**kwargs):
|
| 10 |
+
super().__init__(**kwargs);assert weighted_pattern_refinement and weighted_pattern_mode in ['weighted','plain','shuffled'];self.weighted_pattern_mode=weighted_pattern_mode
|
| 11 |
+
for t in TRACKS:
|
| 12 |
+
dimension=130*SPECS[t][0] if t in FEATURE_TRACKS else self.adapters[t].multitaper_projection.in_features;self.adapters[t].weighted_pattern_normalizer=Standardize(dimension);self.adapters[t].weighted_pattern_projection=nn.Linear(dimension,128)
|
| 13 |
+
self.backbone.weighted_pattern_encoder=nn.Sequential(nn.Linear(128,256),nn.LayerNorm(256),nn.GELU(),nn.Dropout(.3),nn.Linear(256,128),nn.LayerNorm(128));self.backbone.register_buffer('weighted_pattern_enabled',torch.tensor(float(weighted_pattern_enabled)));self.weighted_pattern_heads=nn.ModuleDict({t:WeightedPatternReadout(SPECS[t][2],self.heads[t].output_scale) for t in TRACKS})
|
| 14 |
+
def weighted_pattern_features(self,t,x,features=None):
|
| 15 |
+
if t not in FEATURE_TRACKS:return super().multitaper_features(t,x)
|
| 16 |
+
from weighted_ordinal_features import weighted_ordinal_features
|
| 17 |
+
return weighted_ordinal_features(t,x)[self.weighted_pattern_mode]
|
| 18 |
+
def weighted_pattern_embedding(self,t,values):
|
| 19 |
+
with torch.autocast(values.device.type,enabled=False):return self.backbone.weighted_pattern_encoder(self.adapters[t].weighted_pattern_projection(self.adapters[t].weighted_pattern_normalizer(values.float())))
|
| 20 |
+
def weighted_pattern_predict(self,t,values,prior,gain=None,return_standalone=False):
|
| 21 |
+
with torch.autocast(values.device.type,enabled=False):
|
| 22 |
+
h=self.weighted_pattern_heads[t];standalone=h.projection(self.weighted_pattern_embedding(t,values))*self.backbone.weighted_pattern_enabled;g=h.correction_gain if gain is None else gain;result=prior.float()+(g*h.output_scale)*standalone
|
| 23 |
+
return (result,standalone) if return_standalone else result
|
| 24 |
+
def forward(self,t,x,features=None,covariances=None,covariance_features=None):
|
| 25 |
+
prior=super().forward(t,x,features,covariances=covariances,covariance_features=covariance_features);return self.weighted_pattern_predict(t,self.weighted_pattern_features(t,x,features=features),prior)
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/finalization/trajectory.jsonl
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"type":"thread.started","thread_id":"01a19351-dcd4-7b31-83ad-611e1e0b6c67"}
|
| 2 |
+
{"type":"item.completed","item":{"id":"item_0","type":"error","message":"`[features].use_legacy_landlock` is deprecated and will be removed soon. (Remove this setting to stop opting into the legacy Linux sandbox behavior.)"}}
|
| 3 |
+
{"type":"turn.started"}
|
| 4 |
+
{"type":"item.completed","item":{"id":"item_1","type":"agent_message","text":"I’ll finalize the already verified experiment 543 package. I’ll use the existing proof records and static file checks only, then stop."}}
|
| 5 |
+
{"type":"item.started","item":{"id":"item_2","type":"command_execution","command":"/bin/sh -lc pwd","aggregated_output":"","exit_code":null,"status":"in_progress"}}
|
| 6 |
+
{"type":"item.completed","item":{"id":"item_2","type":"command_execution","command":"/bin/sh -lc pwd","aggregated_output":"/workspace\n","exit_code":0,"status":"completed"}}
|
| 7 |
+
{"type":"item.started","item":{"id":"item_3","type":"command_execution","command":"/bin/sh -lc 'cat /workspace/research/published_state.json'","aggregated_output":"","exit_code":null,"status":"in_progress"}}
|
| 8 |
+
{"type":"item.completed","item":{"id":"item_3","type":"command_execution","command":"/bin/sh -lc 'cat /workspace/research/published_state.json'","aggregated_output":"{\n \"source\": \"/workspace/research/experiments543/all_full/epoch-008\",\n \"validation\": {\n \"faced\": 0.5382716049382716,\n \"tuev\": 0.7073115703982028,\n \"ad65\": 0.8380952380952381,\n \"openbmi\": 0.823409090909091,\n \"longitudinal\": 0.855189948192487\n },\n \"weights_sha256\": \"fb1405db77c975a547acc95ca50fd8113aa42134a9b52b167843e4fa442ee61e\",\n \"full_inference_validation_matches\": true,\n \"validation_evidence\": \"publication-fb1405db77c9-verified.json\",\n \"readonly_relocation_passed\": true,\n \"relocation_evidence\": \"publication-fb1405db77c9-relocation.json\",\n \"verification_status\": \"complete\",\n \"validation_scope\": {\n \"raw_reverified_tracks\": [\n \"faced\",\n \"tuev\",\n \"ad65\",\n \"openbmi\",\n \"longitudinal\"\n ],\n \"inherited_raw_evidence_tracks\": []\n },\n \"relocation_scope\": \"Direct uid1000 all-five readonly relocation with fresh IDs, shuffled rows and zeros.\",\n \"verified_at\": \"2026-11-02T13:09:18.828123+00:00\",\n \"prepublication_verification\": true,\n \"fresh_stage_replay_audit\": \"/workspace/research/activation-groups-full-review-all_full-replay-audit.json\",\n \"source_joint_ancestry_verified\": true,\n \"this_stage_allfive_update_common\": true,\n \"contract_check_passed\": true,\n \"contract_checked_during_atomic_publication\": true\n}\n","exit_code":0,"status":"completed"}}
|
| 9 |
+
{"type":"item.started","item":{"id":"item_4","type":"command_execution","command":"/bin/sh -lc 'cat /workspace/contract.md'","aggregated_output":"","exit_code":null,"status":"in_progress"}}
|
| 10 |
+
{"type":"item.completed","item":{"id":"item_4","type":"command_execution","command":"/bin/sh -lc 'cat /workspace/contract.md'","aggregated_output":"# BCI five-track shared submission v2\n\nKeep one complete package under /workspace/submission, including infer.sh,\narchitecture configuration, code and weights. One trainable EEG backbone must\nserve all five tracks; input adapters and classification heads may be task-specific.\nThe backbone must be trained jointly on all five training splits. Initialization\nmay be random or from the task-provided audited checkpoint allowlist. Package\ncontents must not contain symlinks. The package must run after relocation.\n\nInvocation: bash infer.sh INPUT_DIR OUTPUT_DIR.\nINPUT_DIR/manifest.json contains schema=bci-input-v1, track, config, and samples.\nEach sample is {\"id\":\"opaque\",\"path\":\"shard-000000.npy\",\"index\":0}.\nNumPy shards have shape [N,C,S,200], in microvolts. Track C/S:\nfaced 32/10, tuev 16/5, ad65 19/10, openbmi 62/4, longitudinal 58/2.\nThe baseline scales input by 1/100. No labels, subjects or source filenames are\npart of test inputs. Support unseen IDs, arbitrary order and sample counts.\n\nWrite OUTPUT_DIR/predictions.jsonl, exactly one row per ID:\n{\"id\":\"opaque\",\"probabilities\":[0.2,0.8]}.\nClass counts: 9/6/3/2/2 respectively. Values must be finite in [0,1],\nsum to 1 within 1e-5, and use the documented class order. Missing, duplicate,\nunknown IDs or invalid probabilities invalidate that track (reward 0).\n\nRuntime: PyTorch 2.8.0, dependencies in requirements.txt, one GPU, 64 GiB RAM,\ntwo hours maximum per track, no network, unprivileged user, package/input\nread-only and output writable. Inference cannot use labels, external caches or\nworkspace files. No training/adaptation on evaluation batches.\n\nEach track is independently scored in [0,1]; no scalar aggregate.\nFACED/TUEV: balanced accuracy, with weighted F1 and Cohen kappa.\nAD: arithmetic mean of window probabilities per subject, then subject-level\nbalanced accuracy (window metrics additionally reported).\nOpenBMI: mean of subject-level balanced accuracies over all each subject's trials.\nLongitudinal: balanced accuracy per subject/session, mean across sessions within\nsubject, then mean across subjects. Infrastructure failures produce no reward.\n","exit_code":0,"status":"completed"}}
|
| 11 |
+
{"type":"item.started","item":{"id":"item_5","type":"command_execution","command":"/bin/sh -lc \"python - <<'PY'\nimport json,os\np='/workspace/research/published_state.json'\nx=json.load(open(p))\nprint('published_state_keys',list(x))\nfor k,v in x.items():\n if isinstance(v,(str,int,float,bool)) or v is None: print(k, v)\nprint('submission_exists',os.path.isdir('/workspace/submission'))\nprint('submission_files',sorted(os.listdir('/workspace/submission')))\np='/workspace/research/publication-fb1405db77c9-installed-closure.json'\nx=json.load(open(p)); print('closure_keys',list(x)); print('file_count',len(x.get('all_package_file_sha256',{})))\nPY\"","aggregated_output":"","exit_code":null,"status":"in_progress"}}
|
| 12 |
+
{"type":"item.completed","item":{"id":"item_5","type":"command_execution","command":"/bin/sh -lc \"python - <<'PY'\nimport json,os\np='/workspace/research/published_state.json'\nx=json.load(open(p))\nprint('published_state_keys',list(x))\nfor k,v in x.items():\n if isinstance(v,(str,int,float,bool)) or v is None: print(k, v)\nprint('submission_exists',os.path.isdir('/workspace/submission'))\nprint('submission_files',sorted(os.listdir('/workspace/submission')))\np='/workspace/research/publication-fb1405db77c9-installed-closure.json'\nx=json.load(open(p)); print('closure_keys',list(x)); print('file_count',len(x.get('all_package_file_sha256',{})))\nPY\"","aggregated_output":"published_state_keys ['source', 'validation', 'weights_sha256', 'full_inference_validation_matches', 'validation_evidence', 'readonly_relocation_passed', 'relocation_evidence', 'verification_status', 'validation_scope', 'relocation_scope', 'verified_at', 'prepublication_verification', 'fresh_stage_replay_audit', 'source_joint_ancestry_verified', 'this_stage_allfive_update_common', 'contract_check_passed', 'contract_checked_during_atomic_publication']\nsource /workspace/research/experiments543/all_full/epoch-008\nweights_sha256 fb1405db77c975a547acc95ca50fd8113aa42134a9b52b167843e4fa442ee61e\nfull_inference_validation_matches True\nvalidation_evidence publication-fb1405db77c9-verified.json\nreadonly_relocation_passed True\nrelocation_evidence publication-fb1405db77c9-relocation.json\nverification_status complete\nrelocation_scope Direct uid1000 all-five readonly relocation with fresh IDs, shuffled rows and zeros.\nverified_at 2026-11-02T13:09:18.828123+00:00\nprepublication_verification True\nfresh_stage_replay_audit /workspace/research/activation-groups-full-review-all_full-replay-audit.json\nsource_joint_ancestry_verified True\nthis_stage_allfive_update_common True\ncontract_check_passed True\ncontract_checked_during_atomic_publication True\nsubmission_exists True\nsubmission_files ['MODEL_CARD.md', 'activation_groups_math.py', 'additive_hinge_features.py', 'additive_hinge_geometry.py', 'additive_hinge_kernel.py', 'alpha_features.py', 'candidate_temporal_basis_model.py', 'channel_attention_math.py', 'confidence_model.py', 'config.json', 'coupling_features.py', 'covariances.py', 'data.py', 'envelope_features.py', 'features.py', 'frequency_features.py', 'gradient_protection.py', 'infer.py', 'infer.sh', 'learned_filter_temporal_basis.py', 'legacy_model.py', 'local_channel_features.py', 'model.py', 'multitaper_covariance_features.py', 'multitaper_model.py', 'native_log_covariance_features.py', 'ordinal_features.py', 'partial_covariance_features.py', 'phase_features.py', 'requirements.txt', 'shared_activation_groups_parent_model.py', 'shared_additive_hinge_model.py', 'shared_dual_readout_model.py', 'shared_expert_routing_math.py', 'shared_expert_routing_model.py', 'shared_spectral_features.py', 'shared_spectral_filter_model.py', 'shared_temporal_basis_model.py', 'short_context_features.py', 'student_features.py', 'tangent_features.py', 'temporal_convolution_math.py', 'temporal_scale_math.py', 'training.json', 'weighted_ordinal_features.py', 'weighted_pattern_model.py', 'weights.pt']\nclosure_keys ['completed_at', 'source', 'weights_sha256', 'registration', 'registration_sha256', 'all_package_file_sha256', 'all_registered_proof_hashes_exact', 'direct_full5_readonly5_entire_stage_replay_and_contract_completed_before_publication', 'installed_scores']\nfile_count 47\n","exit_code":0,"status":"completed"}}
|
| 13 |
+
{"type":"item.started","item":{"id":"item_6","type":"command_execution","command":"/bin/sh -lc 'cat /workspace/contract.md'","aggregated_output":"","exit_code":null,"status":"in_progress"}}
|
| 14 |
+
{"type":"item.completed","item":{"id":"item_6","type":"command_execution","command":"/bin/sh -lc 'cat /workspace/contract.md'","aggregated_output":"# BCI five-track shared submission v2\n\nKeep one complete package under /workspace/submission, including infer.sh,\narchitecture configuration, code and weights. One trainable EEG backbone must\nserve all five tracks; input adapters and classification heads may be task-specific.\nThe backbone must be trained jointly on all five training splits. Initialization\nmay be random or from the task-provided audited checkpoint allowlist. Package\ncontents must not contain symlinks. The package must run after relocation.\n\nInvocation: bash infer.sh INPUT_DIR OUTPUT_DIR.\nINPUT_DIR/manifest.json contains schema=bci-input-v1, track, config, and samples.\nEach sample is {\"id\":\"opaque\",\"path\":\"shard-000000.npy\",\"index\":0}.\nNumPy shards have shape [N,C,S,200], in microvolts. Track C/S:\nfaced 32/10, tuev 16/5, ad65 19/10, openbmi 62/4, longitudinal 58/2.\nThe baseline scales input by 1/100. No labels, subjects or source filenames are\npart of test inputs. Support unseen IDs, arbitrary order and sample counts.\n\nWrite OUTPUT_DIR/predictions.jsonl, exactly one row per ID:\n{\"id\":\"opaque\",\"probabilities\":[0.2,0.8]}.\nClass counts: 9/6/3/2/2 respectively. Values must be finite in [0,1],\nsum to 1 within 1e-5, and use the documented class order. Missing, duplicate,\nunknown IDs or invalid probabilities invalidate that track (reward 0).\n\nRuntime: PyTorch 2.8.0, dependencies in requirements.txt, one GPU, 64 GiB RAM,\ntwo hours maximum per track, no network, unprivileged user, package/input\nread-only and output writable. Inference cannot use labels, external caches or\nworkspace files. No training/adaptation on evaluation batches.\n\nEach track is independently scored in [0,1]; no scalar aggregate.\nFACED/TUEV: balanced accuracy, with weighted F1 and Cohen kappa.\nAD: arithmetic mean of window probabilities per subject, then subject-level\nbalanced accuracy (window metrics additionally reported).\nOpenBMI: mean of subject-level balanced accuracies over all each subject's trials.\nLongitudinal: balanced accuracy per subject/session, mean across sessions within\nsubject, then mean across subjects. Infrastructure failures produce no reward.\n","exit_code":0,"status":"completed"}}
|
| 15 |
+
{"type":"item.started","item":{"id":"item_7","type":"command_execution","command":"/bin/sh -lc \"python - <<'PY'\nimport json,pathlib,hashlib\nr=pathlib.Path('/workspace/submission')\nfor n in ['infer.sh','requirements.txt']:\n print(n); print((r/n).read_text())\nx=json.loads((r/'config.json').read_text()); print('config_keys',list(x)); print('model_card', (r/'MODEL_CARD.md').read_text()[:5500])\np=pathlib.Path('/workspace/research/publication-fb1405db77c9-installed-closure.json')\nprint('closure_sha256',hashlib.sha256(p.read_bytes()).hexdigest())\nx=json.loads(p.read_text()); print('scores',x.get('installed_scores')); print('source',x.get('source')); print('recorded_pass',x.get('direct_full5_readonly5_entire_stage_replay_and_contract_completed_before_publication'))\nPY\"","aggregated_output":"","exit_code":null,"status":"in_progress"}}
|
| 16 |
+
{"type":"item.completed","item":{"id":"item_7","type":"command_execution","command":"/bin/sh -lc \"python - <<'PY'\nimport json,pathlib,hashlib\nr=pathlib.Path('/workspace/submission')\nfor n in ['infer.sh','requirements.txt']:\n print(n); print((r/n).read_text())\nx=json.loads((r/'config.json').read_text()); print('config_keys',list(x)); print('model_card', (r/'MODEL_CARD.md').read_text()[:5500])\np=pathlib.Path('/workspace/research/publication-fb1405db77c9-installed-closure.json')\nprint('closure_sha256',hashlib.sha256(p.read_bytes()).hexdigest())\nx=json.loads(p.read_text()); print('scores',x.get('installed_scores')); print('source',x.get('source')); print('recorded_pass',x.get('direct_full5_readonly5_entire_stage_replay_and_contract_completed_before_publication'))\nPY\"","aggregated_output":"infer.sh\n#!/usr/bin/env bash\nset -euo pipefail\nexec python \"$(dirname -- \"$0\")/infer.py\" \"$1\" \"$2\"\n\nrequirements.txt\nnumpy\nscipy\ntorch==2.8.0\nbraindecode==1.8.1\n\nconfig_keys ['schema', 'architecture', 'initialization', 'loader_scale', 'tracks', 'head_arithmetic', 'head_refinement', 'clinical_spectral_refinement', 'head_estimation', 'clinical_asymmetry_refinement', 'alpha_rhythm_adapter', 'clinical_envelope_refinement', 'independent_adapter_merge', 'frequency_montage_refinement', 'private_track_selection', 'clinical_sampling_refinement', 'temporal_statistics_readout', 'temporal_evidence_readout', 'fourier_basis_readout', 'shared_tangent_readout', 'shared_context_correction', 'shared_wave_coactivation', 'fixed_common_coactivation_readouts', 'shared_ordinal_context', 'shared_complex_coherence', 'shared_cross_frequency', 'inherited_private_readout_refresh', 'shared_student_residual', 'private_head_refresh', 'shared_student_extension_residual', 'fixed_common_embedding_readouts', 'shared_center_context_residual', 'private_input_head_refresh', 'shared_short_context_residual', 'shared_dual_context_residual', 'shared_geometry_residual', 'fixed_common_geometry_input_readouts', 'shared_emotion_residual', 'shared_refinement_residual', 'fixed_common_refinement_input_readouts', 'shared_spatial_residual', 'fixed_common_spatial_input_readouts', 'shared_conditional_residual', 'continued_shared_model', 'fixed_common_private_selection', 'frozen_confidence_modulation', 'private_confidence_gate_selection', 'shared_multitaper_refinement', 'shared_weighted_pattern_refinement', 'shared_spectral_filter_refinement', 'shared_expert_routing_refinement', 'shared_additive_hinge_refinement', 'shared_dual_readout_refinement', 'shared_temporal_basis_refinement', 'shared_temporal_scale_refinement', 'shared_activation_groups_refinement']\nmodel_card # Shared EEG decoder\n\nThis package contains one coupled backbone used by all five tracks, with private input adapters and classifiers. Every trainable common component was trained with all five training splits. It is a single model; inference performs no parameter updates or dataset-level fitting.\n\nThe common backbone combines waveform convolutions, an audited pretrained BIOT feature path, covariance and log-correlation encoders, and shared feature corrections. The waveform coactivation extension encodes 64 within-window log variances and 2,016 correlations between common waveform channels. A matched experimental control removes the correlation inputs. `config.json` identifies the packaged variant and its five fixed correction gains. All original backbone parameters are fixed during this extension's joint training.\n\nWeights originate only from the supplied training data and audited initialization checkpoints. Training details, parent provenance, raw/cache checks, shared-gradient checks and the five separate validation metrics are recorded in `training.json`. Validation selects checkpoints and fixed gains; it does not fit normalization or update parameters. Reported validation results belong to selected checkpoints, not to private test evaluation or five-seed means.\n\nRun `bash infer.sh INPUT_DIR OUTPUT_DIR`. The input manifest specifies a track and opaque sample IDs, shard paths and indices. Signals are in microvolts and are scaled by 1/100. The package writes one probability vector per input ID to `OUTPUT_DIR/predictions.jsonl`. It needs only the packaged files and the contract's installed Python dependencies, works after relocation, and does not need labels, subject IDs, training caches or network access.\n\nFACED and TUEV use window balanced accuracy. AD65 uses mean window probabilities per patient before balanced accuracy. OpenBMI averages within-subject balanced accuracy. Longitudinal averages within-session balanced accuracy within each subject, then over subjects. These five metrics remain separate.\n\nThis checkpoint adds fixed within-window ordinal pattern probabilities, permutation entropy and statistical complexity at five delays. Training-only normalization and five input projections feed one common correction MLP trained by all five tracks. The common correction enters the existing covariance and fusion representations; fixed per-track gains select its strength. All earlier model tensors remain unchanged.\n\nFixed real and imaginary spectral coherence between the inherited 24 spatial filters is normalized using training windows only and encoded by one new common network. Five private linear heads add class evidence. All five training splits update the new common encoder; all earlier model tensors remain unchanged.\n\nFixed per-window relative band powers, envelope variability, envelope correlations and phase-amplitude coupling feed training-normalized private input projections and one new shared encoder. Five linear heads add class evidence. All five training splits update the new common encoder; all prior model tensors remain unchanged. AD65 updates use all windows from six class-balanced training patients; objective: mean-probability.\n\nThe inherited OpenBMI phase-classifier projection was refreshed from a separately validated private-readout fit. Every common tensor and input adapter of this jointly trained model is unchanged. Exact ancestor checks confirm that all common tensors used by this inherited readout are identical; the new cross-frequency correction remains disabled for OpenBMI. No shared checkpoints or predictions are ensembled.\n\nA common CBraMod feature encoder, itself jointly trained on all five training splits, supplies its shared summary and tokens pooled into four ordered time bins. Its classifiers are discarded. A new common feature MLP and five zero-initialized private linear projections learn residual class evidence jointly on all five training splits. Training may randomly remove the earlier decoder logits for half of training groups, using one mask per AD patient and one per other window; labels and teacher targets remain unchanged. Validation and inference always retain the complete earlier decoder. The same new class projection also receives an auxiliary standalone classification loss when configured, with the same patient-pooled AD objective; this adds no inference module. The complete earlier decoder and feature extractor remain tensor-identical; selecting zero residual gain preserves its predictions exactly. The summary-only control masks the 8192 ordered features after training-fitted per-feature normalization. One feature backbone and one classifier per track run at inference, with no prediction ensemble or external runtime cache.\n\nThe five outer private student-feature class projections are refined on all five training splits while every common/input/prior-head tensor remains exactly fixed. AD uses the exact patient-mean probability objective. Private checkpoints may be selected independently only because the common representation is identical; all five metrics are evaluated for every exported package.\n\nThe longitudinal private outer projection is selected from another training-only readout fit using exactly the same common/input/prior-head tensors. All other private heads are retained. Exact equality of every common tensor and executable runtime is audited; this package has one common checkpoint and one head per track.\n\nThe complete stronger parent is retained, \nclosure_sha256 3f70e7cb494d2d93fa03460c2dea5de85d2d47c141948aba1db7a690e4a431db\nscores {'faced': 0.5382716049382716, 'tuev': 0.7073115703982028, 'ad65': 0.8380952380952381, 'openbmi': 0.823409090909091, 'longitudinal': 0.855189948192487}\nsource /workspace/research/experiments543/all_full/epoch-008\nrecorded_pass True\n","exit_code":0,"status":"completed"}}
|
| 17 |
+
{"type":"item.completed","item":{"id":"item_8","type":"agent_message","text":"The existing records confirm experiment 543 passed replay, relocation, and all five inference checks. I’m republishing that exact package atomically and checking its files against the recorded hashes.\n"}}
|
| 18 |
+
{"type":"item.started","item":{"id":"item_9","type":"command_execution","command":"/bin/sh -lc \"mkdir -p /workspace/finalization\ncat > /workspace/finalization/finalize_submission.py <<'PY'\nimport ast\nimport ctypes\nimport datetime\nimport hashlib\nimport json\nimport os\nfrom pathlib import Path\nimport shutil\nimport subprocess\n\nroot = Path('/workspace/finalization')\nclosure_path = Path('/workspace/research/publication-fb1405db77c9-installed-closure.json')\nclosure_bytes = closure_path.read_bytes()\nclosure_hash = hashlib.sha256(closure_bytes).hexdigest()\nassert closure_hash == '3f70e7cb494d2d93fa03460c2dea5de85d2d47c141948aba1db7a690e4a431db'\nclosure = json.loads(closure_bytes)\nexpected = closure['all_package_file_sha256']\nassert len(expected) == 47\nsource = Path(closure['source'])\nassert source == Path('/workspace/research/experiments543/all_full/epoch-008')\nassert closure['direct_full5_readonly5_entire_stage_replay_and_contract_completed_before_publication'] is True\nstate = json.loads(Path('/workspace/research/published_state.json').read_text())\nassert state['source'] == str(source)\nassert state['weights_sha256'] == closure['weights_sha256']\nassert state['verification_status'] == 'complete'\nsubmission = Path('/workspace/submission')\nassert submission.is_dir() and not submission.is_symlink()\nstamp = datetime.datetime.now(datetime.timezone.utc).strftime('%Y%m%dT%H%M%SZ')\nstage = root / ('package543-' + stamp)\nassert not stage.exists()\n\nlibc = ctypes.CDLL(None, use_errno=True)\nexchange = libc.renameat2\nexchange.argtypes = [ctypes.c_int, ctypes.c_char_p, ctypes.c_int, ctypes.c_char_p, ctypes.c_uint]\nexchange.restype = ctypes.c_int\nassert root.stat().st_dev == submission.parent.stat().st_dev\n\ndef audit_files(folder):\n actual = {}\n for path in sorted(folder.rglob('*')):\n assert not path.is_symlink(), str(path)\n if path.is_dir():\n continue\n assert path.is_file(), str(path)\n name = path.relative_to(folder).as_posix()\n h = hashlib.sha256()\n with path.open('rb') as stream:\n for chunk in iter(lambda: stream.read(8 * 1024 * 1024), b''):\n h.update(chunk)\n actual[name] = h.hexdigest()\n assert set(actual) == set(expected), (set(actual) - set(expected), set(expected) - set(actual))\n assert actual == expected, [name for name in actual if actual[name] \"'!= expected[name]]\n return actual\n\nshutil.copytree(source, stage, symlinks=True)\naudit_files(stage)\nfor path in stage.glob('\"'*.py'):\n ast.parse(path.read_text(), filename=path.name)\nfor path in stage.glob('*.json'):\n json.loads(path.read_text())\nsubprocess.run(['bash', '-n', str(stage / 'infer.sh')], check=True)\nassert (stage / 'weights.pt').stat().st_size > 0\nassert expected['weights.pt'] == 'fb1405db77c975a547acc95ca50fd8113aa42134a9b52b167843e4fa442ee61e'\nfor path in stage.rglob('*'):\n if path.is_file():\n assert path.stat().st_mode & 0o004, 'File must be readable by inference user: ' + str(path)\nassert stage.stat().st_mode & 0o005 == 0o005\nprint('Staged package matches all 47 recorded file hashes; static syntax and permissions pass.', flush=True)\nif exchange(-100, os.fsencode(stage), -100, os.fsencode(submission), 2) \"'!= 0:\n error = ctypes.get_errno()\n raise OSError(error, os.strerror(error))\ninstalled = audit_files(submission)\nreceipt = {\n '\"'completed_at': datetime.datetime.now(datetime.timezone.utc).isoformat(),\n 'submission': str(submission),\n 'selected_existing_source': str(source),\n 'weights_sha256': closure['weights_sha256'],\n 'existing_proof_closure': str(closure_path),\n 'existing_proof_closure_sha256': closure_hash,\n 'selection_validation_scores_from_existing_records': closure['installed_scores'],\n 'atomic_publication': 'renameat2 RENAME_EXCHANGE',\n 'all_47_installed_package_hashes_match_existing_proof': True,\n 'all_package_file_sha256': installed,\n 'finalization_checks': ['file inventory and no symlinks', 'SHA256 hashes', 'Python AST syntax', 'JSON syntax', 'bash -n syntax', 'unprivileged read permissions'],\n 'new_training_inference_evaluation_or_experiments': False,\n 'previous_submission_backup': str(stage),\n}\nreceipt_path = root / 'submission-finalization.json'\nreceipt_path.write_text(json.dumps(receipt, indent=2) + '\\\\n')\nprint('Published /workspace/submission atomically; all 47 installed hashes match.')\nprint('Finalization receipt: ' + str(receipt_path))\nprint('Weights SHA256: ' + closure['weights_sha256'])\nPY\npython /workspace/finalization/finalize_submission.py\"","aggregated_output":"","exit_code":null,"status":"in_progress"}}
|
| 19 |
+
{"type":"item.completed","item":{"id":"item_9","type":"command_execution","command":"/bin/sh -lc \"mkdir -p /workspace/finalization\ncat > /workspace/finalization/finalize_submission.py <<'PY'\nimport ast\nimport ctypes\nimport datetime\nimport hashlib\nimport json\nimport os\nfrom pathlib import Path\nimport shutil\nimport subprocess\n\nroot = Path('/workspace/finalization')\nclosure_path = Path('/workspace/research/publication-fb1405db77c9-installed-closure.json')\nclosure_bytes = closure_path.read_bytes()\nclosure_hash = hashlib.sha256(closure_bytes).hexdigest()\nassert closure_hash == '3f70e7cb494d2d93fa03460c2dea5de85d2d47c141948aba1db7a690e4a431db'\nclosure = json.loads(closure_bytes)\nexpected = closure['all_package_file_sha256']\nassert len(expected) == 47\nsource = Path(closure['source'])\nassert source == Path('/workspace/research/experiments543/all_full/epoch-008')\nassert closure['direct_full5_readonly5_entire_stage_replay_and_contract_completed_before_publication'] is True\nstate = json.loads(Path('/workspace/research/published_state.json').read_text())\nassert state['source'] == str(source)\nassert state['weights_sha256'] == closure['weights_sha256']\nassert state['verification_status'] == 'complete'\nsubmission = Path('/workspace/submission')\nassert submission.is_dir() and not submission.is_symlink()\nstamp = datetime.datetime.now(datetime.timezone.utc).strftime('%Y%m%dT%H%M%SZ')\nstage = root / ('package543-' + stamp)\nassert not stage.exists()\n\nlibc = ctypes.CDLL(None, use_errno=True)\nexchange = libc.renameat2\nexchange.argtypes = [ctypes.c_int, ctypes.c_char_p, ctypes.c_int, ctypes.c_char_p, ctypes.c_uint]\nexchange.restype = ctypes.c_int\nassert root.stat().st_dev == submission.parent.stat().st_dev\n\ndef audit_files(folder):\n actual = {}\n for path in sorted(folder.rglob('*')):\n assert not path.is_symlink(), str(path)\n if path.is_dir():\n continue\n assert path.is_file(), str(path)\n name = path.relative_to(folder).as_posix()\n h = hashlib.sha256()\n with path.open('rb') as stream:\n for chunk in iter(lambda: stream.read(8 * 1024 * 1024), b''):\n h.update(chunk)\n actual[name] = h.hexdigest()\n assert set(actual) == set(expected), (set(actual) - set(expected), set(expected) - set(actual))\n assert actual == expected, [name for name in actual if actual[name] \"'!= expected[name]]\n return actual\n\nshutil.copytree(source, stage, symlinks=True)\naudit_files(stage)\nfor path in stage.glob('\"'*.py'):\n ast.parse(path.read_text(), filename=path.name)\nfor path in stage.glob('*.json'):\n json.loads(path.read_text())\nsubprocess.run(['bash', '-n', str(stage / 'infer.sh')], check=True)\nassert (stage / 'weights.pt').stat().st_size > 0\nassert expected['weights.pt'] == 'fb1405db77c975a547acc95ca50fd8113aa42134a9b52b167843e4fa442ee61e'\nfor path in stage.rglob('*'):\n if path.is_file():\n assert path.stat().st_mode & 0o004, 'File must be readable by inference user: ' + str(path)\nassert stage.stat().st_mode & 0o005 == 0o005\nprint('Staged package matches all 47 recorded file hashes; static syntax and permissions pass.', flush=True)\nif exchange(-100, os.fsencode(stage), -100, os.fsencode(submission), 2) \"'!= 0:\n error = ctypes.get_errno()\n raise OSError(error, os.strerror(error))\ninstalled = audit_files(submission)\nreceipt = {\n '\"'completed_at': datetime.datetime.now(datetime.timezone.utc).isoformat(),\n 'submission': str(submission),\n 'selected_existing_source': str(source),\n 'weights_sha256': closure['weights_sha256'],\n 'existing_proof_closure': str(closure_path),\n 'existing_proof_closure_sha256': closure_hash,\n 'selection_validation_scores_from_existing_records': closure['installed_scores'],\n 'atomic_publication': 'renameat2 RENAME_EXCHANGE',\n 'all_47_installed_package_hashes_match_existing_proof': True,\n 'all_package_file_sha256': installed,\n 'finalization_checks': ['file inventory and no symlinks', 'SHA256 hashes', 'Python AST syntax', 'JSON syntax', 'bash -n syntax', 'unprivileged read permissions'],\n 'new_training_inference_evaluation_or_experiments': False,\n 'previous_submission_backup': str(stage),\n}\nreceipt_path = root / 'submission-finalization.json'\nreceipt_path.write_text(json.dumps(receipt, indent=2) + '\\\\n')\nprint('Published /workspace/submission atomically; all 47 installed hashes match.')\nprint('Finalization receipt: ' + str(receipt_path))\nprint('Weights SHA256: ' + closure['weights_sha256'])\nPY\npython /workspace/finalization/finalize_submission.py\"","aggregated_output":"Staged package matches all 47 recorded file hashes; static syntax and permissions pass.\nTraceback (most recent call last):\n File \"/workspace/finalization/finalize_submission.py\", line 71, in <module>\n raise OSError(error, os.strerror(error))\nOSError: [Errno 18] Invalid cross-device link\n","exit_code":1,"status":"failed"}}
|
| 20 |
+
{"type":"item.started","item":{"id":"item_10","type":"command_execution","command":"/bin/sh -lc 'cat /workspace/baseline/braindecode/publish.py'","aggregated_output":"","exit_code":null,"status":"in_progress"}}
|
| 21 |
+
{"type":"item.completed","item":{"id":"item_10","type":"command_execution","command":"/bin/sh -lc 'cat /workspace/baseline/braindecode/publish.py'","aggregated_output":"#!/usr/bin/env python3\n\"\"\"Publish a package directory to /workspace/submission atomically.\n\n python /workspace/baseline/braindecode/publish.py SRC [--check]\n\nThe verifier may read /workspace/submission at any moment, so the package must never be half\nwritten. This copies SRC (a version symlink written by train_shared.py is resolved) into a\nstaging directory next to the target, optionally runs its infer.sh on a slice of every\nvalidation split and checks the predictions with the verifier's reader, then swaps it in.\n\"\"\"\nimport argparse\nimport errno\nimport json\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\nfrom pathlib import Path\n\nimport numpy as np\n\nsys.path.insert(0, str(Path(__file__).resolve().parents[2] / 'evaluation'))\nfrom bci_score import CLASSES, read_predictions # noqa: E402\n\nEXCLUDE = shutil.ignore_patterns('__pycache__', '*.pyc', 'resume*', 'optimizer*.pt')\n\n\ndef swap_into(staged, final):\n old = final.with_name(f'.{final.name}.old-{os.getpid()}')\n if final.exists() or final.is_symlink():\n try:\n os.replace(final, old)\n except OSError as error:\n # A directory from a lower image layer cannot be renamed on overlayfs (EXDEV).\n if error.errno != errno.EXDEV:\n raise\n shutil.copytree(final, old, symlinks=True)\n shutil.rmtree(final)\n os.replace(staged, final)\n if old.is_symlink() or old.is_file():\n old.unlink()\n else:\n shutil.rmtree(old, ignore_errors=True)\n\n\ndef check(staged, data, samples):\n for track, classes in CLASSES.items():\n split = data / track / 'val'\n manifest = json.loads((split / 'manifest.json').read_text())\n rows = manifest['samples'][:samples]\n with tempfile.TemporaryDirectory() as work:\n inp, out = Path(work) / 'input', Path(work) / 'output'\n inp.mkdir()\n out.mkdir()\n # One fresh shard with the sampled windows, as the verifier stages copied inputs.\n arrays = {}\n for r in rows:\n if r['path'] not in arrays:\n arrays[r['path']] = np.load(split / r['path'], mmap_mode='r')\n np.save(inp / 'shard-000000.npy', np.stack([arrays[r['path']][r['index']] for r in rows]))\n public = [{'id': r['id'], 'path': 'shard-000000.npy', 'index': i} for i, r in enumerate(rows)]\n (inp / 'manifest.json').write_text(json.dumps({**manifest, 'samples': public}))\n subprocess.run(['bash', str(staged / 'infer.sh'), str(inp), str(out)], check=True)\n read_predictions(out / 'predictions.jsonl', rows, classes)\n print(f'{track}: {len(rows)} validation predictions follow contract.md', flush=True)\n\n\ndef main():\n parser = argparse.ArgumentParser(description=__doc__.split('\\n\\n')[0])\n parser.add_argument('source', type=Path)\n parser.add_argument('--output', type=Path, default=Path('/workspace/submission'))\n parser.add_argument('--data', type=Path, default=Path('/workspace/data'))\n parser.add_argument('--check', action='store_true',\n help='run infer.sh on a slice of every validation split before publishing')\n parser.add_argument('--check-samples', type=int, default=256)\n args = parser.parse_args()\n source, final = args.source.resolve(), args.output.absolute()\n if not (source / 'infer.sh').is_file():\n sys.exit(f'{source} has no infer.sh')\n if any(p.is_symlink() for p in source.rglob('*')):\n sys.exit('package contents must not contain symlinks (contract.md)')\n staged = Path(tempfile.mkdtemp(prefix=f'.{final.name}.staging-', dir=final.parent))\n os.chmod(staged, 0o755)\n try:\n shutil.copytree(source, staged, ignore=EXCLUDE, dirs_exist_ok=True)\n if args.check:\n check(staged, args.data, args.check_samples)\n swap_into(staged, final)\n except BaseException:\n shutil.rmtree(staged, ignore_errors=True)\n raise\n print(f'published {source} -> {final}')\n\n\nif __name__ == '__main__':\n main()\n","exit_code":0,"status":"completed"}}
|
| 22 |
+
{"type":"item.started","item":{"id":"item_11","type":"command_execution","command":"/bin/sh -lc \"python - <<'PY'\nfrom pathlib import Path\nimport os\nfor name in ['/workspace','/workspace/submission','/workspace/finalization']:\n p=Path(name); print(name,'real',p.resolve(),'device',p.stat().st_dev,'mount',os.path.ismount(p))\nprint('stages',list(Path('/workspace/finalization').glob('package543-*')))\nPY\"","aggregated_output":"","exit_code":null,"status":"in_progress"}}
|
| 23 |
+
{"type":"item.completed","item":{"id":"item_11","type":"command_execution","command":"/bin/sh -lc \"python - <<'PY'\nfrom pathlib import Path\nimport os\nfor name in ['/workspace','/workspace/submission','/workspace/finalization']:\n p=Path(name); print(name,'real',p.resolve(),'device',p.stat().st_dev,'mount',os.path.ismount(p))\nprint('stages',list(Path('/workspace/finalization').glob('package543-*')))\nPY\"","aggregated_output":"/workspace real /workspace device 76 mount False\n/workspace/submission real /workspace/submission device 76 mount False\n/workspace/finalization real /workspace/finalization device 76 mount False\nstages [PosixPath('/workspace/finalization/package543-20261102T214013Z')]\n","exit_code":0,"status":"completed"}}
|
| 24 |
+
{"type":"item.started","item":{"id":"item_12","type":"command_execution","command":"/bin/sh -lc \"python - <<'PY'\nimport ast, datetime, hashlib, json, os, subprocess\nfrom pathlib import Path\nroot=Path('/workspace/finalization')\nproof=Path('/workspace/research/publication-fb1405db77c9-installed-closure.json')\nproof_hash=hashlib.sha256(proof.read_bytes()).hexdigest()\nassert proof_hash=='3f70e7cb494d2d93fa03460c2dea5de85d2d47c141948aba1db7a690e4a431db'\nclosure=json.loads(proof.read_text())\nexpected=closure['all_package_file_sha256']\npackage=Path('/workspace/submission')\nassert package.is_dir() and not package.is_symlink()\nactual={}\nfor path in sorted(package.rglob('*')):\n assert not path.is_symlink(), str(path)\n if path.is_dir():\n assert path.stat().st_mode & 0o005 == 0o005\n continue\n assert path.is_file() and path.stat().st_mode & 0o004\n h=hashlib.sha256()\n with path.open('rb') as stream:\n for chunk in iter(lambda: stream.read(8*1024*1024),b''): h.update(chunk)\n actual[path.relative_to(package).as_posix()]=h.hexdigest()\nassert actual==expected\nassert len(actual)==47\nassert package.stat().st_mode & 0o005 == 0o005\nfor path in package.glob('*.py'): ast.parse(path.read_text(),filename=path.name)\nfor path in package.glob('*.json'): json.loads(path.read_text())\nsubprocess.run(['bash','-n',str(package/'infer.sh')],check=True)\nreceipt={\n 'completed_at':datetime.datetime.now(datetime.timezone.utc).isoformat(),\n 'submission':str(package),\n 'selected_existing_source':closure['source'],\n 'weights_sha256':closure['weights_sha256'],\n 'existing_proof_closure':str(proof),\n 'existing_proof_closure_sha256':proof_hash,\n 'publication_action':'Retained the already published complete package, byte-identical to the selected proof-closed source.',\n 'existing_atomic_publication_and_all_checks_recorded_before_finalization':closure['direct_full5_readonly5_entire_stage_replay_and_contract_completed_before_publication'],\n 'staging_note':'A fresh copy matched all 47 archived hashes. Atomic exchange returned EXDEV on the image-layer submission directory, leaving the already published submission unchanged. Static verification confirmed the installed package is exactly the selected candidate.',\n 'all_47_installed_package_hashes_match_existing_proof':True,\n 'all_package_file_sha256':actual,\n 'selection_validation_scores_from_existing_records':closure['installed_scores'],\n 'finalization_checks':['file inventory','no symlinks','SHA256 hashes','Python AST syntax','JSON syntax','bash -n syntax','unprivileged read permissions'],\n 'new_training_inference_evaluation_or_experiments':False,\n}\np=root/'submission-finalization.json'\np.write_text(json.dumps(receipt,indent=2)+'\\\\n')\nprint('FINALIZED /workspace/submission: all 47 package files match the existing verified experiment 543 package.')\nprint('Weights SHA256:',closure['weights_sha256'])\nprint('Receipt:',p)\nprint('No training, inference, evaluation, simulation, or experiment was run during finalization.')\nPY\"","aggregated_output":"","exit_code":null,"status":"in_progress"}}
|
| 25 |
+
{"type":"item.completed","item":{"id":"item_12","type":"command_execution","command":"/bin/sh -lc \"python - <<'PY'\nimport ast, datetime, hashlib, json, os, subprocess\nfrom pathlib import Path\nroot=Path('/workspace/finalization')\nproof=Path('/workspace/research/publication-fb1405db77c9-installed-closure.json')\nproof_hash=hashlib.sha256(proof.read_bytes()).hexdigest()\nassert proof_hash=='3f70e7cb494d2d93fa03460c2dea5de85d2d47c141948aba1db7a690e4a431db'\nclosure=json.loads(proof.read_text())\nexpected=closure['all_package_file_sha256']\npackage=Path('/workspace/submission')\nassert package.is_dir() and not package.is_symlink()\nactual={}\nfor path in sorted(package.rglob('*')):\n assert not path.is_symlink(), str(path)\n if path.is_dir():\n assert path.stat().st_mode & 0o005 == 0o005\n continue\n assert path.is_file() and path.stat().st_mode & 0o004\n h=hashlib.sha256()\n with path.open('rb') as stream:\n for chunk in iter(lambda: stream.read(8*1024*1024),b''): h.update(chunk)\n actual[path.relative_to(package).as_posix()]=h.hexdigest()\nassert actual==expected\nassert len(actual)==47\nassert package.stat().st_mode & 0o005 == 0o005\nfor path in package.glob('*.py'): ast.parse(path.read_text(),filename=path.name)\nfor path in package.glob('*.json'): json.loads(path.read_text())\nsubprocess.run(['bash','-n',str(package/'infer.sh')],check=True)\nreceipt={\n 'completed_at':datetime.datetime.now(datetime.timezone.utc).isoformat(),\n 'submission':str(package),\n 'selected_existing_source':closure['source'],\n 'weights_sha256':closure['weights_sha256'],\n 'existing_proof_closure':str(proof),\n 'existing_proof_closure_sha256':proof_hash,\n 'publication_action':'Retained the already published complete package, byte-identical to the selected proof-closed source.',\n 'existing_atomic_publication_and_all_checks_recorded_before_finalization':closure['direct_full5_readonly5_entire_stage_replay_and_contract_completed_before_publication'],\n 'staging_note':'A fresh copy matched all 47 archived hashes. Atomic exchange returned EXDEV on the image-layer submission directory, leaving the already published submission unchanged. Static verification confirmed the installed package is exactly the selected candidate.',\n 'all_47_installed_package_hashes_match_existing_proof':True,\n 'all_package_file_sha256':actual,\n 'selection_validation_scores_from_existing_records':closure['installed_scores'],\n 'finalization_checks':['file inventory','no symlinks','SHA256 hashes','Python AST syntax','JSON syntax','bash -n syntax','unprivileged read permissions'],\n 'new_training_inference_evaluation_or_experiments':False,\n}\np=root/'submission-finalization.json'\np.write_text(json.dumps(receipt,indent=2)+'\\\\n')\nprint('FINALIZED /workspace/submission: all 47 package files match the existing verified experiment 543 package.')\nprint('Weights SHA256:',closure['weights_sha256'])\nprint('Receipt:',p)\nprint('No training, inference, evaluation, simulation, or experiment was run during finalization.')\nPY\"","aggregated_output":"FINALIZED /workspace/submission: all 47 package files match the existing verified experiment 543 package.\nWeights SHA256: fb1405db77c975a547acc95ca50fd8113aa42134a9b52b167843e4fa442ee61e\nReceipt: /workspace/finalization/submission-finalization.json\nNo training, inference, evaluation, simulation, or experiment was run during finalization.\n","exit_code":0,"status":"completed"}}
|
| 26 |
+
{"type":"item.completed","item":{"id":"item_13","type":"agent_message","text":"Finalized the already-published experiment 543 package at `/workspace/submission`, the strongest verified candidate.\n\nAll 47 files match the recorded hashes. No new training, inference, or experiments were run. Research is stopped."}}
|
| 27 |
+
{"type":"turn.completed","usage":{"input_tokens":1039456515,"cached_input_tokens":1015327241,"cache_write_input_tokens":23391964,"output_tokens":8009513,"reasoning_output_tokens":3699926}}
|
tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a/index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|