HackRare 2026 — Session Summary
Date: 2026-03-01 Repo: https://github.com/sainikkam/hackrare-2026
Changes Made This Session
1. Magnitude-Aware Cosine Scoring (src/scoring/scorer.py)
Replaced arithmetic mean (c1+c2+c3)/3 with principled vector projection:
s(a, b) = clamp((a·b) / (b·b), 0, 1) where b = [1, 1, 1]
Mathematically equivalent for equal weights, but extensible to disease-specific
reference vectors. Adds scoring_method: magnitude_aware_cosine to all output.
2. Clinical-Authoritative BBB Gate (src/gates/bbb_gate.py)
- Threshold raised from
> 0.5→>= 0.8 - When experimental CNS score ≥ 0.80: use directly (skip physicochemical composite)
- Positive controls all pass: everolimus=0.90, sirolimus=0.85, selumetinib=0.88, trametinib=0.82
- Negative controls correctly excluded: imatinib=0.250, imiglucerase=0.300
3. scoring_method propagated to tree output (src/scoring/tree_builder.py)
Field visible in Streamlit UI and output JSON.
4. Config updates (config/tsc.yaml, config/nf1.yaml)
bbb_gate_threshold: 0.8, scoring_method: magnitude_aware_cosine added as metadata.
Pipelines Run
TSC (Tuberous Sclerosis Complex) — PASS ✓
- 46 candidates → 9 BBB → 5 safety → 5 scored
- Top-2: everolimus (0.416), sirolimus (0.416)
- Validation: PASS
NF1 (Neurofibromatosis Type 1) — PASS ✓
- 12 candidates → 5 BBB → 4 safety → 4 scored
- Top-2: selumetinib (0.472), trametinib (0.472)
- Validation: PASS
SYNGAP1-Related Disorders (new config)
- 51 candidates → 12 BBB → 7 safety → 7 scored
- Top-3: ketamine (0.290), risperidone (0.273), selumetinib (0.271)
- Validation: FAIL (scores below 0.4 threshold — expected for single-gene ultra-orphan)
- Key insight: selumetinib/everolimus appear as expected from RAS/mTOR biology; ketamine is mechanistically relevant (SYNGAP1 is downstream of NMDAR)
Angelman Syndrome (new config)
- 34 candidates → 8 BBB → 4 safety → 4 scored
- Top-4: ketamine (0.311), risperidone (0.280), everolimus (0.225), sirolimus (0.225)
- Validation: FAIL (positive controls minocycline/topiramate lack UBE3A MOA in ChEMBL — correctly not surfaced; symptomatic vs. mechanistic distinction is a feature)
- Key insight: only 4 drugs scored because UBE3A is an E3 ligase, not a classical drug target
Commits (all on main)
| Hash | Description |
|---|---|
808c77d |
Magnitude-aware cosine scoring + clinical-authoritative BBB gate |
1217bf4 |
Angelman Syndrome pipeline config and results |
e6d905a |
ML model design and validation plan |
Files Added / Modified
| File | Change |
|---|---|
src/gates/bbb_gate.py |
Threshold 0.8, clinical-authoritative branch |
src/scoring/scorer.py |
_magnitude_aware_cosine(), new final_score computation |
src/scoring/tree_builder.py |
scoring_method field in tree output |
config/tsc.yaml |
Updated metadata |
config/nf1.yaml |
Updated metadata |
config/syngap1.yaml |
New |
config/angelman.yaml |
New |
data/tree_*.json (3 files) |
Updated/new pipeline outputs |
ml_repurposing_model_plan.md |
ML extension design + validation plan |
Algorithm Generalizability
The pipeline is disease-agnostic. Any rare disease with:
- ≥1 known causal gene
- An OMIM ID
- OpenTargets searchable name
...can be run by creating a new config/<disease>.yaml. No code changes needed.
Diseases ready to run next:
- Dravet Syndrome (SCN1A/SCN2A) — sodium channel; fenfluramine approved
- CDKL5 Deficiency (CDKL5) — kinase; mTOR/MAPK overlap with SYNGAP1
- PTEN Hamartoma (PTEN) — mTOR hyperactivation; everolimus motivated
- Phelan-McDermid (SHANK3) — mGluR/mTOR; already a layer2 in angelman.yaml
Log in or sign up for Devpost to join the conversation.