A Kalman-smoother based data imputation strategy to data gaps in spaceborne gravitational wave detectors Preprint: APS/123-QED Tingyang Shen, He Wang, Jibo He Abstract Massive black hole binaries (MBHBs) and other sources within the frequency band of spaceborne gravitational wave observatories like the Laser Interferometer Space Antenna (LISA), Taiji and Tianqin pose unique challenges, as gaps and glitches during the years-long observation lead to both loss of information and spectral leakage. We propose a novel data imputation strategy based on Kalman filter and smoother to mitigate gap-induced biases in parameter estimation. Applied to a scenario where traditional windowing and smoothing technique introduce significant biases, our method mitigates the biases and demonstrates lower computational cost compared to existing data augmentation techniques such as noise inpainting. This framework presents a new gap treatment approach that balances robustness and efficiency for space-based gravitational wave data analysis. I Introduction Since the landmark detection of GW150914 Abbott et al. 2016a ; Abbott et al. 2016b , global interest in gravitational wave (GW) astronomy has been growing, leading to the initiation of various projects aimed at detecting gravitational wave signals across different frequency bands. Ground based detectors like the Laser Interferometer Gravitational Wave Observatory (LIGO) Aasi et al. 2015 , Virgo Acernese et al. 2014 and the Kamioka Gravitational Wave Detector (KAGRA) Akutsu et al. 2019 focus mainly on a sensitive range between \sim 10 Hz to a few kHz Abbott et al. 2019 . In order to detect sources from lower frequency bands such as Massive Black hole binaries (MBHB) Sesana et al. 2005 , extreme mass ratio inspirals (EMRI) Gair et al. 2017 , stellar-mass black hole inspirals Toubiana et al. 2020 and stochastic gravitational wave background (SGWB) Bartolo et al. 2018 , multiple spaceborne gravitational wave missions have been proposed with different configurations and characteristics. LISA and Taiji missions share a similar configuration as a three-satellite constellation trailing Colpi et al. 2024 and leading Hu and Wu 2017 the earth respectively in the heliocentric orbit, each with their own armlengths of 2.5 million km for LISA Colpi et al. 2024 and 3 million km for Taiji Hu and Wu 2017 , resulting in slight differences on the sensitivity. On the other hand, the geocentric mission TianQin has an armlength of 0.17 million km, and to mitigate the thermal load, TianQin adopts a 3-months-on and 3-months-off observation scheme Luo et al. 2016 , giving rise to unique challenges compared to the heliocentric missions like LISA and Taiji. Compared to existing GW sources for ground-based detectors like LIGO and Virgo, sources for spaceborne GW missions, primarily MBHBs, would remain in observable bandwidth for longer time, from hours to years. As a result, data gaps emerge as a primary data analysis challenge for future missions. Gaps in observations can arise from several factors which are generally categorized into two categories: scheduled and unscheduled gaps. Scheduled gaps are interruptions in observations due to pre-planned maintenance circles or mandatory downtime of observation systems for various reasons, many identified factors includes antenna re-pointing (gap lasts 3 hours every 14 days), tilt-to-length coupling constant estimation (gap lasts 2 days and has a frequency of about four times per year) and point-ahead angle mechanism (PAAM) adjustments (three times per day, lasting about 100 seconds each) Burke et al. 2025 . In general, scheduled gaps are periods during which accumulative effects are addressed and the whole system go through maintenance and potential reparation (especially in ground-based missions). Unscheduled gaps, on the other hand, are mainly caused by various unforeseeable events that will eventually translate into scenarios where data quality is severely compromised: For spaceborne missions like LISA, Taiji and TianQin, unforeseeable problems in instruments and random physical events like micrometeorite collisions can render the detectors inoperable. Such collisions are estimated to occur approximately 30 times per year and each event can cause a data gap lasting up to one day Burke et al. 2025 . Other minor problems like instrument outages can also contribute to unscheduled gaps. Also, nonstationary events known as glitches have been observed in various GW missions, and sereval schemes have been devised to characterize and mitigate such effects. Windowing such events out and treating them as gaps also emerges as a fallback solution to glitches, as is shown in Ref Castelli et al. 2025 . These potential applications further highlight the importance of developing a comprehensive strategy for gap treatment in general. Since the launch of LISA Pathfinder mission, many efforts have been made to evaluate the effects of different patterns of gaps on data analysis. Carré and Porter found that untreated gaps on time domain would lead to significant spectral leakage on Fourier domain hindering data analysis Carré and Porter 2010 . It is suggested in Ref. Dey et al. 2021 that when treated with smoothing technique, unscheduled gaps tend to have greater impact on the detectability of signals than scheduled gaps and such gaps will induce significant loss of SNR (signal-to-noise ratio), and the closer gaps are to the merger, the greater their influence would be. The gap happens during the merger phase can severely impact parameter estimation performance and in many cases result in loss of detection Dey et al. 2021 completely. To counter such adverse effects, many techniques have been developed. These techniques are generally divided into two categories: data augmentation and windowing. Broadly speaking, data augmentation methods Baghi et al. 2019 ; Blelly et al. 2021 ; Wang et al. 2025 use Bayesian techniques to estimate and sample parameters for both the signal and noise background, thereby reconstructing the missing data. However, this approach considerably increases computational cost and is typically applied to Galactic Binary sources rather than MBHB systems. Applying the same approach to MBHB signals would further escalate computational demands due to the cost of template generation and parameter estimation. More recent works in this category, such as noise inpainting Wang et al. 2025 and autoencoder-based methods Mao et al. 2025 , have been applied to MBHB cases and attempt to mitigate computational costs in different ways. Windowing, on the other hand, addresses spectral leakage by applying a window function to both sides of the gap Baghi et al. 2019 . However, this treatment leads to the loss of additional valid data and renders the resulting data non-stationary, making noise mismodeling a significant issue. Recent work Burke et al. 2025 analyzes this problem and proposes a formalism to characterize the resulting modeling errors. In this work, we propose a new data imputation technique based on the Kalman smoother in order to repair gaps and improve the posterior estimation performance. The Kalman smoother is a widely-used technique across many fields and can handle noisy observations without the need to provide labeled training data. Its computational cost remains relatively low compared to previous data augmentation techniques, despite having a computational complexity that scales cubically with the size of the state space. It also makes use of existing data points which includes both data and signal components rather than noise parameters only to generate inpainting data points, which may retain more relevant information. In our testing scenario, it is found that the Kalman smoother can successfully handle randomized gap patterns as long as such gaps are not dangerously close to time of coalescence. This paper is organized as follows: Sec.II introduces our methodologies, including a brief introduction on data generation in Sec.II A, gap introduction and treatment in Sec.II B as well as principles for Bayesian estimation and sampling techniques in Sec.II C. Sec.III shows our results with details about our injection and noise realization in Sec.III A and parameter estimation results for our injected case in Sec.III B with comparison between standard windowing and Kalman-based treatment. We will then summarize our work in Sec.IV. II Methodology II.1 Data preparation In data generation process we made use of existing GPU-accelerated Black Hole Binary Waveforms package bbhx Katz et al. 2020 ; Katz 2022 to generate our waveform for testing. We use the following set of parameters to describe our signal: chirp mass \mathcal{M}_{c} , mass ratio q , time of coalescence of the binary t_{c} , luminosity distance D_{L} , spin \chi_{1} and \chi_{2} , inclination \iota , ecliptic longitude \lambda , ecliptic latitude \beta , polarization angle \psi and coalescence phase \phi_{c} . We generated our waveform in IMRPhenomD Husa et al. 2016 and put it through the Time Delay Interferometery (TDI) channel of A, E and T to obtain the noise-free signal in that three channels. For the noise term n_{ij} where ij \in\{12,23,31,21,32,13\} , i and j specifying the index of S/C receiving and emitting lasers, respectively. The noise here is seen as a combination of various noise factors including read-out noise, test-mass acceleration noise, optical path noise, etc. The dominant contribution is described as a combination of the optical metrology system (OMS) noises N_{ij} and test-mass acceleration (ACC) noises \delta_{ij} Quang Nam et al. 2023 , \displaystyle n_{ij}(t)=N_{ij}(t)+\delta_{ij}(t)+\mathbf{D}_{ij}\delta_{ji}(t). (1) The delay operator \mathbf{D}_{ij} is defined as \mathbf{D}_{ij}f(t)\equiv f\left(t-d_{ij}(t)\right) , when acted on an arbitrary function of time f(t) . According to the baseline design of Taiji, the nominal Power Spectral Density (PSD) of N_{ij} and \delta_{ij} take the forms of \displaystyle S_{ij,\mathrm{OMS}}(f)= \displaystyle A_{ij,\mathrm{OMS}}^{2}\left(\frac{2\pi f}{c}\right)^{2}\left[1+\left(\frac{2\mathrm{mHz}}{f}\right)^{4}\right], (2) \displaystyle S_{ij,\mathrm{ACC}}(f)= \displaystyle A_{ij,\mathrm{ACC}}^{2}\left(\frac{1}{2\pi fc}\right)^{2}\left[1+\left(\frac{0.4\mathrm{mHz}}{f}\right)^{2}\right] \displaystyle\times\left[1+\left(\frac{f}{8\mathrm{mHz}}\right)^{4}\right], where A_{ij,\mathrm{OMS}}\equiv 8\times 10^{-12}\mathrm{~m}/\sqrt{\mathrm{Hz}} and A_{ij,\mathrm{ACC}}\equiv 3\times 10^{-15}\mathrm{~m}/\mathrm{s}^{2}/\sqrt{\mathrm{Hz}} . In order to suppress laser frequency noise, we used TDI observables and these observables are defined as, \mathrm{TDI}=\sum_{ij\in\mathcal{I}_{2}}\mathbf{P}_{ij}\eta_{ij}. (3) For the second generation TDI observable X_{2} , P_{ij} is defined as Wang et al. 2022 , \displaystyle\mathbf{P}_{12}=1-\mathbf{D}_{131}-\mathbf{D}_{13121}+\mathbf{D}_{1213131}, (4) \displaystyle\mathbf{P}_{23}=0, \displaystyle\mathbf{P}_{31}=-\mathbf{D}_{13}+\mathbf{D}_{1213}+\mathbf{D}_{121313}-\mathbf{D}_{13121213}, \displaystyle\mathbf{P}_{21}=\mathbf{D}_{12}-\mathbf{D}_{1312}-\mathbf{D}_{131212}+\mathbf{D}_{12131312}, \displaystyle\mathbf{P}_{32}=0, \displaystyle\mathbf{P}_{13}=-1+\mathbf{D}_{121}+\mathbf{D}_{12131}-\mathbf{D}_{1312121}. Definitions for observable Y_{2} and Z_{2} can also be obtained according to their TDI scheme following the permutation rule of 1 to 2, 2 to 3 and 3 to 1. In order to obtain the signal channel A and E and the null channel T, we follow this definition Prince et al. 2002 , \displaystyle A_{2} \displaystyle=\frac{Z_{2}-X_{2}}{\sqrt{2}}, (5) \displaystyle E_{2} \displaystyle=\frac{X_{2}-2Y_{2}+Z_{2}}{\sqrt{6}}, \displaystyle T_{2} \displaystyle=\frac{X_{2}+Y_{2}+Z_{2}}{\sqrt{3}}. Then we combine our noise-free signal with the noise drawn from the above-mentioned PSD on A, E and T channel to obtain our full observation data. In practice, we make use of the PSD and noise generation functions also used in data generation for Taiji Data Challenge Du et al. 2025 . II.2 Gap introduction and treatment Gaps are generated using gap indices from randomized or arbitrary input, and the corresponding time-domain data points are set to zero to simulate the lack of observation during gaps. Ideally any gap should be sufficient far away from reference time t_{c} in order to avoid loss of detection entirely Dey et al. 2021 , however in a separate case we would also place a long gap arbitrarily close to t_{c} in order to test extreme cases for our treatment strategy. II.2.1 Windowing In order to counter the spectral leakage introduced by gaps, it is a simple but effective approach to apply a windowing function to the gap, and both sides of the gaps smoothed by a windowing function are defined as below Dey et al. 2021 , w(t)=\begin{cases}\frac{1}{2}\left(1+\cos\left[\pi\left(\frac{t-t_{\mathrm{s}}-t_{\mathrm{tr}}}{t_{\mathrm{tr}}}\right)\right]\right)&\text{ for }t_{\mathrm{s}}-t_{\mathrm{tr}}