The following article is Open access

Identifying Exoplanets with Deep Learning. VI. Enhancing Neural Network Mitigation of Stellar Activity RV Signals with Additional Metrics

, , , , , , , , ,

Published 2026 March 18 © 2026. The Author(s). Published by the American Astronomical Society.
, , Citation Naomi McWilliam et al 2026 AJ 171 233DOI 10.3847/1538-3881/ae45fd

PDF Opens in a new tab.ePub You need an eReader or compatible software to experience the benefits of the ePub3 file format.
1538-3881/171/4/233

Abstract

The measurement of exoplanet masses using the radial velocity (RV) technique is currently limited by stellar activity, which introduces quasiperiodic variability signals that must be modeled and removed to enhance the sensitivity of the RV measurements to exoplanet signals. Neural networks have previously been demonstrated effective in modeling stellar activity signals in HARPS-N solar data using white light cross correlation functions (CCFs). Building on this work, we train a neural network on 6 yr of HARPS-N solar data with additional parameters commonly associated to stellar activity, including chromatic CCFs, line shape metrics, spectral activity indicators, total solar irradiance (TSI) light curves from SORCE and TSIS-1, and TSI time derivatives. Our results show that parameters such as the bisector inverse slope and Na D equivalent widths (EWs) do not significantly improve the neural network’s ability to predict activity-induced RV variations compared to using the white light CCFs alone. However, parameters such as unsigned magnetic flux, the TSI and its time derivative, S-index, Hα EW, chromatic CCFs, contrast, and FWHM do improve the neural network's ability to predict RV scatter. Our new model reduces the RV scatter in a held-out test set from 147.1 cm s−1 to 93.3 cm s−1, consistent with supergranulation noise levels reported in previous studies. These results suggest that finding effective tracers for (super)granulation will be critical to train models capable of further mitigating RV jitter, and necessary for characterizing Earth analogs.

Export citation and abstractBibTeXRIS

Original content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.

1. Introduction

The radial velocity (RV) method is one of the most widely used tools for exoplanet detection and enables the detection of one of the most fundamental properties of an exoplanet: its mass14 (D. A. Fischer et al. 2016). The RV method measures line-of-sight velocities through the observed Doppler shifts in the spectra of stars. However, RV measurements have currently hit a noise floor of ∼50–100 cm s−1 that poses a barrier to achieving the extreme precision radial velocities (EPRVs) necessary for the detection of Earth analog exoplanets. This noise originates from stellar surface phenomena and is often referred to as stellar activity or stellar jitter (e.g., C. Lovis & D. Fischer 2010; D. A. Fischer et al. 2016; M. Miklos et al. 2020). Characterizing and effectively modeling stellar variability signals is critical to detecting and characterizing potentially Earth-like exoplanets orbiting Sun-like stars.

Stellar activity signals evolve in time, resulting in quasiperiodic signals that can be challenging to model (e.g., R. D. Haywood et al. 2016). The stellar activity signals that primarily limit RV precision for Sun-like stars are caused by four physical processes: (i) pressure-mode oscillations (p-modes) on the stellar surface (R. B. Leighton et al. 1962), which cause RV signals of 10–100 cm s−1 for Sun-like stars (C. J. Schrijver & C. Zwann 2000; T. Arentoft et al. 2008) on timescales of a few minutes for the Sun (C. J. Schrijver & C. Zwann 2000; A. M. Broomhall et al. 2009), (ii) granulation (D. Dravins 1982; W. C. Livingston 1982; P. N. Brandt & S. K. Solanki 1990; X. Dumusque et al. 2011) and supergranulation (M. Rieutord & F. Rincon 2010; M. Bazot et al. 2012) phenomena, which produce signals with similar amplitudes to p-modes (C. J. Schrijver & C. Zwann 2000) on timescales from a few minutes up to a couple days in the Sun (A. M. Title et al. 1989; D. Del Moro et al. 2004; K. Al Moulla et al. 2023), (iii) spots and faculae (D. Dravins 1982; W. C. Livingston 1982; F. Cavallini et al. 1985; S. H. Saar & R. A. Donahue 1997; D. Queloz et al. 2001; N. Huélamo et al. 2008; A. M. Lagrange et al. 2010; N. Meunier et al. 2010), which can produce RV scatter on the order of ∼40–140 cm s−1 for the Sun (N. Meunier et al. 2010) due to suppressed convection in active regions and result in signals on timescales of tens of days (X. Dumusque et al. 2011), and (iv) solar-like magnetic cycles on a timescale of several years (D. Dravins 1985; B. Campbell et al. 1988; L. Lindegren & D. Dravins 2003; N. Meunier et al. 2010).

Characterizing and removing stellar activity signals is particularly crucial given the current—HARPS-N (R. Cosentino et al. 2012), ESPRESSO (F. Pepe et al. 2021), EXPRES (R. R. Petersburg et al. 2020), NEID (C. Schwab et al. 2016), MAROON-X (A. Seifahrt et al. 2022), KPF (S. R. Gibson et al. 2020)—and upcoming high-resolution spectrographs—G-CLEF (A. Szentgyorgyi et al. 2014), HARPS-3 (S. J. Thompson et al. 2016), and ANDES (A. Marconi et al. 2024). These instruments already have (G. Anglada-Escudé et al. 2016; A. Suárez Mascareño et al. 2020) or are expected to demonstrate instrumental RV precision required for the detection of Earth-mass exoplanets in the habitable zone around M dwarfs (e.g., HARPS can achieve RV measurements of better than 100 cm s−1 in short exposure time for bright stars; F. Pepe et al. 2005; X. Dumusque et al. 2011). However, accurate modeling of stellar variability will be critical to detecting Earth analogs around Sun-like stars that are expected to produce signals of about 10 cm s−1.

Several methods have been developed to reduce the RV noise originating from stellar activity. For example, the HARPS-GTO survey uses exposure times of around 15 minutes to reduce the effects from solar p-modes on RV measurements (X. Dumusque et al. 2011). W. J. Chaplin et al. (2019) showed that the p-modes can be averaged out to around ∼10 cm s−1 for Sun-like stars by fine-tuning exposure times, while A. A. Medina et al. (2018) were able to extend this by removing the p-mode effects from evolved stars. But longer exposure times are not an efficient way to reduce the variability from granulation or supergranulation phenomena, which act on timescales longer than single exposures (X. Dumusque et al. 2011; N. Meunier et al. 2015). Instead, X. Dumusque et al. (2011) showed that averaging multiple observations of a star separated by a few hours can significantly reduce these short-term effects, but not to the 10 cm s−1 level needed to find Earth analogs.

The EPRV community has aimed much work at mitigating magnetic activity at either the rotation period or long-term magnetic cycle timescales. There are two main classes of solutions: those that involve separating activity signals from planetary signals in the time domain, and those that involve separating the signals in the spectral or wavelength domain.

In the time domain, early efforts used noise models like autoregressive moving averages (M. Tuomi et al. 2013) or perfectly periodic Keplerian signals (X. Dumusque et al. 2012), but most work now takes advantage of Gaussian process regression (e.g., R. D. Haywood et al. 2014; V. Rajpaul et al. 2015, 2016; D. E. Jones et al. 2017). However, these methods often rely on high-cadence and precisely timed observations, which can be difficult to achieve for astronomical observations.

In the spectral or wavelength domain, many mitigation efforts focus on identifying metrics that track activity signals and use those metrics as proxies to decorrelate activity from RV measurements. These methods involve indicators such as $\mathrm{log}{R}_{{\rm{HK}}}^{{\prime} }$ (R. W. Noyes et al. 1984), the bisector inverse slope (D. Queloz et al. 2001), Hα (X. Bonfils et al. 2007; P. Robertson et al. 2014), and a combination of the star’s light curve and its derivative (called $F{F}^{{\prime} }$; S. Aigrain et al. 2012). Recently, R. D. Haywood et al. (2022) used the unsigned magnetic flux to identify stellar activity, and F. Lienhard et al. (2023) demonstrated a method to extract a proxy of the unsigned magnetic flux in disk-integrated spectra and showed that it correlates strongly with RV variability. In the past few years, another class of solutions uses data driven-methods to separate stellar activity from true Doppler RV shifts in the spectral domain. An approach called YARARAv2 (M. Cretignier et al. 2023) uses the RVs derived from individual lines to identify signals in the time series that can be filtered using principle component analysis (PCA). This method has achieved sub m s−1 velocities on stars over timescales of decades.

One class of spectral domain methods focuses on using cross-correlation functions (CCFs), which are obtained by cross-correlating observed spectra with a stellar mask, and encode both Doppler shifts and spectral line-shape variations. These methods use changes in the shape of the CCF to characterize and then mitigate stellar activity signals, and a range of techniques have been developed to model CCFs. Some of these techniques focus on using separating the shift-driven from shape-driven components of the CCF using PCA (e.g., A. Collier Cameron et al. 2021; B. Klein et al. 2024) or Fourier domain methods (J. Zhao et al. 2022a). One such approach, SCALPELS, uses PCA on the shift-invariant autocorrelation function of the CCF (which preserves CCF shape information only) and decorrelates against the strongest vectors to mitigate stellar activity (A. Collier Cameron et al. 2021; A. A. John et al. 2022), yielding significant improvements in the RVs of active stars. Other techniques use forward modeling approaches, such as C. Di Maio et al. (2024), who developed SpotCCF to forward model CCF shape changes caused by starspots.

Beyond either time-domain or wavelength-domain methods, there has also been work to combine both of these approaches through the use of time series of the CCF that are modeled with a Gaussian process model (H. Yu et al. 2024), which shows promise for using both spectral and timing information to model stellar variability.

In addition to these CCF-based methods that use Gaussian processes or PCA-based methods, Z. L. de Beurs et al. (2022) demonstrated that machine learning (ML) methods such as neural networks (NN) can learn activity-driven variations in CCFs. These methods perform very well on both short-term (rotation) and long-term (magnetic cycle) activity. This is also a wavelength-domain method and therefore does not require precisely timed observations. Z. L. de Beurs et al. (2022) demonstrated that white light CCFs contain shape changes that can be used as input to an NN capable of reducing stellar RV variability. Using this method, they reduced the RV variability in 3 yr of observations of the Sun from the HARPS-N Solar Telescope (D. F. Phillips et al. 2016) from 175.3 cm s−1 to 103.9 cm s−1. Since then, several other ML techniques have been developed to mitigate this RV variability and demonstrated success on both simulated and real data (L. L. Zhao et al. 2022b; I. Colwell et al. 2023; Y. Liang et al. 2023; M. Perger et al. 2023; Z. L. de Beurs et al. 2024).

In this paper, we build on the work of Z. L. de Beurs et al. (2022), by expanding their analysis of 3 yr of HARPS-N Solar Telescope RVs to 6 yr,15 and by testing several other activity indicators as inputs to their NN, in addition to the white light CCF used in that work. In ML, a feature is a measurable property or characteristic of a dataset that can help an NN identify and learn patterns. Often a range of data inputs are tested as features to determine which ones are most informative, as selecting the most informative features is crucial for optimizing the performance of ML models. Throughout this paper, we will refer to data inputs to our NN as features. We test features including the total solar irradiance (TSI), the time derivative of TSI, unsigned magnetic flux, and the equivalent widths (EWs) for the Hα and sodium D1 and D2 absorption lines in the Sun’s spectra. We also test additional features derived from the white light CCFs, such as the FWHM, the bisector span, and the contrast. Finally, we include chromatic CCFs measured from blue (387.4–459.0 nm), yellow (453.9–554.0 nm), and red (547.9–690.9 nm) wavelength regions of the solar spectra.

This paper is organized as follows. In Section 2, we describe the observational data used for training the ML model. In Section 3, we describe the methods used to process the input data in order to be suitable for the ML model. In Section 4, we describe the mathematical foundations of our ML models, how the observations were separated into training and test sets, and the training procedure. In Section 5, we present our results. In Section 6, we discuss the implications of our results, and in Section 7 we conclude.

2. Data

2.1. HARPS-N Solar Spectra

The RV data were obtained from the HARPS-N (High Accuracy RV Planet Searcher- North) optical spectrograph, which observes the Sun continuously with 5 minute integration times to mitigate short-term stellar activity p-mode oscillations (X. Dumusque et al. 2015; D. F. Phillips et al. 2016). HARPS-N is a temperature stabilized, cross-dispersed, R ∼ 115,000, echelle spectrograph, covering an optical wavelength range of 383–690 nm (R. Cosentino et al. 2012).

The solar data from the 5 minute exposures of the Sun, taken throughout the day using HARPS-N, are reduced using the HARPS-N Data Reduction Software (DRS-2.3.5; X. Dumusque et al. 2021). In brief, the DRS extracts a one-dimensional sky-background-subtracted spectrum for each echelle order and solves for the spectrograph’s wavelength solution. The data undergoes cross-correlation with a digital mask based on solar absorption lines. This results in a 49-element array, which we refer to as the CCF for each echelle order. After corrections for instrumental drift are applied, the CCFs from each echelle order are summed to produce a white light high signal-to-noise ratio (SNR) CCF, which is used as the input representation for the ML method employed in the analysis described in Section 4. The DRS then extracts the RVs by fitting the white light CCF with a Gaussian function. However, stellar variability including spots and faculae causes time-varying small shape deviations in the white light CCF from a perfect Gaussian, which result in the measured RVs including contributions from both Doppler shifts and stellar activity signals.

Unlike distant stars, the Sun is a resolved disk in the sky, so additional steps must be taken to correct for the fact that light from different regions of the solar disk pass along different lines of sight through Earth’s atmosphere. First, we account for the effect of differential atmospheric extinction following A. Collier Cameron et al. (2019). Then, we identify and remove observations where clouds obscured at least part of the solar disk following a multistep process. First, we calculate a quality factor, based on the SNR and airmass of each observation, using a mixture model as described in A. Collier Cameron et al. (2019). We only include data where this quality factor (which spans 0 and 1) is above 0.99. As this technique does not detect all low-quality observations, we additionally use information from the HARPS-N exposure meter to more sensitively identify observations contaminated by cloud coverage. We define the exposure meter quality factor E as the ratio between the maximum and mean count of the exposure meter. This ratio does not pile up at 1 due to a slight delay in opening the shutter but can be well modeled by a Gaussian function to identify outlying observations where E is large. After fitting the distribution of E, we remove all data where E is higher than 3σ from the mean value of the entire dataset. Finally, as a last cut, we also remove observations where the resulting RV is more than 5σ from the mean value. This rather strict approach of removing low-quality data may indeed remove good data too, but is purposefully strict to only have the highest quality of data. Although this process removes 35% of the spectra, the number of days in the dataset is reduced by only 20% since we take a daily average for each day. The dataset from HARPS-N after applying these quality cuts contains 1148 days of solar observations between 2015 July 29 and 2021 November 12.16

We use multiple data products from the HARPS-N solar observations in our analysis, which we describe in detail in Section 3.

2.2. Total Solar Irradiance Observations

In addition to the HARPS-N solar spectra, we used observations of the TSI of the Sun. The TSI is the intensity of solar radiation integrated over the solar surface, and over the entire spectrum of the Sun. The TSI can be thought of as an analogous data product to a light curve observed by Kepler or TESS and, therefore, contains information about stellar activity (e.g., S. Aigrain et al. 2012). For example, increases in the TSI can be caused by the presence of faculae, while decreases can indicate the presence of sunspots.

We downloaded TSI datasets from the Total Irradiance Monitor (TIM) instruments on the SORCE satellite (G. Kopp et al. 2005; G. Rottman 2005; G. Kopp 2020) and on the TSIS-1 sensor on the International Space Station (G. Kopp 2023). The TIM on SORCE covers the entire solar spectrum—from X-ray to far-infrared—and has a high absolute accuracy of 350 ppm, and relative accuracy of 10 ppm yr−1. It takes measurements at a 50 s cadence, which are combined to produce a daily averaged TSI value. The dataset includes daily averaged TSI data from 2003 February 25 until 2020 February 25.17 On dates where the quality of data is low due to shielding of the Sun from the Earth, the TSI is recorded as 0.0. We removed these observations from the dataset.

The data from the TIM on the TSIS-1 sensor covers the same wavelength range, but with an improved absolute accuracy of 100 ppm, and relative accuracy of 10 ppm yr−1 (G. Kopp 2023). The dataset includes daily averaged TSI data from 2018 January 11 until 2023 July 19.18

We cross-referenced the dates with measurements of TSI with HARPS-N Solar Telescope observations and found that all but 36 days with HARPS-N observations had a corresponding TSI measurement. We excluded those 36 days from our ML analysis to ensure that we had values for all input features included in our models.

2.3. Helioseismic and Magnetic Imager Data

To measure the disk-averaged, unsigned, unpolarized magnetic flux, we used data from the Helioseismic and Magnetic Imager (HMI; P. H. Scherrer et al. 2012) aboard NASA’s Solar Dynamics Observatory (SDO). The HMI observes the solar disk in the Fe I absorption line at 617.3 nm. It achieves a high image resolution of 1″ by observing the solar disk using two 4096 × 4096 pixel CCD cameras, and an image stabilization system, with a data rate of 55 Mbps. We used HMI’s line-of-sight magnetogram data, which are maps of the Sun’s photospheric magnetic field. The magnetograms have a precision of 10 G, a zero-point accuracy of 0.05 G, and are taken with a cadence of 45 s.

The line-of-sight magnetogram data were downloaded and processed using the open-source python package SolAster19 (T. Ervin et al. 2022), which we also used to calculate the unsigned magnetic flux from the magnetogram data, as described in Section 3.4. SolAster downloads the data using the Sunpy (The SunPy Commun et al. 2020) query software. For each date, three files are downloaded, a Dopplergram, a Magnetogram, and a Continuum Intensity. Each of these files correspond to the measurement at 12:00:45 UTC for that day. We downloaded daily observations for the full time period of the HARPS-N Solar observations. During the HARPS-N observational baseline, there were nine dates where the HMI data were incomplete and not all three files were available, which meant the unsigned magnetic flux could not be calculated for those dates. We therefore excluded these dates and removed them from all of the datasets used in our analysis.

3. Methods

3.1. Preparing CCFs and RVs

ML models learn most effectively when data is pre-processed and scaled in a uniform format to ensure each feature is of the same scale and considered equally (e.g., D. Singh & B. Singh 2020). This pre-processing allows our ML models to capture and learn patterns in our data more readily. For the white light CCFs, we design the input representation such that the model becomes sensitive to shape changes and not translational shifts.20 The measured RVs from the CCFs contain not only true velocity shifts from Doppler reflex motion but also contain stellar activity contributions and instrumental systematics. This is because the RVs from the DRS are computed by fitting a Gaussian to the white light CCFs. However, stellar activity in the form of spots and faculae, as well as instrumental systematics, can cause shape changes to CCFs that result in asymmetries. This means that the center measured by the Gaussian fit is not the true center (i.e., the true velocity shift), but instead the true velocity shift and some additional deviation. We want to train our model to predict this deviation between these center-of-the-CCF measurements and the true velocity shift. In this way, our model then aims to predict the contribution of CCF asymmetries to the RV measurements, and thereby models shape-driven stellar activity and instrumental noise, leaving us with shape-driven corrections for our RV time series.

The steps we take to design the input representation to predict differences between the Gaussian fit CCFs and the true velocity shifts are described in detail in Z. L. de Beurs et al. (2022, 2024), and summarized here:

  1. 1.  
    Weighted average CCFs. We compute an SNR weighted average of the CCFs as described in detail in Section 2.1
  2. 2.  
    Remove the RV signatures of solar system planets. Since the RVs and CCFs from the DRS contain both the Doppler reflex motion of the solar system planets and stellar variability, we transform both data types from the barycentric to the heliocentric reference frame using the JPL Horizons ephemeris (J. D. Giorgini et al. 1996). We tested multiple interpolation methods (linear, quadratic, cubic) and found that cubic was most optimal. After performing this transformation, the RVs and CCFs should contain only shifts due to stellar activity and instrumental systematics.
  3. 3.  
    Center the CCFs to the mean. We fit a Gaussian to each CCF and shift all of the CCFs to a common center using the expression xi = mean(μ) − μi, where xi is the amount shifted, μi is the center of the Gaussian fit for the CCF spectrum i, and mean(μ) is the mean value of μ across the entire dataset. This step is taken because we know that planets cause translation shifts whereas stellar variability causes shape changes to the CCFs. By centering all of the CCFs, we remove the translational differences between the observations and help the model focus on learning shape change patterns instead. We note that centering the CCFs does not require knowing the planetary reflex motion a priori and can be done for stars with unknown planetary contributions by using either pipeline-provided RVs or fitting a Gaussian and shifting by μ.
  4. 4.  
    CCF normalization. First, we normalize the CCFs by their continuum level. Then, to prepare the CCFs for the neural network, we subtract the median of the CCF time series and divide by the standard deviation. This normalization is performed across all input parameters as described below so that the scale of variations of each input parameter is approximately equal and speeds up training and optimization of the model.

In addition to the standard white light CCF that uses all 69 spectral orders to compute a weighted average CCF, we generate three chromatic CCFs that use only a subset of the 69 orders: (a) a blue CCF that is computed using the first 23 orders (387.4–459.0 nm), (b) a yellow CCF that uses the middle 23 orders (453.9–554.0 nm), and (c) a red CCF that uses the last 23 orders (547.9–690.9 nm). These chromatic CCFs are pre-processed in the same way as described above to ensure that they have the same normalized input representation. However, these chromatic CCFs each probe only a subset of spectral lines compared to the standard white light CCF and, thus, could encode activity information that is wavelength dependent. The presence of H-opacity, particularly in the blue wavelengths, allows us to probe deeper into the photosphere compared to red wavelengths. Therefore, variations in RVs across the chromatic CCFs could reveal differences in the hemisphere-averaged convective blueshift at different depths in the photosphere (K. Al Moulla et al. 2022).

3.2. Sodium Doublet and Hα Lines

In addition to the CCFs, we included the EWs of the Hα line and the sodium D lines in the solar spectra as features to our ML model. We computed the EWs of these lines in each HARPS-N spectrum using the python package specutils.analysis.equivalent_width (N. Earl et al. 2023), which uses as inputs the continuum normalized spectra, and the small wavelength regions centered around each absorption line summarized in Table 1. The code outputs EWs for each absorption line, calculated as the numerically integrated area between the observed spectrum and the normalized continuum level within the specified wavelength ranges.

Table 1. Absorption Lines and Their Corresponding Wavelengths in Air Used to Measure EWs

Absorption LineWavelength in AirWavelength Cut Region
 (nm)(nm)
Hα656.281656.175–656.390
Na D1589.592589.508–589.685
Na D2588.995588.879–589.105

Note. Lower and upper wavelength limits for each region used in the EW calculations are also listed.

Download table as:  ASCIITypeset image

We calculated the mean EW per day for each of the three absorption lines. We normalized the remaining EW values (subtracting the mean of the values and dividing by the standard deviation, similar to the CCF normalization), leaving us with three new features corresponding to the three absorption lines.

3.3. TSI and TSI Derivative

We have two TSI datasets from TSIS-1 and SORCE, which span different dates as described in Section 2.2. These two datasets, containing daily averaged TSI values, overlap from 2018 January 11 until 2020 February 25, and there is an offset between them, with TSIS-1 having higher TSI values compared to SORCE, as seen in Figure 1. We also noticed that the first 100 days of the TSIS-1 data had a significantly larger scatter compared to the SORCE data, which may be caused by initial instrument calibrations during the first period of operations for TSIS-1.

Figure 1. Refer to the following caption and surrounding text.

Figure 1. The overlapping region between the two datasets of TSI values. Pink points represent measurements from SORCE, while blue points represent measurements from TSIS-1. There is an offset between the two, so we shifted the SORCE data to match the level of the TSIS data to merge the datasets. The shifted SORCE data are shown in orange. Small variations can be seen between the TSI values from the two datasets.

Standard image High-resolution image

To merge the datasets and remove the anomalous measurements at the beginning of the TSIS-1 time series, we took the steps described below. To start, we removed the first 110 days of the TSIS-1 data for our analysis, which results in a smaller overlapping region between the two datasets that spans 2018 May 1 to 2020 February 25. We then computed the mean of the difference between the two datasets within this region and added this value to all of the SORCE data, as seen in Figure 1. Then, for the overlapping region, we took the mean of the two daily averaged TSI values for those days. For dates where we only had values for one of the two datasets, those values were used. Lastly, we normalized all of the TSI data in the same way as all of the other input features (subtracting the mean and dividing by standard deviation) before feeding them into the neural network.

In addition to using the TSI values, we also computed the time derivative of the TSI, since this has also been shown to be important for predicting stellar activity signals, such as when using the FF’ method (S. Aigrain et al. 2012). In particular, sunspots, which move across the surface of the Sun, could potentially be identified through changes in TSI.

To find the change in the TSI, we first fit a spline to the un-normalized TSI data using keplerspline,21 as shown in Figure 2, where we used on average a 3.4 day break point spacing. Then, we used the central difference scheme to numerically differentiate the spline. The derivative values were normalized, again by subtracting the median value and dividing by the standard deviation.

Figure 2. Refer to the following caption and surrounding text.

Figure 2. Plot of the total solar irradiance (TSI) data from the merged SORCE and TSIS-1 datasets fitted with a spline using keplerspline. Pink points are individual TSI measurements, and the black curve is the spline fit. The spline captures the variations in the TSI values while smoothing over short-timescale variations. We use this spline to calculate the TSI derivative as described in Section 3.3.

Standard image High-resolution image

3.4. Unsigned Magnetic Flux

Another feature used in our model is the disk-averaged, unsigned, unpolarized, magnetic flux of the Sun, which we obtain using the SolAster package, as described in 2.3. The package identifies and removes regions without significant magnetic activity, where the unsigned magnetic field, Bobs, is less than a threshold chosen to be 8G. SolAster then calculates the disk-averaged, unpolarized, unsigned magnetic flux, $| \hat{{B}_{\mathrm{obs}}}| $, using

Equation (1)

where α and β are the coordinates on each point on the solar disk, Iαβ is the uncorrected continuum intensity map, and where Bobs,αβ is the corrected observed magnetic field strength from the magnetogram (R. D. Haywood et al. 2016; T. Ervin et al. 2022).

After computing the unsigned magnetic flux using SolAster, we finally normalize this feature (again by subtracting the median and dividing by the standard deviation) such that it can be used as an NN input feature.

3.5. S-Index

We also used the S-Index (the ratio of the flux in the core of the calcium II H and K lines to that in the continuum; e.g., A. H. Vaughan et al. 1978) as a feature. These values were produced by the HARPS-N DRS (see footnote 16). In the DRS, ghost contamination is automatically corrected (see X. Dumusque et al. 2021). Before inputting into the neural network, the S-Index required some pre-processing. The raw data contained a significant number of outliers, which we identified using the same quality factor we used to identify good CCFs (A. Collier Cameron et al. 2019). We only kept data where the quality flag is over 0.99. This cut removed 42% of the data points, but only 31% of dates, most of which correspond to dates when the CCF data were also low quality. This additional cut therefore removed only 90 additional dates from the dataset. We then normalized the S-index measurements in the same way as all other input features.

3.6. Final Dataset

We only retained dates in our dataset for training and evaluation of the neural network when there were measurements for all input features we considered. After removing all dates with either missing or outlier values from each independent metric, the final dataset consisted of daily average observations on 978 individual dates between 2015 July 29 and 2021 September 08.

4. Neural Network Analysis

We trained several convolutional neural networks (CNNs) to predict stellar activity RV signals using the shape of the white light CCF and one or more different additional features.

4.1. Neural Networks

We use feedforward neural networks, where the network takes an input x, and attempts to approximate a function f*, so that it can output the value y, where y = f(x;p), and p are the parameters it learns to produce the best approximation of f*. In our case, f* is the true stellar activity correction, and f is our neural network approximation. The network is composed of many simpler functions. For example, the network might be the chain

Equation (2)

where f(1), f(2), and f(3) are three functions, and f(1) is the first layer, f(2) is the second layer, and f(3) is the final output layer. The output from one layer is the input to the next layer. The length of the chain, in this case three, is called the depth of the model. We want f(x) to match f*(x) as closely as possible.

To train the neural network, we used labeled training data that consists of input and output pairs (x, y). The neural network determines how to model the other functions in between the input and output, which are called hidden layers. The width of the model is given by the dimensions of the hidden layers. We can think of each layer as being composed of many units, where each layer takes many inputs from the previous layer, and produces a single output.

4.2. Convolutional Neural Network Theory

CNNs are commonly used for pattern recognition in structured data where the proximity of the dimensions contains relevant information. CNNs learn to identify local patterns across the entire input space. There are three types of layers in a CNN: convolutional layers, pooling layers, and fully connected layers. With each layer i, the complexity of the CNN increases, a larger portion of the input can be identified, and the final layer produces an output based on the entire input.

4.2.1. Convolutional Layers

We can first consider the convolutional layers, where we apply a cross-correlation operation. For each layer, i, we apply a one-dimensional discrete CCF from a stack of T vectors ${{\boldsymbol{a}}}_{i-1}^{(t)}$ for t = 1 to T of length ni−1 called the input, to the stack of L output vectors ${{\boldsymbol{a}}}_{i}^{(l)}$ for l = 1 to L, or feature map,

Equation (3)

where the convolution kernel, ${{\boldsymbol{w}}}_{i}^{(t,l)}$, is a vector of length mi of learned parameters during training, ${{\boldsymbol{b}}}_{i}^{(l)}$ is a vector of length ni of learned bias parameters, and ϕ is an activation function as described in Section 4.2.4. The * represents the convolution operator where for a vector x, feature map s, and kernel w,

Equation (4)

The kernel size is less than the input vector size so that it can be applied several times across regions of a. It is usually small, around mi = 3 or 5, so that it can effectively detect local feature changes of a. Typically, mi is odd, as then the units from the previous layer can be centered around an output pixel, which would otherwise not be possible and cause distortion for an even valued mi.

4.2.2. Pooling Layers

We can next consider pooling layers. Pooling layers compress the information output from the previous layer into a lower-dimensional space. We use a specific version of pooling called max pooling, where given the output of the previous layer as the input, the output of the pooling layer is a vector of the maximum values of small regions along the input vector. The stride length is how many units apart each region is, and the pooling width is the number of neurons summarized in each region, as can be seen in Figure 3. Pooling helps to keep the output invariant to small translations of the input, which is useful when we solely want to know if a characteristic is present, rather than its exact location.

Figure 3. Refer to the following caption and surrounding text.

Figure 3. Diagram of max-pooling layer. The circles on the left represent the output of a convolutional layer. The circles on the right represent the output from the max-pooling layer, with a stride of two neurons and a pooling region width of two neurons. Each circle represents a neuron in the layer, and the value is written inside. The neurons in the max-pooling layer take the maximum value over the neurons in the convolutional layer that are covered by the pooling region.

Standard image High-resolution image

4.2.3. Fully Connected Layers

Finally, we consider the fully connected layers, where the last layer outputs the final prediction. Every unit in the fully connected layer takes the entire output from the previous layer as the input. The activation is defined by

Equation (5)

where i is, again, the layer number in the CNN, ci is a vector of length ni of activations in layer i, Wi is an ni × ni−1 matrix of learned weights, di is a vector of length ni of learned bias parameters, and ϕ is an activation function as described in Section 4.2.4.

4.2.4. Activation Functions

An activation function is a nonlinear mathematical operation that determines the output from a unit, introducing nonlinearity to enable the network to learn complex patterns and make better predictions. The choice of ϕ depends on the application. The most popular activation function, rectified linear unit (ReLu), is given by

Equation (6)

For many activation functions, the derivative vanishes as x → ±, which can lead to slow convergence for gradient-based optimization algorithms. The derivative of the ReLu function on the other hand does not face this issue, and so tends to converge quicker and with better performance. We used ReLu activation functions in our CNN layers.

4.3. Training the Networks

Neural networks are trained to minimize a loss function. We provide the neural network with a training set containing examples of inputs and true values, and the loss function is a measure of the difference between the prediction from the model, and the true value. The mean squared error (MSE) is a common loss function used for regression tasks, and is given by

Equation (7)

where y1, y2, …, yM are the true labels of all M examples in the training set, and $\hat{{y}_{1}},\hat{{y}_{2}},\ldots ,\hat{{y}_{M}}$ are the predicted outputs given parameters p, where p is the vector of the parameters in the model. The values of p are learned during training. For the CNN, in the convolutional layers, these are the elements of all convolutional kernels ${{\boldsymbol{w}}}_{n}^{(t,l)}$ and bias vectors bn from Equation (3), and for the fully connected layers, these are the weight matrices Wn and bias vectors bn from Equation (5), where n corresponds to the index of the final output layer.

We minimize the loss function through an optimization algorithm called gradient descent. To reach this minimum, we first start with a random set of parameters p, and then iteratively update them, so that we descend along the gradient with respect to the parameters. If we write the loss function as f(x), then this can be expressed as

Equation (8)

where ∇xf(x) is the gradient, and epsilon is a positive scale factor called the learning rate, which determines the step size between each iteration. The learning rate is a tunable hyperparameter as further described in Section 4.4. We tune this rate until we reach a suitable minimum value of the loss function.

An important class of minimization algorithms is called Stochastic Gradient Descent (SGD). To find the true gradient, the entire training set of size M must be used. However, this is computationally expensive, and so in SGD, a random subset of the data is used of size BSGD, where BSGD is called the ’batch size’, and 1 ≤ BSGD << M. Then the minimization is performed using this approximate gradient. We used a constant batch size of BSGD = 1024, as BSGD does not affect the performance of the model if the other hyperparameters are well tuned, as demonstrated by C. J. Shallue et al. (2019). We used a variant of the SGD algorithm, SGD with momentum (B. Polyak 1964), and fixed the momentum parameter at 0.9.

4.4. Preparing Training, Validation, and Test Sets

In ML, it is the gold standard to split your data into three subsets: a training, validation, and testing set. This is done to ensure generalization, which is the ability of a model to perform well on new, previously unseen data (I. Goodfellow et al. 2016). An ML model is first trained using the training set, which commonly contains 80% of the data. The validation set contains data that the model has not seen yet and is used to evaluate the performance of the model on new inputs at every step of the learning process. For example, this can be used to optimize the model architecture. This process allows us to prevent under- and overfitting on the observations, which should be avoided since it can result in poor out-of-sample performance. Finally, after the model has been tuned using the training and validation sets, the final model’s performance can be evaluated using the testing set.

Since we are using a relatively small dataset (hundreds of examples compared to the thousands commonly used in ML), we use a k − fold cross-validation method on our training dataset, as this allows us to make out-of-sample performance for the entire dataset, rather than only on the relatively small validation and test sets. In our model, we split the data as 80% in training, 10% in validation, and 10% in testing. The steps for the k-fold cross-validation method performed on the training set are as follows.

  1. 1.  
    The training data is randomly assigned into k subsets.
  2. 2.  
    For each training data subset:
    • a.  
      take the current subset as the “hold-out” dataset,
    • b.  
      take the other k − 1 groups as the new training dataset,
    • c.  
      fit a model using the new training dataset, and evaluate it using the hold-out dataset,
    • d.  
      record the model performance.

Using this strategy, each of the k subsets is used in the hold-out group once. The value of k must be chosen so that there is not a high variance (lower variance implies model performance changes a lot based on training data, which can occur for higher k values) or a high bias (overestimation of the model performance occurs for high k). We used a 10-fold cross-validation method, as k = 10 has been shown empirically to result in test error estimates that do not give high bias or variance (G. James et al. 2023). We then optimized our model by first training using the 10-fold cross-validation, and using the 10% validation set to tune the hyperparameters as detailed in Section 4.6. Finally, we evaluated the optimized model performance on the 10% test set.

4.5. Overfitting and Regularization

Compared to other optimization algorithms, neural network methods are especially capable of picking up on subtle patterns in datasets. However, they can also be especially prone to overfitting. To prevent this and ensure proper generalization, which is the ability of a model to perform well on new, previously unseen inputs, we implemented regularization methods. The generalization of a model is often described by the training error and test error. The error of predictions on the training set is called the training error, and we try to make this low for the best results to reduce underfitting. We also compute the generalization error or the test error, which is the expected value for the error on a new input, and minimization reduces overfitting. Methods involving changing the learning algorithm to reduce the generalization error but not the training error are called regularization methods. The method we used is weight decay regularization, which reduces the complexity of the model by limiting the values the parameters can take. If we write the parameters as a vector p, then on each iteration, it updates as

Equation (9)

where ${({\rm{\nabla }}{{\boldsymbol{p}}}_{i})}_{\,\rm{opt}\,}$ is the change computed by the original algorithm at iteration i, and 1 − ε is a factor to reduce the parameter vector by. The value for ε was optimized during hyperparameter tuning.

4.6. CNN Implementation and Hyperparameter Optimization

We implemented the CNN model in TensorFlow, an open-source software library for ML (M. Abadi et al. 2015).

To minimize the loss function, we used SGD with momentum on the cross-validation set. To find the optimum hyperparameters for the model, we performed ∼300 random searches across the parameter space over the cross-validation set for the learning rate, kernel size, filters, convolutional, fully connected, and max-pooling layers, units, pool size, pool strides, weight decay, and the number of epochs as listed in Table 2. We did this for ∼10 different models, with each model containing the original white light CCF data, and one additional feature.

Table 2. Hyperparameters Used to Train the Model, Including Whether They Were Discrete or Logarithmic (Column (2)), the Values of the Tested Hyperparameters (Column (3)), and the Optimized Values Corresponding to the Final Model Used (Column (4))

HyperparametersHyperparameter DistributionRandom Search SpaceOptimized Values
Learning rateLogarithmic10−4–10−20.003
Conv. kernel sizeDiscrete1,3,5,7,9,119
No. conv filtersDiscrete2,4,8,16,32,648
No. conv layersDiscrete1,2,4,6,8,101
No. dense unitsDiscrete50,100, 200500
500, 1000, 2000
No. dense layersDiscrete1,2,4,6,8,10,124
No. max poolingDiscrete1, 2, 3, 41
layers
Pool sizeDiscrete1, 2, 3, 4, 7, 103
Pool stridesDiscrete1, 2, 3, 4, 7, 102
Weight decayLogarithmic0.0005–0.050.003
EpochsDiscrete50, 55, 65,
70, 80, 90,90
100,110,120

Note. To find the optimized hyperparameters for the final model, we performed random searches across the parameter space. For the hyperparameters categorized as logarithmic, the learning rate was sampled by generating a range of exponents uniformly and then applying exponentiation to create a log-scale distribution. The weight decay values were generated to be evenly spaced on a logarithmic scale.

Download table as:  ASCIITypeset image

We evaluate a model’s performance using the rms error (RMSE) between the labels and predictions on the validation set. For a more detailed description of the RMSE, see Appendix A.1. To find the optimum hyperparameters, we first found the hyperparameter values that corresponded to the lowest RMSEs for each of the models, and then found the best value across all of the random searches and over all of the models, by visualizing how the RMSE varied using the TensorBoard22 software included in the TensorFlow library (M. Abadi et al. 2015). These values are listed as the “Optimized Values” in Table 2. These optimized values were then used for our best CNN model architecture.

We then trained several different models using the best set of hyperparameters. The input to the first model trained was only the white light CCF. Then, we included one additional feature in each model, which was added after the max-pooling layer, as illustrated in Figure 6. The additional features were the white light CCF bisector and FWHM, S-Index, the EW of the Hα lines and of the sodium D1 and D2 lines, the TSI and TSI derivative, the unsigned magnetic flux, and the chromatic CCFs. Then, for the best-performing features, we trained models including several of these features simultaneously. In the case of the blue, yellow, and red CCFs, adding one of these would result in 49 features since the CCFs are 49-dimensional arrays rather than one-dimensional arrays such as features like s-index and EW of Hα.

5. Results

5.1. Performance Metrics

Although RMSE is an easily accessible metric in our Tensorflow implementation of the CNN and can be a helpful metric to assess model performance, RMSE is not resistant to outliers in the dataset, and our dataset does have some non-Gaussian characteristics and outliers23 (see Figure 4). Therefore, to determine which stellar activity features work the best in the CNN in providing predictions of the RV, we calculate the metric σpercentile instead. We do this using the 84th and 16th percentiles, which we describe in detail in Appendix A.2.

Figure 4. Refer to the following caption and surrounding text.

Figure 4. Distribution of RV values before correcting for activity (raw RVs, red) compared to the activity corrected RVs distribution (blue) using the CNN model. The RV labels are skewed from a standard normal distribution. The stellar activity corrected RVs have a lower variance than the raw RVs, indicating that our neural network is effective in mitigating activity signals.

Standard image High-resolution image

We calculate σpercentile for both the raw RVs (without any activity mitigation), which correspond to the RV labels used in the neural network, and the “corrected” RVs, RVcorrected, where we have removed the predicted activity signal from our neural networks. In particular, we define:

Equation (10)

To determine which combination of features produces the best stellar variability model, we trained 100 different instances of each model architecture, where each instance is initialized with different random values for each parameter before optimization. We chose to train such a large number of models because any given architecture can perform better or worse depending on the input initialization, which will vary due to randomness in data ordering during training. By training many models and averaging the results, we can ensure that our model architecture comparisons are robust to these random variations.

For each of the 100 models trained for each architecture, we find the σpercentile for the corrected RVs. Then, we calculate the median and standard error of the median (see Appendix A.3 for details) over the 100 models. By using these metrics for each model architecture, we can robustly and fairly compare each model’s performance.

5.2. ML Results

The median and uncertainty on the σpercentile scatter in the corrected RV time series for each model architecture are shown in Figure 5 and Table 3. The figure shows the results across the test set. It includes models using only one feature in addition to the white light CCFs, as well as models with multiple additional features. Table 3 focuses on models with multiple additional features. Additional figures and tables comparing results across the cross-validation, validation, and full datasets individually for both RMSE and σpercentile, for all model architectures, can be found in the Appendices (Figure 15, Table 4, Figure 16, and Table 5).

Figure 5. Refer to the following caption and surrounding text.

Figure 5. Median σpercentile over 100 runs for the corrected RVs over the test set, for different model architectures. The standard errors of each median are shown as black error bars. Models have either one additional feature to the original white light CCFs (top panel) or multiple additional features combined (bottom panel). The model in pink uses only the original white light CCFs as the input to the CNN, and the models in blue represent those with any additional features. There are abbreviations for unsigned magnetic flux (UMF), TSI, and TSI Derivative (ΔTSI). The most effective parameters for the NN are the UMF, TSI, and ΔTSI.

Standard image High-resolution image

Table 3. Median and Uncertainty on the σpercentile Scatter in the Corrected RVs for 100 Models Run for Different Architectures over the Test Set

Additional Input Featuresσpercentile
 (cms−1)
UMF + S-Index + ΔTSI97.67 ± 0.35
Yellow CCF + Blue CCF97.27 ± 0.46
Red CCF + Blue CCF96.73 ± 0.43
TSI + ΔTSI96.69 ± 0.37
Red CCF + Yellow CCF + Blue CCF96.54 ± 0.41
Red CCF + Yellow CCF + Blue CCF95.82 ± 0.46
+ UMF + TSI + ΔTSI 
No additional features95.46 ± 0.36
Hα EW + sodium D1 EW95.20 ± 0.32
+ sodium D2 EW 
Red CCF + Yellow CCF + Blue CCF95.10 ± 0.40
+ UMF 
Red CCF + Yellow CCF94.66 ± 0.29
Red CCF + Yellow CCF + Blue CCF94.47 ± 0.43
+ UMF + TSI + ΔTSI + Hα EW 
UMF + ΔTSI93.31 ± 0.37
CCF Contrast + CCF Bisector + CCF FWHM93.29 ± 0.25
Red CCF + Yellow CCF + Blue CCF93.06 ± 0.45
+ UMF + S-Index + TSI 
+ ΔTSI + Hα EW 
Red CCF + Yellow CCF + Blue CCF93.05 ± 0.41
+ UMF + S-Index + TSI + ΔTSI 
UMF + S-Index + TSI + ΔTSI + Hα EW92.72 ± 0.37
+ Red CCF + Blue CCF + Yellow CCF
+ CCF Contrast + CCF Bisector + CCF FWHM
UMF + Blue CCF92.51 ± 0.44
UMF + S-Index92.11 ± 0.31
UMF + S-Index + TSI + ΔTSI91.60 ± 0.37
+ Red CCF + Blue CCF + Yellow CCF
+ Hα EW + Na D1 EW + Na D2 EW
+ CCF Contrast + CCF Bisector + CCF FWHM
UMF + Yellow CCF90.55 ± 0.32
UMF + Red CCF90.21 ± 0.34
UMF + S-Index + TSI89.45 ± 0.34
UMF + CCF Bisector88.95 ± 0.34
UMF + CCF Contrast85.91 ± 0.34
UMF + TSI85.63 ± 0.35
UMF + CCF FWHM85.09 ± 0.35

Note.Only architectures that use more than one additional feature are included. They are given in descending order of median σpercentile for the test set, with lower values indicating improved performance. There are abbreviations for unsigned magnetic flux (UMF), Total Solar Irradiance (TSI), and TSI Derivative (ΔTSI).

Download table as:  ASCIITypeset image

Overall, while the relative performance of the models varies slightly depending on which datasets and scatter metrics are used for evaluation, a few consistent patterns emerge. In particular, we see that the unsigned magnetic flux, TSI, TSI derivative, chromatic CCFs, S-Index, Hα EW, and the contrast and FWHM of the white light CCFs consistently reduce the σpercentile scatter most compared to the models with no additional features added (only the white light CCFs are input). We also note that the bisector of the white light CCFs, and EW of the sodium D1 and D2 absorption lines do not seem to improve the model performance, suggesting that they may not contain any additional information that is not already captured by the white light CCFs.

5.3. Improvement in RV Scatter for a Nominal “Best” Model

Many of the architectures we considered performed similarly well, so it is not possible to truly identify which particular features are optimal. Nevertheless, for the sake of simplicity in understanding the results of our tests, we identify a nominal “best-performing” model and use its predictions in our analysis for the rest of this paper. We chose the model with the lowest σpercentile value for the corrected RVs in the full dataset (shown in Table 5). This best model uses the unsigned magnetic flux and TSI derivative as additional features, and reduces the σpercentile from 154.5 to 91.6 cm s−1. The architecture of the final CNN using this model is shown in Figure 6. The results of this best model across the full dataset are summarized in Figure 7. For our best architecture for a model with no additional features (i.e., only the white light CCFs), we find that the corrected RV scatter is 102.6 cm s−1. However, adding in the TSI derivative and unsigned magnetic flux improves the results significantly; we measure a corrected RV scatter of 91.6 cm s−1. Similarly across the test set, for a model with no additional features, the corrected RV scatter reduces from 147.1 to 95.5 cm s−1, and using the best model, this reduces to 93.3 cm s−1. This highlights that these additional features further help the CNN to be able to model and predict the RV signals originating from stellar activity better. For the best model architecture, the raw RVs, CNN-predicted stellar activity contributions, and CNN stellar activity corrected RVs are plotted over time in Figure 8.

Figure 6. Refer to the following caption and surrounding text.

Figure 6. Architecture of our best-performing CNN model. This has both optimized hyperparameters and optimized input features. Convolutional layers area denoted Conv〈Kernel Size〉-〈No. conv filters〉; max-pooling layers are denoted maxpool 〈Pool Size〉-〈Pool Strides〉; and fully connected layers are denoted Fully Connected 〈No. dense units〉. The features being input into the CNN are shown in purple.

Standard image High-resolution image
Figure 7. Refer to the following caption and surrounding text.

Figure 7. Comparison between the observed RVs and the predictions from the CNN model. The raw and corrected scatter are given by σPercentile for the RVlabels and RVcorrected, respectively, and model RMSE is the rms error of the RVcorrected. The stellar error removed is the difference between the raw scatter and corrected scatter in quadrature. Left panel: the predictions are from a model with the best hyperparameter architecture, but with no additional features. Right panel: the predictions are from a model with the best hyperparameter architecture, and the best features.

Standard image High-resolution image
Figure 8. Refer to the following caption and surrounding text.

Figure 8. Time series of the HARPS-N radial velocity measurements and our neural network’s activity correction. Top panel: uncorrected HARPS-N data. Middle panel: CNN-predicted activity signals from our best architecture. Bottom panel: HARPS-N radial velocity measurements corrected by subtracting the activity predictions. The gaps in the observations at ∼7​​​​200 days correspond to hardware downtime. RV uncertainties in the top and bottom panels are from the HARPS-N pipeline.(The data used to create this figure are available.)

Standard image High-resolution image

5.4. Improvement in Radial Velocity Scatter in Fourier Space

To understand which RV signals are being modeled and removed by the best model, and whether these signals correspond to stellar activity, we examined the RVs in the Fourier domain. The raw and corrected RVs are shown in Figure 9 in the form of a Lomb–Scargle periodogram (N. R. Lomb 1976; J. D. Scargle 1982). To obtain the Lomb–Scargle periodogram, we used the LombScargle24 function included in the astropy.timeseries package (J. T. VanderPlas & Ž. Ivezić 2015; Astropy Collaboration et al. 2013, 2018, 2022). We used the periodogram normalization outlined in M. Zechmeister & M. Kürster (2009).

Figure 9. Refer to the following caption and surrounding text.

Figure 9. Lomb–Scargle periodograms of the HARPS-N RVs used in this work and in Z. L. de Beurs et al. (2022). Panel (a): the 3 yr of raw RVs included in Z. L. de Beurs et al. (2022) in Fourier space. Panel (b): the 6 yr of raw RVs in Fourier space included in this work. The peak at the rotation period is less strong in this work, which is likely because our dataset includes a larger fraction of observations collected during solar minimum (see Section 5.4). Panel (c): the full 6 yr dataset after subtracting our best neural network’s activity prediction. The overall activity signal in the periodogram decreases, with particularly noticeable decreases in the amplitude of the periodogram peaks corresponding to the stellar rotation period (Prot) and long-term activity cycle.

Standard image High-resolution image

The peaks indicated in Figure 9 as Prot and Prot/2 correspond to the Sun’s mean synodic Carrington rotation period of ∼27 days and half this rotation period, respectively. The peaks at periods >200 days correspond to long-term magnetic cycles. The leftmost peaks correspond to aliases resulting from sampling of the RVs once a day.

A similar Lomb–Scargle periodogram was produced in Z. L. de Beurs et al. (2022) using only 3 yr of HARPS-N data, which we include here in Figure 9(a). For this subset of the data, the peaks in the raw RVs at Prot and Prot/2 appear much stronger compared to our full 6 yr of data in Figure 9(b). This is likely due to us using a dataset that is twice as long. For the 3 yr dataset, the spots that we see at the rotation period coming in and out of view at that cadence will be relatively stable. However, for the 6 yr dataset, with twice as much longitudinal data, it is more likely that there are spots that are not stable and could be out of phase, weakening the rotation signal. There is also more time at solar minimum within our larger dataset, and this is likely the primary cause of the weakened rotational signal strength.

The corrected RVs from the CNN model in the bottom panel no longer have the peaks that correspond to these stellar activity signals. These results demonstrate that the CNN can detect and remove the quasiperiodic variability arising from spots and plague networks using only the white light CCF, the unsigned magnetic flux, and the TSI derivative, and no information about the timing of the observations.

5.5. Injection-recovery Tests

Our primary goal in developing our CNN stellar variability model is to improve our ability to detect planetary Doppler shifts in RV datasets. To demonstrate that our method preserves planetary signals while modeling stellar variability, we performed several end-to-end planet injection-recovery tests. In these tests, we injected simulated Keplerian planetary signals into the solar data at the CCF level, pass these data through our full pipeline, and then evaluate how well we can recover the orbital parameters of the simulated planets.

Using this approach, we performed four independent planet injection-recovery tests spanning a range of RV semiamplitudes. For simplicity, we assumed circular orbits with orbital periods of P = 400 days and with semiamplitudes of K = 0.10 m s−1, 0.20 m s−1, 0.30 m s−1, and 0.40 m s−1. We simulate the planetary RV signals using radvel’s kepler.rv_drive function (B. J. Fulton et al. 2018) and inject these planetary signals into our CCFs and our HARPS-N radial velocities. Although our best NN model includes unsigned magnetic flux data and TSI derivatives, we do not inject planetary signals into these datasets because we expect unsigned magnetic flux to be unaffected by the presence of planets and only 0.1%–10% of exoplanets transit (depending on orbital orientations). We do no want to limit our model to only be able to detect transiting exoplanets, so we intentionally do not inject planetary transits in our TSI measurements.

To prepare our CCFs and RVs for the neural network model and inject the planet signals into them, we follow the same steps as described in Section 3.1, with the modification that we inject the planetary signal between Step 2 and Step 3 and perform one extra step after Step 3. For the CCFs, the planet signal is injected by applying a translational Doppler shift to the CCFs, and for the RVs, the planetary signal is simply added to the HARPS-N RV values. As part of our normal pipeline, we then perform Step 3 described in Section 3.1, which is to shift all CCFs to a common center by fitting each CCF to a Gaussian and extracting the μ values from the Gaussian fit. Notably, this measures and removes translational shifts and is how we would approach any dataset with unknown planetary signal(s). After Step 3, we perform one extra step for the injection-recovery process, which is to subtract the μ value from our RV values so that the RV values used to train our neural network do not contain translational shift information and focus on stellar variability contributions. Next, we proceed with Step 4 of our pipeline and finally train our neural network on the CCFs, TSI values, unsigned magnetic flux values, and the RVs. After training, we apply the neural network model’s stellar activity correction to the RVs to get our corrected RV time series. We add our μ values back to the now stellar activity corrected RVs since those are our estimates of planetary reflex motion.

Next, we compute Lomb–Scargle periodograms on the corrected RVs with the planetary Doppler motion. We require that for a planet signal to be detected, its peak in the periodogram must exceed the false-alarm probability of 0.1%. With this criteria, we found that the signals corresponding to semiamplitudes of K = 0.30 m s−1 and 0.40 m s−1 on 400 days orbits produce significant peaks in the periodogram and the lower-amplitude signals are not detected. We performed a Markov Chain Monte Carlo (MCMC) orbital fit for both planets using the software edmcmc (A. Vanderburg 2021), which incorporates differential evolution to speed up the MCMC fitting process. We applied uniform priors to the period, semiamplitude, and phase that were broadly centered around the injected values. We fixed the eccentricity to zero. A comparison of the injected planetary orbit and MCMC fit are shown in the left and right panels of Figure 10 for K=0.30m s−1 and K=0.40m s−1, respectively. For both planets, the semiamplitudes estimated from the MCMC, ${{\rm{K}}}_{0.3}={0.29}_{-0.04}^{0.04}$m s−1 and ${{\rm{K}}}_{0.4}={0.39}_{-0.04}^{0.04}$m s−1 agree within error with the true values. However, as can be seen in the left panel of Figure 10, there is a mismatch between the injected and retrieved planet curves for the 0.30 m s−1planet, which is due to the MCMC best-fit value of the period (${{\rm{period}}}_{0.3}\,={421.3}_{-13.7}^{+30.58}$ days) being overestimated. We therefore consider the K = 0.30m s−1 case a weak detection. The lowest-amplitude signal we are able to confidently retrieve is the K = 0.40 m s−1 at a 400 day orbital period, which corresponds to a 5.16 ME planet around the Sun.

Figure 10. Refer to the following caption and surrounding text.

Figure 10. Stellar activity corrected radial velocities with two different injected planetary signals. In the left panel, a planet with semiamplitude of 0.3m s−1 on a 400 day orbit is injected into the radial velocities. In the right panel, a planet with a semiamplitude of 0.4m s−1 with the same orbital period is used. For both panels, the radial velocities, which are shown with gray points, are phase-folded on the simulated planets’ respective orbital periods retrieved by our MCMC analyses. For visualization, the RVs are also binned and labeled in yellow. The injected planet is indicated by a green dotted line, and the MCMC retrieved planet is shown by a black line.

Standard image High-resolution image

6. Discussion

6.1. Visualizing Our Features during Low- and High-magnetic Activity Periods

To qualitatively understand how the magnetic flux and TSI derivative inform the neural network’s predictions of stellar variability, we plot in Figures 11 and 12 the time series for the values of the unsigned magnetic flux, TSI, TSI derivative, raw RVs, predicted RVs, and corrected RVs from our best model during periods of low and high magnetic activity on the Sun. We focus on a period of 100 days, centered around months with one of the highest and lowest number of sunspots in our dataset, respectively. The high activity period occurred on 2015 October, with a mean of ∼64 sunspots over the month. The low activity period occurred on 2019 December, with a mean of ∼1.5 sunspots 25 (F. Clette & L. Lefèvre 2015).

Figure 11. Refer to the following caption and surrounding text.

Figure 11. A period of high magnetic activity is shown, with the date 5300 (2457300 JD) corresponding to 2015 December 4, where in this month there was a mean of around 64 sunspots (F. Clette & L. Lefèvre 2015). The RVs from HARPS-N (top panel), unsigned magnetic flux (second), and TSI and TSI spline fit (third), predicted RVs from our best CNN model (fourth), and corrected RVs as given in Equation (10) (last panel) are plotted against the Julian date. We see variations at the same times in all of the time series. While most of the features have variations that follow a similar shape to the raw RVs, the TSI is inverted. The value of σpercentile, as given in Equation (A2), for the raw RVs and the corrected RVs, are also shown.

Standard image High-resolution image
Figure 12. Refer to the following caption and surrounding text.

Figure 12. A period of low magnetic activity is shown, with the date 6820 (2458820 JD) corresponding to 2019 December 2, where in this month there was a mean of around 1.5 sunspots (F. Clette & L. Lefèvre 2015). The RVs from HARPS-N (top panel), unsigned magnetic flux (second), and TSI and TSI spline fit (third), and predicted RVs from our best CNN model (fourth), and corrected RVs as given in Equation (10) (last panel) are plotted against the Julian date. The values of σpercentile, as given in Equation (A2), for the raw RVs and the corrected RVs are also shown.

Standard image High-resolution image

For the high-magnetic activity plot shown in Figure 11, we can see that the unsigned magnetic flux follows the variations in the raw RVs, with similar peaks at around the dates 5260, 5295, and 5330, which correspond to 2457620 Julian Date (JD), 2457295 JD, and 2457330 JD, respectively. This is expected due to an increase in magnetic flux during active periods. The TSI instead dips around these dates, indicating a decrease in brightness due to sunspots. The TSI derivative similarly has shape changes at the same positions as the raw RVs, with the most prominent at around the dates 5260 and 5330 in the figure, which correspond to 2457260 JD and 2457330 JD, respectively. We can see that the predicted RVs from our best model capture these RV variations well, with predicted peaks at the same dates. However, the amplitude of the peaks predicted by our neural network are often lower compared to the raw RVs, which is likely due to our dataset mostly containing periods of low solar activity. We suspect that the neural network struggles with predicting the amplitude of the largest activity signals because there are not many examples of such an active Sun in the training set. We anticipate that the network’s ability to predict these high-activity time periods will improve if we increase the number of high activity examples in the training set. The value of σpercentile for the raw RVs in this period is 154.0 cm s−1 and for corrected RVs is 107.8 cm s−1, leading to a reduction of 30.0%.

For the low-magnetic activity time period shown in Figure 12, the predicted RVs follow the amplitude of the raw RVs well, where the value of σpercentile for the raw RVs is 90.6 cm s−1 and for the corrected RVs is 81.5 cm s−1, leading to a reduction of scatter of 10.0%. The network is performing well, even when there are no strong activity signals in the dataset, and it knows to ignore the information from the features (the unsigned magnetic flux, TSI, etc.), leading to predicting very low activity signals. Interestingly, the network predicts a jump in the RV time series at Julian date 2458840. This is likely a correction for an instrumental systematic (see Section 6.2).

In addition, we visualize the entire dataset for each of the one-dimensional features in Figure 13. The raw RVs are shown in pink. We can see that some of the features that did not perform well, such as white light CCF bisector span and white light CCF contrast do not appear to correlate well with the variations in the raw RVs. Bisector span is known to be particularly sensitive to spots. However, over the course of the last 3 yr included in this analysis, the Sun was mostly in solar minimum and had few spots and plagues, so this may potentially explain the low correlation of the bisector span with the RVs. On the other hand, features that perform well such as unsigned magnetic flux, TSI, TSI derivative, and s-index have similar overall shape and patterns to the raw RVs. The predicted RVs from our best model are shown in blue, and capture the variations of the raw RVs well, especially at periods of high stellar variability.

Figure 13. Refer to the following caption and surrounding text.

Figure 13. Time series of all of the one-dimensional additional input features to our CNN (shown in black), along with the input raw HARPS-N RVs (pink), and our best model’s activity predictions (blue).

Standard image High-resolution image

6.2. Instrumental Systematics

Although our main goal in developing this neural network was to correct astrophysical noise sources, we found that it was also able to correct instrumental artifacts. In particular, the network learned and corrected for the impact of cryostat warm-ups, which are events that occurred approximately twice a year between 2015 and 2021 and introduced small jumps in measured radial velocities. These warm-up dates are marked on the raw RVs in the top panel of Figure 14, and on the predicted RVs from the CNN in the second panel. During periods of higher magnetic activity (the first half of the dataset), the RV offsets introduced by the warm-ups are smaller than the activity variations, so it is not easy to notice their effect. However, during periods of lower activity (the second half of the dataset), there are apparent jumps in the measured RVs occurring at the warm-up dates. This is illustrated by the two examples in the bottom two panels of Figure 14. (A similar effect is also visible in Figure 12 at time 6840 days, or Julian Date 2458840). These two figures also show the neural network’s predicted RVs at the times of the cryostat warm-ups, which also show jumps, indicating that the network learned to predict instrumental artifacts in addition to the stellar activity signal.

Figure 14. Refer to the following caption and surrounding text.

Figure 14. Visualization of the neural network’s ability to identify and correct instrumental artifacts. The HARPS-N spectrograph underwent cryostat warm-up events between 2015 and 2021, resulting in temperature jumps in the sensors. The raw RVs (top panel) and predicted RVs from our best CNN model (second panel) are shown, with the warm-up dates overlaid. During periods of higher magnetic activity (first half of the dataset), the effects of warm-ups on the predicted RVs are obscured, but during periods of lower magnetic activity (second half of the dataset), the dates of the warm-ups align with jumps in the predicted RVs. The bottom two panels show subsets of the observations where warm-ups during low magnetic activity periods coincide with increases in predicted RVs. These occur at Julian Date 2458232 (third panel) and Julian Date 2458684 (fourth panel).

Standard image High-resolution image

The fact that the neural network can predict both instrumental and activity signals is interesting and suggests avenues for future improvement. The neural network was designed primarily to model stellar variability, and we therefore did not include features that directly trace the instrument’s performance. As a result, we did not expect the neural network to mitigate instrumental-driven RV variations. Instead, it must have identified instrumental artifact events based on shape changes in the white light CCFs, since that is the only input into our best model that is derived from HARPS-N. In the future, we may be able to enhance the ability of the network to remove artifacts by inputting instrument diagnostics like measurements from temperature and pressure sensors to the network. This potentially makes neural networks an even more powerful tool for post-processing RV measurements, since identifying and removing instrumental artifacts will become even more critical as we try to find increasingly small planets with the next generation of extreme precision spectrographs.

6.3. Limiting Precision

In this work, we have demonstrated an improvement in RV scatter on the Sun to about 90 cm s−1. If we could achieve similar improvements in RV measurements of other stars, it would considerably improve our ability to detect small planets with the RV method. However, the 90 cm s−1 scatter in the corrected RVs is still far larger than the 10 cm s−1 amplitude of an Earth-like planet around a Sun-like star.

We therefore wish to understand how to improve the precision further and why it is being limited. The corrected periodogram in Figure 9 shows that most of the quasiperiodic stellar signals at the stellar rotation period have been effectively removed by the CNN model predictions, although some residual still remains near 1/2 the rotation period. Moreover, in simulated data with only magnetic activity signals, Z. L. de Beurs et al. (2022) were able to use CNNs to achieve RV precision of a few centimeters per second using this method. This implies that we are able to remove most of the contribution of magnetic activity signals either at the stellar rotation period or in the long-term activity cycle, so much of the remaining RV scatter must be from some other source.

There are two possible factors dominating the remaining RV scatter in the HARPS-N data: (i) instrumental noise and (ii) supergranulation.26 In terms of instrumental noise, σinstrumental, HARPS-N requires frequent calibrations to ensure accuracy of the generated wavelength solutions, which limit the precision of the RVs. X. Dumusque et al. (2021) found that the wavelength solutions from the HARPS-N DRS we use for our data change by around 49 cm s−1 on day-to-day timescales. While we showed that our neural network can predict and correct at least some instrumental artifacts, we do not expect that most of our input features to the CNN are able to trace the day-to-day variations in the instrument wavelength solution that dominate the scatter found by X. Dumusque et al. (2021).27 The second factor likely dominating our remaining RV scatter is supergranulation, σsupergran, which occurs on inactive regions of the solar surface and would not be traced well by many of the activity indicators in our model.28 Additionally, supergranulation may manifest in the CCFs as translational shifts (N. Meunier & A. M. Lagrange 2020), to which our model is not sensitive due to some of our data pre-processing steps described in Section 3.1.

Supergranulation results in RV variations of a similar scale to instrumental noise, with estimates ranging from 68 cm s−1 by K. Al Moulla et al. (2023) to 86 cm s−1 by B. S. Lakeland et al. (2024). Likewise, we do not expect that most of the supergranulation signal can be predicted given our inputs; it is not magnetic, so most of our additional features do not apply, and it should produce only small changes in the shape of the white light CCF. The overall contribution to RV signals from these two factors is given by

Equation (11)

which, for σinstrumental = 49cm s−1 and σsupergran = 68–86cm s−1, gives σtot = 84–99cm s−1. This is similar to the 92 cm s−1 residuals of our CNN model.

6.4. Future Work and Prospects

One avenue for future work is to apply the lessons learned from this investigation of solar data to observations of other stars. Already, the neural network white light CCF-based method of Z. L. de Beurs et al. (2022) has been modified to search for planetary signals around other stars (L. L. Zhao et al. 2022b; Z. L. de Beurs et al. 2024). Other stars have smaller datasets, so modifying our method requires a linear regression approach, where a white light CCF-based stellar activity model and Keplerian signals are simultaneously fitted. This approach has the advantage of not requiring the prior removal of stellar activity signals before performing a planet search and allowing us to immediately apply these methods to other stars without requiring the extensive training set necessary for a neural network. Thus far, these methods have been successfully applied to five systems and reduced their RV scatter (L. L. Zhao et al. 2022b; Z. L. de Beurs et al. 2024). In the future, these linear regression methods could incorporate some of the features that we found to contain complementary information to the white light CCFs in this work. For example, we could add the chromatic CCFs, a proxy for the unsigned magnetic flux for stars beyond the Sun (e.g., F. Lienhard et al. 2023), and Hα into this linear regression and test how much this helps our stellar activity models for stars spanning the HR diagram. However, since other stars have smaller datasets, we will need to investigate dimensionality reduction techniques if we wish to add all of these additional features.

In the future, we are also interested in looking for new input features that can be used to predict granulation and supergranulation for the Sun. Although testing the applicability of these methods developed for the Sun to other stars is essential, developing new methods by focusing on solar observations can also give insight into new ways of mitigating variability, which can later be applied on other targets. In this way, the Sun is a great test-bed for trying out new features to see if they can help improve RV precision, and identifying new correlations to stellar variability. Since we find that the current noise floor for solar observations appears to be dominated by supergranulation (B. S. Lakeland et al. 2024), we plan to look for new correlations with these phenomena in the future by using extremely high-resolution spectra at higher resolutions than HARPS-N’s (see, e.g., M. L. Palumbo et al. 2024), or other observables, such as SDO’s Dopplergrams or UV continuum observations. Although many of the types of observations SDO provides for the Sun may not be readily available for other stars, they can still help probe the underlying physics, find new correlations, and potentially inform the design of future extreme precision spectrographs to incorporate our knowledge of stellar variability.

7. Conclusion

To detect Earth-like exoplanets orbiting the habitable zone of Sun-like stars, we must first detect and remove the larger stellar activity signals that hide the planetary signals. These stellar activity signals are difficult to remove due to their quasiperiodic nature. Previously, Z. L. de Beurs et al. (2022) showed that an ML algorithm can effectively remove stellar activity from observations of the Sun using shape changes in the white light CCFs. Here, we have extended this work and tested how much additional input features to the ML model help the model’s ability to identify and remove stellar activity from observed RVs.

We performed an extensive suite of tests where we added new features to a model similar to that of Z. L. de Beurs et al. (2022). We identified which features decreased RV scatter the most compared to a model with only white light CCFs. We found that the activity indicators that consistently gave the lowest σpercentile values included the unsigned magnetic flux, the TSI, the TSI derivative, the S-Index, the chromatic CCFs, Hα EW, and the FWHM and contrast of the white light CCFs. Our best-performing model used the white light CCFs from HARPS-N Solar Telescope (X. Dumusque et al. 2015), and additionally the disk-averaged, unsigned, unpolarized magnetic flux from the HMI aboard the SDO (P. H. Scherrer et al. 2012), and the TSI derivative from SORCE and TSIS-1. This model reduces the scatter in the RV data from 147.1 to 93.3 cm s−1 across 6 yr of observations.

We find that the remaining RV variability left after removing our best model’s predictions is likely dominated by instrumental shifts and supergranulation. While current and future spectrographs are believed or expected to have instrumental stability at the 10 cm s−1 level, supergranulation may prevent further improvements in RV precision without advancements in its removal. There is a strong need for further study of the Sun to identify pathways to mitigate stellar RV variability due to supergranulation before we can detect the 10 cm s−1 signals of Earth analogs around Sun-like stars.

Acknowledgments

N.M. would like to thank the support from the International Research Opportunities Programme and the Department of Physics at Imperial College London, the Turing Scheme, MIT International Science and Technology Initiatives (MISTI), and MIT Department of Physics. N.M. is funded by a Science and Technology Facilities Council (STFC) studentship (ST/Y509231/1).

Z.L.D. would like to thank the generous support of the MIT Presidential Fellowship, the MIT Collamore-Rogers Fellowship, and to acknowledge that this material is based upon work supported by the National Science Foundation Graduate Research Fellowship under grant No. 1745302. Z.L.D. and A.V. acknowledge support from the D.17 Extreme Precision RV Foundation Science program under NASA grant 80NSSC22K0848. A.C.C. acknowledges support from STFC consolidated grant No. ST/V000861/1 and UKRI/ERC Synergy grant EP/Z000181/1 (REVEAL). This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation program (grant agreement SCORE No. 851555). This work has been carried out within the framework of the NCCR PlanetS supported by the Swiss National Science Foundation under grants 51NF40_182901 and 51NF40_205606. This project has received funding from the Swiss National Science Foundation under the grant SPECTRE (No. 200021_215200). B.S.L. is funded by a Science and Technology Facilities Council (STFC) studentship (ST/V506679/1). B.S.L. and A.M. acknowledge funding from a UKRI Future Leader Fellowship, grant No. MR/X033244/1. A.M. acknowledges funding from a UK Science and Technology Facilities Council (STFC) small grant ST/Y002334/1.

The HARPS-N project has been funded by the Prodex Program of the Swiss Space Office (SSO), the Harvard University Origins of Life Initiative (HUOLI), the Scottish Universities Physics Alliance (SUPA), the University of Geneva, the Smithsonian Astrophysical Observatory (SAO), the Italian National Astrophysical Institute (INAF), the University of St Andrews, Queen’s University Belfast, and the University of Edinburgh

We used ChatGPT 5.1 (OpenAI 2025) to improve the concision, clarity, and wording of parts of the manuscript.

Software: NumPy (C. R. Harris et al. 2020), Matplotlib (J. D. Hunter 2007), TensorFlow (M. Abadi et al. 2015), Astropy (Astropy Collaboration et al. 2013, 2018, 2022) SciPy (P. Virtanen et al. 2020), specutils (N. Earl et al. 2023).

Appendix

In this appendix, we include more detailed descriptions of the two performance metrics used in evaluating our models, the RMSE (Section A.1) and σpercentile (Section A.2). In addition, we include the values of the performance metrics for each model in our analysis (Tables 4 and 5, respectively) and figures to compare these values (Figure 15 and 16).

Table 4. Median and Error on the Median of the RMSE Values for the Same Models as in Table 5 Are Shown Sorted in Order of Decreasing Median RMSE for the Full Dataset, with Lower Values Indicating Improved Performance

 RMSE Median (cms−1)
Additional Input FeaturesCross-val SetValidation SetTest SetFull Dataset
Sodium D2 EW106.82 ± 0.04103.03 ± 0.13135.77 ± 0.11109.74 ± 0.04
No additional features106.84 ± 0.05103.26 ± 0.15135.76 ± 0.13109.74 ± 0.04
Sodium D1 EW106.79 ± 0.05103.28 ± 0.13135.75 ± 0.11109.65 ± 0.04
Hα EW106.73 ± 0.05103.41 ± 0.13135.40 ± 0.13109.63 ± 0.04
Hα EW + sodium D1 EW + sodium D2 EW106.53 ± 0.05103.30 ± 0.11135.60 ± 0.10109.47 ± 0.04
CCF Contrast106.47 ± 0.04102.70 ± 0.14134.95 ± 0.11109.26 ± 0.03
CCF Bisector106.53 ± 0.04102.68 ± 0.12133.49 ± 0.10109.17 ± 0.03
CCF FWHM105.78 ± 0.05101.72 ± 0.12134.12 ± 0.11108.54 ± 0.04
TSI Derivative105.64 ± 0.04102.72 ± 0.13133.63 ± 0.11108.50 ± 0.04
TSI105.71 ± 0.04102.59 ± 0.16132.27 ± 0.14108.38 ± 0.03
Blue CCF105.42 ± 0.0799.10 ± 0.16133.05 ± 0.18107.93 ± 0.06
CCF Contrast + CCF Bisector + CCF FWHM105.13 ± 0.04100.64 ± 0.01131.32 ± 0.01107.59 ± 0.03
Red CCF104.14 ± 0.05100.00 ± 0.15135.61 ± 0.13107.33 ± 0.04
Yellow CCF104.19 ± 0.05100.01 ± 0.13135.62 ± 0.15107.32 ± 0.04
TSI + TSI Derivative104.51 ± 0.05101.74 ± 0.16130.10 ± 0.17107.04 ± 0.04
Red CCF + Yellow CCF103.52 ± 0.0599.78 ± 0.12135.30 ± 0.12106.76 ± 0.04
Red CCF + Blue CCF102.71 ± 0.0697.25 ± 0.16132.93 ± 0.17105.64 ± 0.05
Yellow CCF + Blue CCF102.71 ± 0.0697.26 ± 0.15132.84 ± 0.16105.62 ± 0.06
Red CCF + Yellow CCF + Blue CCF102.36 ± 0.0797.98 ± 0.18132.79 ± 0.17105.41 ± 0.06
S-Index101.10 ± 0.04102.41 ± 0.15128.09 ± 0.13104.25 ± 0.04
Red CCF + Yellow CCF + Blue CCF + Unsigned magnetic flux97.48 ± 0.0792.82 ± 0.16122.38 ± 0.1899.85 ± 0.06
Unsigned magnetic flux + Blue CCF97.79 ± 0.0691.57 ± 0.13116.65 ± 0.1599.22 ± 0.05
Unsigned magnetic flux + S-Index96.28 ± 0.0496.19 ± 0.13117.68 ± 0.1198.60 ± 0.04
Unsigned magnetic flux + CCF Bisector96.59 ± 0.0594.09 ± 0.12116.88 ± 0.1198.56 ± 0.04
Unsigned magnetic flux + Yellow CCF96.08 ± 0.0692.44 ± 0.12120.33 ± 0.1598.45 ± 0.05
Unsigned magnetic flux + Red CCF96.04 ± 0.0592.32 ± 0.13120.33 ± 0.1398.39 ± 0.05
Unsigned magnetic flux96.12 ± 0.0493.80 ± 0.11116.38 ± 0.1198.13 ± 0.04
Unsigned magnetic flux + CCF Contrast95.94 ± 0.0492.81 ± 0.12116.24 ± 0.1197.88 ± 0.04
Red CCF + Yellow CCF + Blue CCF + Unsigned magnetic flux95.31 ± 0.0791.08 ± 0.20118.21 ± 0.1897.44 ± 0.06
+ TSI + TSI Derivative + Hα EW    
Red CCF + Yellow CCF + Blue CCF + Unsigned magnetic flux95.20 ± 0.0890.78 ± 0.19118.05 ± 0.2197.30 ± 0.06
+ TSI + TSI Derivative 
Unsigned magnetic flux + CCF FWHM95.43 ± 0.0592.19 ± 0.10114.86 ± 0.1497.22 ± 0.04
Unsigned magnetic flux + S-Index + TSI Derivative94.94 ± 0.0494.60 ± 0.10116.13 ± 0.1197.22 ± 0.03
Unsigned magnetic flux + Red CCF + Yellow CCF + Blue CCF94.81 ± 0.0690.86 ± 0.19117.26 ± 0.2096.95 ± 0.06
+ S-Index + TSI + TSI Derivative    
Unsigned magnetic flux + S-Index + TSI94.81 ± 0.0494.80 ± 0.13113.75 ± 0.1496.93 ± 0.03
Red CCF + Yellow CCF + Blue CCF + Unsigned magnetic flux94.74 ± 0.0891.42 ± 0.17117.34 ± 0.1996.86 ± 0.07
+ S-Index + TSI + TSI Derivative + Hα EW    
Unsigned magnetic flux + S-Index + TSI + TSI Derivative94.70 ± 0.0791.10 ± 0.19116.34 ± 0.2096.71 ± 0.06
+ Red CCF + Blue CCF + Yellow CCF + Hα EW    
+ CCF Bisector + CCF FWHM + CCF Contrast    
Unsigned magnetic flux + S-Index + TSI + TSI Derivative94.56 ± 0.0790.85 ± 0.18116.30 ± 0.1996.64 ± 0.05
+ Red CCF + Blue CCF + Yellow CCF    
+ Hα EW + sodium D1 EW + sodium D2 EW    
+ CCF Bisector + CCF FWHM + CCF Contrast    
Unsigned magnetic flux + TSI Derivative94.62 ± 0.0492.22 ± 0.10114.71 ± 0.1296.60 ± 0.04
Unsigned magnetic flux + TSI94.77 ± 0.0492.37 ± 0.11112.66 ± 0.1396.49 ± 0.04

Only a portion of this table is shown here to demonstrate its form and content. A machine-readable version of the full table is available.

Download table as:  Machine-readable (MRT)Typeset image

Table 5. Median and Error on the σpercentile for the Corrected RVs for 100 Models Ran for Each Architecture Are shown

 σpercentile for Corrected RVs (cms−1)
Additional Input FeaturesCross-val SetValidation SetTest SetFull Dataset
Sodium D1 EW103.50 ± 0.15101.07 ± 0.2895.30 ± 0.34102.97 ± 0.12
Sodium D2 EW103.48 ± 0.15101.29 ± 0.3095.48 ± 0.37102.84 ± 0.14
TSI Derivative103.33 ± 0.1599.58 ± 0.2597.10 ± 0.34102.71 ± 0.13
CCF Contrast103.48 ± 0.13100.81 ± 0.3094.85 ± 0.29102.71 ± 0.12
No additional features103.23 ± 0.14101.01 ± 0.2995.46 ± 0.36102.63 ± 0.11
TSI103.50 ± 0.15100.81 ± 0.3094.12 ± 0.34102.53 ± 0.11
CCF FWHM103.48 ± 0.18100.64 ± 0.2893.89 ± 0.31102.36 ± 0.13
Hα EW + sodium D1 EW + sodium D2 EW102.21 ± 0.1499.71 ± 0.3595.20 ± 0.32102.13 ± 0.12
TSI + TSI Derivative102.25 ± 0.15100.77 ± 0.2596.69 ± 0.37102.11 ± 0.12
Hα EW101.99 ± 0.13100.51 ± 0.2595.38 ± 0.37101.93 ± 0.13
CCF Bisector102.95 ± 0.15102.69 ± 0.2995.48 ± 0.32101.50 ± 0.14
CCF Contrast + CCF Bisector + CCF FWHM102.56 ± 0.14100.76 ± 0.2493.29 ± 0.25101.31 ± 0.11
Red CCF99.30 ± 0.15100.54 ± 0.3195.16 ± 0.3299.44 ± 0.14
Yellow CCF99.21 ± 0.1499.86 ± 0.3295.50 ± 0.3299.32 ± 0.13
Blue CCF100.07 ± 0.1694.64 ± 0.3395.87 ± 0.3399.21 ± 0.15
Red CCF + Yellow CCF98.87 ± 0.16100.86 ± 0.3294.66 ± 0.2998.73 ± 0.14
S-Index98.80 ± 0.1397.69 ± 0.3999.80 ± 0.4398.09 ± 0.13
Red CCF + Yellow CCF + Blue CCF97.96 ± 0.1796.04 ± 0.4496.54 ± 0.4197.60 ± 0.16
Yellow CCF + Blue CCF98.05 ± 0.1695.61 ± 0.4197.27 ± 0.4697.54 ± 0.14
Red CCF + Blue CCF97.68 ± 0.1796.02 ± 0.4496.73 ± 0.4397.01 ± 0.14
Red CCF + Yellow CCF + Blue CCF + Unsigned magnetic flux95.30 ± 0.2186.26 ± 0.4395.10 ± 0.4094.14 ± 0.16
Unsigned magnetic flux + S-Index95.11 ± 0.1388.36 ± 0.3592.11 ± 0.3193.81 ± 0.13
Unsigned magnetic flux + Yellow CCF95.03 ± 0.1685.95 ± 0.3590.55 ± 0.3293.60 ± 0.14
Unsigned magnetic flux + Red CCF95.42 ± 0.1486.67 ± 0.3090.21 ± 0.3493.60 ± 0.14
Unsigned magnetic flux + CCF Bisector94.99 ± 0.1288.19 ± 0.3688.95 ± 0.3493.54 ± 0.11
Unsigned magnetic flux + Blue CCF94.37 ± 0.1688.25 ± 0.3792.51 ± 0.4492.83 ± 0.13
Unsigned magnetic flux94.47 ± 0.1288.09 ± 0.3387.10 ± 0.4592.67 ± 0.11
Unsigned magnetic flux + CCF Contrast94.50 ± 0.1486.48 ± 0.3285.91 ± 0.3492.66 ± 0.11
Unsigned magnetic flux + CCF FWHM93.72 ± 0.1286.47 ± 0.3585.09 ± 0.3592.41 ± 0.11
Unsigned magnetic flux + S-Index + TSI92.30 ± 0.1287.05 ± 0.2989.45 ± 0.3492.54 ± 0.10
Red CCF + Yellow CCF + Blue CCF + Unsigned magnetic flux92.84 ± 0.1686.94 ± 0.4094.47 ± 0.4392.53 ± 0.15
+ TSI + TSI Derivative + Hα EW    
Red CCF + Yellow CCF + Blue CCF + Unsigned magnetic flux92.84 ± 0.1787.01 ± 0.3995.82 ± 0.4692.35 ± 0.16
+ TSI + TSI Derivative    
Unsigned magnetic flux + S-Index + TSI + TSI Derivative92.93 ± 0.1886.78 ± 0.4592.72 ± 0.3792.28 ± 0.16
+ Red CCF + Blue CCF + Yellow CCF + Hα EW    
+ CCF Bisector + CCF FWHM + CCF Contrast    
Unsigned magnetic flux + S-Index + TSI Derivative93.00 ± 0.1389.32 ± 0.3397.67 ± 0.3592.23 ± 0.11
Red CCF + Yellow CCF + Blue CCF + Unsigned magnetic flux92.85 ± 0.1686.90 ± 0.3893.06 ± 0.4592.16 ± 0.16
+ S-Index + TSI + TSI Derivative + Hα EW    
Unsigned magnetic flux + TSI93.35 ± 0.1486.37 ± 0.2985.63 ± 0.3592.10 ± 0.12
Unsigned magnetic flux + S-Index + TSI + TSI Derivative92.63 ± 0.1786.26 ± 0.3991.60 ± 0.3791.97 ± 0.15
+ Red CCF + Blue CCF + Yellow CCF    
+ Hα EW + sodium D1 EW + sodium D2 EW    
+ CCF Bisector + CCF FWHM + CCF Contrast    
Unsigned magnetic flux + Red CCF + Yellow CCF + Blue CCF92.77 ± 0.1886.16 ± 0.3893.05 ± 0.4191.92 ± 0.16
+ S-Index + TSI + TSI Derivative    
Unsigned magnetic flux + TSI Derivative92.59 ± 0.1386.39 ± 0.3893.31 ± 0.3791.57 ± 0.11

Note.They are given in descending order of median σpercentile for the full dataset, with lower values indicating improved performance. Each architecture uses different additional input features. We find that the models containing unsigned magnetic flux, TSI, TSI Derivative, EW Hα, and chromatic CCFs consistently result in the lowest σpercentile values, and that the best model over the full dataset uses the unsigned magnetic flux and TSI derivative.

Only a portion of this table is shown here to demonstrate its form and content. A machine-readable version of the full table is available.

Download table as:  Machine-readable (MRT)Typeset image

Figure 15. Refer to the following caption and surrounding text.

Figure 15. The median RMSE for the RVcorrected values over 100 runs for the cross-validation, validation, and test set for different model architectures (see Appendix A.1 for more details on the RMSE). Models are shown with one additional feature to the original white light CCFs (left panels) and models with multiple features combined (right panels). The cross-validation set (top panels) contains 80% of the data and is used to train the model. The validation set (middle panels) contains 10% of the data and is used to evaluate the performance of the model on new inputs that can be used to optimize the model. The test set (bottom panels) has the remaining 10% of the data, and is used to evaluate the final model performance on previously unseen data. A more detailed description of the three sets is provided in Section 4.4. The standard error of the median as given in Equation (A3) is shown as the black error bars. The model in pink uses only the original white light CCFs as the input to the CNN, and the models in blue represent those with any additional features. There are abbreviations for unsigned magnetic flux (UMF), TSI, and TSI Derivative (ΔTSI).

Standard image High-resolution image
Figure 16. Refer to the following caption and surrounding text.

Figure 16. The same charts are shown as in Figure 15 using the same models, but showing the results of the median σpercentile values, where we use σpercentile as a less sensitive alternative to the standard deviation (see Appendix A.2 for more details). By comparing the models with the lowest σpercentile values, we can identify the most effective features for the NN. We find that the models containing UMF, TSI, ΔTSI, EW Hα, and chromatic CCFs consistently result in the lowest σpercentile values.

Standard image High-resolution image

A.1. RMS Error (RMSE)

The rms error (RMSE) is a standard metric used to quantify the performance of a model by assessing the differences between the values predicted by the model and the values actually observed. The RMSE is defined as

Equation (A1)

where M represents the total number of samples being input or predicted. RVpredicted,i denotes the predicted value for the ith sample from the model, which in our analysis is an NN, which utilizes input activity indicators for its predictions. RVlabels,i denotes the actual, observed values for the ith sample, which, for our NN models, are the raw RVs without any activity corrections applied.

A lower RMSE value indicates a model that closely predicts the observed outcomes, reflecting its higher accuracy and performance. Therefore, in our analysis, we conclude that the NN models with the lowest RMSE have the optimal model architecture or most effective input activity features.

A.2. σpercentile

When selecting the optimal model architecture and identifying the most effective stellar activity features for our NN in predicting RVs, we initially rely on the RMSE metric as described above. However, RMSE is not resistant to the influence of outliers. We therefore also wish to consider outlier resistant metrics to assess how effective our models are.

The σ percentile metric, σpercentile, is a robust statistical measure used to assess the variability of a dataset while minimizing the influence of outliers. We define this as

Equation (A2)

where RV84th% and RV16th% are the 84th and 16th percentiles of the RVs, respectively. This metric measures the spread of the middle 68% of the data, providing a summary of data variability similar to the standard deviation in a normal distribution. However, unlike the standard deviation, σpercentile is less sensitive to extreme values or outliers in the distribution, making it particularly useful for datasets with non-Gaussian characteristics.

A.3. Standard Error of the Median

When we determine the most effective stellar activity features, we find the σpercentile of the corrected RVs 100 times for each model architecture. This is to ensure our results minimize the effect of random variations due to data ordering during training. We then calculate the median and standard error of the median of the 100 σpercentile values for each architecture.

The standard error of the median is a statistical measure used to quantify the uncertainty of the median estimate of a dataset. It is especially useful in situations where data distributions are not symmetric or contain outliers. It can be approximated for a dataset of N samples by the formula:

Equation (A3)

where ς is the standard deviation of the dataset (J. Maindonald & W. J. Braun 2010).

Footnotes

  • 14 

    It is important to note the RV method measures $m\sin i$, where m is the mass of the exoplanet, and i is the inclination of its orbit relative to the line of sight. Therefore, the RV method alone cannot determine the true mass of the exoplanet without additional information about the orbital inclination, which must be obtained from other observational methods.

  • 15 

    This roughly doubles the volume of data used by Z. L. de Beurs et al. (2022)

  • 16 

    The first 3 yr of data from 2015 July to 2018 July can be downloaded publicly from https://dace.unige.ch/Sun/ (DRS version 2.2.8) or using the DACE python API https://dace-query.readthedocs.io/en/latest/ (DRS version 2.3.5). The remaining RVs and activity indicators used in our analysis will be available via VizieR at CDS.

  • 17 

    This data can be downloaded publicly from https://lasp.colorado.edu/sorce/data/tsi-data/.

  • 18 

    This data can be downloaded publicly from https://lasp.colorado.edu/tsis/data/tsi-data/.

  • 19 
  • 20 

    We note that our choice of pre-processing to highlight line-shape changes means that our method will be less sensitive to activity signals that do not have significant line-shape changes like granulation or supergranulation (N. Meunier & A. M. Lagrange 2020).

  • 21 
  • 22 
  • 23 

    The non-Gaussian RV distribution arises primarily from stellar activity, as magnetic active regions suppress convective blueshift, leading to positive RV deviations, and thus causes a skew in the data.

  • 24 
  • 25 
  • 26 

    We note that granulation should be effectively mitigated in our solar data because we average over an entire day of observations, but it remains a major challenge for observations of other stars at night.

  • 27 

    Perhaps in future work, we may explicitly include features to predict instrumental noise contributions such as temperature sensor information or wavelength calibration data.

  • 28 

    M. L. Palumbo et al. (2024) found spectrographs of ultra-high resolution with R ≳ 190,000 are required to detect granulation and supergranulation signatures.

Please wait… references are loading.
10.3847/1538-3881/ae45fd