Machine learning for analysis of real nuclear plant data in the frequency domain

Machine Learning is used in this paper for noise-diagnostics to detect deﬁned anomalies in nuclear plant reactor cores solely from neutron detector measurements. The proposed approach leverages advanced diffusion-based core simulation tools to generate large amounts of simulated data with different types of driving perturbations originating at all theoretically possible locations in the core. Speciﬁcally the CORE SIM+ modelling framework is employed, which generates these data in the frequency domain. We train using these vast quantities of simulated data state-of-the-art machine and deep learning models which are used to successfully perform semantic segmentation, classiﬁcation and localisation of multiple simultaneously occurring in-core perturbations. Actual plant data are then considered, provided by two different reactors, including no labels about perturbation existence. A domain adaptation methodology is subsequently developed to extend the simulated setting to real plant measurements, which uses self-supervised, or unsupervised learning, to align the simulated data with the actual plant data and detect perturbations, whilst classifying their type and estimating their location. Experimental studies illustrate the successful performance of the developed approach and extensions are described that indicate a great potential for further research. (cid:1) 2022 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).


Introduction
Being able to early detect anomalies in nuclear reactors before they have any inadvertent effect on plant availability and safety is of paramount importance.Nuclear power plants are very large and complex systems, so the detection of anomalies is particularly challenging, despite the multitude of sensors monitoring the health of the system and the recent progress in surveillance, diagnostic and prognostic techniques (International Atomic Energy Agency, 2013).The part of the system where this is more difficult is the nuclear reactor core, i.e., the part of the system containing the nuclear fuel assemblies.This part of the system is equipped with very few detectors, especially in-core.The existence of neutrons in the core nevertheless offers a unique opportunity for monitoring: due to the fission and scattering reactions occurring in the core and the corresponding transport of particles through the core, a neutron detector can ''sense" any perturbation, even when this perturbation is far away from the considered neutron detector.
Core monitoring techniques constitute, in general, methods that allow detecting anomalies in nuclear reactor cores, subsequently characterizing those anomalies, localizing them (if relevant), and classifying them according to their impact on plant safety and availability.Early identification of conditions possibly leading to a reactor transient is of utmost importance.In this respect, one of the most promising core monitoring techniques relies on the measurement of inherent fluctuations in the neutron flux -the so-called neutron noise -and of its spatial dependence throughout the core (Pázsit and Demaziere, 2010).Neutron noise is formally defined as the instantaneous neutron flux at a given spatial point, from which its mean value in time has been subtracted.
The paper presents an innovative core monitoring technique for detecting anomalies, their type and location, in nuclear power plants, by developing and using state-of-the-art deep learning methodologies.The developments were performed in the framework of the Horizon 2020 CORTEX project 1 , in which advanced reactor modelling was combined with Machine and Deep Learning https://doi.org/10.1016/j.anucene.2022.1092930306-4549/Ó 2022 The Author(s).Published by Elsevier Ltd.This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).

Annals of Nuclear Energy
In those methods, the algorithms first needed to be fed with data representing the induced neutron noise for specified anomalies.Since possible anomalies in commercial nuclear reactors are seldom known or measurable, simulated data obtained from specifically developed neutronic modelling tools were used instead.With those tools, the induced neutron noise for many possible scenarios of considered perturbations was estimated.The results of such simulations were then provided as training and validation data sets to the machine/deep learning techniques, whilst testing the ability of machine learning-based unfolding to correctly detect and localize perturbations in large Pressurized Water Reactors (PWRs).
Machine learning has also been employed in alternative aspects of core-monitoring away from this work where Li et al. (2022) reconstruct 3D power distributions from all types of detectors incore, ex-core and thermocouples, while Kim et al. (2020) present a feasibility study into the use of machine learning in monitoring CRUD induced power shift and control rod mislocation.Wang et al. (2020) tackle useful life prediction using machine learning to determine the longevity of electric gate valves, while Saeed et al. (2020) more broadly aim to address fault detection under a number of classified and unclassified scenarios.Away from coremonitoring, Lee et al. (2021) employs RNNs to develop safety significance factor inference models to produce a digital twin for diagnosis of plant damage states.Performance prediction tasks have also employed machine learning, where Zeng et al. (2018) used SVM models to predict core behavior and transient parameters such as reactivity insertion timing and rate.More broadly speaking, artificial intelligence has been employed in nuclear engineering at the design stage where Sobes et al. (2021) demonstrate that greater optimization of reactor core cooling channel geometry can be achieved with the use of machine learning, showing success in improving temperature peaking factor.
In the current paper, we focus on datasets that include frequency domain representations of the inherent fluctuations in neutron flux recorded by in-core and ex-core instrumentation.Other methodologies, that have been developed in CORTEX and are based on time domain measurements of these fluctuations, can be found in Ribeiro et al. (2018).
The paper is structured as follows.Section 2 presents the modelling and processing of neutron noise simulations that were used to generate the synthetic data for the training of the developed machine and deep learning algorithms.The developed machine learning approaches for core unfolding are presented in Sections 3 and 4. In particular, Section 3 describes a voxel-wise semantic segmentation approach for anomaly classification and localisation, based on self-supervised domain adaptation for synthetic-to-real representation alignment.Section 4 describes the use of unsupervised machine learning techniques for the alignment of simulated perturbations with real plant measurements.A large experimental study is then presented in Section 5, which illustrates the performance of the developed approaches.Section 6 provides the discussion and conclusions of the derived contributions, including planned future work.

Modelling and Processing of Neutron Noise Simulations
Machine learning is used in this paper to unfold the possible existence of perturbations from neutron detector readings in a nuclear reactor core.In the diagnostic task, the type of perturbation is also determined and some characteristic features are extracted, if relevant.Prior to the unfolding, the machine learning algorithms need to be fed with training data sets, i.e., neutron noise at the locations of the existing detectors, for a known perturbation in the system.Unfortunately, annotated measurement data are not available, since possible anomalies existing in nuclear reactors are seldom known.In this work, training data sets are instead provided by simulations.Since a very large number of simulations is required to cover various types of anomalies and all possible locations of the anomalies, in case of local perturbations, a modelling framework allowing fast running simulations needs to be used.
In the following, the CORE SIM+ tool (Mylonakis et al., 2021) is adopted.The software estimates, for postulated noise sources, the neutron noise according to two-group diffusion approximation and linear theory, in the frequency domain.Since the entire core is considered, the software is based on a coarse representation of the system.The heterogeneities are thus modelled after spatial homogenisation on volumetric nodes of 10-20 cm in characteristic size.Nevertheless, as noise sources are introduced on much smaller spatial domains, some refinement of the mesh around the introduced noise sources is carried out.This requires the use of dedicated numerical techniques, which were specifically developed and implemented in CORE SIM+.
In the tool, the noise sources need to be defined in terms of perturbations of macroscopic cross-sections, from which the induced neutron noise can be directly estimated by solving the corresponding balance equations.In CORE SIM+, another strategy, particularly well suited to the generation of a database of neutron noise signatures corresponding to many types of perturbations and characteristics, is also available.It relies on the observation that the neutron noise induced by any type of noise source S g r; x ð Þ (with g representing the group index) can be alternatively estimated as: with G g 0 !g r; r 0 ; x ð Þ being the frequency-domain Green's function.Such a Green's function gives the neutron noise in the spatial point r in the energy group g induced by a spatial Dirac-like perturbation located in the spatial point r 0 , in the energy group g 0 .CORE SIM+ thus first estimates the different components of the Green's function appearing in Eq. 1.A spatial convolution between the Green's functions and the noise sources S g r; x ð Þ then allows estimating the neutron noise induced by that type of noise source.
As ensuring compatibility with the simulated data when applying the machine learning architecture on the measured data is essential, the results of the simulations are post-processed and transformed into Cross-Power Spectral Densities (CPSD) of the relative neutron noise (compared to the static neutron flux) between pairs of neutron detectors.This transformation is carried out as: In this equation, r i and r j represent the respective locations of the pair of neutron detectors.The subscript 0 denotes the static component of the considered quantity.Since neutron detectors are mostly sensitive to thermal neutrons, only the thermal component of the induced neutron noise and its static counterpart are used.In Eq. 2, Ã represents the complex conjugate.
The reasons for using the CPSD are twofold.First, using the frequency domain instead of the time domain allows to directly select the frequencies at which resonances and interesting phenomena exist.Then, the CPSD, which is the Fourier transform of the cross-correlation function, retains the common frequency content between two neutron detectors, thus eliminating the uncorrelated noise.Nevertheless, before using the CPSD, sanity checks on the measured signals should be carried out so that only the reliable ones are used.Those checks include: possibly eliminating trends or sudden jumps in the mean values of each signal, verifying that the noise is distributed according to a Gaussian distribution around the mean value for each signal, and only retaining detector pairs having a high enough coherence.
On the modelling side, once the Green's functions are available from CORE SIM+, the neutron noise is estimated for the following assumed noise sources: Generic ''absorber of variable strength", where a spatial Diraclike perturbation is assumed.All possible locations of the perturbation are considered, for frequencies in the range 0.1 to 25 Hz.In such a case, the induced neutron noise is exactly given by the corresponding Green's function.Although the generic ''absorber of variable strength" might be seen as an artificial perturbation, its computation is very beneficial, beyond providing the Green's function.In case the machine learning-based unfolding fails to identify any of the more ''physical" scenarios described hereafter, being able to estimate the noise source in terms of a fast or thermal perturbation, or a combination of both, as well as its spatial spread, is still of very high diagnostic value.
Axially travelling perturbations at the velocity of the coolant flow, where a perturbation is created at some spatial location in the core and travels upwards with the flow through the core.All possible locations of the perturbation are considered, for frequencies in the range 0.1 to 25 Hz.Fuel assembly vibrations, for which the lateral movement of fuel assemblies is modelled according to the following modes of vibrations: the cantilevered beam mode for frequencies in the range 0.6 to 1.2 Hz, the simply supported on both sides mode (with its two first harmonics -the first harmonics at frequencies between 0.8 and 4.0Hz, the second harmonics at frequencies between 5 and 10 Hz), and the cantilevered beam and simply supported mode (with its two first harmonicsthe first harmonics at frequencies between 0.8 and 4.0Hz, the second harmonics at frequencies between 5 and 10 Hz).All possible locations of vibrating fuel assemblies are modelled.Control rod vibrations, where a partially inserted control rod is assumed to laterally vibrate in the core.All possible locations of the vibrating control rod are considered, for frequencies in the range 0.1 to 20 Hz.Core barrel vibrations, where the core barrel is assumed to vibrate in the beam or pendular mode, for frequencies in the range 7 to 13 Hz.
For the last three types of perturbations, a model that describes the two components of the vector representing the lateral displacement of the vibrating structures is necessary.The details of the modelling of the corresponding noise sources for all scenarios above are described in Demazière and Dokhane (2019).
In this work, a Swiss 3-loop and a German 4-loop pre-KONVOI reactor are considered.For selected measurement data sets, the neutron noise was modelled using proprietary data representative of the corresponding core conditions and burnup.

Voxel-Wise Semantic Segmentation for anomaly classification and localisation
We first present a two-stage methodology to unfold the reactor transfer function from real plant measurements via machine learning.The initial stage comprises the pre-training of a bespoke Fully-Convolutional Neural Network (FCNN) to learn the necessary spatial features from the plentiful and annotated synthetic data.The following stage updates the already trained data via a self-supervised domain adaptation methodology to align the distributions of the synthetic and real plant measurements.As aforementioned, our network unfolds the reactor transfer function, classifying the perturbation type and origin location.Importantly, this work follows that of Demazière et al. (2021), extending it to the more natural case where samples are comprised of noise responses from multiple perturbations occurring simultaneously.

Pre-training with Simulated Data
The initial stage aims to train the proposed FCNN -depicted in Fig. 1 -to learn the necessary features pertaining to the semantic concepts defining the perturbation type and the spatial features leading to origin localisation.Given the rarity in data acquisition and the lack of human annotated labels of real plant measurements, the network was trained with simulated data with the intention to transfer this learnt knowledge to the setting of nonannotated real plant measurements.

Processing of Simulated Data
Before describing the approach to unfold and subsequently classify and localise multiple perturbations occurring simultaneously, we describe the data handling and pre-processing procedure, which later establishes the obtained results.We produce the aforementioned simulated perturbations through individual CORE SIM+ simulations for all perturbations at all possible locations for a given reactor with the conditions corresponding to those at the time of real plant measurement.We simulate control rod vibrations with an insertion depth equivalent to their real plant measurement counterparts.Each individual vibration mode is characterized by an anisotropy factor and a direction of the vibration given by the angle theta in the x-y plane.In the current work, the anisotropy factor is chosen to be 0.25, 0.5, 0.75 and 1.0, and the angle h in the x-y plane p 4 ; p 2 ; 3p 4 , and p.Then 16 different cases are possible for each individual vibration mode.All of the individual simulated perturbations are then split into non-overlapping training, validation and testing sets, split based on the location of the perturbation origin (i.e.assembly, control rod, etc.) which can then be latter combined without contamination between training and evaluation samples.To acquire multiple simultaneously occurring perturbations, we additively combine the single perturbation volumetric samples produced via CORE SIM+.Additive combination, however, assumes that all vibrations are in phase and that their relative weights are kept at their respective nominal value.More appropriate and computationally efficient combination procedures are reserved for future work.For further details concerning the simulation perturbation settings we refer to Demazière and Dokhane (2019).Simulations provide a direct measure of the induced neutron noise.A pre-processing of the volumes of induced neutron readings was undertaken, following Durrant et al. (2019); Demazière et al. (2021).In particular, the Auto-Power Spectral Densities (APSDs) and CPSDs of simulated neutron detector readings were computed per single perturbation scenario.In this paper, the additive combination was performed on the APSD/CPSD of the detector readings, although some complications due to cross-correlation of noise were introduced.Combining noise before this stage is a topic of future research.
The quantities were given as complex values, which was not compatible with traditional machine learning methods; we, therefore, express each complex value in terms of its amplitude and phase.Further processing involved the embedding of the detector readings into volumes identical in dimensions defined by the fuel assemblies.For the CORE SIM+ simulations, a relatively fine spatial mesh is used.Given the computational requirements of such finemesh data and the adequate granularity of prediction, we simply reduced them to produce a coarse mesh as input for the FCNN.The input into the network thus consisted of volumes of dimensions 17 Â 17 Â 17 and 16 Â 16 Â 21 for the German 4-loop and the Swiss 3-loop pre-KONVOI reactors, respectively, where each reactor contained 44 and 56 detectors respectively.APSD and coherence of these detectors were embedded into each volume at their corresponding locations, with all other voxels having zero values.We concatenated all volumes (amplitude and phase of APSDs and coherence) channel-wise.It should be noted that we did not use the coherence between all detectors, because this would result in large numbers of channels and thus to computational inefficiency.We empirically found that 8 pre-selected detectors were adequate, calculated the coherence between each detector and the 8 selected detectors, resulting in 16 channels (8 detectors each with an amplitude and phase component concatenated).

The Unfolding Methodology
To unfold and therefore classify and localise multiple, simultaneously occurring perturbations, a method is required that can make an arbitrary number of predictions.We employ techniques from the field of computer vision, specifically semantic segmentation, to enable such varying number of predictions per sample.Semantic segmentation involves ''linking" each voxel in the input volume to a semantic label in the output prediction volume.In our case, each semantic label represents the perturbation scenario, with its location in the volume (i; j; k) indicating where this perturbation originated, thus simultaneously localising and classifying it.
The proposed network follows a traditional encoder-decoder structure, used for semantic segmentation.The encoder extracts and constructs high-dimensional spatial feature representations of the frequency domain input volume, whilst the decoder utilises these features to construct a prediction mask with the same dimensions as the input.Both the encoder and decoder employ 3D CNN layers to fully exploit the spatial relationships between detector readings within the core volume.The 3D convolutions achieve this through translational invariance properties of the kernel convolutions, ideal for learning spatial information that can vary in position throughout the volume.The choice of 3D CNN architecture was guided by this intuition of learning spatial relationships to more appropriately solve the complex challenge of localisation.During development we confirmed our intuition through empirical studies where previously we had experimented with the use of standard 2D architectures taking as input the matrix of sensor readings.However, the localisation performance suffers under the 2D setting given the limited spatial information embedded into the input of the network, which when in such a coordinate-based format does not leverage the translational properties of convolutional neural networks.We also attempted to introduce spatial embeddings to the 2D model to inform the location of each sensor in relation to one another but found the 3D volumetric feature extractor outperformed.
The proposed model is inspired from Kaul et al. (2020), taking the notable design feature of the spatial pyramid pooling block (four bottom blocks of the network).This block learns rich semantic features at various scales, using four CNN layers with differing kernel size, stride, and dilation to capture varying information at different granularity.Additionally, to capture high spatial information, given the limited number of detectors, dilated convolutions (Wang et al., 2019) are employed to increase the receptive field of the convolution operator, whilst maintaining computational efficiency.Furthermore, CoordConv (Liu et al., 2018) is also implemented to help preserving spatial information of the features.This informs the convolution kernels where they are, in relation to the input volume; introducing layer-wise Cartesian coordinates of voxel positions and improving segmentation accuracy by % 2% per perturbation class.
Specifically, we train the FCNN so as to minimise the cross entropy between a voxel-wise prediction and the ground truth semantic labels (i.e., the true source location of the simulated perturbations).In addition, we employ a variation of the cross entropy loss, i.e., focal loss (Lin et al., 2017) introducing a tuneable focusing parameter, c, to the cross entropy loss, so as to adjust the rate at which easy examples are down-weighted and to give more significance to hard examples (Eq.3).Here, P represents the number of perturbation classification scenarios.The rationale behind this implementation is that, given the constraints of inherent reactor design, there are far fewer cases of a control rod vibration in comparison to examples representing a generic absorber of variable strength.As such, there is an imbalance between class occurrence.Without weighting schemes, the under-represented classes will L FL ðy; ŷÞ ¼ À 1 P 3.2.Self-Supervised Domain Adaptation for Synthetic-to-Real Representation Alignment Following the training of the base FCNN on synthetic data and the low error reported, we now intend to effectively utilise the learnt representations on real plant measurements to make predictions.However this is non-trivial, since ground truth values for the real plant measurements are unknown and few in number of samples, thus we must employ the simulated data solely to learn the characteristics of the perturbations.Additionally, the simulations and real plant measurements -although fundamentally and theoretically represent the same response to anomalous phenomenapresent some naturally occurring differences in data distributions.Consequently, it is necessary that mitigations are introduced to enable the large quantities of simulated data to be fully exploited for use with real plant measurements.Without such alleviation, the difference in distribution will yield a difference in feature distribution captured by the model resulting in poor predictions when inference is performed using a model trained only with simulated data.

Processing of Real Plant Measurements
The real plant measurements have been processed by using classical signal processing techniques for neutron noise diagnostics, observing the response of the neutron detector sensors in the frequency domain through the Fourier transform of the autocorrelation function, APSD.Analogously, for two variables, the CPSD has been calculated through the Fourier transform of the cross correlation between signals of two detectors.Moreover, to provide further information via signal processing, the coherence is calculated between detectors and the embedding of the readings into the spatial volume is performed by the same procedure previously described in the synthetic data setting.

The Alignment Methodology
To align the data domains (simulated or real), we propose to utilise a domain adaptation procedure encapsulating our 3D FCNN model, to more closely align representations of the input volumes produced by our network from each data domain.Specifically, we employ the Self-Supervised Domain Adaptation (SSDA) procedure proposed in (Sun et al., 2019).Given we do not have any labelled (ground truth) information for real plant measurements, auxiliary tasks -constructed from solely the input volumes -are employed to provide feature understanding of structurally relevant information that does not require human annotated labels.These auxiliary tasks define the self-supervised training procedure, where such methods have begun to see vast adoption and great success across all areas of deep learning (Devlin et al., 2018;Chen et al., 2020;Grill et al., 2020;Durrant and Leontidis, 2022).These tasks encourage alignment between the distribution of features captured by the FCNN of both the simulated (source) and real (target) measurements domains, by making the feature extractor predict identical augmentations to each input volume, hence enforcing invariance to the nuances displayed between the data distributions.
The proposed method aims to simultaneously train our previously described network to minimise the error of the main task of semantic segmentation for source domain data (simulated), whilst also minimising the loss of a variety of auxiliary tasks for both source and target (real) domains.Auxiliary tasks are simply Softmax classification tasks aiming to predict augmentations applied identically to each of the source and target domain input samples.
The tasks include: rotation prediction ½0 ; 90 ; 180 ; 270 ; vertical flip prediction ½0; 1; and prediction of a missing detector.The output for each task, including the segmentation task, is provided by individual classification layers where input is provided by the feature extractor, this is visually depicted in Fig. 2. The resulting loss is the mean of the categorical cross entropy loss for each auxiliary tasks per domain, and the segmentation loss for the source domain (Eq.3).At inference time, the target test samples are input to the feature extractor, a resulting prediction mask is produced via the segmentation task head, whilst disregarding all auxiliary heads.Real plant predictions are shown in Fig. 8.

Unsupervised Learning for aligning simulated with real plant measurements
Unsupervised learning techniques aim at extracting knowledge from or to recognizing patterns in data that are not characterized by any additional information (i.e unlabeled data).This is extremely helpful in the current setting, since actual plant measurements are unlabeled, i.e. in most cases we are unaware of any occurring perturbations in the reactor core.
In this respect, the conducted analysis is going to have a number of objectives.Initially, a more compact representation for both simulated perturbations and especially plant measurements is sought; one that is expected to be more suitable for the subsequent tasks.This step is also known as feature extraction and is further discussed in Section 4.1.Subsequently, detector signals that share common properties or traits are going to be grouped together, in a process known as clustering (Section 4.2).This procedure can help us identify different reactor core states, especially those evolving through time.Clustering detector signals may also be useful in anomaly detection; clearly, detector signals that cannot be grouped easily may be due to hidden outliers in data (i.e.perturbations or a malfunctioning detector).As a final step, the simulated perturbations presented in Section 2 are going to be compared with plant measurements.The purpose of the said comparison (Section 4.3) is the discovery of common patterns in-between them, for the preemptive identification of possible sources of perturbation on reactor cores.The objective is to draw insight about the reactor transfer function across fuel cycles and across different phases of the same fuel cycle.

Feature Extraction
Feature extraction or feature engineering is the task of identifying those characteristics in data that are most helpful in describing their statistical properties.Since the quality of the obtained features greatly influences the performance of machine learning algorithms, this task is an important step that precedes the application of perturbation identification and localization techniques.
Machine learning approaches may also be directly employed in feature extraction, in an effort to find useful representations of data and consequently, extract new features.In the past, this was primarily achieved with techniques like the principal component analysis (Bengio et al., 2013) or the latent Dirichlet allocation (Blei et al., 2003), but recently, more advanced techniques are used, like autoencoders (Bengio et al., 2013).
Autoencoders are a type of neural network that can reduce the dimensionality of the input space without losing significant information or knowledge from the data.The specific architecture used in the experiments is depicted in Fig. 3 and like any autoencoder, it consists of two parts; the encoder and the decoder.The task of the first part (from the input layer to the flatten layer) is to transform the input signal into a space of lower dimensionality, through successive neural network layers.In other words, the output of the encoder is a compressed version of the input that preserves its most salient features.The decoder (from the first dense layer to the output) tries to reconstruct the initial input of the network.So, the autoencoder is trained as a supervised model, where the output must match the input, while reducing data dimensionality internally.
In this work, the spectrograms of simulated detector signals have been used to train the autoencoder of Fig. 3, which compresses them to a small vector of constant size (in our case, 100 elements).Then, during inference, plant measurements are fed into the same autoencoder architecture, after being split in 10 sec windows, in order to encode the same amount of temporal information.

Clustering plant measurements for anomaly detection
Many clustering algorithms exist in the literature, with each of them producing different results (clusters), as, essentially, every algorithm identifies different patterns in data, providing better insight on their structure (Oyelade et al., 2019).A key concept in clustering is the determination of the number of clusters, which may be either be performed by the algorithm itself (in some approaches) or be provided as a hyperparameter (in other approaches).Determining the number of clusters is closely related with the objective of the analysis and since, in this work, we examine clustering from the perspective of anomaly detection, we are going to only consider two clusters; a majority cluster, which should contain ''normal" signals and a minority cluster with ''abnormal" signals.
As plant measurements are represented by consecutive latent vectors (Section 4.1), one for each time window, we are going to evaluate the proportion of time windows classified in the minority cluster for each detector signal.Two algorithms have been employed for this task; one-class support vector machines (SVM) and isolation forests.One-class SVM is an anomaly detection algorithm that tries to fit the whole dataset in the smallest possible hypersphere.After training, every data sample that lies outside that space is regarded as an outlier, while the rest are considered normal instances.Isolation forests, on the other hand, partition data points into a tree, by splitting them based on the value of a random feature.After the construction of the tree, out of all the external nodes (leaves), the ones with the shortest path length are considered to be the outliers.

Spatial comparison between plant measurements & simulated perturbations
In this subsection, a spatial comparison will be made between the simulated perturbations on the frequency domain and the actual plant measurements.The objective of this comparison is to determine whether and where the given perturbations are more likely to exist.It involves the direct computation of the APSDs and CPSDs for both plant measurements and simulated data.This analysis produces vectors of power spectral densities that can be compared with distance metrics like the cosine similarity or the Euclidean distance.If plant measurements align well to a simulated perturbation, we can consider that as a strong indicator of the existence of that perturbation in the reactor core.This, as well as the computation of the magnitude-squared coherence and CPSD between the simulated data and real measurements, can be used both as features for a machine learning model or as standalone predictors of the ongoing perturbation (Ioannou et al., 2021).The overall procedure is depicted in Fig. 4, which results in the creation of a heatmap with the similarity scores for each position in the grid where a given perturbation has been simulated.In this respect, it will be possible to estimate the likelihood of a perturbation occurring in all areas of the reactor, but, also, we can compare the similarities between different perturbations.

Experiments with Simulated Data
To demonstrate the performance of our approach, experimentation has been undertaken on combinations of simulated scenarios for both a Swiss pre-KONVOI and a German pre-KONVOI reactor.We produce 3 combined data sets, each differing in maximum number of combinations.The number of combined single perturbations per sample is selected at random within the range ½1; x, where x ¼ f15; 30; 45g, whilst ensuring that samples combinations are of the same frequency and do not originate from the same location.Our experimentation aims to explore how our approach classifies and localises each of the induced perturbations, given a range of simultaneously occurring perturbations per sample.The networks remain identical throughout, only changing the input dimensions to accommodate different reactor dimensions.The training procedure utilised the Stochastic Gradient Descent (SGD) optimisation procedure for back propagation, with a base learning rate of 0.01, decaying by a factor of 0.1 when the validation error plateaus for 20 epochs within a threshold of 0.025.Additionally, training lasted 150 epochs with a batch size of 128, and employed '-1 weight regularisation of 0.001.Furthermore, a modulating factor of c ¼ 2 for the focal loss was used.The percentage accuracy of our predictions are shown in Table 1, where the accuracy is defined as the percentage of correctly classified voxels per perturbation classification throughout the volume, averaged across the test set.In addition, normalised confusion matrices showing the performance per classification are depicted in Fig. 5. 2Table 1 reports the results of voxel-wise classification of simultaneously occurring perturbations, and subsequently their origin locations.Low error is reported across all scenario types and combinations for each reactor type, this is further depicted by the normalised confusion matrices shown in Fig. 5.It is often noticed that the loss in performance is attributed to false positive predictions, i.e. detecting a perturbation that is not present.Simply put, our network tends to make additional predictions around the ground truth value, forming a cluster of predictions, this is depicted in Fig. 6.Although affecting performance of our network, this result does in fact, inspire greater confidence in contrast to the contrary of false negative predictions (missed predictions).Furthermore, it is worth noting that the increase in combined perturbations per sample does result in a drop in classification performance of the more localised perturbations such as the generic absorber of variable strength, À7%.We conjecture that due to the more uniform structure of fuel assembly, control rod, and core barrel vibrations, there are fewer variations at which these perturbations can originate, thus resulting in a lower complexity in comparison to generic absorber of variable strength.

Experiments with Real Plant Measurements
To make predictions via our self-supervised domain adaptation procedure, the model had been trained in a similar manner as described in 3.1, although with the following adjusted hyperparameters: weight decay of 10 À5 , a smaller base learning rate of 0.001 and 100 epochs, fewer given it has already been pretrained.To further leverage the simulated training, our FCNN feature extractor weights are initialised with those corresponding to the trained model from the simulated experiments, and all parameters fine-tuned throughout the domain adaptation procedure.
First, Fig. 7 depicts the smooth convergence of our auxiliary task losses, along with the minimisation and convergence of a nonoptimised distance metric between source and target representations.This metric measures the centroid distance (linear maximum mean discrepancy (MMD)) between the feature distributions of the two domains in the learned representation space produced by the FCNN feature extractor.This empirically shows maximisation of alignment in representational space between simulated and real domains, consequently improving invariance between source and target in our feature extractor.Additionally, Fig. 8 shows the pre-   dictions made by our network for real measurements of an operational German pre-KONVOI reactor.These results, although yet to be fully validated given the inability to acquire ground truth values, show the potential of our method to make on-line predictions of core anomalies in operational reactors.To further support our claims, the work presented in Section 4.1 undertook an alternative approach on the same real reactor measurements with similar phenomena reported at near identical locations within the core volume.For example, strong axially travelling perturbations are reported at ð12; 16Þ in Fig. 12, with our prediction (Fig. 8) also reporting the same phenomena at ð14; 14Þ in addition to an axial column of generic absorber of variable strength, adding further weight to the validity of our prediction.Although here we do not explicitly examine the performance of our network nor introduce any mitigation for uncertainty in sensor measurement, we deem them unnecessary as we have empirically shown in previous works (Ribeiro et al., 2018;Caliva et al., 2018;Durrant et al., 2019) the robustness of machine learning methods to additional uncorre-lated noise, achieving only a 10% decrease in localisation performance under SNR approaching 0. In addition, more recent work (Herb et al., 2022) determines that given uncertainty in simulation input parameters our approaches remain robust and demonstrates insignificant decrease in localisation and classification performance.Finally, as the neutron detectors are operating in current mode, any inaccuracy in the detector response cancels out when taking the ratio between the neutron noise and the static neutron flux -as can be seen e.g. in Eq. 2. The measurement of the relative neutron noise is thus very accurate.signal belonging to the minority class, while the y-axis depicts the detector name.An initial observation is that both techniques have singled out detector L-G10-2 as having an ''abnormal" behavior (e.g.belonging mostly to the minority class) during the three examined fuel cycles.As it has been discussed before, this behavior can be attributed to a number of causes, including a malfunctioning detector or the influence of a certain perturbation.
According to one-class SVM (Fig. 9a), detector L-N12-2 also exhibits an exclusively abnormal behavior in all of the examined cycles.On the other hand, the isolation forest technique (Fig. 9b) assigns the said detector in the minority class, predominately for Cycle 32; in the other cycles, it seems to exhibit a normal behavior.This is also the case of detector L-J06-5, which is also identified as abnormal by one-class SVM during Cycle 32.Both observations indicate that something might have happened during that cycle (e.g., a perturbation); however, further analysis is required to identify the causes of this differentiation.Fig. 10 outlines the results of the same analysis for different points in two fuel cycles of the Swiss

Experiments on Spatial Comparison of Simulated and Real Plant Data
After analyzing the plant measurements of the German reactor (Section 2), we identified 1 Hz to be among the most dominant frequencies in all signals and as a consequence it has been selected for the simulated perturbations.The CPSDs were calculated between all fully working sensors of the reactor (53 in total).As the simulated perturbations are monochromatic, the same single frequency has been extracted out of the plant measurements and the corresponding CPSDs have been computed.Consequently, a matrix of size 53x53 has been constructed for both real and simulated data for each perturbation.
All of the simulated perturbations presented in Section 2 have been considered; that is: (i) Absorber of Variable Strength (AVS), (ii) Axially Travelling Perturbation (ATP), (iii) Control Rod Vibration (CRV) and (iv) Fuel Assembly Vibration (FAV, including cantilevered, supported, and cantilevered and supported modes).
Fig. 11 depicts the heatmap of similarities between plant measurements and AVS perturbations.Since neutron detectors are mostly sensitive to the thermal neutrons, the AVS experiments have been predominately focused on the second neutron energy group.The plot is related to the axial elevation with the maximum similarity.In both energy groups 1 and 2, the maximum similarity occurred at coordinates ð16; 15; 18Þ, where the first coordinate corresponds to the horizontal axis, the second to the vertical axis and finally the third to the z-axis.Fig. 12 outlines the radial heatmap of similarities between plant measurements and ATPs.The maximum cosine similarity score has been determined to be 0:63 at radial position ð15; 13Þ.Fig. 13 summarizes the heatmaps of similarities between plant measurements and CRV perturbations at two different axial levels, i.e., z ¼ 18 (Fig. 13 and z ¼ 31 (Fig. 13b).We can observe that both heatmaps are similar to a great extent, which is also confirmed by the fact that the maximum similarities are in the same vicinity: at ð15; 5Þ for z ¼ 18 and at ð17; 3Þ for z ¼ 31.
Finally, Fig. 14 displays the heatmap of similarities between plant measurements and FAV in cantilevered (Fig. 14a), supported (Fig. 14b), and cantilevered and supported (Fig. 14c) modes.In the first case, the maximum cosine similarity has been located at ð11; 9Þ with a similarity value equal to 0:751.In the second case, it was located at ð15; 15Þ with a similarity value equal to 0:752.In the third case, it was located at ð15; 13Þ with a similarity value of 0:766.

Discussion and Conclusions
Here we address the longstanding task of anomaly detection in nuclear plant reactor cores by employing state-of-the-art machine learning approaches to classify and identify the origin of driving perturbations from neutron detector measurements.The presented approach focuses on frequency domain representations of the collected data, thus permitting the use of a powerful and computationally efficient modelling frameworks, i.e., the CORE SIM+ tool.Using such tools, large volumes of simulated data have been generated and used for training appropriate machine and deep learning methods for classifying among significant perturbation categories, whilst successfully identifying the perturbation origin locations.
The machine learning models developed with simulated data need to be extended to align to real plant data distributions.Since actual nuclear plant data cannot include precise labels for perturbations and locations, it is therefore not possible to employ the same supervised learning approaches for achieving this transfer of learnt representations.A large variety of approaches, belonging to the fields of Domain Adaptation and Domain Generalisation (Wang et al., 2021;Zhou et al., 2021) aim to address this domain shift problem.Domain adaptation has been the means of tackling the problem in this paper, leveraging unlabelled actual plant (target) data along with the abundant labelled simulated (source) data for model adaptation.Both self-supervised and unsupervised learning methodologies have been developed and used to achieve alignment between the simulated and real data.Extensive and empirically interesting results have been obtained, when dealing with two specific reactors, demonstrating the capabilities of such alignment methods to leverage simulated data and make predictions in real plant settings.Although not used here, domain generalisation can be used in future studies to further extend these capabilities, focusing on generalisation, i.e. on training machine learning models that can be applied over all contexts and types of power plant reactors.
Safety is the main aim when detecting anomalies in nuclear reactors.In this paper we have developed and tested machine and deep learning methods that are able to analyse large amounts of simulated and actual plant data and provide alerts about existence of perturbations, also estimating their type and location.However, it should be mentioned that trustworthiness on the provided decisions is crucial for the adoption and use in real life.By further adopting state-of-the-art methodologies, the presented approaches can provide confidence and uncertainty estimates for their performance (Abdar et al., 2021;De Sousa Ribeiro et al., 2020) to achieve greater interpretability of predictions, as well as visualisation and adaptation of the machine learning decision making procedures (Shitole et al., 2020;Kollias et al., 2020).Moreover, another research direction is the development of methods that take advantage of existing knowledge so as to provide explainable, in terms of human understanding, decisions.Once such approach, Neural-symbolic learning and reasoning, is such a possible direction (Hitzler and Sarker, 2022).
j o u r n a l h o m e p a g e : w w w .e l s e v i e r .c o m / l o c a t e / a n u c e n e

Fig. 1 .
Fig. 1.The proposed 3D Fully-convolutional, voxel-wise semantic segmentation network.Arrows represent the direction of network activation's, purple arrows are the flow of activation's with no operation, red show trilinear up-sampling, and green are the concatenation of activation's channel-wise.

Fig. 2 .
Fig. 2. SSDA methodology depicting the input volumes (Left), FCNN network (Middle), and the three auxiliary tasks and supervised (segmentation) task (Right).The flow of source and target data is given by the red and blue arrows respectively.

Fig. 4 .
Fig. 4. Spatial comparison procedure for comparing plant measurements and simulated perturbations.

Fig. 5 .
Fig. 5. Normalised confusion matrix of per voxel classification on the simulated test set, max combination = 15.These show the number of voxel predictions per classification against the ground truth.(Left) German pre-KONVOI, (Right) Swiss pre-KONVOI.

Fig. 6 .
Fig. 6.Network prediction (Left) and ground truth (Right) classification masks for a combination of simulated scenarios.The pressure vessel is not depicted for visual clarity.

Fig. 7 .
Fig. 7. Normalised auxiliary task errors and MMD error between the source and target distributions.Improved alignment is shown as errors decrease until convergence.

5. 2 .
Alignment based on Unsupervised learning 5.2.1.Experiments on Anomaly Detection based on Clustering Fig. 9 summarizes the results of applying the anomaly detection techniques discussed in Section 4.2 on in-core detector signals from three different fuel cycles of the German reactor (Section 2).The x-axis displays the proportion of the time windows of each

Fig. 8 .
Fig. 8. Predictions of German pre-KONVOI reactor measurements under our self-supervised domain adaptation procedure.Left: 3D prediction visualisation of the whole core volume, we omit the reactor pressure vessel for visual clarity.Right: Axial (top down) view of the predictions excluding AVS.Outside of the pressure vessel is depicted in grey.

Fig. 10 .
Fig. 10.Anomaly detection on in-core detector signals of the Swiss reactor using two different methodologies.

Table 1
Per classification voxel accuracies averaged across the unseen test set for varying numbers of combined perturbations for both simulated pre-KONVOI reactors.