16.3.14 OA
Author(s): Daniel Garabato, Minia Manteiga, Lara Pallas-Quintela, Marco A. Álvarez, Carlos Dafonte
16.3.14.1 Goal
OA aims to complement the overall classification performed by the UCA and DSC modules by processing objects from which these modules provide only a weak classification (see Section 16.3.13 and Section 16.3.2). It focuses on complementing the photometric processing by detecting artefacts, improving UCA and DSC classifications and analysing unusual, infrequent objects. Specifically, it deals with the analysis of those sources which are assigned as outliers by UCA, as well as those that are assigned DSC combined probabilities below a given threshold for all the considered classes. Figure 16.25 shows the OA processing stages, which are briefly described below.
In order to select an object to be processed by OA, it is required that either the UCA or the DSC modules flag it as an outlier. The main goal of OA is to extract knowledge from these sources, so that the underlying cause of their classification as outliers can be identified and understood. In order to analyse them, OA performs an unsupervised classification (clustering) by means of Self-Organising Maps (hereafter SOM, Kohonen 2001; Ordóñez et al. 2012; Fustes et al. 2013; Dafonte et al. 2018), grouping similar objects according to their BP/RP spectra. In addition, OA characterises each group of similar objects, i.e. cluster or neuron, by reporting statistics of the main Gaia computed quantities: magnitudes, galactic latitudes, parallaxes, number of transits, etc. The quality of the clustering is also assessed according to different measurements on the distribution of classification distances, so that a quality category can be identified for the neurons, as detailed in Section 16.3.14.5.3.
Finally, a class label is assigned to the best clusters following a template matching procedure detailed in Section 16.3.14.5.4. It should be noted that we characterise and label clusters instead of objects. Since a cluster is representative of the sources that are assigned to it, those properties could also be extrapolated to the sources it contains. A classification distance, as well as a distance percentile, are defined for each source, so that the end user can decide whether to extend such properties, or not, to a particular source.
16.3.14.2 Training data and models
The OA module trains a SOM in the Apsis chain, so there is no need to provide a trained model to feed the network (for more details see Section 16.3.14.5). Nonetheless, once the map is trained and for better understanding, the resulting neurons are labelled by comparing the neuron prototype with reference spectra or templates which were previously computed (see Section 16.3.14.5.4 for more details).
16.3.14.3 Inputs
OA internally uses mean XP spectra produced by SMSgen (Section 16.3.1), downsampled to 60 pixels per band, concatenated (as shown in Figure LABEL:fig:cu8par_apsis_oa_inputs_bprp_example_preprocessing), and preprocessed before the clustering is performed to deal with border effects, zero or negative pixels, as well as the overlapping region between BP and RP wavelengths (see Section 16.3.14.5.1). Additionally, some internal Gaia information, such as galactic latitude (b), magnitudes in Gaia bands (phot_g_mean_mag, phot_bp_mean_mag, and phot_rp_mean_mag) or the number of transits (phot_bp_n_obs, and phot_rp_n_obs) is used to describe the objects grouped in the same neuron.
16.3.14.4 Outputs
OA contributes to the archive by means of different products:
-
•
Self-Organising Map (SOM) clustering for outlier sources using a map (900 neurons).
-
•
Neuron-by-neuron statistical description for different Gaia observables, such as , , , or .
-
•
Neuron-by-neuron quality measurements, which comprise basic statistics on intra-neuron and inter-neuron distances, and some parameters computed for the intra-neuron distance distribution: Full Width at Half Maximum (), skewness (), kurtosis (). Additionally, from these parameters a categorical quality index () is also derived, as described in Section 16.3.14.5.3.
-
•
For the best quality neurons (), a class label is also provided by means of a template matching procedure using a reference set of templates built from a reliable catalogue of sources, as described in Section 16.3.14.5.4.
-
•
Source-by-source information, so that the neuron where a particular source lies can be identified. In addition, the squared Euclidean distance between the source XP spectra and the neuron prototype is also provided, so that a further filtering on the sources can be applied.
These products are essentially contained in three different tables of the archive, for which the relationship can be observed in Figure 16.26, and contain the following information:
-
•
The ap_class table contains the clustering information for a source. If the source was selected as input to the module, the table provides the assigned neuron (neuron_oa_id), the distance of the source from the neuron (neuron_oa_dist), its distance percentile within the neuron (neuron_oa_dist_percentile_rank), quality flags (flags_oa), and the neuron label (classlabel_oa; see Table 16.32 for the labels defined in OA).
-
•
The oa_neuron_information table contains non-multidimensional parameters associated with the neurons, where each neuron is identified by a unique neuron_id, as well as two indices that specify its location within the map (neuron_row_index and neuron_column_index). This table provides some statistics for each one of the neurons based on the objects that populate them. In particular, it contains the mean, standard deviation, maximum and minimum values for different Gaia observables: (phot_g_mean_mag), (phot_bp_mean_mag), (phot_rp_mean_mag), proper motions (pmra, and pmdec), parallax (parallax), galactic latitude (b), number of transits in each photometric band (phot_bp_n_obs, and phot_rp_n_obs) and astrometric parameter ruwe (ruwe) (check Section 25.4.14 for further information about oa_neuron_information). It also contains some other relevant information, such as the number of sources populating a neuron (hits), the class label assigned to the neuron (classlabel), if any, and the source_id of the centroid object (centroid_id). Finally, some quality indices based on the intra-neuron distance distribution are also provided: distance percentiles, (distance_fwhm), skewness (, distance_skew), kurtosis (, distance_kurtosis) and the categorical index (quality_category).
-
•
The oa_neuron_xp_spectra table contains multidimensional data related to XP spectrophotometry of the neurons, including the preprocessed spectra of the prototype (xp_spectrum_prototype_flux) and, if available, the template ( xp_spectrum_template_flux) for each neuron.
Finally, some use cases that can help the user to work with these tables can be found in Section 16.3.14.7, such as retrieving the sources assigned to a particular neuron, or extracting neuron prototypes or templates. Furthermore, together with Gaia DR4, a SOM-map visualisation tool named ‘GUASOM flavour Gaia DR4’ will be released to explore the OA products in an interactive and user-friendly manner. A detailed description of the tool and its features is provided in Álvarez et al. (2022).
16.3.14.5 Method
The method used by OA to analyse the nature of classification outliers is an unsupervised artificial intelligence algorithm, namely a Self-Organising Map (Kohonen 2001) which allows objects with similar spectral energy distributions to be grouped and does not make use of any prior knowledge based on physical models. Some optimisations were introduced to speed up the execution of the module, and different validation mechanisms were also implemented.
16.3.14.5.1 Preprocessing
Many of the spectra processed by OA come from low apparent luminosity objects, which as a result of the extraction process can have pixel intervals with very low or even negative fluxes. To carry out a meaningful clustering for as many objects as possible, a preprocessing stage is performed before training the SOM model.
This procedure is illustrated in Figure 16.24 and improves the overall performance of the model. It consists of the following steps:
-
1.
The borders of each spectrum are trimmed due to the low transmission at these wavelengths. As a result, OA uses the effective wavelength ranges nm for BP and nm for RP.
-
2.
Some spectra may contain negative flux values, and therefore such regions are linearly interpolated provided that they comply with the following constraints:
-
•
A maximum of 10% of the effective wavelength range is allowed to present consecutive negative flux values.
-
•
A maximum of 25% of the effective wavelength range is allowed to present negative flux values spread all over the spectrum.
Otherwise, the sample is considered to be a poor-quality spectrum, and it is discarded.
-
•
-
3.
The spectra are downsampled from 120 to 60 pixels per band, as this was found to preserve clustering quality while substantially reducing execution time.
-
4.
Both BP/RP spectra are joined in a single array of fluxes, for which the wavelengths are sorted in strictly ascending order.
-
5.
Finally, the resulting spectrum is normalised, so that its area sums up to one.
16.3.14.5.2 Training
Self-Organising Maps are an unsupervised technique based on neural networks. These maps perform a projection of a multidimensional input space into a two-dimensional grid, facilitating its visual exploration using appropriate tools. This projection is characterised by preserving topological order; that is, similar data in the input space will belong to the same neuron or to neighbouring neurons in the output space. Each of these neurons has a representative, called a prototype, which is a synthetic pattern that is adjusted during the training phase and that best represents the input patterns that belong to that group. The membership of a source in a neuron is determined by identifying the closest neuron prototype to the given source.
Due to the large amount of data to be processed in the current context, the base SOM algorithm was optimised using the so-called Fast-SOM version (Dafonte et al. 2018), which was designed and implemented for distributed computing environments. One of the most important processing steps involves the calculation of the neuron prototype. In the case of the SOM computed for Gaia DR4 outliers, each neuron prototype was calculated as the average spectrum for all the XP spectra of the sources contained in that particular neuron. This simple representation was achieved due to the configuration used and the execution performed, where the number of iterations was large enough to reach a neighbourhood radius (which represents the topological distance between neurons) equal to zero (Kohonen 2001) during the calculation of this specific SOM map.
In order to set up the SOM for Gaia DR4, the following variables were appropriately tuned and configured according to the results obtained during an extensive experimentation phase:
-
•
Grid of neurons: (900 neurons).
-
•
Similarity function: squared Euclidean distance.
-
•
Neighbourhood function: Gaussian.
-
•
Maximum number of iterations: 250.
-
•
Fast-SOM activation point: 20% of iterations (50 in this case).
16.3.14.5.3 Clustering quality assessment
In the absence of prior information about the physical nature of the objects that populate the neurons, clustering quality cannot be assessed using classification success rates. In this case, internal parameters can be used to measure the quality of the grouping and to validate the performance of the SOM algorithm. We adopt a descriptive approach based on inter- and intra-neuron distances (Álvarez et al. 2022).
The inter-neuron distance is computed as the squared Euclidean distance between two different neuron prototypes. For each neuron, statistical values are calculated considering only its immediate neighbourhood. The intra-neuron distance is computed as the squared Euclidean distance between a source and the prototype of the neuron where it is assigned, allowing different statistics to be calculated for the sources populating each one of the neurons.
In order to assess the quality of the clustering, we selected three parameters that allow the distribution of the intra-neuron distance to be described: a) the width of the distribution according to the value of the Full Width at Half Maximum (); b) the skewness () that measures the asymmetry of the distance distribution; and, c) the kurtosis (), which measures the level of concentration of distances. High-quality clustering will result from neurons with low values of the parameter, and large positive values of both skewness and kurtosis.
Additionally, a fourth quality parameter was defined to quantify the quality of each neuron relative to the other ones, allowing them to be easily compared. Therefore, was introduced as a scaled version of , in which the average value of the of neurons with lowest (that is, the best ones) is used as the scaling factor.
Finally, to facilitate the interpretation of quality measurement, we derived a new categorical index named , which is based on the values of the three parameters discussed above: , , and . Seven quality categories were empirically established to rank according to six percentiles (, , , , , and ), defined independently for the distribution of each parameter. For each neuron, we select the lowest percentile among the three aforementioned parameters. Thus, if this value is in the 95 percentile, then takes a value of zero; if it is in the percentile, then corresponds to category one, and so on up to category six. The latter corresponds to neurons for which the worst quality indicator falls outside the lowest percentile considered, the . Accordingly, the highest quality neurons have and the lowest-quality ones, .
Figure 16.27 shows examples of the intra-neuron distance distributions of objects populating two different neurons. The upper panel illustrates a low-quality neuron, which takes small values for and . The distribution is more symmetric, and the distance values are widely spread all over the distribution rather than concentrated in a specific range, which is also supported by the large values taken by the . The lower panel shows the intra-neuron distance distribution for a high-quality neuron, with large values of and and a small . The distribution is clearly skewed to the left, with a large number of sources assigned to the neuron at small distances.


16.3.14.5.4 Template matching
SOMs are a powerful data-mining tool for extracting knowledge from complex and multi-dimensional data, such as Gaia data. However, due to their unsupervised nature, these maps do not provide labels that can be associated with the samples being analysed. For this reason, a template matching procedure was included as part of the neuron description phase to determine a class label for each neuron using a set of reference templates. These templates help to study the physical nature of those outlier sources that populate a certain neuron in the OA SOM map.
For this purpose, the templates are built using information from the UCA pre-trained SOMs (see Section 16.3.13.2). At each of those maps, those neurons that achieved a qualified majority above 68% were selected as template candidates. Then, for each one of these neurons, the 68% of the closest sources to the prototype were selected, and their XP spectra were averaged to build the actual templates, which were associated with the corresponding predominant object type. As a result, 551 templates are obtained, distributed as shown in Table 16.32.
| Source Type | Subtype | Number of templates |
|---|---|---|
| STARS | STAR_OBA | 1 |
| STAR_F | 21 | |
| STAR_G | 138 | |
| STAR_K | 172 | |
| STAR_M | 59 | |
| STAR_WD | 1 | |
| STAR_CARBON | 1 | |
| STAR_ULTRACOOL | 1 | |
| GALAXIES | GAL_Z01_LT | 30 |
| GAL_Z01_02 | 33 | |
| GAL_Z02_GT | 3 | |
| QUASARS | QSO_Z05_LT | 4 |
| QSO_Z05_15 | 26 | |
| QSO_Z15_25 | 38 | |
| QSO_Z25_35 | 21 | |
| QSO_Z35_45 | 2 |
These reference templates were used to label the neurons in the Gaia DR4 outlier SOM map by means of the k-NN method and the squared Euclidean distance, so that for each neuron the closest template to its prototype was identified. In addition, to ensure the suitability of the assigned templates (and class labels), two conditions were imposed: a) the distance between a template and its prototype must not exceed a threshold ; b) the neuron must satisfy a quality threshold based on the aforementioned indicators, where the categorical index must meet the condition . Both criteria depend, at the same time, on the quality of the spectrophotometry. The threshold values defined above were empirically determined based on the experimentation performed during the internal validation cycles in Apsis.
Therefore, neurons that did not meet at least one of these conditions were not associated with a template and, hence, were not assigned a class label either. Finally, it should be noted that the neuron prototypes are synthetic and, therefore, they do not correspond to real observations, but rather to the average XP spectra of the observations that populate the neuron. The templates are also synthetic, as they are based on the averaged XP spectra of several sources. For this reason, we also provide a centroid for each neuron (centroid_id), representing the real observation closest to the neuron prototype, as determined, once again, using the squared Euclidean distance.
16.3.14.6 Scope
As we mentioned in Section 16.3.14.1, the scope of the OA work package is to analyse classification outliers in Gaia DR4. As originally conceived, this module strongly depends on the performance of the general classification packages UCA and DSC and the techniques they employ (see Section 16.3.13 and Section 16.3.2).
Following DPAC recommendations for Gaia DR4, the following filters were also implemented in order to discard some sources:
-
•
Discard sources with fewer than 5 transits or 241 measurements (both for BP and RP spectra).
-
•
Remove duplicate sources.
-
•
Accept only sources where AGIS (Section 4) converged to a solution.
16.3.14.7 Uses and limitations
OA results can be used to perform an in-depth analysis of the sources weakly classified by DSC and UCA, which mostly correspond to faint stars and extragalactic objects. To this end, OA provides several parameters, as discussed in Section 16.3.14.4. In this section we present some typical use cases that may be useful to users working with OA outputs:
-
•
The SOM map is composed of 900 different neurons and each one of them represents a group of similar objects, which may be candidates for an isolated study through the statistical parameters that are provided for each neuron or even through other parameters available in the Gaia DR4 catalogue.
-
•
The prototype synthetic XP spectrum is provided for each one of the neurons, and it can be considered as a representative of the spectra for those sources that belong to a neuron. The template XP spectrum will also be available for those neurons that were assigned a class label.
-
•
For each neuron, different quality measurements or indices are available, so that a filtering can be performed by the end user in order to retrieve high-quality neurons (HQN) or low-quality neurons (LQN) and then perform a further analysis on the objects that belong to that specific group. In addition, the distance between the source XP spectra and the neuron prototype is also available in order to perform a finer filtering.
-
•
For the best quality neurons (from category zero to five), a class label provides an indication of the astronomical class of the objects populating each neuron, allowing all neurons or objects associated with a particular class to be identified and studied.
-
•
For each source, the processing and quality information is provided in the flags_oa field in the ap_class table, and it is encoded as ‘ABCD’. The first two digits, A and B, indicate the number of gaps containing negative flux values in the BP and RP spectra, respectively. They take values between 0 and 2, with 2 indicating two or more gaps. The third digit, C, represents the source classification quality category, with values ranging from 0 to 5. The fourth digit, D, represents the quality category of the neuron to which the source was assigned, with values ranging from 0 to 6. This field is null for sources that were not selected as outliers by either DSC or UCA, or that were discarded during OA processing.
There are some known limitations when working with these results:
-
•
Currently, no templates were considered for binary or emission line stars, and therefore it may not be possible to deal with this type of object within the OA outputs.
-
•
Some poor quality sources are assigned to the closest neuron in the SOM map according to the distance between the source XP spectra and the neuron prototype. However, they may provide such a poor fit that it renders their membership in that neuron effectively useless. Therefore, we encourage the user to filter those sources using distance-based criteria as discussed above.
-
•
The scope of OA is restricted to the subset of sources identified as outliers or weakly classified by upstream modules, and that also satisfy the spectra preprocessing and quality filtering criteria. Therefore, the results are not intended to describe the full Gaia DR4 population.
A client-server system (Álvarez et al. 2022) was specifically designed to facilitate the analysis of SOM maps, named GUASOM (Gaia Utility for the Analysis of Self-Organising Maps). It was implemented using web technologies, to benefit from their flexibility and easy access to the information. The version of GUASOM developed specifically for the spectra processed by the UCA and OA packages for Gaia DR4 is called GUASOM flavour Gaia DR4 and provides several visualisation utilities that allow a user-friendly analysis of the information present on the map. The tool provides both classical and specific domain representations:
-
•
U matrix: This representation shows the distance between the different neuron prototypes, where a smaller distance means more similarity. This is useful to identify groups of neurons populated by objects with similar SEDs. In our application the user can control the boundaries of the distance among neurons through a slider, with the objective of exploring the inner structure of the map.
-
•
Hits: It displays the number of objects assigned to each neuron, making it possible to identify dense regions in the map.
-
•
Parameter distribution: This visualisation shows the distribution of a particular parameter of the domain in the map, displaying the average values calculated in each neuron.
-
•
Catalogue labels: This graphic shows the representative label of each neuron according to a specific catalogue chosen by the user. The labels of the objects were obtained through the cross-matching procedure described above. Through a slider, the user can control the qualified majority limit that the label has to reach to be representative.
-
•
Template labels: It is similar to the Catalogue labels visualisation, but the representative label of each cluster is based on a template, selected as the one that best fits the prototype according to the squared Euclidean distance. A slider allows the user to control the distance between the prototype and its corresponding template in order to decide the adjustment threshold between them that allows assigning the label with sufficient confidence.
-
•
Category distribution: In this representation the distribution of a single type of object is shown. The user can select the category to be displayed from a set of labels, according to the templates and catalogues available for the map. This graphic allows the user to easily observe the regions of the map containing objects of the chosen type.
-
•
Colour distribution: It shows the colour distribution of the objects in the map, derived as the difference in magnitudes between two photometric bands, which correspond to the two photometers, BP and RP, and the colour is calculated as .
-
•
Novelty: This visualisation displays the distance between a selected template and its prototype. Smaller distances indicate less novelty, because the template associated with the neuron is more similar to the prototype and therefore corresponds to a well-known object type. The user can select the set of templates to render.
The strength of the tool lies in its ability to explore the neurons and the objects assigned to them by means of the following specific representations:
-
•
Spectra: It displays the matched template, the object-centroid, and the prototype of a particular neuron. The user can also visualise the spectra of the objects in the neuron that best and worst fit the prototype.
-
•
Population: It shows the frequency of the different types of objects in the neuron according to the available templates or catalogues.
-
•
Statistical summary: The summary shows a table containing the statistical information available for a neuron.
16.3.14.8 Changes with respect to Gaia DR3
With respect to Gaia DR3, OA has two primary changes:
-
•
Add UCA outliers as input data.
-
•
Refinement of the templates. In addition, the two levels of template granularity were removed, and only the most specific level is currently used.