<figure><img src="image_1.png" /></figure>

# Optimization of foreground moment deprojection for semi-blind CMB polarization reconstruction

A. Carones, M. Remazeilles

► To cite this version:

A. Carones, M. Remazeilles. Optimization of foreground moment deprojection for semi-blind CMB polarization reconstruction. Journal of Cosmology and Astroparticle Physics, 2024, 2024 (06), pp.018. 10.1088/1475-7516/2024/06/018. [hal-04863121](https://hal.science/hal-04863121v1)

HAL Id: hal-04863121

https://hal.science/hal-04863121v1

Submitted on 3 Jan 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
PAPER • OPEN ACCESS

# Optimization of foreground moment deprojection for semi-blind CMB polarization reconstruction

To cite this article: A. Carones and M. Remazeilles JCAP06(2024)018

View the [article online](#) for updates and enhancements.

You may also like

- Improved Diffuse Foreground Subtraction with the ILC Method: CMB Map and Angular Power Spectrum Using Planck and WMAP Observations
Vipin Sudevan, Pavan K. Aluri, Sarvesh Kumar Yadav et al.

- Getting of Ni from Nickel-Induced Lateral Crystallization Silicon Using Amorphous Silicon and Chemical Oxide
Bau-Ming Wang and YewChung Sermon Wu

- Optimizing NILC Extractions of the Thermal Sunyaev-Zel'Dovich Effect with Deep Learning
Cameron T. Pratt, Zhijie Qu, Joel N. Bregman et al.
RECEIVED: February 28, 2024

REVISED: April 29, 2024

ACCEPTED: May 2, 2024

PUBLISHED: June 7, 2024

# Optimization of foreground moment deprojection for semi-blind CMB polarization reconstruction

A. Carones<sup>a, b</sup> and M. Remazeilles<sup>c</sup>

E-mail: alessandro.carones@roma2.infn.it, remazeilles@ifca.unican.es

**ABSTRACT:** Upcoming Cosmic Microwave Background (CMB) experiments, aimed at measuring primordial CMB polarization *B*-modes, require exquisite control of instrumental systematics and Galactic foreground contamination. Blind minimum-variance techniques, like the Needlet Internal Linear Combination (NILC), have proven effective in reconstructing the CMB polarization signal and mitigating foregrounds and systematics across diverse sky models without suffering from foreground mismodelling errors. Still, residual foreground contamination from NILC may bias the recovered CMB polarization at large angular scales when confronted with the most complex foreground scenarios. By adding constraints to NILC to deproject statistical moments of the Galactic emission, the Constrained Moment ILC (cMILC) method has been demonstrated to further enhance foreground subtraction, albeit with an associated increase in overall noise variance. Faced with this trade-off between foreground bias reduction and overall variance minimization, there is still no recipe on which moments to deproject and which are better suited for blind variance minimization. To address this, we introduce the optimized cMILC (ocMILC) pipeline, which performs full automated optimization of the required number and set of foreground moments to deproject, pivot parameter values, and deprojection coefficients across the sky and angular scales, depending on the actual sky complexity, available frequency coverage, and experiment sensitivity. The optimal number of moments for deprojection, before paying significant noise penalty, is determined through a data diagnosis inspired by the Generalized NILC (GNILC) method. Validated on *B*-mode simulations of the *PICO* space mission concept with four challenging foreground models, ocMILC exhibits lower Galactic foreground contamination compared to NILC and cMILC at all angular scales, with limited noise penalty. This multi-layer optimization enables the ocMILC pipeline to achieve unbiased posteriors of the tensor-to-scalar ratio, regardless of foreground complexity.

**KEYWORDS:** CMBR experiments, CMBR polarisation

ARXIV ePRINT: 2402.17579

<figure><img src="image_3.png" /></figure>

<footnote><sup>a</sup>Dipartimento di Fisica, Università di Roma “Tor Vergata”, via della Ricerca Scientifica 1, I-00133, Roma, Italy</footnote>

<footnote><sup>b</sup>Sezione INFN Roma 2, via della Ricerca Scientifica 1, I-00133, Roma, Italy</footnote>

<footnote><sup>c</sup>Instituto de Física de Cantabria (CSIC-UC), Avda. los Castros s/n, 39005 Santander, Spain</footnote>
# Contents

<table><tr><td>1</td><td>Introduction</td><td>1</td></tr><tr><td>2</td><td>Sky simulations</td><td>3</td></tr><tr><td>3</td><td>Component separation methodology</td><td>5</td></tr><tr><td></td><td>3.1 Baseline cMILC approach</td><td>6</td></tr><tr><td></td><td>3.2 Optimized cMILC (ocMILC) method</td><td>8</td></tr><tr><td>4</td><td>Data analysis and results</td><td>13</td></tr><tr><td></td><td>4.1 cMILC results and limitations</td><td>15</td></tr><tr><td></td><td>4.2 ocMILC results</td><td>16</td></tr><tr><td></td><td>4.3 Sensitivity to AME and synchrotron emission</td><td>26</td></tr><tr><td>5</td><td>Conclusions</td><td>30</td></tr></table>

## 1 Introduction

Accurate measurements of the temperature anisotropies of the Cosmic Microwave Background (CMB) have yielded stringent constraints on viable cosmological models [1, 2]. Future CMB experiments, featuring enhanced sensitivity, will provide additional insights into CMB polarization anisotropies [3–6]. On the one hand, an accurate reconstruction of the CMB E-mode polarization anisotropies will lead to a cosmic-variance limited measurement of the optical depth to last scattering surface $\tau$ [5, 6], providing new constraints on the cosmic reionization history [7, 8] and the sum of neutrino masses [3, 9, 10]. On the other hand, a detection of the primordial CMB B-mode polarization may open a new window on the physics of the early Universe by setting constraints on the tensor-to-scalar ratio $r$, thereby shedding light on the cosmic inflation scenario [11].

To achieve these goals, future CMB experiments require exquisite control of the contamination from Galactic foregrounds and instrumental systematics. In recent years, several component separation pipelines, both parametric [12–17] and blind [18–24], have been developed or customized for this purpose. Given the huge amplitude discrepancy between Galactic foregrounds and CMB B-modes, these pipelines need to demonstrate robustness against the complex and unknown properties of Galactic foreground emissions, including spatial variations in their spectral energy distribution (SED) along and across the lines of sight [25], as well as resulting foreground spectral distortions [26] and spectral decorrelation [27].

Parametric component separation methods are engineered to yield minimal uncertainty in the retrieval of CMB B-modes, as long as the assumed parametric foreground model aligns with the actual foregrounds in the data. However, given the aforementioned intricacies in the foreground properties, parametric methods are also prone to potential biases in the recovery of the CMB B-mode signal when confronted with incorrect or incomplete modelling of poorly understood foregrounds [28]. In contrast, blind minimum-variance approaches to component
separation, like the Needlet Internal Linear Combination (NILC) method [21], offer the pos-
sibility of extracting the CMB polarization *E*- and *B*-mode fields from multifrequency data
without making any assumption about the foregrounds, thus avoiding mismodelling errors.
However, if the polarized Galactic foregrounds turn out to be highly complex, as in the case of
multi-layer contributions to thermal dust emission along the line-of-sight and spectral decorre-
lation [29], minimum-variance methods like NILC may return CMB polarization maps that are
still significantly contaminated by Galactic foreground residuals, as highlighted in [23, 24, 30].

To overcome these issues, intermediate approaches at the intersection of parametric and
blind methods can be pursued, using either partial information on Galactic foregrounds or
some effective modelling. For instance, information on the spatial variations of the foregrounds
across the sky can be inferred from the data and exploited to optimize the domains over which
the NILC variance is minimized, as implemented in the Multi-Clustering NILC method [24].
As an alternative semi-blind approach, the Constrained Moment ILC (cMILC) method [23] re-
lies on effective foreground modelling through statistical moment expansion around fixed pivot
spectral parameters to project out some of these moments through nulling constraints added
to NILC, while leaving higher-order moments and unmodelled foregrounds for blind variance
minimization. Through nulling constraints for moment deprojection, the cMILC method
facilitates the handling of foreground moments and SED distortions resulting from line-of-sight
and beam averaging of spatial variations in foreground spectral properties by CMB instru-
ments. In addition, it allows for imperfect parameterization of the foregrounds by leaving any
higher-order correction to the moment expansion or any omitted foreground to blind variance
minimization. This semi-blind technique has proven more effective than NILC in reducing
Galactic contamination in the recovered CMB *B*-mode map when applied to complex fore-
ground simulations of future CMB satellite experiments such as LiteBIRD and PICO [23, 31].

However, the reduction of the residual foreground contamination bias in the cMILC
CMB solution is counterbalanced by an increase of the overall variance associated with
instrumental noise and unconstrained foreground moments, since each additional nulling
constraint in cMILC effectively reduces the number of frequency channels available for variance
minimization. Faced with this trade-off between bias reduction and variance increase, certain
foreground moments may be more conducive to variance minimization than deprojection,
particularly when they exert a dominant influence on the overall variance in the data,
while other subdominant moments may be better addressed through deprojection. However,
no recipe for determining which moments to deproject and which to retain for variance
minimization has been provided thus far. In the baseline cMILC approach, the deprojection of
zeroth-order moments is prioritized, anticipating their significant contribution to the bulk of
Galactic foreground emission. Nonetheless, the optimal solution might favour the deprojection
of higher-order components, relegating dominant moments to blind variance minimization.
Moreover, if the actual SED of polarized thermal dust and synchrotron emissions significantly
deviates from the prevalent parameterization of a single modified blackbody (MBB) and a
power-law, respectively, then the deprojection of SED moments with fixed values of pivot
spectral parameters across the sky and angular scales may prove less effective.

In this work, we introduce the *optimized cMILC* (ocMILC) pipeline, where the choice of
moments to deproject, the values of pivot parameters, and the amount of deprojection of each
moment is optimized through a fully data-driven approach. Specifically, the optimal number of moments to deproject before paying significant noise penalty is determined depending on the experimental configuration by applying the strategy of the Generalized Needlet ILC (GNILC) method [32]. This method provides a blind diagnosis of the actual complexity of the Galactic foreground emission across the sky and angular scales, yielding maps of the local number of independent foreground degrees of freedom as byproducts. Such a diagnostic tool is valuable for informing the foreground model parameterization and tuning component separation pipelines according to the observed sky complexity and experimental configuration. The new ocMILC framework is tested and validated on a set of complex foreground scenarios using comprehensive simulations of the Probe of Inflation and Cosmic Origins (PICO) mission concept [6]. We choose this experimental configuration as a proof of concept, given its high sensitivity and broad frequency coverage, allowing us to thoroughly assess the robustness of the proposed approach against various thermal dust and synchrotron models. We note that the validation of the ocMILC pipeline is performed under the assumption of perfectly reconstructed frequency maps from time-ordered data. However, as shown by the latest analyses of the Planck data (NPIPE [33], SRoll [34, 35], Cosmoglobe [36]), a parametric model of the Galactic emission may still be needed for the low-level data processing steps, as calibration, bandpass corrections, and multi-component destriping, involved in producing high-fidelity frequency maps.

The paper is organized as follows: in section 2, we provide a description of the PICO sky simulations, considering four foreground scenarios with different dust models. Section 3 outlines our component separation methodology, first reviewing the basics of the cMILC approach (section 3.1), then describing the proposed ocMILC pipeline (section 3.2), which involves a data-driven diagnosis of foreground complexity inspired by GNILC (section 3.2.1) and subsequent optimization of foreground moment deprojection (section 3.2.2). Section 4 presents our results for the different foreground scenarios. Our conclusions are summarized in section 5.

## 2 Sky simulations

As a proof of concept, we perform simulations of multifrequency sky maps based on the experimental setup of the PICO mission. PICO, a NASA probe-scale space mission concept, is anticipated to be the most sensitive among the proposed next-generation CMB space missions, targeting a sensitivity on the tensor-to-scalar ratio of $r \le 0.0002$ at a 95% confidence level (CL) and aiming for a cosmic-variance limited measurement of the optical depth to last scattering, $\sigma(\tau) = 0.002$ [6]. To meet these objectives, PICO will conduct full-sky observations in 21 frequency channels spanning from 21 to 799 GHz with high signal-to-noise to disentangle Galactic foreground emission from the CMB polarization signal. Given its extensive frequency coverage and high sensitivity, PICO serves as an ideal experimental framework to assess the robustness and flexibility of the proposed optimization of moment deprojection across various thermal dust and synchrotron models.

The PICO sky maps are generated by co-adding simulated maps of CMB, Galactic foregrounds, and instrumental noise across the 21 frequency bands, according to the instrument specifications reported in [6].
CMB polarization anisotropies are generated using the HEALPix Python package<fnref n="1" /> [37, 38], based on the CMB angular power spectra of the Planck 2018 best-fit parameters [39] with a tensor-to-scalar ratio $r = 0$, and include the contribution from the gravitational lensing effect.

The instrumental noise is simulated as white and isotropic Gaussian realizations, with standard deviations in each pixel corresponding to the polarization sensitivities of the baseline PICO configuration as reported in [6]. The combined noise level for this configuration is equal to $0.87 \mu K \cdot \text{arcmin}$. In [6, 30], it has been demonstrated that the targeted sensitivity $r < 0.0002$ (95% CL) can be achieved for most foreground scenarios with the so-called Current Best Estimate (CBE) PICO configuration, featuring a combined noise level of $0.61 \mu K \cdot \text{arcmin}$. However, for the purpose of our study relying on the more conservative baseline PICO configuration, with a combined noise level of $0.87 \mu K \cdot \text{arcmin}$, we estimate a target sensitivity of about $r < (0.87)^2/(0.61)^2 \times 0.0002 = 0.0004$ (95% CL). Here, the noise levels are squared, as the tensor-to-scalar ratio parameter is associated with power spectrum rather than map noise. In section 4.2, we show that, by adopting the CBE PICO configuration, we can indeed achieve $r < 0.0002$ (95% CL) with the ocMILC method.

Maps of polarized Galactic emission are generated using the PySM Python package [40, 41]. Given the current lack of knowledge about the polarized Galactic emission at the targeted sensitivity, we explore a range of foreground sky models that remain consistent with existing observations. Four distinct models of Galactic thermal dust emission are examined in this study and are described below, using the terminology of the PySM:

* **d1:** the thermal dust emission at each line-of-sight $\hat{n}$ and each frequency $\nu$ is characterized by a modified blackbody (MBB) SED in intensity units

$$X_d(\hat{n}, \nu) = X_d(\hat{n}, \nu_d) \left(\frac{\nu}{\nu_d}\right)^{\beta_d(\hat{n})} \frac{B_{\nu}(T_d(\hat{n}))}{B_{\nu_d}(T_d(\hat{n}))}, \quad (2.1)$$

where $X = \{Q, U\}$ are Stokes parameters, $B_{\nu}(T)$ is the blackbody spectrum, $\beta_d$ is the dust spectral index, $T_d$ is the dust temperature, and $X_d(\hat{n}, \nu_d)$ represents the dust template at a reference frequency $\nu_d$. Both $\beta_d$ and $T_d$ vary across the sky, as estimated from the Planck data analysis using the Commander algorithm [42]. The thermal dust template is given by the Commander dust Q and U maps at 353 GHz of the Planck 2015 data release, smoothed with a Gaussian beam of full width at half maximum (FWHM) 2.6°, with stochastic small-scale fluctuations added via the procedure described in [40].

* **d4:** in this model, the thermal dust emission is composed of two distinct MBB components, as fitted to Planck and DIRBE/IRAS data in [43]. The temperatures of these two components vary across the sky, while the spectral indices remain constant with values $\beta_d^{(1)} = 1.63$ and $\beta_d^{(2)} = 2.82$. The Q and U templates at the reference frequency are obtained by scaling the dust intensity templates of [43] to 353 GHz and applying the polarization fraction and polarization angles of the d1 model. Gaussian small-scale fluctuations are generated similarly to the d1 model.

* **d7:** simulations of thermal dust emission are based on a physical model of dust grains with a distribution of sizes, composition, and temperatures. Additionally, an

<footnote n="1">¹https://github.com/healpy/healpy.</footnote>
environmental radiation strength field is assumed across the sky based on the dust temperature map obtained in [42]. The model also accounts for magnetic dipole radiation from iron grains [44], resulting in a SED that deviates from a simple MBB spectrum.

* d12: in this model, the dust emission is composed of six distinct emitting layers [29], so that the effective SED varies not only across the sky but also along the line-of-sight, leading to spectral decorrelation across frequencies. It represents the most complex dust model among the four considered in this study. Specifically, the maps of Stokes parameters at a frequency $\nu$ are given by the superposition of six templates scaled with a MBB law, each associated with a different map of spectral indices and temperatures:

$$X_d(\hat{n}, \nu) = \sum_{k=1}^{6} X_d^{(k)}(\hat{n}, \nu_0) \left(\frac{\nu}{\nu_0}\right)^{\beta_d^{(k)}(\hat{n})} B_{\nu}(T_d^{(k)}(\hat{n})), \quad (2.2)$$

such that it matches the total dust emission of the Planck GNILC intensity and polarization maps at 353 GHz [45].

Galactic synchrotron emission is simulated using the PySM s1 model, which assumes a power-law SED in brightness temperature units [46]

$$X_s(\hat{n}, \nu) = X_s(\hat{n}, \nu_s) \left(\frac{\nu}{\nu_s}\right)^{\beta_s(\hat{n})}, \quad (2.3)$$

where $\beta_s$ is the synchrotron spectral index, varying with the position $\hat{n}$ in the sky. $X_s(\hat{n}, \nu_s)$ represents the synchrotron template at a reference frequency $\nu_s$. The chosen templates are the WMAP 9-year 23-GHz Q and U maps [47], smoothed with a Gaussian kernel of FWHM 5°, with small-scale fluctuations added using the procedure outlined in [40]. The synchrotron spectral index map is derived through a spectral fit to the Haslam 408-MHz data and the WMAP 23-GHz 7-year data [48].

In summary, four distinct PICO data sets, hereafter referred to as d1, d4, d7, and d12, are created by combining the respective dust model maps with the PySM s1 synchrotron maps and random realizations of CMB. At each frequency, these components are first smoothed using a Gaussian beam with the corresponding FWHM of that PICO channel and then co-added to instrumental noise. Such resulting PICO frequency maps are ultimately brought to a common resolution of FWHM = 38' and downgraded to a HEALPix resolution of $N_{side} = 512$ before undergoing component separation analysis. For each data set, 50 simulations are generated, each featuring distinct realizations of CMB and instrumental noise.

## 3 Component separation methodology

In polarization, we can assume that data at different frequencies, $d_\nu$, are the superposition of three distinct types of components:

$$d_{\nu}(\hat{n}) = c(\hat{n}) + f_{\nu}(\hat{n}) + n_{\nu}(\hat{n}), \quad (3.1)$$
where (assuming CMB temperature units) $c(\hat{n})$ denotes frequency-independent CMB anisotropies, $f_ν(\hat{n})$ is the Galactic foreground emission, $n_ν(\hat{n})$ the instrumental noise, $\hat{n}$ the sky position, and $ν = 1, ..., N_ν$, with $N_ν$ the number of available frequency channels.

An estimate $\hat{c}(\hat{n})$ of CMB anisotropies can be formed via a weighted linear combination of the data:

$$ \hat{c}(\hat{n}) = \mathbf{w}^T \cdot \mathbf{d} = \sum_{\nu} w_{\nu}(\hat{n}) d_{\nu}(\hat{n}), \qquad (3.2) $$

where the specific weights $w_ν$ assigned to data $d_ν$ across frequency channels are sought to minimize the variance due to foreground and noise contamination while preserving the CMB signal $c(\hat{n})$. This is the strategy of ILC methods such as NILC [21]. In this section, we seek to optimize these weights to minimize foreground variance rather than global variance as a function of sky regions and angular scales with our proposed ocMILC (optimized cMILC) pipeline. We first review the basics of the cMILC formalism (section 3.1) which forms the skeleton of the proposed ocMILC pipeline, the specific properties of which are described afterward (section 3.2).

## 3.1 Baseline cMILC approach

As demonstrated in [23], although the blind NILC method provides the CMB solution with minimum overall variance, it does not achieve minimum foreground variance. This minimum foreground variance can be attained through the more constrained semi-blind cMILC method, which involves the deprojection of certain foreground components. Achieving minimum foreground variance is essential to alleviate systematic biases in the recovered tensor-to-scalar ratio, especially in cases where residual foreground contamination after component separation surpasses the CMB and noise power at large angular scales. Such unfavourable outcome was observed in the case of NILC for the multi-layer dust scenario with PICO [30] and for less complex foreground skies in experimental configurations with narrower frequency coverage [31].

Galactic emission exhibits three-dimensional characteristics [25], extending along the line of sight, and its spectral parameters vary spatially both along and across the lines of sight. When integrated along the line of sight and within the instrumental beam by CMB instruments, the superposition of emitting elements with varying spectral parameters results in spectral distortions of the baseline SEDs of the Galactic components. As demonstrated in the seminal work of [26], these foreground distortions can be accurately captured through a Taylor moment expansion of the baseline SEDs around pivot values of the spectral parameters. Foreground subtraction can then be enhanced by deprojecting certain moments of the Galactic foreground emission from the output CMB solution, a technique introduced by the cMILC method [23].

Referring to equation (2.3), the Galactic synchrotron emission can be expanded around a baseline power-law SED up to second order in $β_s(\hat{n})$ as:

$$ X_s(\hat{n}, \nu) = X_s(\hat{n}, \nu_s) \left[ \begin{aligned} & f_{\text{sync}}(\nu, \bar{\beta}_s) + (\beta_s(\hat{n}) - \bar{\beta}_s) \partial_{\beta_s} f_{\text{sync}}(\nu, \bar{\beta}_s) \\ & + \frac{1}{2} (\beta_s(\hat{n}) - \bar{\beta}_s)^2 \partial_{\beta_s}^2 f_{\text{sync}}(\nu, \bar{\beta}_s) + \mathcal{O}((\beta_s(\hat{n}) - \bar{\beta}_s)^3) \end{aligned} \right], \qquad (3.3) $$
where

$$f_{\text{sync}}(\nu, \bar{\beta}_s) = \left(\frac{\nu}{\nu_s}\right)^{\bar{\beta}_s} \qquad (3.4)$$

is a power-law with fixed pivot spectral index $\bar{\beta}_s$. Equation (3.3) highlights moments of the synchrotron spectral index, $(\beta_s(\hat{n}) - \bar{\beta}_s)^k$, with uniform SEDs $\partial_{\bar{\beta}_s}^k f_{\text{sync}}(\nu, \bar{\beta}_s)$.

Similarly, from equation (2.1), the moment expansion of the thermal dust emission around a baseline MBB SED up to second order reads as:

$$X_d(\hat{n}, \nu) = X_d(\hat{n}, \nu_d) \left[ \begin{aligned} & f_{\text{dust}}(\nu, \bar{\beta}_d, \bar{T}_d) + (\beta_d(\hat{n}) - \bar{\beta}_d) \partial_{\bar{\beta}_d} f_{\text{dust}}(\nu, \bar{\beta}_d, \bar{T}_d) \\ & + (T_d(\hat{n}) - \bar{T}_d) \partial_{T_d} f_{\text{dust}}(\nu, \bar{\beta}_d, \bar{T}_d) + \frac{1}{2} (\beta_d(\hat{n}) - \bar{\beta}_d)^2 \partial_{\bar{\beta}_d}^2 f_{\text{dust}}(\nu, \bar{\beta}_d, \bar{T}_d) \\ & + (\beta_d(\hat{n}) - \bar{\beta}_d) (T_d(\hat{n}) - \bar{T}_d) \partial_{\bar{\beta}_d} \partial_{T_d} f_{\text{dust}}(\nu, \bar{\beta}_d, \bar{T}_d) \\ & + \frac{1}{2} (T_d(\hat{n}) - \bar{T}_d)^2 \partial_{\bar{T}_d}^2 f_{\text{dust}}(\nu, \bar{\beta}_d, \bar{T}_d) + \mathcal{O}((\beta_d(\hat{n}) - \bar{\beta}_d)^3, (T_d(\hat{n}) - \bar{T}_d)^3) \end{aligned} \right], \qquad (3.5)$$

where

$$f_{\text{dust}}(\nu, \bar{\beta}_d, \bar{T}_d) = \left(\frac{\nu}{\nu_d}\right)^{\bar{\beta}_d+1} \frac{\exp\left(\frac{h\nu_d}{k\bar{T}_d(\hat{n})}\right) - 1}{\exp\left(\frac{h\nu_d}{k\bar{T}_d(\hat{n})}\right) - 1} \qquad (3.6)$$

is the MBB function for data in brightness temperature units, with fixed pivot values of the spectral index and temperature $\bar{\beta}_d$ and $\bar{T}_d$.

We assume the observed averages of spectral parameters across the sky as pivot values to ensure that most of the Galactic emission projects onto the zeroth-, first-, and second-order moments of the expansion: $\bar{\beta}_s \approx -3$ [45, 48–50], $\bar{\beta}_d \approx 1.5$, and $\bar{T}_d \approx 20$ K [45]. However, further refinement of the most suitable pivot values for spectral parameters could be achieved by considering the observed average in the sky area outside the Galactic mask used in the analysis or by requiring the cancellation of first-order moments in the average [51].

The cMILC weights $w$ are built to deproject some of these foreground moments by adding to NILC nulling constraints against their homogeneous SEDs, while the remaining unconstrained contamination is left to blind variance minimization:

$$\left\{ \begin{array}{l} \min_{w} (w^T C w) \\ w^T \cdot a_{\text{CMB}} = 1 \\ w^T \cdot f_{\text{sync}}(\bar{\beta}_s) = 0 \\ w^T \cdot \partial_{\bar{\beta}_s} f_{\text{sync}}(\bar{\beta}_s) = 0 \\ w^T \cdot f_{\text{dust}}(\bar{\beta}_d, \bar{T}_d) = 0 \\ w^T \cdot \partial_{\bar{\beta}_d} f_{\text{dust}}(\bar{\beta}_d, \bar{T}_d) = 0 \\ w^T \cdot \partial_{T_d} f_{\text{dust}}(\bar{\beta}_d, \bar{T}_d) = 0 \\ \vdots \end{array} \right. , \qquad (3.7)$$

where $w = \{w_\nu(\hat{n})\}$ represents the vector of frequency-dependent, pixel-dependent cMILC weights, $C = \{C_{\nu\nu'}(\hat{n}) = \langle d_\nu(\hat{n}) d_{\nu'}(\hat{n}) \rangle\}$ denotes the data covariance matrix with the
same dependencies as the weights, $\partial^k_{\beta_d} \partial^n_{T_d} f_{\text{dust}}(\bar{\beta}_d, \bar{T}_d) = \{\partial^k_{\beta_d} \partial^n_{T_d} f_{\text{dust}}(\nu, \bar{\beta}_d, \bar{T}_d)\}$ and $\partial^k_{\beta_s} f_{\text{sync}}(\bar{\beta}_s) = \{\partial^k_{\beta_s} f_{\text{sync}}(\nu, \bar{\beta}_s)\}$ are the frequency-dependent but pixel-independent dust and synchrotron moment SEDs, and $a_{\text{CMB}} = \{a_{\text{CMB},\nu}\}$ stands for the CMB SED, which is independent of frequency in CMB temperature units. The number of nulling constraints on moments in equation (3.7) is only limited by the number of available frequency channels and the sensitivity of the experiment.

By collecting the SED vectors of the CMB and selected foreground moments into the mixing matrix

$$A = (a_{\text{CMB}} \quad f_{\text{sync}}(\bar{\beta}_s) \quad f_{\text{dust}}(\bar{\beta}_d, \bar{T}_d) \quad \partial_{\beta_d} f_{\text{dust}}(\bar{\beta}_d, \bar{T}_d) \quad \dots)$$

and the deprojection coefficients into the vector:

$$e = (1 \quad 0 \quad 0 \quad 0 \quad \dots)^T, \qquad (3.8)$$

the cMILC weights can be expressed in the compact form:

$$w = e^T [A^T C^{-1} A]^{-1} A^T C^{-1}. \qquad (3.9)$$

The cMILC method, initially introduced in [23], has since been applied in various subsequent works [31, 52–56]. In such a framework, NILC represents simply a subcase of cMILC where only the first element of $e$ and first column of $A$ are employed in equation (3.9).

Adding constraints to null some of the foreground moments in equation (3.7) and, thereby, remove systematic biases generally results in an increase of the variance of the noise and unconstrained foreground components, such as non-included higher-order moments. There is thus a trade-off between deprojection and blind variance minimization, where components that significantly contribute to the overall variance in the data may be better suited for variance minimization rather than deprojection. However, in the baseline cMILC approach, there is no inherent procedure for selecting which moments should be prioritized for deprojection and which should be left for variance minimization, nor is there a method for assessing the optimal number of moments to deproject before incurring significant noise penalties. Moreover, if the effective SED of foreground emission turns out to highly deviate from the adopted baseline SEDs of equations (3.3) and (3.5), moment expansion may not fully capture such distortions, in which case partial deprojection or variance minimization could be more effective. Therefore, there is room for optimization of moment deprojection in cMILC, as anticipated and preliminarily explored in [23].

## 3.2 Optimized cMILC (ocMILC) method

Our proposed ocMILC (optimized cMILC) method, an enhanced version of cMILC, aims to optimize moment deprojection and variance minimization in four ways: (i) allowing the number of deprojected moments to vary across sky regions and multipole ranges via a blind diagnosis of local foreground complexity; (ii) selecting moments for deprojection independently of the natural order of the Taylor expansion; (iii) allowing pivot values to vary across sky regions and multipole ranges to reduce the significance of higher-order moments
in the moment expansion; (iv) partially filtering out the contribution of specific moments by modifying the deprojection vector in equation (3.8) as follows:

$$e = (1 \ \epsilon_1 \ \epsilon_2 \ \epsilon_3 \ \dots)^T, \qquad (3.10)$$

with $|\epsilon_i| < 1$. This last adjustment aims to strike a balance between reducing bias and increasing noise variance, drawing inspiration from [57]. The method is fully data-driven.

The first stage in the ocMILC pipeline aims at assessing the optimal number of moments to deproject across the sky and angular scales. This is achieved by leveraging information from byproducts of the Generalized Needlet ILC (GNILC) method [32, 58], which allows for a blind diagnosis of the effective foreground complexity in the data by determining how many independent modes of the Galactic emission exhibit greater power than noise across the sky and angular scales. The GNILC diagnosis tool which is implemented in ocMILC is detailed in section 3.2.1, while subsequent optimization layers of the ocMILC pipeline are described in section 3.2.2.

### 3.2.1 Diagnosis of foreground complexity

The complex properties of the polarized Galactic foregrounds at microwave frequencies are not yet fully understood at the anticipated sensitivity levels of future CMB experiments. Furthermore, the integration of foreground emission along the line-of-sight and within the beam by CMB instruments leads to spatial averaging of each foreground spectral parameter, which results in spectral distortions of the expected foreground SEDs [26, 59] and spectral decorrelation of the foreground emission across frequencies [25, 27]. Additional spectral averaging occurs during data processing steps such as spherical harmonic transforms. All these processes effectively augment the list of expected foreground parameters, adding further complexity to the modelling of the foregrounds. To avoid making incorrect assumptions about the number of foregrounds and their spectral properties, it is useful to adopt a data-driven approach which can inform us on the actual complexity of foregrounds in sky observations. The GNILC method [32, 58] offers an avenue, by providing maps of the effective number of independent foreground components across the sky and different angular scales as byproducts, based on the experiment's sensitivity and frequency coverage. These GNILC byproduct maps, revealing the effective dimension of the foreground subspace, can in turn inform the cMILC method [23] about the optimal number of nulling constraints or moments to deproject without incurring significant noise penalty, depending on the sky area and the range of angular scales. Besides, parametric component separation methods may also benefit from these diagnostic maps to gauge the expected volume of the foreground parameter space depending on the sky regions.

Instead of making spectral assumptions, GNILC relies on statistical decorrelation to estimate the number of independent foreground degrees of freedom and perform component separation. It capitalizes on the fact that while the noise is largely uncorrelated across frequencies, the foreground emission, $f_ν(\hat{n})$, remains strongly correlated, such that it can be decomposed, at any frequency $ν$, onto a common basis of a few independent (i.e. uncorrelated,
not physical) templates $t(\hat{n}) = \{t_i(\hat{n})\}_{i \in [1, m]}$:

$$f_{\nu}(\hat{n}) = \sum_{i=1}^{m} \alpha_{\nu,i}(\hat{n}) t_i(\hat{n}), \qquad (3.11)$$

where the number $m$ of independent templates is typically smaller than the number of frequency channels. The focus of ocMILC is on mapping this number $m$ rather than the templates themselves to provide insight into the complexity of the foreground sky.

From equation (3.1), the elements of the $N_{\nu} \times N_{\nu'}$ data covariance matrix for frequency pairs $(\nu, \nu')$ read as

$$C_{\nu\nu'}(\hat{n}) = \langle d_{\nu}(\hat{n}) d_{\nu'}(\hat{n}) \rangle = C_{\nu\nu'}^{\text{CMB}}(\hat{n}) + F_{\nu\nu'}(\hat{n}) + N_{\nu\nu'}(\hat{n}), \qquad (3.12)$$

where $C^{\text{CMB}}$, $F$, and $N$ denote respectively the CMB, foreground, and noise covariance matrices. In equation (3.12) we fairly assume that the three components are statistically uncorrelated. In practice, the ensemble average of equation (3.12) is substituted with a sample average:

$$C_{\nu\nu'}(\hat{n}) = \sum_{\hat{n}'} W(\hat{n}, \hat{n}') d_{\nu}(\hat{n}) d_{\nu'}(\hat{n}'), \qquad (3.13)$$

where $W(\hat{n}, \hat{n}')$ are the weights associated to a Gaussian convolution kernel centred at $\hat{n}$, with a standard deviation large enough to sample an adequate number of modes.

Considering that our focus is on Galactic foregrounds, we rewrite equation (3.12) as

$$C(\hat{n}) = F(\hat{n}) + C_N(\hat{n}), \qquad (3.14)$$

where $C_N$ is the nuisance covariance matrix collecting the contribution from CMB and instrumental noise covariance matrices.

Unlike the foreground covariance matrix, the nuisance covariance matrix can be estimated from simulations based on the knowledge of the instrument and the CMB statistics. The estimated nuisance covariance matrix, $\hat{C}_N(\hat{n})$, is then used as an input of the GNILC pipeline to compute the whitened data covariance matrix:

$$\tilde{C}(\hat{n}) = (\hat{C}_N^{-1/2} C \hat{C}_N^{-1/2}) (\hat{n}) \approx (\hat{C}_N^{-1/2} F \hat{C}_N^{-1/2}) (\hat{n}) + \mathbf{1}, \qquad (3.15)$$

where the last equality follows from equation (3.14) and is exact if the estimated nuisance covariance matrix perfectly captures the statistics of the CMB and noise components, and $\mathbf{1}$ denotes the identity matrix.

Therefore, the eigendecomposition and diagonalization of the whitened data covariance matrix must have the following structure:

$$\tilde{C}(\hat{n}) \approx (U_F(\hat{n}) | U_N(\hat{n})) \begin{pmatrix} \lambda_1(\hat{n}) + 1 & & & \\ & \ddots & & \\ & & \lambda_{m(\hat{n})}(\hat{n}) + 1 & \\ & & & 1 \\ & & & & \ddots \\ & & & & & 1 \end{pmatrix} \begin{pmatrix} U_F(\hat{n})^T \\ U_N(\hat{n})^T \end{pmatrix}, \qquad (3.16)$$
where all eigenvalues significantly greater than one correspond to the independent eigenmodes of the Galactic emission which locally dominate over the variance of the noise and CMB components. Therefore, in each point of the sky $\hat{n}$, we are able to estimate the number of independent Galactic foreground modes, $m(\hat{n})$, above the noise, given the sensitivity of the considered experiment, through this model-independent approach where we only need to assume the two-point statistics of the noise and CMB components in the polarization data. The $m$ independent foreground eigenmodes are simply collected in the $N_{\nu} \times m$ matrix $U_F$.

In the language of principal component analysis (PCA), the template maps of equation (3.11) are given by $t(\hat{n}) = U_F(\hat{n})^T \hat{C}_N^{-1/2}(\hat{n}) d(\hat{n})$ and correspond to the $m$ principal components detected above the noise along the line-of-sight $\hat{n}$. They form uncorrelated, not physical, foreground templates, as indicated by their diagonal covariance matrix. If the foreground emission was completely uncorrelated across frequencies, as instrumental noise is, the method would return $m = N_{\nu}$, i.e. as many independent templates as the number of available frequency channels. In contrast, the greater the correlation among physical foregrounds across frequencies and with each other, the lower the value of $m$ will be. In addition, when noise dominates the local data, the effective number $m$ of independent foreground components being detected is also reduced.

However, foreground emission models with same overall amplitude, i.e. equal ‘foreground-to-noise’ ratio, yet different levels of decorrelation, can lead to a different number of independent components, thus holding different degrees of complexity and producing different GNILC outcomes.

We note that, in the above treatment, we considered the CMB as a nuisance whose covariance matrix can be predicted. This may not be exactly the case at large angular scales for CMB B-modes since the value of the tensor-to-scalar ratio $r$ is unknown. However, this issue can be addressed in ocMILC by considering only the noise in the nuisance covariance matrix ($C_N = N$), in which case our method outputs the number of independent modes from both foregrounds and CMB that dominate over the noise:

$$m(\hat{n}) = m_{\text{fgds}}(\hat{n}) + m_{\text{CMB}}(\hat{n}), \qquad (3.17)$$

with $m_{\text{CMB}}(\hat{n}) = 0$ or 1, as the CMB is fully correlated between frequencies. Given the sensitivity of future CMB experiments, we expect the lensing CMB B-mode signal to dominate over instrumental noise across the range of observed angular scales (see e.g. figure 1 of [30]). Therefore,

$$m(\hat{n}) = m_{\text{fgds}}(\hat{n}) + 1. \qquad (3.18)$$

The GNILC approach implemented in ocMILC thus allows one to perform a blind diagnosis of the complexity of the Galactic foreground emission in the observed sky and to possibly compare it with that expected from various foreground models.

We expect the ‘foregrounds-to-noise’ ratio, as traced by the whitened covariance matrix $\tilde{C}(\hat{n})$ (equations (3.15) and (3.16)), to vary not only across the sky but also across angular scales. Therefore, most likely, $m_{\text{fgds}}$ will be higher at large angular scales where diffuse Galactic emission is brighter than CMB and noise by orders of magnitude, while it will be lower at small angular scales where the noise dominates the covariance budget. This reasoning supports an implementation of our diagnostic tool in wavelet domain, using a specific frame
of spherical wavelets known as needlets [60, 61]. In such a framework, the data $d_ν(\hat{n})$ are convolved by a set of needlet bandpass filters in harmonic domain in order to form needlet coefficient maps, $β_ν^j(\hat{n})$, including sky emission from specific ranges of angular scales:

$$β_ν^j(\hat{n}) = \sum_{ℓ,m} (a_{ℓm,ν} b_ℓ^j) Y_{lm}(\hat{n}), \qquad (3.19)$$

where $a_{ℓm,ν}$ are the spherical harmonic coefficients of the frequency maps $d_ν(\hat{n})$, $b_ℓ^j$ is the $j$th needlet bandpass, and $Y_{lm}(\hat{n})$ are spherical harmonics. By construction, the needlet bandpasses satisfy $\sum_j (b_ℓ^j)^2 = 1$ for all multipoles, so that the inverse needlet transform

$$d_ν(\hat{n}) = \sum_j \sum_{ℓ,m} b_ℓ^j (a_{ℓm,ν} b_ℓ^j) Y_{lm}(\hat{n}) \qquad (3.20)$$

retrieves the initial data.

The methodology presented above is applied to the multifrequency needlet coefficient maps, $β_ν^j(\hat{n})$, instead of the original sky maps, $d_ν(\hat{n})$. The data and nuisance covariance matrices, $C^j(\hat{n})$ and $C_N^j(\hat{n})$ of equation (3.14), are thus computed separately for each range of angular scales selected by the needlet bands. This implementation allows us to produce maps of the number of independent foreground modes, $m_{fgds}^j(\hat{n})$, across the sky and in different ranges of angular scales.

By diagnosing the number of independent modes of the Galactic foreground emission above the noise level, the blind approach outlined in this section can be leveraged to enhance the optimization of CMB component separation. In ocMILC, we exploit this information to optimize the selection of deprojected moments of the Galactic foreground emission within the framework of the semi-blind cMILC component separation method.

### 3.2.2 Optimization of moment deprojection

For each range of angular scales (needlet scale $j$), the GNILC diagnosis conducted in ocMILC (section 3.2.1) provides a partitioning of the sky into clusters of uniform dimension, $m_{fgds}^j$, of the expected foreground subspace. Each cluster of the partition, as illustrated later in section 4.2.1, offers constraints on the optimal number of moments to deproject in that region of the sky and range of angular scales without incurring significant noise penalty. In ocMILC, this information is fully leveraged, and only $m_{fgds}^j(\hat{n})$ moments are filtered out at pixel $\hat{n}$ and needlet scale $j$.

Once the optimal number of moments to deproject is determined across the sky and needlet scales, ocMILC selects the optimal configuration of $m_{fgds}^j$ moments, pivot values, and deprojection coefficients among the following sets of

1. moment SEDs:

$$[f_{\text{dust}}, f_{\text{sync}}, \partial_{\beta_d} f_{\text{dust}}, \partial_{\beta_s} f_{\text{sync}}, \partial_{T_d} f_{\text{dust}}, \partial_{\beta_d}^2 f_{\text{dust}}, \partial_{\beta_d} \partial_{T_d} f_{\text{dust}}, \partial_{\beta_s}^2 f_{\text{sync}}, \partial_{T_d}^2 f_{\text{dust}}], \qquad (3.21)$$

2. dust pivot parameter values:

$$\bar{\beta}_d \in [1.2, 1.8] \text{ with } \Delta\bar{\beta}_d = 0.05, \quad \bar{T}_d \in [17 \text{ K}, 22 \text{ K}] \text{ with } \Delta\bar{T}_d = 0.25, \qquad (3.22)$$
3. and deprojection values:

$$ \epsilon_k \in [-0.05, -0.01, -0.005, -0.001, -0.0005, 0., 0.0005, 0.001, 0.005, 0.01, 0.05]. \quad (3.23) $$

A distinct deprojection coefficient is assigned to each selected moment. The optimal combination of moments, pivots, and deprojection coefficients is determined so as to minimize the cMILC output variance corrected for residual noise variance in each GNILC cluster:

$$ \langle c_{\text{cMILC}}^2 \rangle - \langle n_{\text{res}}^2 \rangle = w_{\text{cMILC}}^T (C - N) w_{\text{cMILC}}, \quad (3.24) $$

where C represents the data covariance matrix and N denotes the instrumental noise covariance matrix.

The GNILC partitioning of the sky into clusters of pixels characterized by uniform foreground complexity is used to recalculate the local covariance matrix of the data and ocMILC weights in each cluster independently, drawing inspiration from the multiclustering strategy of [24]. The covariance matrices in equation (3.24) and the optimization procedure are thus computed within each independent GNILC region, representing a connected set of pixels sharing the same value of $m_{\text{fgds}}^j$. Therefore, the ocMILC CMB map is the solution with minimum local foreground variance obtained by partially (or fully) deprojecting $m_{\text{fgds}}^j$ moments with varying pivot parameters across the sky and angular scales.

# 4 Data analysis and results

In this section, we analyse the simulated PICO d1, d4, d7, and d12 data sets described in section 2, representing four different foreground scenarios, using the ocMILC pipeline. The performance of ocMILC is compared against that of the baseline cMILC approach and the fully blind NILC approach.

The data are decomposed into needlet coefficient maps (equation (3.19)) for analysis by the NILC, cMILC, and ocMILC pipelines. In this work, we employ cosine-shaped needlet bandpasses defined as

$$ b_{\ell}^{j} = \begin{cases} \cos \left( \frac{\ell_{\text{peak}}^{j} - \ell}{\ell_{\text{peak}}^{j} - \ell_{\text{peak}}^{j-1}} \frac{\pi}{2} \right) & \text{if } \ell_{\text{peak}}^{j-1} \le \ell < \ell_{\text{peak}}^{j} \\ \cos \left( \frac{\ell - \ell_{\text{peak}}^{j}}{\ell_{\text{peak}}^{j+1} - \ell_{\text{peak}}^{j}} \frac{\pi}{2} \right) & \text{if } \ell_{\text{peak}}^{j} \le \ell < \ell_{\text{peak}}^{j+1} \end{cases}, \quad (4.1) $$

where $\ell_{\text{peak}} = 0, 50, 100, 200, 300$ for $j = 1, \dots, 5$. These needlet bandpasses in harmonic domain are plotted in figure 1, with each of them covering a specific range of multipoles. Since the needlet bands have compact support in harmonic domain, the needlet coefficient maps, $\beta_{\nu}^{j}(\hat{n})$, are obtained at a HEALPix $N_{\text{side}}$ equal to the smallest power of 2 larger than $\ell_{\text{max}}^{j}/2$, where $\ell_{\text{max}}^{j}$ is the maximum multipole of the $j$th needlet band.

The outcomes from the pipelines are first inspected by means of the angular power spectra of foreground and noise residuals, calculated by applying the weights derived from the specified data set to the foreground and noise inputs of each simulation. Such spectra are compared against the primordial CMB B-mode signal across a range of tensor-to-scalar ratio
<figure><img src="image_4.png" /><figcaption>Figure 1. Cosine needlet bandpass windows in harmonic domain used in this work.</figcaption></figure>

values, $r \in [0.4 \times 10^{-3}, 4 \times 10^{-3}]$, where $r = 0.4 \times 10^{-3}$ represents the actual upper bound at 95% CL targeted by PICO for its baseline instrumental configuration, as adopted in this work (refer to section 2 for details on rescaling PICO CBE to baseline sensitivity). Throughout the paper, to alleviate residual foreground contamination along the Galactic plane, the angular power spectra for d1, d4, and d7 are computed over $f_{sky} = 70\%$ of the sky using the publicly available Planck GAL70 mask applied to the maps. For d12, a more conservative masking strategy is employed, by extending the Planck GAL70 mask through smoothing the average d12 foreground residuals with a 5° beam and thresholding them to achieve a final sky fraction of $f_{sky} = 40\%$. Although the d12 mask is constructed from foreground residuals that may not be accessible in real data analysis, it is employed solely for comparing outcomes from different pipelines within the same clean 40% region of the sky. The angular power spectra are computed using the pymaster Python package<fnref n="2" /> of the MASTER estimator [62, 63], which facilitates proper deconvolution of masking and beam smoothing effects [64].

To further assess the quality of the CMB B-mode reconstruction, we examine the impact of residuals on the estimation of the tensor-to-scalar ratio, $r$. We estimate the tensor-to-scalar ratio from the recovered B-mode power spectra using the inverse-Wishart log-likelihood [65]:

$$ \log \mathcal{L}(r) = -f_{\text{sky}} \frac{2\ell + 1}{2} \left[ \frac{\hat{C}_{\ell}}{C_{\ell}(r)} + \log C_{\ell}(r) - \frac{2\ell - 1}{2\ell + 1} \log \hat{C}_{\ell} \right]. \quad (4.2) $$

Here $\hat{C}_{\ell} = A_{\text{lens}}C_{\ell}^{\text{lens}} + C_{\ell}^{\text{fgds}} + C_{\ell}^{\text{noi}}$ represents the angular power spectrum of the output CMB

<footnote n="2">²https://namaster.readthedocs.io/en/latest/.</footnote>
B-mode map, averaged over all realizations, with $C_{\ell}^{\text{lens}}$ the lensing power spectrum, $A_{\text{lens}}$ its residual amplitude after some expected level of delensing, $C_{\ell}^{\text{fgds}}$ and $C_{\ell}^{\text{noi}}$ the foreground and noise residual power, while $C_{\ell}(r) = r C_{\ell}^{r=1} + A_{\text{lens}}C_{\ell}^{\text{lens}} + C_{\ell}^{\text{noi}}$ represents our theoretical power spectrum model, where $C_{\ell}^{r=1}$ is the primordial CMB B-mode power spectrum for tensor perturbations with $r=1$. We adopt $A_{\text{lens}} = 0.27$ to align with the expected 73% delensing capability of PICO [30]. As our simulations do not include primordial tensor perturbations, the best-fit value of $r$ is only driven by residual foreground contamination, while its uncertainty is influenced by residual lensing, noise, and foregrounds. While the likelihood function in equation (4.2) is not exact for a masked sky as it neglects correlations between different multipoles induced by masking, we ensure that these off-diagonal terms of the covariance matrix are negligible by binning the angular power spectrum with a constant binning scheme of $\Delta\ell = 10$.

We begin by discussing some limitations in the performance of the baseline cMILC approach (section 4.1), then present the results obtained using the ocMILC method for all foreground scenarios (section 4.2). This includes showcasing diagnostic maps illustrating the actual foreground complexity in each dataset (section 4.2.1) and then presenting ocMILC outcomes related to CMB B-mode reconstruction and tensor-to-scalar ratio estimation (section 4.2.2).

## 4.1 cMILC results and limitations

To illustrate some limitations of the baseline cMILC approach, we applied both NILC and cMILC pipelines to different PICO data sets as discussed in section 2, using the needlet frame implementation presented above. We implemented three versions of cMILC:

1. cMILC-0, where all zeroth-order moments are deprojected.

2. cMILC-01, where all zeroth- and first-order moments are deprojected.

3. cMILC-012, where all zeroth-, first-, and second-order moments are deprojected.

In all cases, the pivot values of the spectral parameters were held fixed to their average across the sky in the PySM d1s1 model: $\bar{\beta}_s = -3$, $\bar{\beta}_d = 1.54$, and $\bar{T}_d = 19.6$ K.

The results for PICO data sets d1 and d7 are reported in figure 2, showing the angular power spectra of foreground and noise residuals. Residuals from the most constrained version cMILC-012 are exclusively shown for the d1 data set. The results from figure 2 lead to several conclusions. For the PICO d1 data set, the cMILC foreground residuals are lower than those of NILC at intermediate and small angular scales. However, on the largest angular scales, the averaging processes significantly distort the foreground SEDs, and the rigid cMILC deprojection fails to adequately suppress these low-$\ell$ distortions of the Galactic emission compared to simple variance minimization. As previously demonstrated in [23], imposing the deprojection of more moments in equation (3.7) results in a penalty to the residual noise budget. This is particularly noticeable when examining the residuals from the application of cMILC-012 (where all zeroth-, first-, and second-order moments are deprojected) to the PICO d1 data set: the CMB solution, derived from the linear combination of 21 frequency channels with nine fully deprojected moments, suffers from a significant increase in noise
<figure><img src="image_5.png" /><figcaption>**Figure 2.** Angular power spectra of foreground (solid) and noise (dashed) residuals in B-modes resulting from the application of NILC (blue), cMILC-0 (orange), and cMILC-01 (green) to PICO d1 (left) and d7 (right) data sets. For the d1 case, results of cMILC-012 (red) are also presented. All the power spectra are binned with $\Delta\ell = 5$ and computed over 70% of the sky. The grey shaded area denotes the range of primordial tensor CMB B-mode power spectra corresponding to tensor-to-scalar ratio values $r \in [0.0004, 0.004]$.</figcaption></figure>

contamination. Therefore, a compromise in the optimal number of moments to deproject must be found. Moreover, in this baseline cMILC approach, the moments have been projected out in the natural order of the expansion. However, there is no a priori reason to filter out lower-order moments first in the context of minimum-variance methodologies. It may be more effective to leave some major low-order contributions for blind variance minimization, as they are anyway prevailing in the budget of the observed data covariance matrix of equation (3.12). When considering PICO maps with different dust models, such as d7 (right panel of figure 2), the cMILC foreground residuals might even appear brighter compared to NILC in some cases (cMILC-01), indicating that the employed moment deprojection may not entirely capture the actual deviations of the dust model from the MBB SED. The application of ocMILC's optimized moment deprojection effectively overcomes all these limitations of the baseline cMILC approach, as demonstrated in the following sections.

## 4.2 ocMILC results

As described in section 3.2, the ocMILC pipeline consists of two main steps: a blind GNILC diagnosis of the effective foreground complexity to determine the optimal number of moment deprojection constraints across the sky and angular scales, and the subsequent optimized moment deprojection. The outcomes from these two steps are presented in sections 4.2.1 and 4.2.2, respectively.

### 4.2.1 Diagnostic maps of foreground complexity

We perform our GNILC diagnosis on the simulated PICO d1, d4, d7, and d12 data sets, each representing different foreground scenarios detailed in section 2. In this analysis, the CMB signal is considered part of the nuisance budget of GNILC, allowing us to estimate the number, $m_{fgds}$, of independent degrees of freedom associated with Galactic emission detectable by a telescope like PICO for each foreground scenario. We perform this diagnosis
for both *E*- and *B*-modes, presenting results for the baseline realization $n_{\text{sim}} = 0$, although similar conclusions can be drawn for other realizations.

Maps of $m_{\text{fgds}}^j(\hat{n})$ for the fifth needlet scale ($j = 5$) are shown in figure 3 for the four distinct data sets. They provide the effective number of independent foreground components detected across the sky in both in *E*- and *B*-mode fields at this scale, thereby partitioning the sky into clusters of uniform foreground complexity. These diagnostic maps reveal different degrees of complexity across the sky depending on the underlying foreground scenario, even though all considered foreground models are consistent with Planck observations. In particular, d12 and d1 models exhibit a larger number of independent foreground modes detected across more extensive sky regions compared to d4 and d7 models, with indications of higher complexity for d12. These results hold for both *E*- and *B*-modes. The effective lower complexity of d4 with two MBB components for dust compared to the single-MBB d1 model, is attributed to the absence of spatial variations of each MBB spectral index in d4. Indeed, unlike the d1 model, where spatial variations of the spectral index induce higher-order moments, the constant spectral indices of the two MBB components in d4 results in the absence of moments beyond zeroth-order in equation (3.5), thereby reducing the list of effective components contributing to the overall foreground emission. The highest level of complexity detected for d12 can be attributed to the multi-layer structure of the dust emission in this model. Also in this case, not all the coadded seven physical components are detected by the GNILC diagnosis, as some may be correlated or below the noise level. In summary, with high polarization sensitivity, as in the case of *PICO*, our approach offers a reliable tool for discriminating between different foreground models. Moreover, the observed decrease in the effective number of independent foreground modes towards high Galactic latitudes aligns with the spatial extent of Galactic emission in the sky and the prevalence of noise in the data at these latitudes. In *E*-modes, we also observe larger values of $m_{\text{fgds}}$ than in *B*-modes over larger regions of the sky. This discrepancy arises from the foreground *E/B* ratio, which exceeds 2. However, this trend is partially compensated by the even higher CMB *E/B* ratio, mitigating the discrepancy between *E*- and *B*-modes concerning the number of independent foreground modes.

In table 1 we report the excursion set of $m_{\text{fgds}}$ observed in the four *PICO* data sets at the five different needlet scales. For each value, the corresponding sky fraction is also reported in parentheses. As expected, the effective number of independent degrees of freedom of the Galactic emission decreases towards smaller angular scales, where the foreground power decreases while the CMB and noise have relatively larger power. Differences among the four data sets are noticeable. The d1 and d12 data sets exhibit larger values of $m_{\text{fgds}}$ compared to d4 and d7 at the largest angular scales and over larger portions of the sky at intermediate and small angular scales, both in *E*- and *B*-modes. Compared to other data sets, the d12 data set, which incorporates multilayer dust emission, exhibits higher complexity in broader regions of the sky for all needlet scales. Again, in general, higher values of $m_{\text{fgds}}$ are found on larger portions of the sky for *E*-modes. At $j = 2$, corresponding to angular scales of $\sim 3^\circ$, we find no sensible differences among the first three foreground models, as we reach the resolution limit of original Planck reference templates used in these PySM models. Conversely, at smaller angular scales, artificial fluctuations have been added to these templates through
<figure><img src="image_6.png" /><figcaption>**Figure 3.** Maps of the detected number, $m_{\text{fgds}}^j$, of independent foreground E-mode components (left) and B-mode components (right) at needlet scale $j = 5$. The results are shown for four distinct foreground scenarios, **d1** (first row), **d4** (second row), **d7** (third row), and **d12** (fourth row), and they reveal varying degrees of complexity. These diagnostic maps, which partition the sky into clusters of uniform foreground complexity, were generated using the GNILC methodology outlined in section 3.2.1, applied to full-sky frequency maps of *PICO E-* and *B*-modes.</figcaption></figure>
### E-modes

<table><thead><tr><th rowspan="2">Model</th><th colspan="5">m<sub>fgds</sub> (f<sub>sky</sub>(%))</th></tr><tr><th>j = 1</th><th>j = 2</th><th>j = 3</th><th>j = 4</th><th>j = 5</th></tr></thead><tbody><tr><td>d1s1</td><td>6</td><td>5 (97), 6 (3)</td><td>3 (3), 4 (81), 5 (16)</td><td>3 (36.8), 4 (63), 5 (0.2)</td><td>1 (0.5), 2 (30.3), 3 (46.2), 4 (23)</td></tr><tr><td>d4s1</td><td>5</td><td>4 (1.2), 5 (98.8)</td><td>3 (54), 4 (31), 5 (15)</td><td>3 (82), 4 (18)</td><td>1 (2), 2 (30), 3 (63), 4 (5)</td></tr><tr><td>d7s1</td><td>5</td><td>5</td><td>3 (13), 4 (71), 5 (16)</td><td>3 (62), 4 (37.9), 5 (0.1)</td><td>2 (31.3), 3 (67), 4 (1.7)</td></tr><tr><td>d12s1</td><td>6</td><td>5 (11), 6 (89)</td><td>4 (70), 5 (26), 6 (4)</td><td>3 (18), 4 (80), 5 (3)</td><td>1 (1), 2 (27.8), 3 (26.5), 4 (44.5), 5 (0.2)</td></tr></tbody></table>

### B-modes

<table><caption>**Table 1.** Number $m_{fgds}$ of independent modes characterizing Galactic foreground emission, as detected by GNILC within each needlet band, for the *PICO* baseline configuration and four distinct foreground scenarios. The results are presented separately for *E*-modes (top table) and *B*-modes (bottom table). In cases where multiple values are observed, the corresponding sky fraction (in percentage) associated with each value of $m_{fgds}$ is provided in parentheses.</caption><thead><tr><th rowspan="2">Model</th><th colspan="5">m<sub>fgds</sub> (f<sub>sky</sub>(%))</th></tr><tr><th>j = 1</th><th>j = 2</th><th>j = 3</th><th>j = 4</th><th>j = 5</th></tr></thead><tbody><tr><td>d1s1</td><td>6</td><td>4 (13), 5 (87)</td><td>3 (4), 4 (95), 5 (1)</td><td>2 (11.5), 3 (28), 4 (60.5)</td><td>1 (0.7), 2 (68), 3 (16.3), 4 (15)</td></tr><tr><td>d4s1</td><td>5</td><td>4 (16), 5 (84)</td><td>3 (59), 4 (40), 5 (1)</td><td>2 (12), 3 (72), 4 (16)</td><td>1 (3), 2 (67), 3 (25.5), 4 (4.5)</td></tr><tr><td>d7s1</td><td>5</td><td>4 (13), 5 (87)</td><td>3 (17), 4 (82), 5 (1)</td><td>2 (12), 3 (53), 4 (35)</td><td>2 (71.5), 3 (27), 4 (1.5)</td></tr><tr><td>d12s1</td><td>6 (82), 7 (18)</td><td>5 (17), 6 (83)</td><td>4 (77), 5 (23)</td><td>2 (9), 3 (15.3), 4 (75), 5 (0.7)</td><td>1 (2), 2 (51), 3 (20.4), 4 (26.6)</td></tr></tbody></table>

different power spectra extrapolations [40], thus returning again visible differences across the sky among the three models as diagnosed by GNILC.

### 4.2.2 CMB *B*-mode reconstruction

The clusters of pixels depicted in the diagnostic maps of figure 3, each featuring distinct dimensions of the foreground subspace, guide ocMILC in determining the appropriate number of constraints for moment deprojection in each cluster at each needlet scale. This constitutes the first layer of optimization in ocMILC. The next three layers of optimization in ocMILC consist in selecting, for each specified number of constraints, the optimal combination of moments, pivot values, and deprojection coefficients to minimize residual foreground contamination in CMB *B*-mode reconstruction, as detailed in section 3.2.2.

The improvement induced by combining the various layers of optimization in ocMILC is demonstrated by comparing the power spectrum of ocMILC residuals with those obtained when optimization is exclusively applied to specific layers. This comparison is performed using the example of the *PICO* d7 data set (similar results are obtained for other models) and considering the following intermediate ocMILC pipelines:

* ocMILC-v0, where optimization focuses on the number of moments, based on information from GNILC diagnostic maps, deprojecting the first $m_{fgds}$ moments in the natural order of the Taylor expansion (equation (3.21));
<figure><img src="image_7.png" /><figcaption>**Figure 4.** Angular power spectra of foreground (solid) and noise (dashed) residuals over $f_{\text{sky}} = 70\%$ of the sky resulting from the application of NILC (blue), ocMILC-v0 (cyan), ocMILC-v1 (red), ocMILC-v2 (green), and ocMILC (magenta) to the *PICO d7 B-mode* data set. This illustrates the progressive improvement in residuals achieved by combining several layers of optimization in ocMILC.</figcaption></figure>

• ocMILC-v1, where optimization involves both the number and the set of moments, deprojecting the set of $m_{\text{fgds}}$ moments that lead to the lowest denoised output variance (equation (3.24));

• ocMILC-v2, where optimization extends to the number of moments, set of moments, and pivot values.

The comparison results, shown in figure 4, reveal that deprojecting the first $m_{\text{fgds}}$ moments in the natural order of the Taylor expansion (ocMILC-v0) does not improve foreground subtraction across most scales, especially when the dust model, like d7, deviates substantially from a MBB. In such cases, nulling constraints result in a notable penalty in residual foreground variance attributed to higher-order moments. This suggests that the mitigation of foregrounds could have been better handled if some of the low-order moments had been left for variance minimization, while the higher-order moments had been deprojected. Optimizing the choice of moments (ocMILC-v1) indeed brings improvement, further enhanced by allowing the values of pivot parameters to vary freely (ocMILC-v2), enabling a more effective accommodation of the dust model through moment expansion. Enabling the weights to also partially deproject specific moments (ocMILC) provides additional flexibility to the blind variance minimization process, allowing for the mitigation of foreground modes not adequately captured by the moment expansion. This final refinement, in conjunction with the previous optimization steps, enables ocMILC to reconstruct the cleanest CMB solution among all considered intermediate pipelines for all data sets, achieving minimum foreground variance with limited noise penalty.
<figure><img src="image_8.png" /><figcaption>**Figure 5.** Angular power spectra of foreground (solid) and noise (dashed) residuals over $f_{\text{sky}} = 70\%$ of the sky obtained from the application of NILC (blue) and ocMILC (others) to the PICO d1 B-mode data set, with variations in the number of moments deprojected compared to the number $m_{\text{fgds}}$ diagnosed by GNILC. The results of ocMILC are shown for four different cases, where, respectively, $m_{\text{fgds}}$ (magenta), $m_{\text{fgds}} - 1$ (cyan), $m_{\text{fgds}} + 1$ (red), and $m_{\text{fgds}} + 2$ (green) foreground moments are deprojected across the sky and needlet scales.</figcaption></figure>

This increased flexibility proves advantageous in effectively handling various thermal dust models through moment expansion.

To validate the accuracy of the GNILC diagnosis in determining the optimal number $m_{\text{fgds}}$ of moments to deproject before incurring significant noise penalties, we apply ocMILC to the PICO d1 data set while imposing the deprojection of $m_{\text{fgds}} - 1$, $m_{\text{fgds}} + 1$, and $m_{\text{fgds}} + 2$ moments in each point of the sky and for each needlet scale. The resulting angular power spectra are compared with those of NILC and the proper ocMILC, with $m_{\text{fgds}}$ moments deprojected, in figure 5. The outcomes clearly demonstrate that deprojecting one or two additional moments, beyond what is suggested by the GNILC diagnosis, leads to a significant increase in residual noise. Conversely, deprojecting $m_{\text{fgds}} - 1$ moments results in larger Galactic contamination on intermediate and small scales. These results highlight the efficacy of the GNILC diagnosis in providing a data-driven assessment of the optimal number of moments for deprojection with ocMILC.

The full ocMILC pipeline, integrating all layers of optimization, has been applied to all PICO B-mode data sets, encompassing diverse foreground scenarios outlined in section 2. The angular power spectra of ocMILC residuals are compared with those of NILC for all foreground scenarios in figure 6. For the d1, d4, and d7 models, ocMILC yields significantly lower foreground residuals across all angular scales compared to NILC, with only a moderate increase in noise contamination relative to NILC. These improvements in terms of residual
<figure><img src="image_9.png" /><figcaption>**Figure 6.** Left: angular power spectra of foreground (solid) and noise (dashed) B-mode residuals obtained from the application of NILC (blue) and ocMILC (magenta) to PICO d1 (top), d4 (second row), d7 (third row), and d12 (bottom) data sets. Power spectra have been computed over $f_{sky} = 70\%$ of the sky for models d1, d4, and d7, and over $f_{sky} = 40\%$ of the sky for model d12. Right: posterior distributions of the recovered tensor-to-scalar ratio for both pipelines. In all plots, the grey shaded area represents the range of values of the tensor-to-scalar ratio: $r \in [0.0004, 0.004]$.</figcaption></figure>
foreground contamination, regardless of the foreground model, can be attributed to the
several layers of optimization in ocMILC: multiclustering from GNILC, varying number and
set of deprojected moments, varying pivot parameters, and varying deprojection coefficients,
across the sky and angular scales. For the most challenging foreground model d12, which
includes multi-layer dust components along the line-of-sight and spectral decorrelation [29],
the reduction of residual foreground contamination is more modest than in other foreground
scenarios but still outperforms NILC across angular scales overall. For all the considered
data sets, the reduced residual foreground contamination of the ocMILC CMB B-mode
solution is achieved with only a moderate noise penalty relative to NILC, thanks to the
information provided by the GNILC diagnosis. These results showcase the flexibility of
ocMILC in effectively handling deviations of thermal dust emission from a simple MBB
through optimized moment deprojection.

The resulting *r*-posteriors for NILC and ocMILC across the four distinct foreground
scenarios are displayed in the right panels of figure 6. Biased estimates of the tensor-to-scalar
ratio (*r*) are reported when the value *r* = 0 falls outside the 68% confidence level. Notably,
ocMILC, in contrast to NILC, produces unbiased posteriors for *r* across all considered
foreground scenarios even for such large fractions of sky. This bias removal is characterized
by both a shift in the distribution's peak towards lower values of *r* due to reduced foreground
contamination and an increase in the distribution's width due to increased noise. The biased *r*-
distribution observed in NILC results from more pronounced residual Galactic contamination
across all multipoles. While previous *PICO* forecasts in the literature [23, 30] demonstrated
that NILC and cMILC can achieve unbiased recovery of *r* for a 50% sky fraction with most
foreground models, our results highlight that over larger sky fractions (70%) these methods,
without optimization, exhibit biases in *r* due to lingering foreground residuals. In contrast,
ocMILC remains unbiased over such extended sky fractions for all foreground models. It is
interesting to note that our results, along with those from [30], exhibiting poorer constraints
on *r* for d1 and d12 compared to d4 and d7 foreground scenarios, align with the GNILC
diagnosis in section 3.2.1 which indeed revealed lower foreground complexity in the d4 and
d7 data sets. For all considered Galactic models, except the intricate d12 model, ocMILC
achieves upper bounds on the tensor-to-scalar ratio that align with the sensitivity targeted
by *PICO* with the adopted baseline instrumental configuration (*r* < 0.0004 at 95% CL).

Thanks to optimized moment deprojection, ocMILC enables the observation of larger
regions of uncontaminated sky compared to NILC and cMILC, without significant bias
introduced by residual foregrounds. This is demonstrated in figure 7, showing the variation of
the recovered posterior on *r* with increasing sky fractions, ranging from *f*<sub>sky</sub> = 70% to 90% for
**d1**, **d4**, and **d7**, and from *f*<sub>sky</sub> = 40% to 60% for **d12**. Across all foreground models, ocMILC
consistently yields lower unbiased upper bounds on the tensor-to-scalar ratio compared to
NILC, whose posteriors exhibit consistent bias at high significance across all data sets over
such large sky fractions. Lastly, it is important to highlight that ocMILC successfully handles
the intricate multi-layer dust model **d12** [29], avoiding the residual bias reported for NILC in
previous *PICO* forecasts [30] concerning this specific foreground model.
<figure><img src="image_10.png" /><figcaption>**Figure 7.** Recovered posterior distributions of the tensor-to-scalar ratio obtained from NILC (blue) and ocMILC (magenta) with increasing sky fractions. The grey shaded region corresponds to the range $r \in [0.0004, 0.004]$, where the lower bound ($r = 0.0004$) aligns with the targeted sensitivity at 95% confidence level for the adopted *PICO* baseline instrumental configuration.</figcaption></figure>
<table><caption>**Table 2.** Optimal configuration of moments and dust pivot parameters for deprojection, as determined by ocMILC across various sky regions and needlet scales for each foreground data set. The optimal deprojection coefficient for each moment SED is indicated in parentheses. As detailed in section 3.2.2, the optimal combination of these parameters is chosen by minimizing the denoised output variance of equation (3.24).</caption><thead><tr><th>Band</th><th>m<sub>fgds</sub></th><th>d1s1</th><th>d4s1</th><th>d7s1</th><th>d12s1</th></tr></thead><tbody><tr><td rowspan="2">j = 1</td><td>5</td><td></td><td>β̃<sub>d</sub> = 1.75, T̄<sub>d</sub> = 19.0;<br/>[∂β<sub>d</sub>(-0.01),∂β<sub>s</sub>(0.),∂T<sub>d</sub>(0.),<br/>∂β<sup>2</sup><sub>s</sub>(0.001),∂β<sup>2</sup><sub>d</sub>T<sub>d</sub>(0.0005)]</td><td>β̃<sub>d</sub> = 1.4, T̄<sub>d</sub> = 17.0;<br/>[f<sub>d</sub>(0.01),∂β<sub>s</sub>(0.),∂T<sub>d</sub>(0.),<br/>∂β<sup>2</sup><sub>d</sub>(0.05),∂β<sup>2</sup><sub>s</sub>(-0.005)]</td><td></td></tr><tr><td>6</td><td>β̃<sub>d</sub> = 1.3, T̄<sub>d</sub> = 17.25;<br/>[f<sub>d</sub>(0.001),f<sub>s</sub>(0.),∂β<sub>s</sub>(0.),<br/>∂T<sub>d</sub>(0.),∂β<sup>2</sup><sub>s</sub>(0.01),∂T<sup>2</sup><sub>d</sub>(0.01)]</td><td></td><td>β̃<sub>d</sub> = 1.25, T̄<sub>d</sub> = 18.25;<br/>[f<sub>d</sub>(0.),f<sub>s</sub>(0.),∂β<sub>d</sub>(-0.005),<br/>∂β<sub>s</sub>(0.),∂T<sub>d</sub>(0.),∂β<sup>2</sup><sub>s</sub>(0.05)]</td><td></td></tr><tr><td rowspan="2">j = 2</td><td>4</td><td>β<sub>d</sub> = 1.2, T̄<sub>d</sub> = 17.5;<br/>[f<sub>s</sub>(0.),∂β<sub>s</sub>(-0.0005),<br/>∂β<sup>2</sup><sub>d</sub>(0.05),∂β<sup>2</sup><sub>s</sub>(0.05)]</td><td>β<sub>d</sub> = 1.75, T̄<sub>d</sub> = 21.5;<br/>[∂β<sub>d</sub>(-0.0005),∂β<sub>s</sub>(0.0005),<br/>∂T<sub>d</sub>(-0.001),∂β<sup>2</sup><sub>d</sub>(0.01)]</td><td>β<sub>d</sub> = 1.35, T̄<sub>d</sub> = 21.75;<br/>[f<sub>d</sub>(0.01),∂β<sub>s</sub>(-0.001),<br/>∂β<sup>2</sup><sub>s</sub>(0.),∂T<sup>2</sup><sub>d</sub>(0.)]</td><td></td></tr><tr><td>5</td><td>β̃<sub>d</sub> = 1.7, T̄<sub>d</sub> = 21.75;<br/>[f<sub>d</sub>(0.),∂β<sub>d</sub>(0.001),∂T<sub>d</sub>(0.),<br/>∂β<sub>s</sub>(0.001),∂β<sup>2</sup><sub>d</sub>(0.01)]</td><td>β̃<sub>d</sub> = 1.75, T̄<sub>d</sub> = 19.5;<br/>[∂β<sub>d</sub>(-0.01),∂β<sub>s</sub>(0.),∂T<sub>d</sub>(0.),<br/>∂β<sub>s</sub>(0.005),∂β<sup>2</sup><sub>d</sub>T<sub>d</sub>(0.0005)]</td><td>β̃<sub>d</sub> = 1.35, T̄<sub>d</sub> = 21.5;<br/>[f<sub>d</sub>(0.01),∂β<sub>s</sub>(0.),<br/>∂β<sup>2</sup><sub>d</sub>(0.05),∂β<sup>2</sup><sub>s</sub>(0.001),<br/>∂T<sup>2</sup><sub>d</sub>(0.)]</td><td>β̃<sub>d</sub> = 1.7, T̄<sub>d</sub> = 17.5;<br/>[f<sub>s</sub>(-0.0005),∂β<sub>s</sub>(0.001),<br/>∂T<sub>d</sub>(0.),∂β<sup>2</sup><sub>d</sub>(-0.0005),<br/>∂β<sub>s</sub>(0.05)]</td></tr><tr><td rowspan="3">j = 3</td><td>3</td><td>β<sub>d</sub> = 1.5, T̄<sub>d</sub> = 19.0;<br/>[f<sub>s</sub>(-0.001),∂T<sub>d</sub>(0.),<br/>∂β<sup>2</sup><sub>s</sub>(0.05)]</td><td>β<sub>d</sub> = 1.45, T̄<sub>d</sub> = 17.0;<br/>[∂β<sub>d</sub>(-0.01),∂β<sub>s</sub>(-0.001),<br/>∂T<sub>d</sub>(0.)]</td><td>β<sub>d</sub> = 1.45, T̄<sub>d</sub> = 21.0;<br/>[f<sub>s</sub>(0.001),∂T<sub>d</sub>(0.),<br/>∂β<sup>2</sup><sub>d</sub>T<sub>d</sub>(0.0005)]</td><td></td></tr><tr><td>4</td><td>β̃<sub>d</sub> = 1.65, T̄<sub>d</sub> = 17.25;<br/>[∂β<sub>d</sub>(0.001),∂β<sub>s</sub>(0.005),<br/>∂β<sup>2</sup><sub>s</sub>(0.05),∂T<sup>2</sup><sub>d</sub>(0.)]</td><td>β̃<sub>d</sub> = 1.45, T̄<sub>d</sub> = 21.75;<br/>[∂β<sub>d</sub>(-0.01),∂β<sub>s</sub>(0.005),<br/>∂β<sup>2</sup><sub>s</sub>(0.05),∂T<sup>2</sup><sub>d</sub>(0.)]</td><td>β̃<sub>d</sub> = 1.4, T̄<sub>d</sub> = 20.0;<br/>[∂β<sub>s</sub>(0.001),∂T<sub>d</sub>(0.),<br/>∂β<sup>2</sup><sub>d</sub>T<sub>d</sub>(0.0005),∂T<sup>2</sup><sub>d</sub>(0.)]</td><td>β̃<sub>d</sub> = 1.75, T̄<sub>d</sub> = 19.25;<br/>[∂β<sub>s</sub>(0.005),∂β<sup>2</sup><sub>d</sub>(-0.0005),<br/>∂β<sup>2</sup><sub>s</sub>(0.05),∂β<sup>2</sup><sub>d</sub>T<sub>d</sub>(0.0005)]</td></tr><tr><td>5</td><td></td><td></td><td>β̃<sub>d</sub> = 1.35, T̄<sub>d</sub> = 19.0;<br/>[∂β<sub>d</sub>(-0.001),∂β<sub>s</sub>(0.01),<br/>∂T<sub>d</sub>(0.),∂β<sup>2</sup><sub>d</sub>T<sub>d</sub>(0.),∂T<sup>2</sup><sub>d</sub>(0.)]</td><td></td></tr><tr><td rowspan="4">j = 4</td><td>2</td><td>β<sub>d</sub> = 1.2, T̄<sub>d</sub> = 17.0;<br/>[f<sub>s</sub>(-0.005),∂T<sup>2</sup><sub>d</sub>(0.)]</td><td>β<sub>d</sub> = 1.3, T̄<sub>d</sub> = 18.25;<br/>[f<sub>d</sub>(0.01),∂β<sub>s</sub>(0.005)]</td><td>β<sub>d</sub> = 1.65, T̄<sub>d</sub> = 17.25;<br/>[f<sub>d</sub>(-0.01),f<sub>s</sub>(-0.005)]</td><td>β<sub>d</sub> = 1.75, T̄<sub>d</sub> = 21.75;<br/>[∂β<sup>2</sup><sub>d</sub>(0.01),∂β<sup>2</sup><sub>d</sub>T<sub>d</sub>(-0.001)]</td></tr><tr><td>3</td><td>β̃<sub>d</sub> = 1.25, T̄<sub>d</sub> = 17.75;<br/>[∂β<sub>d</sub>(-0.01),∂β<sub>s</sub>(0.01),<br/>∂β<sup>2</sup><sub>d</sub>T<sub>d</sub>(0.0005)]</td><td>β̃<sub>d</sub> = 1.45, T̄<sub>d</sub> = 17.5;<br/>[∂β<sub>d</sub>(-0.01),∂β<sub>s</sub>(0.005),<br/>∂β<sup>2</sup><sub>d</sub>T<sub>d</sub>(0.)]</td><td>β̃<sub>d</sub> = 1.6, T̄<sub>d</sub> = 20.25;<br/>[∂β<sub>d</sub>(-0.01),∂β<sub>s</sub>(0.005),<br/>∂β<sup>2</sup><sub>d</sub>T<sub>d</sub>(0.0005)]</td><td>β̃<sub>d</sub> = 1.5, T̄<sub>d</sub> = 21.25;<br/>[f<sub>s</sub>(-0.001),∂β<sub>d</sub>(-0.0005),<br/>∂T<sup>2</sup><sub>d</sub>(0.)]</td></tr><tr><td>4</td><td>β̃<sub>d</sub> = 1.6, T̄<sub>d</sub> = 17.75;<br/>[∂β<sub>d</sub>(0.0005),∂β<sub>s</sub>(0.001),<br/>∂T<sub>d</sub>(0.),∂T<sup>2</sup><sub>d</sub>(0.)]</td><td>β̃<sub>d</sub> = 1.75, T̄<sub>d</sub> = 20.5;<br/>[∂β<sub>d</sub>(-0.001),∂β<sub>s</sub>(0.01),<br/>∂β<sup>2</sup><sub>d</sub>(0.01),∂β<sup>2</sup><sub>d</sub>T<sub>d</sub>(-0.001)]</td><td>β̃<sub>d</sub> = 1.4, T̄<sub>d</sub> = 19.5;<br/>[∂β<sub>s</sub>(0.001),∂T<sub>d</sub>(0.),<br/>∂β<sup>2</sup><sub>d</sub>T<sub>d</sub>(0.0005),∂T<sup>2</sup><sub>d</sub>(0.)]</td><td>β̃<sub>d</sub> = 1.6, T̄<sub>d</sub> = 17.0;<br/>[∂β<sub>s</sub>(0.01),∂T<sub>d</sub>(0.),<br/>∂β<sup>2</sup><sub>d</sub>(0.01),∂β<sup>2</sup><sub>d</sub>T<sub>d</sub>(0.)]</td></tr><tr><td>5</td><td></td><td></td><td></td><td>β̃<sub>d</sub> = 1.45, T̄<sub>d</sub> = 17.0;<br/>[∂T<sup>2</sup><sub>d</sub>(0.)]</td></tr><tr><td rowspan="4">j = 5</td><td>1</td><td>β<sub>d</sub> = 1.2, T̄<sub>d</sub> = 17.0;<br/>[∂β<sup>2</sup><sub>s</sub>(0.005)]</td><td>β<sub>d</sub> = 1.2, T̄<sub>d</sub> = 17.0;<br/>[f<sub>s</sub>(-0.005)]</td><td></td><td></td></tr><tr><td>2</td><td>β̃<sub>d</sub> = 1.2, T̄<sub>d</sub> = 17.0;<br/>[f<sub>s</sub>(0.0005),∂T<sup>2</sup><sub>d</sub>(0.)]</td><td>β̃<sub>d</sub> = 1.75, T̄<sub>d</sub> = 17.0;<br/>[f<sub>d</sub>(0.001),f<sub>s</sub>(0.0005)]</td><td>β̃<sub>d</sub> = 1.4, T̄<sub>d</sub> = 17.0;<br/>[f<sub>s</sub>(0.),∂T<sup>2</sup><sub>d</sub>(0.)]</td><td>β̃<sub>d</sub> = 1.75, T̄<sub>d</sub> = 21.75;<br/>[∂β<sub>d</sub>(0.001),∂β<sup>2</sup><sub>d</sub>T<sub>d</sub>(-0.001)]</td></tr><tr><td>3</td><td>β̃<sub>d</sub> = 1.75, T̄<sub>d</sub> = 21.75;<br/>[f<sub>s</sub>(0.001),∂β<sub>d</sub>(0.001),<br/>∂T<sup>2</sup><sub>d</sub>(0.)]</td><td>β̃<sub>d</sub> = 1.4, T̄<sub>d</sub> = 21.75;<br/>[∂β<sub>d</sub>(-0.01),∂β<sub>s</sub>(0.01),<br/>∂T<sup>2</sup><sub>d</sub>(0.)]</td><td>β̃<sub>d</sub> = 1.35, T̄<sub>d</sub> = 17.0;<br/>[f<sub>s</sub>(0.),∂β<sub>s</sub>(0.001),<br/>∂T<sup>2</sup><sub>d</sub>(0.)]</td><td>β̃<sub>d</sub> = 1.3, T̄<sub>d</sub> = 21.5;<br/>[f<sub>s</sub>(0.0005),∂β<sub>d</sub>(-0.005),<br/>∂T<sup>2</sup><sub>d</sub>(0.)]</td></tr><tr><td>4</td><td>β̃<sub>d</sub> = 1.55, T̄<sub>d</sub> = 21.75;<br/>[f<sub>s</sub>(-0.0005),∂β<sub>d</sub>(-0.001),<br/>∂β<sub>s</sub>(0.001),∂T<sup>2</sup><sub>d</sub>(0.)]</td><td>β̃<sub>d</sub> = 1.3, T̄<sub>d</sub> = 17.25;<br/>[f<sub>s</sub>(0.0005),∂β<sub>d</sub>(-0.0005),<br/>∂T<sub>d</sub>(0.0005),∂β<sup>2</sup><sub>d</sub>T<sub>d</sub>(0.)]</td><td>β̃<sub>d</sub> = 1.6, T̄<sub>d</sub> = 21.75;<br/>[f<sub>s</sub>(-0.0005),∂β<sub>d</sub>(-0.005),<br/>∂β<sub>s</sub>(0.005),∂T<sup>2</sup><sub>d</sub>(0.)]</td><td>β̃<sub>d</sub> = 1.6, T̄<sub>d</sub> = 17.0;<br/>[∂β<sub>s</sub>(0.01),∂T<sub>d</sub>(0.),<br/>∂β<sup>2</sup><sub>d</sub>(0.01),∂β<sup>2</sup><sub>d</sub>T<sub>d</sub>(0.)]</td></tr></tbody></table>

Table 2 presents the optimal moment configurations determined by ocMILC across different sky regions and angular scales for each foreground data set. For each needlet band and GNILC cluster (sky region with uniform foreground complexity), the table includes information on the optimal number and combination of moments for deprojection, along
with the corresponding optimal values of deprojection coefficients and dust pivot parameters. Examining these configurations allows us to draw conclusions consistent with the discussions in previous sections:

* The optimal pivot values of the spectral parameters vary for different foreground models, sky regions, and ranges of angular scales.

* Higher-order moments are sometimes preferred for deprojection (e.g. d4s1), while the subtraction of lower-order components can be effectively handled by minimum variance.

* Most moments require only partial deprojection.

The ranges of $m_{fgds}$ values derived from the GNILC diagnosis for different Galactic models and angular scales, as reported in table 2 and used by ocMILC, are similar to those shown in table 1. However, minor differences exist in a few cases, particularly at large and intermediate scales and for small clusters. This discrepancy arises because ocMILC and table 2 adopt the more conservative estimate $m_{fgds} = m_{GNILC} - 1$, where $m_{GNILC}$ is computed considering only instrumental noise as a nuisance component, and one mode is subtracted to account for the expected CMB contribution. In contrast, table 1 reports $m_{fgds} = m_{GNILC}$, including CMB in the nuisance term. These minor variations result from the fact that, on large and intermediate angular scales, the CMB lensing B-modes are not consistently detected across the entire sky as an independent component above the *PICO* noise level. This is expected, as lensing modes primarily contribute at small scales. However, these differences are negligible and do not impact the performance of the ocMILC technique.

Throughout this paper, we adopted the baseline instrumental configuration of *PICO*, consistent with required specifications detailed in the *PICO* report [6], which provides an overall sensitivity of $0.87 \ \mu K \cdot \text{arcmin}$. To complement our results, we present NILC and ocMILC outcomes for the *PICO* d1 data set, employing the alternative *PICO* configuration known as CBE (Current Best Estimate) [6, 30], featuring an enhanced overall sensitivity of $0.61 \ \mu K \cdot \text{arcmin}$. The results are shown in figure 8, showcasing the angular power spectra of residuals averaged over all realizations and corresponding posteriors of the estimated tensor-to-scalar ratio. Even with the increased sensitivity of the *PICO* CBE configuration, ocMILC still outperforms NILC, exhibiting lower foreground residuals across all angular scales with only a moderate rise in noise contamination. As anticipated, the noise residuals in both NILC and ocMILC CMB B-mode reconstructions are lower compared to those obtained with the baseline *PICO* configuration (displayed in the top panel of figure 6). Consequently, this leads to lower upper bounds on the estimated tensor-to-scalar ratio ($r < 0.00025$ at 95% CL), as shown in the right panel of figure 8. Furthermore, ocMILC improves upon the biased upper bound obtained with NILC for such a large sky fraction (70%). The ocMILC constraint aligns with the quoted forecast in [30] for *PICO* CBE sensitivities, albeit for a significantly larger sky fraction compared to [30].

## 4.3 Sensitivity to AME and synchrotron emission

The results in section 4.2.2 demonstrated the capability of ocMILC to handle diverse dust models efficiently, thanks to the optimization of moment deprojection. This was achieved by
<figure><img src="image_11.png" /><figcaption>**Figure 8.** Same as the top panels of figure 6, but for PICO CBE sensitivities. In both panels, the grey shaded area represents the range of values of the tensor-to-scalar ratio: $r \in [0.0002, 0.004]$. The lower bound ($r = 0.0002$) corresponds to the targeted sensitivity at 95% CL for PICO CBE configuration, while the upper bound ($r = 0.004$) roughly corresponds to the energy scale of Starobinski's inflation model.</figcaption></figure>

integrating information from the GNILC diagnosis and optimizing the selection of moments, pivot values and deprojection coefficients across various sky regions and angular scales. In this section, our focus shifts to assessing the pipeline's robustness against varied models of Galactic synchrotron emission, while maintaining a fixed thermal dust emission model (d1) to isolate the impact of synchrotron model variations. Additionally, we investigate the pipeline's response to potential polarization of the anomalous microwave emission (AME).

Specifically, in addition to s1, two alternative PySM synchrotron models are considered:

1. s5: this model features a power-law SED as defined in equation (2.3), but the spectral index map from s1 has been rescaled to match the larger variability observed in S-PASS data [50]. In addition, small-scale non-gaussian anisotropies have been incorporated into the templates using the Logarithm of the Polarization Fraction Tensor (logpoltens) formalism.

2. s7: this model features a power-law SED with some curvature,

$$X_s(\hat{n}, \nu) = X_s(\hat{n}, \nu_s) \left(\frac{\nu}{\nu_s}\right)^{\beta_s(\hat{n})+C_s(\hat{n}) \log \frac{\nu}{\nu_s}}, \quad (4.3)$$

where $\nu_s = 23$ GHz, and the $X_s(\hat{n}, \nu_s)$ and $\beta_s$ maps remain consistent with those in s5, while a spatially varying curvature term $C_s$ is introduced based on the analysis of intensity data observed in a patch of the ARCADE experiment [66].

As of now, there is no reported detection of AME polarization, and the most stringent upper bounds on the AME polarization fraction are at the level of 1% or lower [67–70], so that the actual contribution of AME to polarized emission still remains uncertain. Therefore, we explore three AME scenarios with different constant degrees of polarization across the sky: $\Pi_{AME} = 0.5, 1$, and $2\%$. The AME model from PySM corresponds to the sum of two spinning dust components based on the Commander fit of Planck temperature data [42]. The SED of the first component features a spatially anisotropic peak frequency, while the SED of
## B-modes with different synchrotron models

<table><thead><tr><th rowspan="2">Model</th><th colspan="7">m<sub>fgds</sub> (f<sub>sky</sub>(%))</th></tr><tr><th>j = 1</th><th>j = 2</th><th>j = 3</th><th>j = 4</th><th>j = 5</th><th>j = 6</th></tr></thead><tbody><tr><td>d1s1</td><td>6</td><td>4 (13), 5 (87)</td><td>3 (4), 4 (95), 5 (1)</td><td>2 (11.5), 3 (28), 4 (60.5)</td><td>1 (0.7), 2 (68), 3 (16.3), 4 (15)</td><td></td></tr><tr><td>d1s5</td><td>6</td><td>5</td><td>3 (4), 4 (52), 5 (44)</td><td>2 (1), 3 (38), 4 (50), 5 (11)</td><td>1 (0.7), 2 (58.5), 3 (25.5), 4 (15.3)</td><td></td></tr><tr><td>d1s7</td><td>6</td><td>5</td><td>3 (4), 4 (52), 5 (44)</td><td>2 (1), 3 (38), 4 (50), 5 (11)</td><td>1 (0.7), 2 (59), 3 (25), 4 (15.3)</td><td></td></tr></tbody></table>

## B-modes with AME with different polarization fractions

<table><caption>**Table 3.** Number $m_{fgds}$ of independent modes characterizing Galactic foreground emission, as detected by the GNILC in each needlet band for the baseline *PICO* configuration, as a function of the synchrotron (top panel) and AME (bottom panel) scenarios. In cases where multiple values are observed, parentheses indicate the corresponding sky fraction in percentage associated with each value of $m_{fgds}$.</caption><thead><tr><th rowspan="2">Model</th><th colspan="7">m<sub>fgds</sub> (f<sub>sky</sub>(%))</th></tr><tr><th>j = 1</th><th>j = 2</th><th>j = 3</th><th>j = 4</th><th>j = 5</th><th>j = 6</th></tr></thead><tbody><tr><td>Π<sub>AME</sub> = 0.5%</td><td>7</td><td>4 (6.4), 5 (64), 6 (29.6)</td><td>3 (4), 4 (89.5), 5 (6.5)</td><td>2 (11), 3 (28.5), 4 (60.5)</td><td>1 (3), 2 (67),<br>3 (25.5), 4 (4.5)</td><td></td></tr><tr><td>Π<sub>AME</sub> = 1%</td><td>7</td><td>5 (27.5), 6 (72.5)</td><td>3 (4), 4 (74),<br>5 (10.5), 6 (11.5)</td><td>2 (10), 3 (29.6), 4 (55.2),<br>5 (5), 6 (0.2)</td><td>2 (71.5), 3 (27), 4 (1.5)</td><td></td></tr><tr><td>Π<sub>AME</sub> = 2%</td><td>8</td><td>6 (81.5), 7 (18.5)</td><td>3 (4), 4 (45), 5 (24), 6 (27)</td><td>1 (0.8), 2 (62.8), 3 (19.6)<br>4 (14.8), 5 (2)</td><td>1 (2), 2 (51),<br>3 (20.4), 4 (26.6)</td><td></td></tr></tbody></table>

the other component maintains a constant peak frequency across the sky. The polarization angles of AME are set to match those of thermal dust emission.

We begin by examining the outcomes of the GNILC diagnosis for the various synchrotron and AME models in table 3, contrasting them with those of the d1s1 data set, where the synchrotron was represented by the s1 model and AME was assumed to be unpolarized. Clearly, the number of independent foreground B-modes detected by GNILC at each needlet scale and the associated sky areas tend to increase with more complex synchrotron models and higher degrees of AME polarization. The larger variability of the synchrotron spectral index in the s5 model compared to s1 is noticeable to GNILC, particularly at intermediate and small scales (j = 2, 3 and 4), where larger regions of the sky exhibit higher values of $m_{fgds}$. In contrast, GNILC is not particularly sensitive to the spatially varying curvature of the s7 model (equation (4.3)) for the frequency range and sensitivity of *PICO*, as the number of independent foreground modes detected remains similar for s5 and s7. Comparing the first lines of the top and bottom tables highlights that even a modest AME polarization fraction of $\Pi_{AME} = 0.5\%$ is detected by GNILC in all needlet bands for the frequency range and sensitivity of *PICO*. This trend persists with increasing polarization fractions ($\Pi_{AME} = 1$ and 2%), suggesting that higher degrees of AME polarization further enhance the effective foreground complexity across the sky and angular scales.

After evaluating the effects of more complex synchrotron and AME models in the GNILC diagnosis, we proceed to assess their impact on NILC and ocMILC CMB B-mode reconstruction in figure 9. This is to determine whether there is a need to extend the
<figure><img src="image_12.png" /><figcaption>**Figure 9.** Left: angular power spectra of foreground (solid) and noise (dashed) *B*-mode residuals over 70% of the sky resulting from NILC applied to the *PICO d1* data set with varying synchrotron models (top) or varying AME polarization models (bottom). Right: ratio of the power spectra between ocMILC and NILC for foreground (solid) and noise (dashed) *B*-mode residuals across different synchrotron and AME scenarios considered.</figcaption></figure>

optimization procedure of ocMILC to accommodate the higher complexity of synchrotron and AME polarized emissions. Indeed, despite ocMILC's optimization including synchrotron moments, the current pipeline maintains a fixed pivot value of $\bar{\beta}_s = -3$ for the synchrotron spectral index (section 3.2.2). However, a higher variability of this parameter across the sky may necessitate optimizing the corresponding pivot values, similar to what was done for dust spectral parameters. Furthermore, the framework of moment expansion has not yet been extended to AME [26], so the current ocMILC pipeline does not attempt to deproject any AME moments, leaving them for blind variance minimization.

The angular power spectra of foreground and noise residuals in the NILC CMB *B*-mode reconstruction under various synchrotron and AME scenarios are displayed in the left panels of figure 9. Having a more complex synchrotron emission (s5 and s7) results in a slight increase in foreground residuals across all angular scales up to $\ell \sim 300$. However, the impact of varying synchrotron complexity on NILC residuals is notably less pronounced compared to the impact of varying dust models, as discussed in previous sections. Consequently, further optimization of ocMILC on the pivot values of the synchrotron spectral index is not expected to significantly enhance ocMILC results. Across all extensions of synchrotron emission considered, the ocMILC's CMB solution with a fixed pivot of $\bar{\beta}_s = -3$ indeed exhibits lower foreground contamination compared to NILC (top right panel), with percentage improvements similar to those obtained with the least complex model s1. In the case of the d1s5 data set,
we even observe a 10% greater improvement of ocMILC over NILC at large angular scales compared to d1s1. Additionally, the increase in noise residuals in ocMILC remains consistent across all synchrotron scenarios. The negligible impact of synchrotron curvature is anticipated since, as demonstrated in [23, 26], curvature is accounted for by the second-order term in the moment expansion (equation (3.3)), which is included in our optimized deprojection. These results show that, currently, with the available and foreseeable more complex synchrotron models, employing a fixed pivot for the synchrotron spectral index ($\beta_s = -3$) still yields highly effective moment deprojection with ocMILC.

Concerning AME scenarios, we observe a slight increase in NILC residuals for $\ell \lesssim 250$ as the AME polarization fraction increases (bottom left panel of figure 9). This indicates that the presence of a polarized AME component affects the variance minimization, given the sensitivity and frequency coverage of PICO. Examining the ratio between ocMILC and NILC residuals (bottom right panel), we find that, while the improvement achieved by ocMILC at intermediate and small angular scales ($\ell \gtrsim 70$) slightly degrades with increasing AME polarization compared to the case without polarized AME, it remains highly significant. However, for very low multipoles ($\ell \lesssim 15$), ocMILC foreground residuals become comparable to or larger than NILC foreground residuals depending on the degree of AME polarization. This highlights the necessity, in such scenarios and considering the frequency coverage of PICO, of incorporating AME moments into the ocMILC pipeline in the first needlet band. We leave this extension for future investigation, noting that there is currently no clear observational evidence for such levels of polarized AME emission across the sky.

# 5 Conclusions

The success of upcoming CMB experiments hinges on the ability to measure the primordial CMB B-mode polarization down to $r \lesssim 10^{-3}$ without bias to validate the inflationary scenario. This requires exquisite control of instrumental systematics and Galactic foreground subtraction. While the blind NILC method enables the reconstruction of the CMB B-mode polarization field without encountering biases from foreground mismodelling that parametric methods may face, fully blind overall-variance minimization might not always be sufficient to reduce large-scale Galactic contamination below the primordial signal, especially for the most challenging foreground scenarios, depending on the available sensitivity, frequency channels, and the targeted $r$ value.

Deprojecting moments of Galactic emission with the semi-blind cMILC method theoretically allows for minimizing foreground variance rather than overall variance. However, the associated noise penalty, including the increased variance of unconstrained foreground moments, does not always guarantee optimal outcomes for the most complex foreground scenarios. Specifically, deprojecting foreground moments in the natural order of the Taylor expansion may not be optimal, particularly for the moments that dominate the overall variance, which may be better suited for blind variance minimization. To address this trade-off, we introduced an optimized variant of cMILC, named ocMILC (section 3.2), which refines the deprojection process through a data-driven approach by optimizing the number and selection of moments to deproject, as well as pivot values and deprojection coefficients.
In ocMILC, the optimization of the number of moments to deproject, depending on sky areas and angular scales, relies on the GNILC diagnosis of data complexity (section 3.2.1), which maps out the number of independent observable modes of Galactic emission, $m_{fgds}$, in the given data set across the sky and at different angular scales (figure 3 and table 1). This diagnosis informs ocMILC on the optimal number of moments to deproject locally before paying significant noise penalties. This strategy is corroborated by the results obtained in figure 5. The specific subset of moments to deproject locally is also optimized to retain some dominant moments for blind variance minimization, while selectively deprojecting higher-order moments that are not predominantly captured by covariance estimation. The optimization of local pivot values of the dust spectral parameters across different sky regions and ranges of angular scales allows for accommodating local moment expansions associated with local averaging processes. Finally, allowing the deprojection coefficients $\epsilon_k$ to be non-zero for partial deprojection of certain moments offers additional flexibility for limiting noise penalties. In addition, it allows to better handle foreground modes not properly described by the moment expansion of a single MBB SED. The optimal pivot values, subset of moments, and deprojection coefficients are determined to minimize the denoised output variance (equation (3.24)), and hence the residual foreground variance, in each GNILC cluster.

Testing on simulated *PICO* data demonstrated ocMILC's superiority over NILC in reducing Galactic contamination across all angular scales and all the considered thermal dust models over large sky fractions, while maintaining noise levels within the target sensitivity for the tensor-to-scalar ratio (figures 6-7). Furthermore, ocMILC outperformed the standard cMILC, showcasing its efficacy in handling diverse dust emission models, including the multi-layer dust model d12 with decorrelation, while controlling noise penalties. While current synchrotron emission models do not necessitate pivot value optimization, the inclusion of mildly polarized AME emissions may require the incorporation of AME moments into ocMILC, a potential avenue for future exploration given the lack of observational evidence. Overall, ocMILC stands as a robust optimization for semi-blind CMB polarization reconstruction, offering promise for application to other satellite missions like *LiteBIRD* [5], with potential extensions to ground-based experiments [3, 4] through appropriate *E*-to-*B* leakage corrections [71-73].

## Acknowledgments

We thank Marina Migliaccio and Domenico Marinucci for useful discussions. This research used resources of the National Energy Research Scientific Computing Center (NERSC), a U.S. Department of Energy Office of Science User Facility located at Lawrence Berkeley National Laboratory. AC acknowledges funding support by AASS PhD Program, ASI/LiteBIRD grant n. 2020-9-HH.0 and ASI/LiteBIRD grant CUP: F84I20000230005. AC was also supported by the InDark and LiteBIRD INFN projects. MR thanks the Spanish Agencia Estatal de Investigación (AEI, MICIU) for the financial support provided under the projects with references PID2019-110610RB-C21 and PID2022-139223OB-C2, and acknowledges support from the CSIC programme 'Ayuda a la Incorporación de Científicos Titulares' provided under the project 202250I159.
References

[1] PLANCK collaboration, Planck 2018 results. VI. Cosmological parameters, Astron. Astrophys. 641 (2020) A6 [Erratum ibid. 652 (2021) C4] [arXiv:1807.06209] [INSPIRE].

[2] A. La Posta et al., Assessing the consistency between CMB temperature and polarization measurements with application to Planck, ACT, and SPT data, Phys. Rev. D 107 (2023) 023510 [arXiv:2204.01885] [INSPIRE].

[3] SIMONS OBSERVATORY collaboration, The Simons Observatory: science goals and forecasts, JCAP 02 (2019) 056 [arXiv:1808.07445] [INSPIRE].

[4] K. Abazajian et al., CMB-S4 science case, reference design, and project plan, arXiv:1907.04473 [INSPIRE].

[5] LITEBIRD collaboration, Probing cosmic inflation with the LiteBIRD cosmic microwave background polarization survey, PTEP 2023 (2023) 042F01 [arXiv:2202.02773] [INSPIRE].

[6] NASA PICO collaboration, PICO: Probe of Inflation and Cosmic Origins, arXiv:1902.10541 [INSPIRE].

[7] Y. Qin et al., Reionization inference from the CMB optical depth and E-mode polarization power spectra, Mon. Not. Roy. Astron. Soc. 499 (2020) 550 [arXiv:2006.16828] [INSPIRE].

[8] PLANCK collaboration, Planck intermediate results. XLVII. Planck constraints on reionization history, Astron. Astrophys. 596 (2016) A108 [arXiv:1605.03507] [INSPIRE].

[9] R. Allison et al., Towards a cosmological neutrino mass detection, Phys. Rev. D 92 (2015) 123535 [arXiv:1509.07471] [INSPIRE].

[10] E. Giusarma et al., Improvement of cosmological neutrino mass bounds, Phys. Rev. D 94 (2016) 083522 [arXiv:1605.04320] [INSPIRE].

[11] M. Kamionkowski, A. Kosowsky and A. Stebbins, A probe of primordial gravity waves and vorticity, Phys. Rev. Lett. 78 (1997) 2058 [astro-ph/9609132] [INSPIRE].

[12] H.K. Eriksen et al., Joint Bayesian component separation and CMB power spectrum estimation, Astrophys. J. 676 (2008) 10 [arXiv:0709.1058] [INSPIRE].

[13] R. Stompor, S.M. Leach, F. Stivoli and C. Baccigalupi, Maximum likelihood algorithm for parametric component separation in CMB experiments, Mon. Not. Roy. Astron. Soc. 392 (2009) 216 [arXiv:0804.2645] [INSPIRE].

[14] E. de la Hoz, P. Vielva, R.B. Barreiro and E. Martínez-González, On the detection of CMB B-modes from ground at low frequency, JCAP 06 (2020) 006 [arXiv:2002.12206] [INSPIRE].

[15] S. Azzoni et al., A minimal power-spectrum-based moment expansion for CMB B-mode searches, JCAP 05 (2021) 047 [arXiv:2011.11575] [INSPIRE].

[16] LITEBIRD collaboration, Moment expansion of polarized dust SED: a new path towards capturing the CMB B-modes with LiteBIRD, Astron. Astrophys. 660 (2022) A111 [arXiv:2111.07742] [INSPIRE].

[17] M. Galloway et al., BEYONDPLANCK — III. Commander3, Astron. Astrophys. 675 (2023) A3 [arXiv:2201.03509] [INSPIRE].

[18] WMAP collaboration, First year Wilkinson Microwave Anisotropy Probe (WMAP) observations: foreground emission, Astrophys. J. Suppl. 148 (2003) 97 [astro-ph/0302208] [INSPIRE].
[19] J. Delabrouille, J.-F. Cardoso and G. Patanchon, Multi-detector multi-component spectral matching and applications for CMB data analysis, Mon. Not. Roy. Astron. Soc. 346 (2003) 1089 [astro-ph/0211504] [INSPIRE].

[20] R. Fernández-Cobos, P. Vielva, R.B. Barreiro and E. Martínez-González, Multi-resolution internal template cleaning: an application to the Wilkinson Microwave Anisotropy Probe 7-yr polarization data, Mon. Not. Roy. Astron. Soc. 420 (2012) 2162 [arXiv:1106.2016] [INSPIRE].

[21] J. Delabrouille et al., A full sky, low foreground, high resolution CMB map from WMAP, Astron. Astrophys. 493 (2009) 835 [arXiv:0807.0773] [INSPIRE].

[22] K. Ichiki, H. Kanai, N. Katayama and E. Komatsu, Delta-map method of removing CMB foregrounds with spatially varying spectra, PTEP 2019 (2019) 033E01 [arXiv:1811.03886] [INSPIRE].

[23] M. Remazeilles, A. Rotti and J. Chluba, Peeling off foregrounds with the constrained moment ILC method to unveil primordial CMB B-modes, Mon. Not. Roy. Astron. Soc. 503 (2021) 2478 [arXiv:2006.08628] [INSPIRE].

[24] LITEBIRD collaboration, Multiclustering needlet ILC for CMB B-mode component separation, Mon. Not. Roy. Astron. Soc. 525 (2023) 3117 [arXiv:2212.04456] [INSPIRE].

[25] K. Tassis and V. Pavlidou, Searching for inflationary B modes: can dust emission properties be extrapolated from 350 GHz to 150 GHz?, Mon. Not. Roy. Astron. Soc. 451 (2015) L90 [arXiv:1410.8136] [INSPIRE].

[26] J. Chluba, J.C. Hill and M.H. Abitbol, Rethinking CMB foregrounds: systematic extension of foreground parametrizations, Mon. Not. Roy. Astron. Soc. 472 (2017) 1195 [arXiv:1701.00274] [INSPIRE].

[27] V. Pelgrims et al., Evidence for line-of-sight frequency decorrelation of polarized dust emission in Planck data, Astron. Astrophys. 647 (2021) A16 [arXiv:2101.09291] [INSPIRE].

[28] M. Remazeilles, C. Dickinson, H.K.K. Eriksen and I.K. Wehus, Sensitivity and foreground modelling for large-scale cosmic microwave background B-mode polarization satellite missions, Mon. Not. Roy. Astron. Soc. 458 (2016) 2032 [arXiv:1509.04714] [INSPIRE].

[29] G. Martínez-Solaeche, A. Karakci and J. Delabrouille, A 3D model of polarized dust emission in the Milky Way, Mon. Not. Roy. Astron. Soc. 476 (2018) 1310 [arXiv:1706.04162] [INSPIRE].

[30] R. Aurlien et al., Foreground separation and constraints on primordial gravitational waves with the PICO space mission, JCAP 06 (2023) 034 [arXiv:2211.14342] [INSPIRE].

[31] LITEBIRD collaboration, Tensor-to-scalar ratio forecasts for extended LiteBIRD frequency configurations, Astron. Astrophys. 676 (2023) A42 [arXiv:2302.05228] [INSPIRE].

[32] PLANCK collaboration, Planck intermediate results. XLVIII. Disentangling galactic dust emission and cosmic infrared background anisotropies, Astron. Astrophys. 596 (2016) A109 [arXiv:1605.09387] [INSPIRE].

[33] PLANCK collaboration, Planck intermediate results. LVII. Joint Planck LFI and HFI data processing, Astron. Astrophys. 643 (2020) A42 [arXiv:2007.04997] [INSPIRE].

[34] PLANCK collaboration, Planck intermediate results. XLVI. Reduction of large-scale systematic effects in HFI polarization maps and estimation of the reionization optical depth, Astron. Astrophys. 596 (2016) A107 [arXiv:1605.02985] [INSPIRE].
[35] J.-M. Delouis et al., SRoll2: an improved mapmaking approach to reduce large-scale systematic effects in the Planck high frequency instrument legacy maps, *Astron. Astrophys.* **629** (2019) A38 [arXiv:1901.11386] [INSPIRE].

[36] D.J. Watts et al., COSMOGLOBE DR1 results — I. Improved Wilkinson Microwave Anisotropy Probe maps through Bayesian end-to-end analysis, *Astron. Astrophys.* **679** (2023) A143 [arXiv:2303.08095] [INSPIRE].

[37] K.M. Górski et al., HEALPix — a framework for high resolution discretization, and fast analysis of data distributed on the sphere, *Astrophys. J.* **622** (2005) 759 [astro-ph/0409513] [INSPIRE].

[38] A. Zonca et al., healpy: equal area pixelization and spherical harmonics transforms for data on the sphere in python, *J. Open Source Softw.* **4** (2019) 1298 [INSPIRE].

[39] PLANCK collaboration, Planck 2018 results. VI. Cosmological parameters, *Astron. Astrophys.* **641** (2020) A6 [Erratum ibid. **652** (2021) C4] [arXiv:1807.06209] [INSPIRE].

[40] B. Thorne, J. Dunkley, D. Alonso and S. Naess, The python sky model: software for simulating the galactic microwave sky, *Mon. Not. Roy. Astron. Soc.* **469** (2017) 2821 [arXiv:1608.02841] [INSPIRE].

[41] A. Zonca, B. Thorne, N. Krachmalnicoff and J. Borrill, The python sky model 3 software, *J. Open Source Softw.* **6** (2021) 3783 [arXiv:2108.01444] [INSPIRE].

[42] PLANCK collaboration, Planck 2015 results. X. Diffuse component separation: foreground maps, *Astron. Astrophys.* **594** (2016) A10 [arXiv:1502.01588] [INSPIRE].

[43] A.M. Meisner and D.P. Finkbeiner, Modeling thermal dust emission with two components: application to the Planck high frequency instrument maps, *Astrophys. J.* **798** (2014) 88 [arXiv:1410.7523].

[44] B.T. Draine and B. Hensley, Magnetic nanoparticles in the interstellar medium: emission spectrum and polarization, *Astrophys. J.* **765** (2013) 159 [arXiv:1205.7021] [INSPIRE].

[45] PLANCK collaboration, Planck 2018 results. IV. Diffuse component separation, *Astron. Astrophys.* **641** (2020) A4 [arXiv:1807.06208] [INSPIRE].

[46] D.B. Rybicki and A.P. Lightman, Radiative processes in astrophysics, (1979).

[47] WMAP collaboration, Nine-year Wilkinson Microwave Anisotropy Probe (WMAP) observations: final maps and results, *Astrophys. J. Suppl.* **208** (2013) 20 [arXiv:1212.5225] [INSPIRE].

[48] M.-A. Miville-Deschenes et al., Separation of anomalous and synchrotron emissions using WMAP polarization data, *Astron. Astrophys.* **490** (2008) 1093 [arXiv:0802.3345] [INSPIRE].

[49] WMAP collaboration, Three year Wilkinson Microwave Anisotropy Probe (WMAP) observations: polarization analysis, *Astrophys. J. Suppl.* **170** (2007) 335 [astro-ph/0603450] [INSPIRE].

[50] N. Krachmalnicoff et al., S-PASS view of polarized galactic synchrotron at 2.3 GHz as a contaminant to CMB observations, *Astron. Astrophys.* **618** (2018) A166 [arXiv:1802.01145] [INSPIRE].

[51] L. Vacher et al., High precision modeling of polarized signals: moment expansion method generalized to spin-2 fields, *Astron. Astrophys.* **669** (2023) A5 [arXiv:2205.01049] [INSPIRE].

[52] A. Rotti and J. Chluba, Combining ILC and moment expansion techniques for extracting average-sky signals and CMB anisotropies, *Mon. Not. Roy. Astron. Soc.* **500** (2020) 976 [arXiv:2006.02458] [INSPIRE].
[53] D. Adak, A new approach of estimating the galactic thermal dust and synchrotron polarized emission template in the microwave bands, Mon. Not. Roy. Astron. Soc. 507 (2021) 4618 [arXiv:2104.13778] [INSPIRE].

[54] S. Ghosh et al., Performance forecasts for the primordial gravitational wave detection pipelines for AliCPT-1, JCAP 10 (2022) 063 [arXiv:2205.14804] [INSPIRE].

[55] Z. Zhang et al., A constrained NILC method for CMB B mode observations, JCAP 04 (2024) 014 [arXiv:2309.08170] [INSPIRE].

[56] J. Dou, S. Ghosh, L. Santos and W. Zhao, Foreground removal with ILC methods for AliCPT-1, JCAP 05 (2024) 006 [arXiv:2310.19627] [INSPIRE].

[57] Y.S. Abylkairov, O. Darwish, J.C. Hill and B.D. Sherwin, Partially constrained internal linear combination: a method for low-noise CMB foreground mitigation, Phys. Rev. D 103 (2021) 103510 [arXiv:2012.04032] [INSPIRE].

[58] M. Remazeilles, J. Delabrouille and J.-F. Cardoso, Foreground component separation with generalised ILC, Mon. Not. Roy. Astron. Soc. 418 (2011) 467 [arXiv:1103.1166] [INSPIRE].

[59] V. Stolyarov, M.P. Hobson, A.N. Lasenby and R.B. Barreiro, All-sky component separation in the presence of anisotropic noise and dust temperature variations, Mon. Not. Roy. Astron. Soc. 357 (2005) 145 [astro-ph/0405494] [INSPIRE].

[60] F.J. Narcowich, P. Petrushev and J.D. Ward, Localized tight frames on spheres, SIAM J. Math. Anal. 38 (2006) 574.

[61] D. Marinucci et al., Spherical needlets for CMB data analysis, Mon. Not. Roy. Astron. Soc. 383 (2008) 539 [arXiv:0707.0844] [INSPIRE].

[62] E. Hivon et al., Master of the cosmic microwave background anisotropy power spectrum: a fast method for statistical analysis of large and complex cosmic microwave background data sets, Astrophys. J. 567 (2002) 2 [astro-ph/0105302] [INSPIRE].

[63] G. Polenta et al., Unbiased estimation of angular power spectrum, JCAP 11 (2005) 001 [astro-ph/0402428] [INSPIRE].

[64] LSST DARK ENERGY SCIENCE collaboration, A unified pseudo-$C_\ell$ framework, Mon. Not. Roy. Astron. Soc. 484 (2019) 4127 [arXiv:1809.09603] [INSPIRE].

[65] S. Hamimeche and A. Lewis, Likelihood analysis of CMB temperature and polarization power spectra, Phys. Rev. D 77 (2008) 103013 [arXiv:0801.0554] [INSPIRE].

[66] A. Kogut, Synchrotron spectral curvature from 22 MHz to 23 GHz, Astrophys. J. 753 (2012) 110 [arXiv:1205.4041] [INSPIRE].

[67] C. Dickinson, M.W. Peel and M. Vidal, New constraints on the polarization of anomalous microwave emission in nearby molecular clouds, Mon. Not. Roy. Astron. Soc. 418 (2011) 35 [arXiv:1108.0308] [INSPIRE].

[68] R. Génova-Santos et al., QUIJOTE scientific results — I. Measurements of the intensity and polarisation of the anomalous microwave emission in the Perseus molecular complex, Mon. Not. Roy. Astron. Soc. 452 (2015) 4169 [arXiv:1501.04491] [INSPIRE].

[69] D. Herman et al., BEYONDPLANCK — XV. Limits on large-scale polarized anomalous microwave emission from Planck LFI and WMAP, Astron. Astrophys. 675 (2023) A15 [arXiv:2201.03530] [INSPIRE].
[70] R. Génova-Santos et al., QUIJOTE scientific results — II. Polarisation measurements of the microwave emission in the galactic molecular complexes W43 and W47 and supernova remnant W44, Mon. Not. Roy. Astron. Soc. 464 (2017) 4107 [arXiv:1605.04741] [INSPIRE].

[71] S. Ghosh, J. Delabrouille, W. Zhao and L. Santos, Towards ending the partial sky E-B ambiguity in CMB observations, JCAP 02 (2021) 036 [arXiv:2007.09928] [INSPIRE].

[72] Z. Zhang et al., Efficient ILC analysis on polarization maps after EB leakage correction, JCAP 22 (2020) 044 [arXiv:2109.12619] [INSPIRE].

[73] A. Carones, M. Migliaccio, D. Marinucci and N. Vittorio, Analysis of needlet internal linear combination performance on B-mode data from sub-orbital experiments, Astron. Astrophys. 677 (2023) A147 [arXiv:2208.12059] [INSPIRE].