← All projects

PROJECT 01 / SCIENTIFIC MACHINE LEARNING

Solar Flare
Prediction

Exploring 24-hour M-class solar-flare forecasting from multimodal observations of solar active regions.

CSUDH SENIOR CAPSTONE · 2026PYTHON · PYTORCH · CNN / GRUSOURCE CODE ↗

The problem

Solar flares can disrupt satellite operations and radio communication. This capstone investigated whether machine learning could identify the likelihood of an M-class or stronger flare within the next 24 hours for a given solar active region. The task is an imbalanced binary classification problem, so accuracy alone is not an adequate way to assess results.

Data preparation

The project used imagery from NASA’s Solar Dynamics Observatory through the SDOBenchmark dataset: eight AIA extreme-ultraviolet/UV channels plus HMI continuum and magnetogram imagery. Model inputs were organized across four timestamps and ten image modalities, with each image at 256 × 256 resolution.

The data-preparation pipeline checked whether a sample had all required image components before constructing model-ready tensors. The complete-only working index contained 8,310 samples across 1,154 solar active regions, including 625 positive flare examples.

8,310Complete samples
10Image modalities
4Time points

What the model saw

These are real SDOBenchmark inputs from the original training split. Every complete model sample contained four observation times × ten image modalities; to keep the visualization readable, these panels show three representative channels: AIA 131 Å, AIA 171 Å, and HMI magnetogram. The individual 256 × 256 solar images are preserved from the uploaded dataset, not generated illustrations.

Interpretation: Rows represent modalities and columns represent observation times. The positive and negative labels refer to the subsequent 24-hour prediction target; the images are neither model predictions nor depictions of the flare event itself. Image source: SDOBenchmark, based on NASA/SDO AIA and HMI observations.

Leakage-resistant evaluation

Observations from the same solar active region can be correlated. To reduce the risk that the model effectively sees the same region in both training and test data, the project used active-region-disjoint splits. Chronological holdout strategies were also investigated to approximate forecasting on later observations.

Frozen active-region-disjoint working splits
SplitSamplesPositiveRegions
Train6,704429959
Validation80744106
Test79915289

Model design

The final experimental lineup compared a single-timestep CNN, weighted CNN, temporal mean-pooling CNN, CNN + GRU, and weighted CNN + GRU. The intent was to examine whether adding temporal structure improved the signal extracted from multi-channel image sequences.

CONCEPTUAL MODEL FLOW (NOT A PERFORMANCE PLOT)
Solar imagery
4 × 10 × 256 × 256
→CNN features→GRU / pooling→Flare likelihood

Verified model results

The final capstone compared selected CNN and CNN–GRU configurations under two evaluation protocols. The values below are test-set results reproduced from the project’s published result tables. The complete CSV files also include additional early-stopping experiments. Here, PR-AUC is reported as average precision (AP); higher is better for PR-AUC and TSS, while lower is better for Brier score.

0.6379AR-disjoint test PR-AUC
Weighted CNN + GRU
0.5678AR-disjoint test TSS
Weighted CNN + GRU
0.4377Chronological test PR-AUC
Weighted CNN + GRU, early stopping

Protocol A: active-region-disjoint test

Solar active regions were kept separate across the training, validation, and test partitions. This tests generalization to regions the model did not observe during training and avoids overlap of region IDs across splits.

Chart showing test PR-AUC for five selected CNN and CNN plus GRU configurations under active-region-disjoint evaluation; weighted CNN plus GRU performs best at 0.6379.
Based on verified test-set average precision; higher is better. Open chart full size ↗
Selected model configurations — active-region-disjoint test metrics
ModelPR-AUC ↑TSS ↑Brier ↓
CNN, last timestep0.56230.35700.1263
CNN + positive weighting0.60370.54460.2373
CNN + temporal mean pooling0.61490.46070.1167
CNN + GRU0.57150.51130.1228
CNN + GRU + positive weighting0.63790.56780.1849

Interpretation: The weighted CNN + GRU achieved the highest PR-AUC and TSS among these five configurations, but its Brier score was worse than the unweighted alternatives. Temporal mean pooling had the lowest Brier score among these five, illustrating that better flare detection does not automatically mean better probability estimates.

Protocol B: chronological holdout

A separate time-based evaluation tested models on later observations. The test distribution and positive-class frequency differ from the active-region-disjoint protocol, so these numbers should not be treated as a direct apples-to-apples measure of deployment performance.

Chart showing test PR-AUC for five selected CNN and CNN plus GRU configurations under chronological holdout; weighted CNN plus GRU with early stopping performs best at 0.4377.
Based on a separate chronological test distribution; do not directly compare scores across protocols. Open chart full size ↗
Selected model configurations — chronological holdout test metrics
ModelPR-AUC ↑TSS ↑Brier ↓
CNN, last timestep0.36570.58560.0509
CNN + positive weighting0.39610.67530.1117
CNN + temporal mean pooling, early stopping0.40410.59110.0487
CNN + GRU0.41760.67600.0467
CNN + GRU + positive weighting, early stopping0.43770.67770.1211

Interpretation: The weighted CNN + GRU with early stopping led the selected models in PR-AUC and TSS, while the unweighted CNN + GRU produced the lowest Brier score. The best configuration depends on whether the priority is detecting rare events or producing accurate probability estimates.

Evaluation decisions and limitations

For threshold-dependent TSS, each model’s operating threshold was selected on its validation partition, then applied unchanged to the test set. This prevents selecting a threshold based on test labels. PR-AUC and Brier score provide complementary perspectives on discrimination and probability quality in an imbalanced problem.

This was an academic research pipeline, not an operational solar-flare warning system. Performance depends on the SDOBenchmark dataset, the evaluation protocol, and the prevalence of positive cases. Stronger evidence for operational use would require prospective testing, further calibration analysis, and reliable near-real-time data handling.

Explore the full experiment records: AR-disjoint results CSV ↗ · Chronological results CSV ↗. These files include additional configurations beyond the five displayed in each table. Original plots and an inference walkthrough can be added in a later documentation pass.

Ongoing research

The results reported above are from the original, frozen 2026 capstone experiments. I intend to investigate additional SDOBenchmark data and completeness issues beyond the original scope. Any new experiments will be evaluated and reported separately, preserving the original data splits, models, and published test metrics as a reproducible baseline.

What this demonstrates

  • Structuring and validating a multimodal scientific dataset
  • Designing reproducible experiments with awareness of leakage
  • Implementing and comparing CNN and CNN–GRU approaches
  • Choosing appropriate metrics for imbalanced classification
  • Documenting decisions and limits rather than overstating results