vgoradia commited on
Commit
2c53bd2
·
verified ·
1 Parent(s): 69c5101

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +99 -0
README.md CHANGED
@@ -1,3 +1,102 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ tags:
4
+ - plasma-physics
5
+ - fusion-energy
6
+ - disruption-prediction
7
+ - transformer
8
+ - time-series
9
+ language:
10
+ - en
11
  ---
12
+
13
+ # SHARD: Signal Harmonics for Anomaly and Reactor Disruption
14
+
15
+ **SHARD** is a Transformer-based deep learning model for predicting plasma disruptions in tokamak fusion reactors. It was developed by Veer Goradia and submitted to the Regeneron Science Talent Search 2027.
16
+
17
+ ## Model Description
18
+
19
+ Plasma disruptions — sudden losses of plasma confinement — are the single greatest threat to sustained fusion energy. They can release megajoules of energy in milliseconds, damaging reactor walls and quenching the plasma. SHARD predicts disruptions far enough in advance to trigger mitigation systems, and explains *which* plasma signals drove each prediction.
20
+
21
+ **Architecture:**
22
+ - Linear projection of 13 plasma diagnostic signals into a 64-dimensional embedding space
23
+ - Learnable positional encoding for temporal awareness
24
+ - 3-layer Transformer encoder with multi-head self-attention (4 heads)
25
+ - Novel **Signal Attribution Layer**: cross-signal attention that identifies which plasma parameters (β_p, q₉₅, MHD modes, etc.) most influenced each prediction
26
+ - Dual output heads: disruption probability (binary classification) + time-to-disruption (regression)
27
+
28
+ **Total parameters:** 62,671
29
+
30
+ ## Performance
31
+
32
+ | Metric | Value |
33
+ |--------|-------|
34
+ | ROC-AUC | 0.864 |
35
+ | PR-AUC | 0.449 |
36
+ | Improvement over HDL baseline | +6.3 points ROC-AUC |
37
+ | 5-seed ensemble ROC-AUC | 0.857 ± 0.008 |
38
+
39
+ Cross-tokamak generalization: model trained on C-Mod and evaluated zero-shot on DIII-D, demonstrating transfer without retraining.
40
+
41
+ ## Training Data
42
+
43
+ - **Primary dataset:** MIT Alcator C-Mod disruption database (DisruptionBench)
44
+ - **Signals used (13):** β_p, lᵢ, q₉₅, n₁ MHD mode, n/nG (Greenwald fraction), lower gap, κ (elongation), Ip error, loop voltage, radiated power, Wmhd, dW/dt, v_loop
45
+ - **Sequence length:** 100 timesteps per shot
46
+ - **Split:** 80/10/10 train/val/test, stratified by disruption label
47
+
48
+ ## Intended Use
49
+
50
+ - Research use for plasma disruption prediction and tokamak safety
51
+ - Real-time deployment on tokamak diagnostic systems (latency ~2ms per shot)
52
+ - Interpretability analysis via Signal Attribution Layer
53
+
54
+ ## How to Use
55
+
56
+ ```python
57
+ import torch
58
+ from model import SHARDEncoder, SIGNAL_NAMES
59
+
60
+ # Load model
61
+ model = SHARDEncoder(n_signals=13, seq_len=100, d_model=64, n_heads=4, n_layers=3)
62
+ model.load_state_dict(torch.load('shard_best.pt', map_location='cpu'))
63
+ model.eval()
64
+
65
+ # Input: (batch, seq_len, n_signals) tensor of normalized plasma signals
66
+ x = torch.randn(1, 100, 13) # replace with real diagnostic data
67
+ disruption_prob, time_to_disruption, signal_weights = model(x)
68
+
69
+ print(f"Disruption probability: {disruption_prob.item():.3f}")
70
+ print(f"Time to disruption: {time_to_disruption.item():.1f} ms")
71
+
72
+ # Get signal attribution (which signals drove the prediction)
73
+ attribution = model.get_signal_attribution(x, SIGNAL_NAMES)
74
+ for signal, weight in sorted(attribution.items(), key=lambda x: -x[1]):
75
+ print(f" {signal}: {weight:.4f}")
76
+ ```
77
+
78
+ ## Live Demo
79
+
80
+ Try the interactive Streamlit app: [SHARD Demo](https://huggingface.co/spaces/vgoradia/SHARD)
81
+
82
+ ## Citation
83
+
84
+ If you use SHARD in your research, please cite:
85
+
86
+ ```
87
+ @misc{goradia2026shard,
88
+ title={SHARD: Signal Harmonics for Anomaly and Reactor Disruption —
89
+ A Transformer Architecture for Interpretable Plasma Disruption Prediction},
90
+ author={Goradia, Veer},
91
+ year={2026},
92
+ note={Submitted to Regeneron Science Talent Search 2027}
93
+ }
94
+ ```
95
+
96
+ ## License
97
+
98
+ MIT License — see LICENSE file.
99
+
100
+ ## Contact
101
+
102
+ Veer Goradia · vgoradia07@gmail.com