## 2 Platform Architecture
### Convolutional Neural Network Software Training and Testing Module  
The module mainly consists of several parts, which are the hyperparameter search module, training module, and test and validation module. In the process of building a convolutional neural network, the setting of hyperparameters is a key factor affecting the accuracy of training and final inferences. Conventional hyperparameters include the convolutional kernel size, step size, padding, activation function, number of convolutional layers, number of fully connected layers, loss function, number of iterations, learning rate, optimizer, batchsize, and dropout rate, which are very inefficient if combined and experimented with manually. Optuna (1.0.0) is a state-of-the-art automated machine learning framework focused on hyperparameter optimization, aiming to improve the performance of machine learning models. Its key strengths include a highly flexible design that allows users to customize complex optimization logic and parameter search spaces; an intuitive and powerful API that ensures ease of use and integration; and improved optimization efficiency through effective sampling strategies and pruning techniques. These features have made Optuna a widely adopted tool in research and industries [19; 20; 21].  
After determining the optimal hyperparameter combination through Optuna, the particle training waveform data and validation waveform data need to be subjected to  
Figure 3: Dataset construction flowchart.  
Figure 2: (**a**) Schematic diagram of waveform signals of different particles with the same energy; (**b**) neutron and gamma waveform schematics.  
forward propagation computation, loss function computation with backward gradient computation, and final training.  
The test validation module is used to analyze the accuracy and ability of the particle discrimination model to achieve classification and discrimination under the current training state. By inputting a preprocessed hybrid test dataset, the accuracy of the validation and inference results can be obtained so as to understand the effectiveness of the model training and to provide data support for determining the model's hyperparameters, as well as determining the model architecture. In practice, the key variables include training set accuracy, loss function value, validation set accuracy, and test set accuracy. The training set accuracy is calculated as shown in Equation (1):  
\[TRCper=TRCnum/TRnum \tag{1}\]  
where \(TRCper\) denotes training accuracy; \(TRCnum\) is the number of training data forward inference results that match with labels; and \(TRnum\) is the total number of training data.  
The loss function value is calculated as shown in Equation (2):  
\[AVEloss=Tloss/TRnum \tag{2}\]  
where \(AVEloss\) is the overall average loss function value for training; \(Tloss\) is the total loss function value; and \(TRnum\) is the total number of training data.  
The validation set accuracy is calculated as shown in Equation (3):  
\[MDCper=MDCnum/MDnum \tag{3}\]  
where \(MDCper\) is the validation set accuracy; \(MDCnum\) is the number of validation set forward inference results that match with labels; and \(MDnum\) is the total number of the validation set's data.  
The test set accuracy is calculated as shown in Equation (4):  
\[TSCper=TSCnum/TSnum \tag{4}\]  
where \(TSCper\) is the test set accuracy; \(TSCnum\) is the number of test set forward inference results that match with labels; and \(TSnum\) is the total number of test set data.