Reinforcement Learning Techniques for the Optimization of Target Polarization in Nuclear Physics Scattering Experiments
Authors: Armen Kasparian, Torri Jeske, Monibor Rahman, Chris Keith, James Maxwell, Thomas Britton, Malachi Schram, David Lawrence
Organizations: Data Science Department, Thomas Jefferson National Accelerator Facility, Newport News, VA 23606 USA · EPSCI, Thomas Jefferson National Accelerator Facility, Newport News, VA 23606 USA · Target Group, Thomas Jefferson National Accelerator Facility, Newport News, VA 23606 USA · Advanced Computing, Mathematics, and Data (ACMD) Division, Pacific Northwest National Lab, Richland, WA 99354 USA
The operation of dynamically polarized targets in nuclear physics experiments relies on continuous tuning of the microwave frequency to compensate for radiation damage and evolving material properties, a task that is traditionally performed through manual trial-and-error by expert operators. This work presents a data-driven control framework that combines surrogate modeling with reinforcement learning to optimize the target polarization. Using operational data from the APOLLO cryogenic target system, we train and evaluate multilayer perceptron and Gaussian process regression models to predict polarization as a function of microwave frequency, beam current, and accumulated radiation dose. We show that Gaussian process-based models provide calibrated uncertainty estimates and reliably identify regions outside the training distribution, while MLPs exhibit limited sensitivity to distributional shift. To enable learning and control across multiple target samples, we introduce a Gaussian process approximation and embed the surrogate model within a standardized simulation environment. A reinforcement learning agent is trained using a lower-confidence-bound reward formulation that balances performance maximization against uncertainty. We are able to show an almost 2x improvement on the operators actions utilizing our RL agent.
Figures & tables
Figure 1: Proton polarization as a function of cumulative radiation dose for NH 3 sample #20-3, used during data taking periods P08 through P11. The blue points correspond to positive polarization, and the red points correspond to negative polarization. In general, the rate at which the polarization degrades increases with the cumulative dose the material has received. The spikes in polarization can be due to either sudden changes in beam current or microwave frequency adjustments.
Figure 2: Example polarization extraction for protons in NH 3 . The normalized phase, baseline, baseline-subtracted, and fit-subtracted signals versus frequency are shown. The polarization is proportional to the area under the fit-subtracted curve (shaded region).
Figure 3: Sample response to changes in microwave frequency given the current polarization and dosage.
Figure 4: Schematic representation of the neural network architecture consisting of two dense hidden layers with ReLU activation and dropout regularization. The output layer predicts both the mean ( μ ) and standard deviation ( σ ) of the target distribution for probabilistic regression.
Figure 5: The agent-environment interaction in a reinforcement learning workflow [ 17 ] . The agent executes a policy that selects an action At given the current St , which results in a reward Rt+1 and a new state St+1 of the environment.
Figure 6: Learning curves showing the training and validation loss for the MLP model. The validation loss decreases as the number of epochs increases, and training stops when the minimum validation loss is reached.
Figure 7: Observed and predicted polarization for the MLP model. The red dotted line indicates the ideal prediction, and the blue markers represent the model’s predictions.
Figure 8: Sample-wise observed values, predictions, and prediction intervals. The red dotted line represents the observed values, and the blue markers represent the model predictions. The predictions follow patterns similar to the true values, with associated uncertainty.
Figure 9: Average calibration of predicted vs. observed values for the MLP model.
Figure 10: Optimized NLL loss values for Laplace, RBF, and Cauchy kernels using Powell, Nelder–Mead, L-BFGS-B, CG, and COBYQA optimization methods.
Figure 11: Observed and predicted polarization for the GP model. The red dotted line indicates the ideal prediction, and the blue markers represent the model’s predictions.
Figure 12: Sample-wise observed values, predictions, and prediction intervals. The red dotted line represents the observed values, and the blue markers represent the model predictions. The predictions follow patterns similar to the true values, with associated uncertainty.
Figure 13: Average calibration of predicted vs. observed values for the MLP model.
Figure 14: Sample-wise comparison of observed polarization values and GPA model predictions for the P07, P11, and P14 test datasets. Solid lines indicate the observed values, while markers denote the model predictions. The shaded regions represent the 95% predictive confidence intervals for each individual sample ID.
Figure 15: Average calibration of predicted vs. observed values for the GPA model for P07, P11, and P14.
Figure 16: Comparison of MLP, GP, and GPA responses during controlled ID-to-OOD transitions. The MLP and GP models are trained using single-sample P07 data, while the GPA model is trained using multisample data from samples P07, P11, and P14. All models are evaluated on P07 test data, with microwave frequency intentionally varied from ID (solid red line) to OOD region (dashed red line). Shaded regions represent prediction uncertainty. In (a) and (c), the frequency is increased beyond the upper training limit of 140.1822 GHz, while in (b) and (d), it is decreased below the lower limit of 140.0979 GHz.
Num
Name
Δ UWave
0
No action
0
1
Decrease UWave Frequency
−0.001
2
Increase UWave Frequency
+0.001
Table 1: Discrete Action Space for P07 Environment
Num
Name
Δ UWave
0
UWave Frequency Adjustment
[−0.01,+0.01]
Table 2: Continuous Action Space for P07 Environment
Num
Name
Min
Max
0
Normalized Frequency
0.0
1.0
1
Scaled Target Dose
0.0
≈4.0
2
Beam Current
0.0
≈5.0
3
Predicted Mean Polarization
0.0
1.0
4
Predicted Std. Deviation
0.0
0.2
5
Lower Confidence Bound
0.0
1.0
Table 3: Observation Space for Proton Polarization Environment
Figure 17: Episode reward curves for DDPG, TD3, and SAC. All three algorithms converge to comparable reward values, indicating that final performance is largely independent of the specific off policy actor-critic algorithm used.
Table 4: Default hyperparameters for the TD3 algorithm.
Figure 18: Human operator vs RL learned policy. Human operators actions are matched from the dataset while the RL agent is generating the actions through the policy model. These action are passed through the environment and show that that the total polarization over the episode is about equivalent
Method
Prediction Time (ms)
Slowdown
Single Sample GP
32.94
1.00 ×
Multi Sample GPA
1103.38
33.49 ×
Table 5: Single-Sample GP vs. Multi-Sample GPA Prediction Time Comparison
Reinforcement learning control uses reward-driven learning to make decisions in dynamic systems, from robots and vehicles to energy and infrastructure.
Beijing ENN Fusion Energy Science and Technology Co., Ltd., Beijing 101111, China · Beijing Key Laboratory of High Magnetic Field Spherical Torus Fusion Energy, Beijing 101111, China · Hebei Key Laboratory of Compact Fusion, Langfang 065000, China +3