WorksPhysics and Astronomy
A Classifier Framework for ALMA Bandpass Calibration Anomalies
Abstract
Bandpass calibration corrects instrumental responses across observing frequencies in interferometric radio observations, so the measured calibration solutions inherently contain spectral variation that varies with instrumental configurations and noise conditions. However, some signals contain anomalies, which if not caught can lead to poorly constructed science products. Observatory pipelines often use scalar metrics with individual, linear decision boundaries. Constructing a simple parametric model can be effective for observations with a relatively limited parameter space, but it becomes progressively less accurate as the parameter space expands. To address this challenge, we design a machine learning framework that treats anomaly identification as a supervised classification task and learns complex, non-linear decision boundaries across multiple features optimized for predictive performance. In particular, we use an XGBoost model that sits on top of several features and specialized scan statistic models to classify anomalies in amplitude solutions from ALMA bandpass calibrations. Trained on an extensive, quality-controlled ALMA dataset, this classifier framework leverages features derived from kernel-based scan statistics to characterize deviating spectral intervals, while remaining extensible to additional feature sets. This method substantially reduces misclassifications in bandpass anomaly detection compared to the current pipeline heuristics. By improving flagging decisions and calibration quality, this classifier framework provides a scalable supplement for observatory operations and is generalizable to next-generation radio facilities.
Introduction
Processing data from general-purpose interferometric radio observatories is challenging, with one key challenge being distinguishing observations that are conducted under expected system performance, from observations that require corrective intervention. The Atacama Large Millimeter/sub-millimeter Array (ALMA) pipeline [13] represents a revolutionary step toward automated processing and data delivery, but often requires human inspection to ultimately decide if the data can be delivered automatically or if corrective action must be taken. For the early years of ALMA operations through the end of 2023, data reducers inspected every reduction to identify calibration issues. More recently, ALMA introduced a quantitative Quality Assessment (QA) process that facilitates partial automation of pipeline processing and data delivery [27, 16]. Nevertheless, identifying calibration issues that compromise the scientific integrity of the data continues to rely either on human inspection or on expert-crafted heuristics with manually tuned thresholds, which may not generalize across observations.
One important step in the calibration process is bandpass calibration, which normalizes the instrumental and atmospheric transmission across frequencies [23, 10, 2]. Observations of bright, spectrally flat bandpass calibrators are used to measure the antenna responses as a function of observing frequency, referred to as calibration solutions. Each bandpass solution represents complex responses, in amplitude and phase, of frequency channels for each spectral window (SPW), antenna, and polarization. Outlier features in bandpass calibration solutions often show as artificial passband shape distortions, which can propagate into the downstream calibration process and introduce artifacts into the science product (e.g. Villanueva et al. [24]).
As in the case of ALMA observations, example outlier features in bandpass solutions include large variability over spectral channels, spikes caused by instrumental leakage from the water vapor radiometer (WVR), and systematics introduced by the correlator itself. While some of these effects can be mitigated through standard calibration procedures, such as WVR corrections, others require identifying and flagging anomalous solutions and excluding them from the calibration process. One such effect is “platforming” or “subbanding”, arising from occasional errors in the way that the correlator stitches together subsections of a given SPW (Cortes et al. [6]). This gives rise to discrete offsets in amplitude between adjacent subbands. Platforming anomalies are particularly common in wide-bandwidth correlators, and are therefore expected to remain important in next-generation radio facilities. The ATAC correlator at the heart of the upcoming ALMA Wideband Sensitivity Upgrade (WSU) (Brogan [3]; Donovan Meyer et al. [8]) will implement a similar subband stitching procedure and may also have such platforming anomalies, though on a wider scale.
Various statistical methods have been developed to identify outliers from the background distribution (including astronomical signals, measurement interference, and anomalies relative to the baseline or noise) and to quantify detections using statistical metrics (e.g. Offringa et al. [18]; Nita & Gary [17]; Gavish & Donoho [11]; Xue et al. [26]; Perez-Portero et al. [21]). A conventional approach for setting a decision threshold is to obtain an empirical distribution of metric values from well-performing data and compare observed metrics against this empirical baseline. Such fixed-threshold hypothesis tests require the validation of the empirical baseline being representative. While tuning independent decision thresholds can be effective in a limited parameter space, it becomes impractical in a complex, sparsely sampled parameter space. As the number of input parameters and the possible combinations increase, the number of thresholds needed to be determined and validated also increases, because each parameter combination may have its own empirical baseline distribution and corresponding decision threshold. Meanwhile, as the parameter space expands, observations become sparse within each parameter combination, leaving too few samples to obtain representative empirical distributions. In practice, astronomical facilities with a complex parameter space, such as ALMA with varying antenna configurations and noise conditions, often apply a global threshold to each metric, which results in context-unaware decisions. Consequently, a given metric value can be normal for one input parameter combination but an outlier for another.
Machine learning (ML) methods, in contrast, excel at learning multivariate decision boundaries. The ALMA Science Archive contains over a decade of expert-curated, high-quality data that can serve to train a classifier. By using labels based on data reducers’ inspection of these data, ML models can learn which metrics or features provide the best trade-off between the prediction purity and completeness by cross validation. One advantage of ML classification approaches over empirical statistical approaches is that ML reduces dependence on potentially fragile statistical assumptions and makes decisions directly by optimizing predictive performance.
In this work, we present a classifier framework for detecting anomalies in bandpass calibration solutions, with the current implementation focusing on the amplitude portion of complex solutions. In § 2, we describe the dataset of bandpass solutions from selected ALMA observations. § 3 presents the classifier framework, including the labeling strategy for both training and evaluation and the selection of input features derived from the raw solution data.
Data
Bandpass Calibration Data
Our models are trained on bandpass calibration data from selected public ALMA Principal Investigator (PI) science observations delivered during Cycle 9 (October 2022 – September 2023). Until the middle of Cycle 10, all ALMA data were systematically reviewed by ALMA staff prior to delivery to PIs. To prepare for the beginning of automatic deliveries in Cycle 10, the ALMA Cycle 9 data were subject to additional, retrospective review. These Cycle 9 datasets—and in particular the so-called “False Negatives” which were assessed to contain an actionable issue but that would have been auto-delivered with the QA assessment in place at the time—are the training data for this work. This ‘false negative’ dataset is preferentially enriched in features of interest for anomaly detection, making it well-suited for improving automated decision support. Among the anomalies present in this corpus, bandpass “subbanding” (discontinuities in the bandpass solution within a spectral window) is of particular relevance. This subbanding issue manifests in spectral windows created using the frequency division multiplexing (FDM) mode of the ALMA Baseline Correlator (BLC) ([9, 6]). In Cycle 9 there was no heuristic in the ALMA pipeline to detect subbanding. As of Cycle 12 a quantitative heuristic has been introduced, discussed in § 4.3.
The Cycle 9 data set contains 84,572 bandpass calibration solutions from 303 execution blocks (EBs), belonging to 151 member observing unit sets (MOUSs). Each MOUS contains one or more EB(s), and all data within a MOUS are merged into a single set of science products, e.g. image or spectral cube, ([6]). The distribution of categorical features of this Cycle 9 data set is shown in Figure 1, covering six ALMA receiver bands, 12-m array and 7-m array observations.
Figure 1. Histograms of categorical features by bandpass solutions in the selected Cycle 9 training dataset.
A second data set, used to evaluate the generalizability of the classifier framework, was assembled from the recent public ALMA Cycle 11 observations with project codes starting with #2024 (October 2024 – September 2025). Beginning in late Cycle 10, ALMA began automated data delivery (based on QA scores), and Cycle 11 is the most recent cycle for which nearly all data are publicly available. We restricted to Cycle 11 calibration data that were inspected by data reducers during the ALMA QA process. It contains 744,240 bandpass calibration solutions from 2,641 EBs, belonging to 1,085 MOUSs, covering ten ALMA receiver bands (Band 1, and Band 3–10). Different from the main Cycle 9 dataset, the 7-m array observations in Cycle 11 were processed through the BLC ([7]), whereas previous cycles used the Atacama Compact Array (ACA) correlator.
Additional Metadata
At ALMA observing frequencies, strong atmospheric spectral lines, mainly from the water vapor and ozone, may introduce absorption features in the bandpass solutions at specific transition frequencies. While atmospheric transmission effects can be corrected using the Atmospheric Transmission at Microwaves (ATM) code implemented in the ALMA pipeline ([19]), these features in the bandpass amplitude arrays can spuriously trigger the anomaly detector and bias the classification; such features manifest as drops in amplitude within the bandpass spectrum, which can appear similar to the platforming effects to be caught, as shown in Figure 2. To characterize these atmospheric features, we constructed an atmospheric transmission model at 1 MHz resolution based on the ATM code. For each of the ALMA’s ten frequency bands, we constrained the transmission value curve by gas pressure, altitude, and precipitable water vapor (PWV), quantities which for our purposes are well-known and regularly measured at the ALMA Array Operations Center. The PWV values for each band were chosen based on the conditions in which that band typically observes, and the resultant set of curves were concatenated into a single representative all-band model. We then ran a standard peak-finding algorithm on the full curve to identify and label atmospheric line locations and their widths, in frequency, which defines our regions of atmospheric interference. These regions were then passed to the anomaly detector in order to help reduce false positives due to atmospheric interference.
Figure 2. Example individual bandpass amplitude solutions, with anomalous intervals shaded in red and non-problematic atmospheric interferences shaded in brown. Panel (c) shows an instance where a platforming anomaly intersects with the atmospheric interference (§ 2).
Methodology
We developed a supervised classifier framework that learns the mapping from features extracted from bandpass calibration solutions to Boolean anomaly labels. This framework is general with respect to feature construction and label definition, which can be based on either the amplitude or phase portion of complex bandpass solutions, or both. The current implementation considers only anomalies in the amplitude solutions. As the raw input data, bandpass amplitude gains are 1D arrays of length varying across EBs, and are typically normalized to a mean of 1.0. Because most standard ML classifiers require fixed-length input vectors, the raw data arrays are flattened into a set of numerical representations, i.e., feature vectors. As the predictive model, we use eXtreme Gradient Boosting (XGBoost, Chen & Guestrin [4]), which builds an additive ensemble of decision trees sequentially via boosting.
Labels
In this work, we define a bandpass calibration anomaly as an interval in the bandpass amplitude solution that deviates from the local background shape, where the associated bandpass solution requires the flagging action. Figure 2 shows example amplitude solutions with anomalous intervals. This definition matches the practical calibration procedure and captures a broad class of anomaly types, among which the subband artifact is a subset that accounts for a large fraction of the observed cases.
We adopt a Boolean labeling scheme, with True representing solutions having bandpass amplitude anomalies and False representing solutions without such anomalies. The ground-truth labels used for model training were defined from a combination of the ALMA Quality Assurance level-2 (QA2) flagging action and additional label review by the authors with ALMA calibration expertise. During the ALMA QA2 process, data reducers inspect the data and flag anomalous data with documented QA2 flagging reasons, with each reason corresponding to a specific task in the ALMA Science Pipeline (Hunter et al. [13]). A detailed description of the ALMA QA process is provided in Cortes et al. [6]. of the selected Cycle 9 dataset (at the solution level) was manually flagged during the QA2 review, and has manual flagging reasons related to bandpass amplitude anomalies1. These QA2 flagging reasons were used to effectively define the initial True labels. We further validated and, where needed, revised the labels.
Looking forward, labels derived directly from the characteristics of the calibrated visibilities may better represent the issues that adversely impact science products. Exploring more scalable ways to identify these issues, with less reliance on human generated labels, will be the subject of future work.
Features
XGBoost excels at building predictors from combinations of different types of features. We constructed two types of features: statistical and categorical. The statistical ones include metrics based on interval anomaly detection methods applied to several levels of cleaning the data, normalized array dispersion, and channel spacing. For the categorical features, we need to pay particular attention to potential data leakage – not because it would make our calculated performance worse, but because it would make the evaluation less reliable. In particular, we do not want to encode dataset-specific associates with the labels. For example, bandpass anomalies in the training data were associated with specific antennas during ALMA Cycle 9 observations. This association was cycle-specific because it resulted from the temporary instrumental conditions of that cycle. Including antenna name as features could therefore allow the classifier to memorize this dataset-specific pattern between antenna and anomaly labels, resulting in reduced generalization.
The implemented features are discussed below, with the full set of features summarized in Table 1. Beyond the presented implementation, the framework can be extended to include additional features derived from the complex bandpass solutions, not only amplitude-frequency behavior but also phase-frequency behavior, with corresponding updates to the labeling strategies.
| Features | Description | Feature construction |
| Masked score () | Anomaly score for a spectral interval deviating from the baseline | Derived using the scan statistic with both 5% spectral edges and atmospheric interferences masked; dimensionless |
| ⋯ | ⋯ | ⋯ |
| Anomaly width for masked score () | Frequency range of the spectral interval with the highest masked score | Same as masked score; units of Hz |
| ⋯ | ⋯ | ⋯ |
| Unmasked score () | Anomaly score for a spectral interval deviating from the baseline | Derived using the scan statistic with 5% spectral edges masked, but atmospheric interferences unmasked; dimensionless |
| ⋯ | ⋯ | ⋯ |
| Anomaly width for unmasked score () | Frequency range of the spectral interval with the highest unmasked score | Same as unmasked score; units of Hz |
| Fixed-width score () | Anomaly score for a spectral interval deviating from the baseline | Derived using the scan statistic with both 5% spectral edges and atmospheric interferences unmasked; fixed interval width of 62.5 MHz; dimensionless |
| ⋯ | ⋯ | ⋯ |
| ⋯ | ⋯ | ⋯ |
| NormalizedDispersion | Bandpass amplitude dispersion | Computed using Equation (1) from amplitude array with a channel separation of 4; dimensionless |
| ⋯ | ⋯ | ⋯ |
| Channel spacing () | Effective spectral interval | Computed from frequency array; units of Hz |
| ⋯ | ⋯ | ⋯ |
| ALMA receiver band | Observational frequency band | Categorical feature |
Table 1. Constructed Features
Scoring metrics based on NWKR scan statistics
The primary features in our classifier are based on an interval anomaly detection method called “Scan Statistics” ([14, 12]). The classic scan statistics method assumes clean and well-behaved data other than some potentially anomalous region. Rakib et al. [22] adapts this to the more complicated characteristics observed in ALMA Bandpass solutions by modeling the background with a Nadaraya-Watson kernel regression (NWKR) model, and then scans all possible intervals looking for the one that most deviates from that fit. It identifies a region which is quantitatively “most anomalous” and provides a score. The score ranges from 0 to 1, with large values representing a more anomalous interval. This score is provided for each interval, and the score of the largest scoring interval called a scan statistic is returned, along with the corresponding interval.
As this scan statistic method is designed for data that (without an interval anomaly) is well-fit by NWKR, it is not always appropriate for the real calibration data. As a result, we run it in three different ways, producing different features with each fed into XGBoost.
The first features are a score and found interval width , which we refer to as masked. These only consider intervals that do not overlap with known atmospheric lines; that is, it masks out the lines with known atmospheric interference. Otherwise, for a given amplitude solution that has atmospheric lines, the scan statistic tends to identify intervals in the atmospheric interference range, biasing the scoring metric and resulting in false anomalies. Therefore, anomaly scores computed on all channels are typically higher than when the channels affected by the known atmospheric lines are excluded. Masking the affected channels is effective in isolating atmospheric lines from instrumental calibration anomalies and reducing false detections.
The second set of features are the same score and found interval width , calculated without the masking of atmospheric lines. This is sometimes necessary for when platforming occurs in intervals that overlap with atmospheric interference, such as in Figure 2 panel (c). In addition to channels flagged by other calibration steps, both and exclude the first and last 5% of channels in each spectral window.
The last scan-statistic feature is the score , calculated using a restricted form of the scan statistic method – one in particular that fixes the interval width at 62.5 MHz. This corresponds to the width of the BLC FDM subband, and this width is characteristic of the platforming anomalies observed in the ALMA BLC. This size can be adapted to reflect different hardware setups, supporting generalizability across facilities (e.g. extending to 200 MHz for the ALMA WSU). excludes only channels flagged by other calibration steps and otherwise considers all spectral channels without masking atmospheric lines.
Additional Expert-Informed Features
We introduced several, additional expert-selected features to represent other salient characteristics of the data. As the only categorical feature, we include the ALMA receiver band, with each band mapping to a fixed frequency range (Figure 1). This feature provides context for frequency-dependent effects, including atmospheric transmission, rather than correlator behavior. We also include the channel spacing, in Hz, of amplitude solutions. It represents the effective spectral resolution, determined by the inherent correlator resolution and bandwidth setup, together with the smoothing function and channel-averaging factor applied during calibration.
In addition, we included another statistical feature to measure the amplitude dispersion, we used the normalized median absolute deviation (MAD, median()) of the fourth-order difference,
where is the bandpass calibrator amplitude at channel . We use a channel separation of 4 because of the non-negligible correlation observed between neighboring channels (e.g. and ) introduced by the smoothing function of ALMA’s correlators (i.e. Hanning smoothing). This channel correlation, however, becomes effectively negligible at a separation of four channels, allowing the feature to be a reliable estimate of independent amplitude variations [15]. Normalization by the overall dispersion of each solution, MAD(), improves comparability across solutions.
Data Preparation
In order to avoid introducing spurious polarization-dependent effects in the data, both polarizations of a given antenna and SPW are always flagged together, even when the issue only occurs on one polarization. While necessary from a data-reduction perspective, this procedure introduces inconsistencies in solution-level labeling. To account for this, we aggregate solutions at the polarization-pair level and combine their labels using a logical OR operator.
**Note—**The selected feature set, used for the XGBoost model, includes seven statistical features flattened from the bandpass amplitude solution and a categorical feature, see § 3.2.
For feature construction at the polarization-pair level, the six statistical features are derived independently from the amplitude array of each polarization, while channel spacing and the categorical ALMA receiver band are common to both polarizations. As such, each polarization-pair aggregation has 14 features in total. As model inputs, they may be abstractly encoded in other input features. Splitting at the EB level ensures that, even if the model learns EB-specific patterns during training, the evaluation on the test set with previously unseen EBs remains trustworthy.
Training Strategy
Because most ALMA data are of high quality, the training dataset is highly imbalanced. Following polarization-pair aggregation, bandpass amplitude anomalies account for only of the 42,286 solution pairs. This imbalance reflects the intrinsic distribution of real observational data, where anomalous calibration solutions are rare compared to nominal solutions. To account for the imbalanced class, we use stratified sampling for the train-test split and give more weight to the minority True class during model training.
Train and test splits were performed at the EB level to avoid information leakage between training and evaluation sets. For each train/test split, a given EB (and thus all its bandpass solutions) is assigned to either the training, validation, or test set. Because solutions from the same EB typically share similar observing and instrumental conditions, this prevents non-independent solutions from existing in both the training and evaluation sets and thus prevents overestimation of model performance. Moreover, although EB IDs are not included as model inputs, they may be abstractly encoded in other input features. Splitting at the EB level ensures that, even if the model learns EB-specific patterns during training, the evaluation on the test set with previously unseen EBs remains trustworthy.
Evaluating Effectiveness
Nested Cross-Validation
The XGBoost classifier hyperparameters include maximum depth of a tree, learning rate, number of estimators, and subsample ratio of the training instances. We optimized these hyperparameters using nested cross-validation with the score as the optimization metric:
where , recall is the fraction of true anomalies identified, and precision is the fraction of predicted anomalies that are true anomalies2. We use a value so that the score weighs false negatives more, aligning with the objective of anomaly detection to prioritize identifying true anomalies over minimizing additional false positives. In addition, we found that the measured score and model performance are sensitive to the train-test split. This is because anomaly examples are unevenly distributed across EBs, and therefore different train-test splits produce test sets with anomalous cases of varying difficulty. As such, in contrast to a single train-test split, we used nested cross-validation, as illustrated in Figure 3. In each outer fold, 80% of the EBs were used for training and validation and 20% were held out for testing. Each of the five outer folds serves as the test set once, allowing every labeled anomaly to be evaluated exactly once. Within each outer-training set, five-fold inner cross-validation is used for hyperparameter optimization. The outer folds assess model performance and its variation across splits.
Figure 3. Schematic of the classifier evaluation framework workflow using nested cross-validation. The 5-fold cross-validation procedure produces five optimized hyperparameter sets and corresponding models, which together estimate the range of values and classifier performance. Colored blocks (purple, lime, green, orange, and pink) represent the held-out outer test folds, brown blocks represent the held-out inner validation folds, and white blocks represent the training folds used in each iteration.
Results
The combination of XGBoost together with the scan statistics performed conjunction operations to understand the data distribution. As the baseline feature set, using only from the scan statistic [22] obtains an score of across the five outer test folds. We extend this baseline by including the corresponding interval width, , followed by the unmasked and fixed-width features to catch more scenarios of anomalies, and pinpoint the precise nature of the platforming issue. As shown in Table 2, iteratively adding these features improves the classifier performance. Allowing XGBoost to also train on these obtains an increasing mean to with reduced fold-to-fold deviation, measured across the same folds.
| Feature Set | TN | TP | FP | FN | |
| 41772 (98.79% 0.18%) | 163 (0.39% 0.06%) | 310 (0.73% 0.21%) | 41 (0.10% 0.04%) | 0.63 0.10 | |
| 41980 (99.28% 0.09%) | 157 (0.37% 0.06%) | 102 (0.24% 0.12%) | 47 (0.11% 0.05%) | 0.73 0.10 | |
| 42039 (99.42% 0.06%) | 176 (0.42% 0.04%) | 43 (0.1% 0.08%) | 28 (0.07% 0.04%) | 0.85 0.05 | |
| 42055 (99.45% 0.04%) | 180 (0.43% 0.03%) | 27 (0.06% 0.05%) | 24 (0.06% 0.02%) | 0.88 0.02 |
Table 2. Performance Metrics Across Outer Test Folds for Different Feature Sets. Total Count (Average Percentages).
Because of the high imbalance between the True and False classes (i.e. the anomalies and nominal data), XGBoost’s ability to learn the less common anomaly class is limited. Therefore, we further included additional expert-informed features that explicitly address radio-specific complications. With the full set of eight features (six features computed separately for each polarization and two features common to both), the XGBoost classifier leveraged complementary domain knowledge to improve performance beyond the scan statistic features. The addition of these expert-informed features further improves the mean score to across the outer test folds.
In the full-feature model, shows a strong influence and is closely related to the model’s decision process (Figure 4). Because there may be additional features not included in the used feature set that are correlated with features having high importance scores,

Figure 4. Feature importance of the implemented features by weight, measured by the number of times a feature is used for a split across all trees in the model. Subscripts (0, 1) correspond to features derived separately from the two orthogonal polarization solutions; features common to both polarizations have no subscript (see § 3.3).
Note—Evaluation was performed on the ALMA Cycle 9 training dataset, which contains 84,572 individual bandpass calibration solutions corresponding to 42,286 polarization-pair samples. : Confusion matrix counts summed over the five outer test folds and the average normalized confusion matrix (per-fold percentages).
a detailed analysis of the causes of the anomaly predictions is beyond the scope of this work.
Comparison to ALMA pipeline heuristic
The bandpass subband heuristic implemented in the current ALMA pipeline evaluates anomalous features associated with a subband width of 62.5 MHz, using five threshold-based heuristics (ALMA/CASA Pipeline Team [1]). It is designed to identify specifically correlator subband issues (including platforming), and applies only to spectral windows processed in the FDM operating mode of the BLC. Accordingly, the selected Cycle 9 training dataset contains 39,134 applicable FDM bandpass solutions. Following the same evaluation framework (§ 3.3), we aggregated the prediction from the two orthogonal polarization bandpass solutions, and obtained 19,567 polarization-pair samples. Compared against the ground-truth labels defined in § 3.1, the confusion matrices of the XGBoost classifier and the current pipeline heuristic are shown in Figure 5 (left and right, respectively). The classifier substantially improves the performance for detecting bandpass amplitude anomalies, reducing both the false-negative rate (FNR) and false-positive rate (FPR).3 Over the 19,567 polarization-pair samples, the FNR decreases from 42% for the heuristic to 13% for the classifier, while the FPR decreases from 0.3% to 0.12%. Although the FPRs of both methods are low, ALMA processing aggregates the results from many independent assessments in determining which datasets need manual review, so a modest FPR for individual assessments can lead to a substantial human inspection workload.
Figure 5. Confusion matrices for the machine learning classifier (blue color scale, left) and the ALMA calibration pipeline heuristics (brown color scale, right), respectively. Model predictions were compared against ground-truth labels derived from the combination of ALMA QA2 flagging and expert review. Because the pipeline heuristic applies only to the observations in the FDM operating mode of the BLC, the comparison is restricted to the 19,567 polarization-pair samples in the Cycle 9 training dataset for which predictions from both methods are available.
We consider that two elements account for the performance improvement of the ML classifier, relative to the current ALMA pipeline heuristic. First, the XGBoost classifier learns and optimizes complex, nonlinear decision boundaries across multiple features. In contrast, the pipeline’s current QA scoring framework treats quantitative features independently, each with a univariate decision boundary, and classifies a sample as anomalous if any single feature crosses the threshold. Second, the implemented scan-statistic feature set (Rakib et al. [22]) is particularly well-matched to the target subband anomalies.
Discussion
Limitation
We examined misclassified calibration solutions in the test folds, including false negatives (Figure 6), corresponding to anomalous solutions missed by the classifier; and false positives (Figure 7; Appendix § 9), corresponding to false alarms. One class of false negatives involves the platforming anomalies at the edge of amplitude solutions (Figure 6 (1)–(4) and (6)–(7)).

Figure 6. False negative classifications in the selected Cycle 9 training dataset. 24 pairs of amplitude solutions (polarization X in blue and Y in purple) were predicted as nominal solutions (False), whereas QA2 labeled them anomalous (True). Brown shaded regions mark atmospheric interference, where present.

Figure 7. False positive classifications in the selected Cycle 9 training dataset. 27 pairs of amplitude solutions (polarization X in blue and Y in purple) were predicted as anomalous (True), whereas the QA2 labels are False. Brown shaded regions mark atmospheric interference, where present. Red shaded regions mark anomalous intervals identified by the scan-statistic masked scoring.
Because the digital filter response leads to a loss of sensitivity at both edges of spectral windows, we constructed the central scan statistics (masked and unmasked) to exclude the extreme edge channels of the amplitude solutions (the first and last 5% of an array). As such, a substantial region of an edge platforming anomaly was not evaluated by the scan statistic, limiting the classifier’s ability to identify these anomalies. We explored additional features designed to identify edge platforming, including searches within 10% of each end of the spectrum for step-like discontinuities and their overlap with the fixed-width scan statistic intervals. However, these features did not improve classifier performance so were not included in the final feature set. Moreover, one false negative involves two anomalous intervals, located at the edge and in the middle respectively (Figure 6 (1)), whereas the scan statistic assumes a single anomalous interval per solution.
Further review found that the false negatives in Figure 6 (11)–(22) are related to an issue caused by an incorrectly seated correlator card. This issue produced significant subband platforming in several antennas within the same EBs, which were correctly identified by the classifier, but also introduced artifacts in the solutions for other antennas. In particular, the false negatives in Figure 6 (16)–(22) are associated with a specific EB, which was affected by subbanding in the reference antenna. Since antenna-based calibrations are relative to the reference antenna, several other antennas were corrupted by the anomaly in the reference antenna, showing unusual morphologies, and were consequently missed by the classifier. These corrupted antennas were flagged by data reducers so show up as false negatives, although they would likely not have been anomalous had the reference antenna been good. The classifier identified the directly affected antennas, suggesting that these false negatives in Figure 6 (11)–(22) are propagated calibration artifacts rather than missed subband anomalies. A definitive determination of whether these propagated artifacts are consequential anomalies can be made upon assessing the calibrated data products.
The false positives identified by the classifier are shown in Figure 7, with the anomalous intervals shaded in red. Some false positive solutions happen to contain spikes introduced by the WVR Local Oscillator (LO) leakage, which occurs at frequencies corresponding to the (sub)harmonics of the 183.3 GHz LO signal, such as the spikes at 91.66 GHz in Figure 7 (22)–(24). However, these solutions were not classified as anomalous because of the LO leakage artifacts. Although the classifier, unlike the current pipeline heuristics, does not explictly exclude the known WVR LO frequency ranges, the anomalous intervals identified by the scan statistic do not coincide with such frequencies. Moreover, the incidence of these leakage artifacts is low in the current training dataset. We therefore find no clear evidence that implementing a veto for the LO leakage frequencies would change these misclassifications. Dedicated mitigation should be evaluated in future work.
We have assumed a relatively simple ground-truth rule as a prediction target for our classifier: a specific class of bandpass calibration anomalies should have the affected antenna and spectral window flagged. A more precise determination of the circumstances under which these anomalies, or the classifier misclassifications, if not flagged or otherwise mitigated, adversely impact the quality of the downstream calibrated data will be the subject of future work.
Application to Cycle 11 Observations
To assess generalizability to unseen observations, we applied the classifier model trained on the Cycle 9 dataset to a per-cycle testbed of Cycle 11 observations. This Cycle 11 dataset is times larger than the Cycle 9 training dataset, containing 372,120 solution pairs (744,240 individual solutions). The Cycle 11 dataset had two notable characteristics that were not in the Cycle 9 training data: Cycle 11 had a new receiver band, Band 1, that was not offered for PI science during Cycle 9; and the 7-m array data were correlated with the BLC, not the ACA correlator used in Cycle 9 and earlier cycles. Note that the target bandpass anomalies are only present in BLC data, so will not have been represented in the Cycle 9 7-m training data.
It has not yet been feasible to carefully review the QA2 flagging by data reducers for this dataset to ensure consistent labeling, as was done for the Cycle 9 training dataset. For this reason, we have not used QA2 flagging as a source of ground truth, but instead compare the classifier predictions with the QA2 flagging actions. For the 12-m array observations, the classifier predicted 566 solution pairs to have bandpass amplitude anomalies, while data reducers manually flagged 849 pairs for QA2 reasons related to bandpass amplitude anomalies. Of these, 209 pairs were identified by both the classifier and data reducers. We subsequently reviewed the 1206 unique pairs identified by either method and confirmed 335 to have meaningful subband anomalies: 205 of the 209 overlapping (classifier/data reducer flags) pairs and 130 identified by only one of the two methods. For Band 1 observations, the classifier identified 28 pairs, 27 of which were confirmed to have meaningful anomalies; 26 of these 27 were also caught during the routine QA2 process. These Band 1 detections suggest generalization to a new observing band.
About three quarters of the bandpass solutions flagged by data reducers but identified as False by the classifier are related to WVR LO leakage artifacts in Band 1. The flagging guidelines for LO leakage artifacts have varied across ALMA observing cycles. The recommended procedure in Cycle 11 differed from that in Cycle 9: a WVR LO harmonic strongly affects Band 1 at 45.83 GHz, close to the methanol maser transition at 45.84 GHz, leading to a recommendation to flag LO leakage artifacts at this frequency if a science line is also detected. Given the varying labeling policy for such artifacts — as well as the dependence on science data not present here — it is not unexpected that they are not identified by the classifier. Since the leakage artifacts occur at known frequencies, we regard them as low priority anomalies for the ML classifier. It could be considered in the future, with a consistently labeled dataset containing LO spikes, to optimize the classifier’s ability to handle them.
For the 7-m array observations, the classifier predicted 109 solution pairs to be positive. However, we did not find clear subband anomalies in the BLC-processed 7-m data. Most of these positive predictions occur in amplitude solutions with very few channels () and high noise. With so few channels, identifying an anomaly from random (and high) variation becomes difficult unless the anomaly is particularly obvious. Similar results are also present in the Cycle 9 FP examples (Figure 7 ((6)–(7))). Further expansion of the training dataset might improve classifier performance for solutions with high noise and limited channel numbers.
Because we reviewed only solutions identified positive by either the classifier or data reducers or both, we cannot assess anomalies among solutions classified as negative by both methods. We therefore estimated lower bounds on the classifier FNR and FPR. Across the 372,120 Cycle 11 polarization-pair samples, the classifier predicted 299 TP, 376 FP, and FN, relative to our review. This confusion matrix corresponds to lower bounds of FNR and FPR , consistent with the performance across the five outer test folds of the Cycle 9 training dataset.
Summary
We developed a supervised classifier framework for distinguishing anomalies from benign variation in ALMA bandpass calibration solutions. The framework is general with respect to feature construction and anomaly types. It can be extended to include additional features derived from the amplitude and/or phase portions of complex bandpass solutions, and to target amplitude and/or phase anomalies.
The current implementation focuses on amplitude anomalies. The classifier was trained on selected ALMA Cycle 9 observations containing 84,572 bandpass calibration solutions. Ground-truth labels were defined from a combination of ALMA QA2 flagging actions and additional label review. We used eight features derived from NWKR scan statistics and additional expert-informed features that account for radio-specific complications, including atmospheric interference, characteristic subband width, and amplitude dispersion. These features were used as inputs to the XGBoost classifier, which builds an additive ensemble of decision trees to produce predictions. Individual solutions were paired by polarization, with polarization pairs treated as the unit of classification.
We evaluated the classifier using nested cross-validation with EB-level splitting to avoid information leakage between training and evaluation data. Performance was assessed from the five outer test folds using and confusion-matrix statistics. Iteratively adding statistical anomaly metrics and domain knowledge improved classification beyond true baseline scan-statistic score alone. This helps the classifier capture more scenarios of anomalies, and pinpoint the nature of the subband issue. With the full feature set, we achieved a mean score of across the five outer test folds. Compared with the current ALMA pipeline subband heuristic on the applicable FDM subset, the classifier reduced the false-negative rate from 42% to 13% and the false-positive rate from 0.3% to 0.12%.
We further applied the trained classifier to 744,240 bandpass calibration solutions from ALMA Cycle 11 observations, nearly an order of magnitude larger than the training dataset. These Cycle 11 data include configurations not represented in the Cycle 9 training dataset, including Band 1 observations. The classifier identified meaningful Band 1 anomalies that should have been flagged, suggesting that the framework can generalize across unseen observations and different observing bands.
The remaining misclassifications note limitations of the current feature representation, including edge platforming, multiple anomalous intervals within a single solution, and solutions with high noise levels and limited channel numbers. Future work will assess whether misclassified calibration solutions propagate into calibrated data products and affect science data quality.
Data access & code
The training dataset of the selected ALMA Cycle 9 bandpass calibration solutions is publicly available in the Zenodo Repository (Xue et al. [25]). The code Bandpass Amplitude Anomaly Classifier is open source and available at https://github.com/cixue/bandpass-classifier with the model trained on the Cycle 9 data using the full feature set.
Facilities: ALMA
Software: XGBoost (Chen et al. [5]), Scikit-learn (Pedregosa et al. [20]), bandpass-classifier,
ACKNOWLEDGMENTS
This work was supported by the National Science Foundation under Cooperative Agreement 2421782 and the Simons Foundation grant MPS-AI-00010515 awarded to the NSF-Simons AI Institute for Cosmic Origins - CosmicAI, https://www.cosmicai.org/. This paper makes use of public ALMA calibration data and observation metadata, but not the scientific data, from all projects starting with: ADS/JAO.ALMA#2024. The National Radio Astronomy Observatory is a facility of the National Science Foundation operated under cooperative agreement by Associated Universities, Inc. ALMA is a partnership of ESO (representing its member states), NSF (USA) and NINS (Japan), together with NRC (Canada), MOST and ASIAA (Taiwan), and KASI (Republic of Korea), in cooperation with the Republic of Chile. The Joint ALMA Observatory is operated by ESO, AUI/NRAO and NAOJ.
Misclassified Solutions
Figure 6 and Figure 7 show misclassified bandpass calibration solutions over the five outer test folds of the nested cross-validation. Each panel shows a pair of amplitude solutions for the two orthogonal polarizations, identified by the EB ID, antenna name, and spectral window index in the lower right.
References
- [1]ALMA/CASA Pipeline Team. 2025, ALMA Science Pipeline User’s Guide for Release 2025.1.0.37, Joint ALMA Observatory
- [2]Álvarez-Ortega, D., Casadio, C., Pötzl, F. M., Kumar, A., & Janssen, M. 2025, A&A, 703, A196, doi: 10.1051/0004-6361/202556838
- [3]Brogan, C. 2024, in The Promises and Challenges of the ALMA Wideband Sensitivity Upgrade, 12
- [4]Chen, T., & Guestrin, C. 2016, CoRR, abs/1603.02754DOI
- [5]Chen, T., He, T., Benesty, M., et al. 2025, xgboost: Extreme Gradient Boosting
- [6]Cortes, P., Remijan, A., Hales, A., et al. 2022, ALMA Cycle 9 Technical Handbook, doi: 10.5281/zenodo.7764458
- [7]Cortes, P., Carpenter, J., Kameno, S., et al. 2025, ALMA Cycle 12 Technical Handbook, doi: 10.5281/zenodo.14933753
- [8]Donovan Meyer, J., Loomis, R. A., Brogan, C., & Hunter, T. 2024, in 33rd IEEE International Symposium on Space THz Technology (ISST 2024), 1
- [9]Escoffier, R. P., Comoretto, G., Weber, J. C., et al. 2007, A&A, 462, 801, doi: 10.1051/0004-6361:20054519DOI
- [10]Ewall-Wice, A., Dillon, J. S., Gehlot, B., et al. 2022, ApJ, 938, 151, doi: 10.3847/1538-4357/ac87b3
- [11]Gavish, M., & Donoho, D. L. 2014, IEEE Transactions on Information Theory, 60, 5040, doi: 10.1109/TIT.2014.2323359DOI
- [12]Glaz, J., & Koutras, M. V. 2024, Handbook of Scan Statistics (Springer), doi: 10.1007/978-1-4614-8033-4DOI
- [13]Hunter, T. R., Indebetouw, R., Brogan, C. L., et al. 2023, PASP, 135, 074501, doi: 10.1088/1538-3873/ace216DOI
- [14]Kulldorff, M. 1997, Communications in Statistics - Theory and Methods, 26, 1481, doi: 10.1080/03610929708831995DOI
- [15]Loomis, R. A., Öberg, K. I., Andrews, S. M., et al. 2018, AJ, 155, 182, doi: 10.3847/1538-3881/aab604DOI
- [16]Nakos, T., Francke, H., Nakanishi, K., et al. 2020, in Observatory Operations: Strategies, Processes, and Systems VIII, ed. D. S. Adler, R. L. Seaman, & C. R. Benn, Vol. 11449, International Society for Optics and Photonics (SPIE), 114491T. https://doi.org/10.1117/12.2559324
- [17]Nita, G. M., & Gary, D. E. 2010, MNRAS, 406, L60, doi: 10.1111/j.1745-3933.2010.00882.xDOI
- [18]Offringa, A. R., de Bruyn, A. G., Biehl, M., et al. 2010, MNRAS, 405, 155, doi: 10.1111/j.1365-2966.2010.16471.xDOI
- [19]Pardo, J. R., Cernicharo, J., & Serabyn, E. 2001, IEEE Transactions on Antennas and Propagation, 49, 1683, doi: 10.1109/8.982447DOI
- [20]Pedregosa, F., Varoquaux, G., Gramfort, A., et al. 2011, Journal of Machine Learning Research, 12, 2825
- [21]Perez-Portero, A., Querol, J., Camps, A., et al. 2022, Remote Sensing, 14, 4672, doi: 10.3390/rs14184672
- [22]Rakib, G. A., Ashton, T., Loomis, R. A., et al. 2026. https://arxiv.org/abs/2608.22201
- [23]Remijan, A., Biggs, A., Cortes, P., et al. 2019, ALMA Cycle 7 Technical Handbook, doi: 10.5281/zenodo.4511522
- [24]Villanueva, G. L., Gordiner, M., Irwin, P. G. J., et al. 2021, Nature Astronomy, 5, 631, doi: 10.1038/s41550-021-01422-zDOI
- [25]Xue, C., Mason, B., & Ashton, T. 2026, Training dataset of the selected ALMA Cycle 9 bandpass calibration solutions, Zenodo, doi: 10.5281/zenodo.21972118. https://doi.org/10.5281/zenodo.21972118
- [26]Xue, C., Remijan, A. J., Burkhardt, A. M., & Herbst, E. 2019, ApJ, 871, 112, doi: 10.3847/1538-4357/aaf738DOI
- [27]Yus, J. F. G., Dent, B., Brisbin, D., et al. 2020, in Observatory Operations: Strategies, Processes, and Systems VIII, ed. D. S. Adler, R. L. Seaman, & C. R. Benn, Vol. 11449, International Society for Optics and Photonics (SPIE), 114491U. https://doi.org/10.1117/12.2560719



