<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Efficient assessment of real-world dynamics of circadian rhythms in heart rate and body temperature from wearable data</title></titleStmt>
			<publicationStmt>
				<publisher>Royal Society Interface</publisher>
				<date>08/01/2023</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10649720</idno>
					<idno type="doi">10.1098/rsif.2023.0030</idno>
					<title level='j'>Journal of The Royal Society Interface</title>
<idno>1742-5662</idno>
<biblScope unit="volume">20</biblScope>
<biblScope unit="issue">205</biblScope>					

					<author>Dae Wook Kim</author><author>Caleb Mayer</author><author>Minki P Lee</author><author>Sung Won Choi</author><author>Muneesh Tewari</author><author>Daniel B Forger</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[<p>Laboratory studies have made unprecedented progress in understanding circadian physiology. Quantifying circadian rhythms outside of laboratory settings is necessary to translate these findings into real-world clinical practice. Wearables have been considered promising way to measure these rhythms. However, their limited validation remains an open problem. One major barrier to implementing large-scale validation studies is the lack of reliable and efficient methods for circadian assessment from wearable data. Here, we propose an approximation-based least-squares method to extract underlying circadian rhythms from wearable measurements. Its computational cost is ∼ 300-fold lower than that of previous work, enabling its implementation in smartphones with low computing power. We test it on two large-scale real-world wearable datasets:<inline-formula><math><mo>∼</mo><mn>600</mn><mo></mo><mrow><mi mathvariant='normal'>days</mi></mrow></math></inline-formula>of body temperature data from cancer patients and ∼ 184 000 days of heart rate and activity data collected from the ‘Social Rhythms’ mobile application. This shows successful extraction of real-world dynamics of circadian rhythms. We also identify a reasonable harmonic model to analyse wearable data. Lastly, we show our method has broad applicability in circadian studies by embedding it into a Kalman filter that infers the state space of the molecular clocks in tissues. Our approach facilitates the translation of scientific advances in circadian fields into actual improvements in health.</p>]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Introduction</head><p>Circadian rhythms are &#8764; 24 h oscillatory physiological processes <ref type="bibr">[1]</ref>. The rhythms are synchronized with external cues, such as day-night cycles, by the endogenous central pacemaker, called the circadian clock, which is in the hypothalamic suprachiasmatic nucleus (SCN) <ref type="bibr">[1]</ref>. Disruption of this synchrony, for instance, due to a shift-work lifestyle, increases the risk for many diseases, such as psychiatric disorders, neurodegenerative diseases and cancer <ref type="bibr">[2,</ref><ref type="bibr">3]</ref>. Thus, identifying optimal sleep schedules for shift workers that lead to minimizing fatigue has received attention <ref type="bibr">[4]</ref>. Moreover, optimal drug and surgery timing has been considered an inevitable part of precision medicine <ref type="bibr">[5]</ref>. Notably, timed infusions of anti-cancer drugs can improve the survival of cancer patients <ref type="bibr">[6,</ref><ref type="bibr">7]</ref>. These clinical applications based on circadian physiology require accurate identification of underlying circadian rhythms in physiological processes <ref type="bibr">[8]</ref>.</p><p>Previously, several methods to track the clock state have been developed <ref type="bibr">[9,</ref><ref type="bibr">10]</ref>. For example, one of the widely used approaches is to measure the secretion onset time of the sleep-regulating hormone, melatonin, from saliva or blood samples under dim-light conditions <ref type="bibr">[9]</ref>. Although the assessment of dim-light melatonin onset (DLMO) is well validated and thus considered the gold standard, challenges arise when using DLMO to develop chronotherapeutics <ref type="bibr">[5,</ref><ref type="bibr">8]</ref>. Major complications include: (i) DLMO assessment is labour-intensive and invasive <ref type="bibr">[11]</ref>; (ii) the sample collection occurs in laboratory settings, making it infeasible to measure DLMO continuously for a long time (e.g. greater than 30 days) <ref type="bibr">[11]</ref>; (iii) the subjective choice of threshold for DLMO assessment (e.g. 3 or 4 pg ml -1 ) can affect the clock state estimation <ref type="bibr">[12]</ref>; and (iv) it is costly <ref type="bibr">[13]</ref>. Thus, large-scale epidemiological studies with DLMO are challenging.</p><p>One possible remedy for this is to exploit wearable technologies. Wearables can continuously measure behavioural and physiological signals such as activity, heart rate (HR) and body temperature (BT) over long periods in real-world settings (figure <ref type="figure">1a</ref>) <ref type="bibr">[8,</ref><ref type="bibr">16]</ref>. These signals are influenced by the circadian clock and thus have circadian variation <ref type="bibr">[17,</ref><ref type="bibr">18]</ref>. Accordingly, tracking of the underlying circadian rhythms from wearable measurements enables real-world chronomedicine. However, wearable technologies pose their own set of challenges. The HR and BT circadian rhythms can become obscured by many factors, such as hormones, sleep, activity, caffeine and stress <ref type="bibr">[19]</ref>. The obscured circadian signals are further hidden in the measurement noise <ref type="bibr">[14]</ref>. As a result, only noisy daily (i.e. time-of-day) rhythms that arise from the combined influence of circadian and state-evoked external components are typically observed.</p><p>To overcome the challenges and extract circadian information specifically related to endogenous timers, several mathematical and statistical methodologies have been proposed <ref type="bibr">[14,</ref><ref type="bibr">16,</ref><ref type="bibr">20]</ref>. Milestone studies done by <ref type="bibr">Brown and</ref> Czeisler showed that the endogenously generated BT rhythms with a period 24 h (i.e. the circadian rhythm in BT) can be identified from constant-routine core body temperature data collected in laboratory settings using harmonic-regression models <ref type="bibr">[15]</ref>. Other important early work showed that the characteristics of the circadian rhythms in BT, such as the type-0 phase response curve to a three-cycle bright light stimulus and the timing of core body temperature minimum, can be accurately captured by van der Pol type oscillator models <ref type="bibr">[21]</ref>. Based on these foundational studies, researchers have recently made meaningful progress in identifying circadian rhythms from wearable data. The dashed grey lines represent the true values of the parameters described in electronic supplementary material, table <ref type="table">S1</ref>. (e,f ) Box-and-whisker plots of 10 2 mean estimates that were obtained when increasing the measurement interval. The estimates of BT (e) and HR ( f ) parameters are still reasonably accurate even if the measurement interval is increased. Here, the two-harmonic model and the single harmonic model were used for the estimation of the BT and HR parameters, respectively, as done in the previous studies <ref type="bibr">[14,</ref><ref type="bibr">15]</ref>.</p><p>Huang and colleagues showed that a mathematical model taking wearable activity data can predict the DLMO in normal free-living conditions <ref type="bibr">[20]</ref>. Moreover, a statistical framework has been recently proposed to extract the circadian rhythm in HR that originates in the sinoatrial node of the heart <ref type="bibr">[14]</ref>. This method has been tested against HR data from a constant-routine protocol, and HR phase estimates from this method display different dynamics than sleep or activityderived timings. The HR phase estimates generally aligned with DLMO predictions during normally entrained scenarios, but became desynchronized during social distancing <ref type="bibr">[22]</ref>. Together, these findings suggest an ability to capture endogenous circadian signals from algorithms applied to wearable data. Considering this, we will consistently employ the term 'circadian' in the rest of the paper to refer to the 24 h rhythm signals extracted using filtering frameworks. Despite this progress, there are still apparent challenges. Specifically, it is challenging to use simple and efficient methods such as least-squares methods (LSMs) for the estimation of circadian parameters because the necessary assumption that the noise process is independent Gaussian does not hold in physiological time-series data. Indeed, external and internal factors lead to autoregressive noise processes in BT and HR <ref type="bibr">[14,</ref><ref type="bibr">15]</ref>. Due to this, previously proposed methods are based on a more computationally expensive Bayesian inference framework with Markov chain Monte Carlo (MCMC) <ref type="bibr">[14,</ref><ref type="bibr">15]</ref>. As a result, these methods cannot perform circadian assessment solely by the computing power of consumer-grade wearables. Thus, time-consuming intermediate steps are required, such as the anonymous transmission of wearable data to secure computer clusters. Moreover, the identification of a suitable model to analyse wearable data remains to be studied. While it has been found that the two-harmonic-regression model is a reasonable choice to extract circadian information from BT data measured in a constant routine protocol <ref type="bibr">[15]</ref>, the suitability of this model for wearable data needs to be explored. For this, a systematic comparison of the goodness-of-fit measures of candidate harmonic models applied to large-scale wearable datasets is required, which is impractical with previous computationally demanding methods <ref type="bibr">[14,</ref><ref type="bibr">15]</ref>.</p><p>In this study, we developed an efficient method to extract physiological parameters from wearable data. It transforms a harmonic-regression model with correlated noise into that with independent Gaussian noise under the assumption that the measurement interval is sufficiently small. This allows us to use LSMs to efficiently estimate the circadian parameters and their uncertainty. We showed that our method is reasonably accurate and computationally much more efficient than the previous methods <ref type="bibr">[14,</ref><ref type="bibr">15]</ref> by testing it on in silico BT and HR data. Using our method, we also found that the time of the circadian minimum, referred to as the circadian phase in previous studies <ref type="bibr">[14,</ref><ref type="bibr">15]</ref>, can be more accurately estimated with a single harmonic model than with a multiple harmonic model having more degrees of freedom. We next applied our method to real-world BT and HR data: &#8764; 600 days of BT data and 184 000 days of HR data, revealing the inter-and intra-individual differences in real-world dynamics of circadian rhythms. Finally, we combined this method with a Kalman filter (KF) framework <ref type="bibr">[23]</ref>, which enables efficient real-world tracking of the state of the molecular clocks in tissues. The computational gains, systematic model testing, and real-world applicability of this work set the stage for personalized digital medicine with wearable devices.</p><p>2. Methods 2.1. Body temperature parameter estimation from wearable data 2.1.1. A harmonic-regression model of the human body temperature rhythm</p><p>The human BT oscillates with &#8764; 24 h periodicity <ref type="bibr">[24]</ref>. This circadian oscillation has been analysed with Fourier series representations (i.e. harmonic-regression models) <ref type="bibr">[15,</ref><ref type="bibr">16,</ref><ref type="bibr">[25]</ref><ref type="bibr">[26]</ref><ref type="bibr">[27]</ref>. Specifically, Brown and Czeisler identified that the first-order autoregressive noise process needs to be incorporated into the harmonic models to successfully analyse the BT <ref type="bibr">[15]</ref>. Following this previous study, we adopted a harmonic-regression-plusfirst-order-autoregressive model (equation (2.1)) to analyse our wearable BT data collected from hospital cancer patients who are unable to perform an excessive physiological activity that may affect the BT (electronic supplementary material).</p><p>where</p><p>and it is assumed that the circadian period &#964; = 24 h, |&#945;| &lt; 1, and the e t values are distributed as Gaussian random variables with mean zero and variance s 2 e . The autoregressive noise process describes the ongoing effects of external factors on the BT. The Gaussian noise e t represents new external influences, for example, from stress, hormones and measurement error. The autocorrelation factor &#945; represents the ongoing contribution of external factors.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1.2.">Approximation-based linear least-squares method to estimate the body temperature model parameters</head><p>To efficiently estimate the parameters of the BT model (equation (2.1)), we propose an approximation-based linear LSM. We first reformulate and approximate equation (2.1) as follows:</p><p>e t : &#240;2:2&#222; The second equality in equation (2.2) holds as v t is a first-order autoregressive noise process (equation (2.1)). In the fourth line in equation (2.2), the assumption (s t &#8776; s t-&#916;t ) is used, which is reasonable if the measurement interval &#916;t is small. Typically, &#916;t is sufficiently small because wearable devices continuously collect physiological signals with high-frequency resolution (e.g. less than 6 min interval) [8,14,16]. Because the approximated equation (equation (2.2)) only includes independent Gaussian noise, we can exploit the standard linear LSM [28,29] with the approximated equation to estimate the parameters from BT data. Specifically, let y = (y &#916;t , y 2&#916;t , &#8230;, y t-&#916;t , y t ) 0 , u &#188; &#240;m, &#227;1 , b1 , . . . , &#227;n , bn , a&#222; 0 and e &#188; &#240;e Dt , e 2Dt , . . . , e t&#192;Dt , e t &#222; 0 where m &#188; &#240;1 &#192; a&#222; &#193; m, &#227;r &#188; &#240;1 &#192; a&#222; &#193; a r , and br &#188; &#240;1 &#192; a&#222; &#193; b r . Then, equation (2.2) can be rewritten in matrix notation as y &#188; Xu &#254; e, &#240;2:3&#222; where X &#188; 1 cos 2pDt t &#192; &#193; sin 2pDt t &#192; &#193; &#193; &#193; &#193; cos 2pnDt t &#192; &#193; sin 2pnDt t &#192; &#193; y 0 . . . . . . . . . . . . . . . . . . . . . 1 cos 2pt t &#192; &#193; sin 2pt t &#192; &#193; &#193; &#193; &#193; cos 2pnt t &#192; &#193; sin 2pnt t &#192; &#193; y t&#192;Dt 2 6 6 4 3 7 7 5 : By applying the linear LSM to equation (2.3), we can derive the probability density function for &#251; that minimizes | |y -X&#952;| | given y and X, where | | &#8226; | | denotes the 2-norm (equation (2.4)).</p><p>&#251; N&#240;&#240;X 0 &#193; X&#222; &#192;1 &#193; X 0 &#193; y, &#240;X 0 &#193; X&#222; &#192;1 &#193; h 2 &#222;, &#240;2:4&#222;</p><p>where</p><p>and dim&#240;&#193;&#222; represents the dimension of a vector. Then, we can compute the probability density of parameters &#956;, a r , b r and &#945; from the distribution of &#251; (equation (2.4)) using the equations m r &#188; mr =&#240;1 &#192; a&#222;, a r &#188; &#227;r =&#240;1 &#192; a&#222; and b r &#188; br =&#240;1 &#192; a&#222;. From these, we can compute the mean and uncertainty estimates of the phase and amplitude of the signal s t (electronic supplementary material).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2.">Heart rate parameter estimation from wearable data 2.2.1. A harmonic-regression model of the human heart rate rhythm</head><p>The human HR shows a circadian variation <ref type="bibr">[17]</ref>. This HR circadian signal has also been successfully analysed with a harmonicregression-plus-first-order-autoregressive model <ref type="bibr">[14,</ref><ref type="bibr">22,</ref><ref type="bibr">30]</ref>, as in the analysis of the BT rhythm. One difference between the HR model and the BT model is that the HR model contains a term describing the increase in HR by activity, specified as follows:</p><p>where a t is the activity level (i.e. step count) at time t and d is the increase in HR per step (HRpS).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2.2.">Approximation-based nonlinear least-squares method to estimate the heart rate model parameters</head><p>We next describe the nonlinear version of the approximationbased LSM (ALSM) to efficiently estimate the HR model parameters. Like the linear version, we first reformulate and approximate equation (2.5) as follows:</p><p>&#240;2:6&#222;</p><p>Due to the reformulation and approximation (equation (2.6)), the noise process is converted from autoregressive noise to independent Gaussian noise. Thus, we can now calculate the mean estimate of u &#188; &#240;m, &#227;1 , . . . , &#227;n , b1 , . . . , bn , d, a&#222; 0 , denoted by u, and its uncertainty (i.e. the covariance matrix S u ) by using any LSMs for nonlinear squares fitting problems. In this study, we used the Levenberg-Marquardt algorithm (see electronic supplementary material and <ref type="bibr">[31]</ref>).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Results</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1.">Extraction of physiological parameters from wearable data</head><p>To check the accuracy and precision of the ALSM, we first tested it on in silico wearable data. Specifically, we generated in silico BT and HR data by simulating the previously proposed BT and HR models <ref type="bibr">[14,</ref><ref type="bibr">15]</ref> (see electronic supplementary material, table <ref type="table">S1</ref>). Then, the generated BT and HR data were analysed by the ALSM, which extracted the underlying circadian rhythms in the data and the effect of activity on HR (figure <ref type="figure">1b</ref> and electronic supplementary material, figure <ref type="figure">S1</ref>).</p><p>As a result, a linear version of ALSM can estimate the probability distributions of four BT parameters: mesor, half the range of the fitted oscillatory signal (i.e. amplitude), time of BT minimum (i.e. phase), and autocorrelation strength describing the effect of confounding factors (e.g. stress) on BT (figure <ref type="figure">1c</ref>, see Methods). A nonlinear version of ALSM can estimate the probability distributions of five HR parameters: mesor, amplitude, phase, autocorrelation strength and the increase in HRpS (figure <ref type="figure">1d</ref>, see Methods). Note that the presence of red fuzz at the far right edge of the centre in figure <ref type="figure">1d</ref> does not indicate that the phase estimate samples significantly differ from the true phase. This is because the phase estimates are cyclic quantities measured in units of time of day. Importantly, the estimation of BT and HR parameters remained reasonably successful even when the measurement interval was extended to 6 min, which exceeds the typical sampling interval of wearables (figure <ref type="figure">1e</ref>,<ref type="figure">f</ref> ). Even with further extension of the measurement interval, the successful estimation of BT parameters persisted (electronic supplementary material, figure <ref type="figure">S2A</ref>). However, the accuracy of estimating the HR phase and amplitude decreased rapidly (electronic supplementary material, figure <ref type="figure">S2B</ref>). To understand the differential effects of increasing the measurement interval on the estimation accuracy of our method for HR data compared with BT data, we examined the relationship between the error resulting from the approximation (s t &#8776; s t-&#916;t ) and both the measurement interval and the model parameters (electronic supplementary material). We found that the upper limit of the error is governed by ffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi</p><p>where &#916;t is the measurement interval and a r and b r denote the harmonic coefficients. This suggests that as the amplitude of the rhythmic signal increases, the resulting approximation error also increases. This explains why the impact of increasing the measurement interval on estimation accuracy was more significant in HR data compared with BT data: since the amplitude of the HR rhythm was greater than that of the BT rhythm, the possible approximation error was larger in HR data compared with BT data (electronic supplementary material, figure <ref type="figure">S2C</ref>). Therefore, with an increase in the measurement interval, the estimation accuracy in HR data deteriorated at a faster rate compared with BT data.</p><p>Previous experimental studies showed that cardiac rhythmicity is regulated differently during sleep <ref type="bibr">[19]</ref>. Thus, the previous algorithm to extract physiological parameters from wearable HR data does not use the data collected during sleep <ref type="bibr">[14,</ref><ref type="bibr">22,</ref><ref type="bibr">30]</ref>. Specifically, the model is fitted to 2-day intervals centred at the sleep episode in between. We checked whether the ALSM is still accurate when the data of 2-day intervals except for the data in the sleep period are only given for estimation, as in the previous studies <ref type="bibr">[14,</ref><ref type="bibr">22,</ref><ref type="bibr">30]</ref>. Indeed, the HR estimates obtained with the ALSM using the 2-day data collected during the wake period were accurate (figure <ref type="figure">2a</ref>,<ref type="figure">b</ref>). In particular, even when the measurement interval was increased to 6 min, the estimates of the ALSM were still accurate and precise (figure <ref type="figure">2c</ref>). This indicates that our method can be used to explore real-world dynamics of the circadian rhythm from the wearable measurements in the same way as the previous method <ref type="bibr">[14]</ref>.</p><p>royalsocietypublishing.org/journal/rsif J. R. Soc. Interface 20: 20230030</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2.">Efficient tracking of the circadian heart rate phase from wearable data</head><p>Our algorithm can identify the underlying circadian rhythms hidden in the influence of confounding factors (e.g. activity) and noise (figures 1 and 2a-c). This provides an opportunity for tracking circadian rhythms in a consecutive manner. We tested this possibility by applying our algorithm to in silico data mimicking typical human lifestyles. First, we simulated a regular real-world lifestyle of humans for 60 days. The HR and activity were simulated as described in electronic supplementary material, except that randomness was introduced into sleep offset and onset time. Specifically, the sleep offset time t off i and onset time t on i of the day i were defined to be t off </p><p>t &#222; where &#963; t denotes the randomness of sleep onset and offset times (electronic supplementary material, Table <ref type="table">S1</ref>). The double-plotted actograms generated by the activity data are shown in figure <ref type="figure">2d</ref>, with the true timing of the HR minimum set as 3.00. Indeed, the true HR phase was successfully tracked by the ALSM despite the additional randomness in activity data (figure <ref type="figure">2d</ref>). More importantly, when the activity pattern is suddenly delayed or advanced, resulting in the misalignment between the activity and the HR observed in the previous study <ref type="bibr">[14]</ref>, the ALSM can successfully track the change of the HR Here, the single harmonic function was used as the HR model as done in the previous study <ref type="bibr">[14]</ref>. The box-and-whisker plots were obtained as in figure <ref type="figure">1f</ref>. (d,e) Double-plotted actograms for virtual subjects generated from in silico activity data. The mean and standard deviation of the HR phase estimates are represented as a red line and range, respectively, with daily activity patterns (black). The ALSM can track the HR phase when the subject is under a constant routine (d ). Moreover, even if the subject has a shift-work lifestyle resulting in the misalignment between the HR and the activity, the HR phase can be estimated (e). ( f ) The ALSM is more computationally efficient than the recently proposed Bayesian MCMC method <ref type="bibr">[14]</ref>. The averaged computational time was obtained by applying the two methods to the data 10 times.</p><p>phase (figure <ref type="figure">2e</ref>). This indicates that our method can be used for studying real-world dynamics of the circadian rhythm in HR. The method recently proposed by Bowman and colleagues <ref type="bibr">[14]</ref> can also track the HR circadian rhythm. To demonstrate the benefit of the ALSM compared with the previous method, we compared their computational cost. Remarkably, our method was &#8764; 300-fold faster than the previous method (figure <ref type="figure">2f</ref> ). For instance, to analyse data collected for 100 days, the previous method needed &#8764; 13 min, while our method needed &#8764; 2 s. Such a large improvement in computational efficiency is mainly because our method computes parameter estimates in a deterministic manner while the previous one is based on the Bayesian MCMC framework. Note that we only collected 500 posterior samples using the MCMC when calculating the computational time of the previous method. If more posterior samples need to be collected to improve estimation accuracy, the previous method might become more computationally intractable. Considering this, it is not suitable for large-scale epidemiological studies. In this circumstance, our method can be a promising alternative.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3.">The circadian phase can be extracted from</head><p>wearable data more accurately with a single-harmonic model than with a multiple-harmonic model</p><p>To accurately estimate the circadian phase from wearable data with our method, a suitable harmonic curve-fitting model needs to be adopted. To identify the model, we compared the performance of our method with harmonic-regression models having a different number of harmonics. Specifically, we first generated in silico HR data as in figure <ref type="figure">2a</ref>, except that the 12 h rhythm was introduced using a two-harmonic model (see electronic supplementary material and table S1 for details). Then, we extracted the time of minimum of the 24 h rhythm (i.e. circadian phase in HR) from the data using our method with either a single harmonic or two harmonics (figure <ref type="figure">3a</ref>). Interestingly, the phase estimated with the single harmonic matched the true phase more closely than that with the two harmonics, even though the fitted data were generated with the two harmonics. We further compared the performance in the presence of gaps and random data loss, which typically occur in real-world wearable data. Specifically, we generated 10 3 versions of in silico HR data having random circadian phase values drawn from a uniform distribution between 0 and 24 h with multiple-harmonic models (figure <ref type="figure">3b</ref>,<ref type="figure">c</ref>). We then introduced two varieties of missing data: (i) a gap of 8 h starting at a random point in the data, repeated for each 24 h period and (ii) random data loss with probability 5%. These two sources combined to simulate missing data due to device charging (e.g. during sleep) or collection errors. The generated data were fitted using our method with either a single-harmonic model or a multiple-harmonic model (figure <ref type="figure">3b</ref>,<ref type="figure">c</ref>). This showed that the single-harmonic model only considering 24 h rhythms outperformed the multiple-harmonic models overall, although the number of harmonics mismatched that in the models used to generate the fitted data.</p><p>In figure <ref type="figure">3d</ref>,e, we quantified the differences between the true phase and the estimate. If the number of harmonics used to generate the data matched that used for estimation, the most accurate estimation of the circadian phase in HR occurred when the number of harmonics (n) was equal to 1 (average error (AE) = 0.671), followed by n = 2 (AE = 1.212) and n = 3 (AE = 2.376) (figure <ref type="figure">3d</ref>). Even if there was a mismatch between the number of harmonics in the data and the number of harmonics in the model, the single (n = 1) harmonic was still the best model to estimate the circadian phase (figure <ref type="figure">3e</ref>,<ref type="figure">f</ref> ) as illustrated in figure <ref type="figure">3b</ref>,<ref type="figure">c</ref>. Specifically, the combination of n = 2 harmonic data and n = 1 harmonic model yielded more accurate predictions than the n = 2 harmonic model and data (AE &#188; 1:012 versus 1:212, figure <ref type="figure">3e</ref>). Similarly, more accurate phase estimation occurred with the n = 3 harmonic data and n = 1 harmonic model than with the n = 3 harmonic model and data (AE &#188; 1:063 versus 2:376, figure <ref type="figure">3f</ref> ). Even when the measurement interval was increased and the length of the gap varies, the singleharmonic model overall outperformed the multiple-harmonic models (electronic supplementary material, table <ref type="table">S2</ref>). Taken together, the single-harmonic model was a suitable choice to estimate the circadian phase in HR even in the presence of multiple harmonic components (i.e. ultradian rhythms) in given wearable data.</p><p>Interactions between the amount of data, the measurement interval, and the harmonic order also impacted the estimation of other parameters than circadian phase. Importantly, our method captured the basal HR, increase in HR due to one step, and autocorrelated noise parameters with high accuracy when applied to in silico data generated while varying the gap length between 4, 6 and 8 h, and varying the measurement interval between 1, 2, 4 and 6 min (electronic supplementary material, table <ref type="table">S3</ref>). The amplitude parameter was captured less accurately overall, and was particularly overestimated for higher numbers of harmonics in the presence of large gaps. This is probably due to the higher-order harmonic terms in the model no longer being independent from the 24 h component due to missing data, and this further supports the performance of the single harmonic mode in capturing parameters in these settings.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.4.">Extraction of circadian physiological parameters from body temperature data</head><p>We now tested our method on the axillary temperature measurements previously collected using a FDA-approved smart wearable thermometer (TempTraq) <ref type="bibr">[16]</ref>. Seventy-two hospital patients with cancer who received chimeric antigen receptor T-cell or haematopoietic cell transplant wore a wearable axillary skin patch to monitor BT every 2 min (see electronic supplementary material). This allowed for the collection of 598 days of densely sampled wearable BT data under non-fever conditions, which provides an opportunity to study the BT dynamics of cancer patients in real-world settings.</p><p>We first analysed the high-frequency BT measurements with the ALSM by varying the number of harmonics from one to three (figure <ref type="figure">4a</ref>). Then, we considered the following four widely used goodness-of-fit statistics: the root-meansquare error (RMSE), the coefficient of determination denoted by R 2 , the Akaike information criterion (AIC), and the Bayesian information criterion (BIC) (see electronic supplementary material, <ref type="bibr">[15,</ref><ref type="bibr">28,</ref><ref type="bibr">32]</ref>). Of all the models we considered, the zero-order harmonic that does not consider oscillatory variations in BT described the BT data least well. Specifically, RMSE, AIC and BIC decreased, and R 2 increased when the BT rhythmicity was considered in the parameter estimation (i.e. when the number of harmonics, n &gt; 0) (figure <ref type="figure">4b-e</ref> and <ref type="figure">table 1</ref>). Taking this into account, oscillatory models are appropriate to describe the key BT wearable data features.</p><p>We found that increasing the number of harmonics can improve goodness-of-fit (figure <ref type="figure">4a-e</ref> and <ref type="figure">table 1</ref>). However, when increasing n = 2 to 3, there were no remarkable improvements in graphical goodness-of-fit (figure <ref type="figure">4a</ref>) and the statistics (figure <ref type="figure">4b-e</ref>). This suggests that the twoharmonic model with the autoregressive noise process is a reasonable model for extracting hidden physiological parameters from the wearable BT data. Interestingly, our results were consistent with the model selection findings with BT data, which are typically measured with a rectal thermistor in a constant routine protocol that reduces the effects of external factors and makes endogenous circadian signals more easily observable <ref type="bibr">[15]</ref>. Specifically, Brown and Czeisler found that the three-harmonic model with the first-order autoregressive noise process is the best statistical model to describe constant-routine core BT data in terms of the goodness-of-fit measures. However, they also showed no significant improvements in fitting results between the two and three harmonics, resulting in their conclusion that the twoharmonic model is reasonable. Recently, the chest surface body temperature measured by wearables and the core temperature recorded using electronic ingestible pills with radio-frequency transmissions were scrutinized using spectral analysis. This showed that both the chest BT data and core BT data exhibit a dominant period of 24 or 12 h <ref type="bibr">[27]</ref>, which provides additional support to our results.</p><p>We next analysed the fitted BT parameter values from 598 days by varying the number of harmonics (figure <ref type="figure">4f-i</ref>). The mesor estimates did not change when increasing the number of harmonics (figure <ref type="figure">4f</ref> and table <ref type="table">1</ref>). The mesor estimates fell between 34 C and 37 C, which closely matched the normal range of the temperature of the skin surface of the trunk (33:5 C&#192;36:9 C) reported in experimental literature <ref type="bibr">[33,</ref><ref type="bibr">34]</ref>. The estimates of amplitude defined to be half the range of the oscillatory signal increased when increasing the number of harmonics (figure <ref type="figure">4g</ref> and table <ref type="table">1</ref>). It is noteworthy that our amplitude estimate obtained with the reasonable two-harmonic model (0:896 C) was consistent with the previously reported one (0:88 C) obtained by fitting the two harmonics to the BT data collected using a wearable chest patch (Movisens, Karlsruhe, Germany) <ref type="bibr">[27]</ref>. Moreover, the amplitude estimates of 24 h rhythm (i.e. circadian amplitude) calculated from the estimates of the first-order harmonic coefficients were 0:6 C regardless of the number of harmonics used for estimation (electronic</p><p>38.0 35.0 0 1 2 36.5 (b) (a) 24 3 -3 0 RMSE (&#186;C) R 2 the number of harmonics ( f ) BIC temp. (&#186;C) 0.8 0 0.4 mesor (&#186;C) 32 36 40 amp. (&#186;C) 0 1 . 5 3 . 0 density 2 0 1 phase (h) 0 12 24 0.12 0 0.06 autocorr. strength 0.6 0.8 1.0 20 0 10 0 2 1 3 the number of harmonics 0 1 2 clock time (h) 24 0 12 24 0 12 24 &#215;10 3 3 -3 0 AIC &#215;10 3 -1 1 0 0 1 2 3 0 2 1 0 1 2 3 0 1 2 3 0 1 2 3 (c) (g) (d) (h) (e) (i) 0 2 1 3 the number of harmonics and BIC (e) that were computed for 598 days of wearable BT data by varying the number of harmonics used for estimation. ( f-i) Smooth kernel histograms for the probability density function of the mean estimates of mesor ( f ), amplitude (g), phase (h) and autocorrelation strength (i) for 598 days of the BT data. See table <ref type="table">1</ref> for the mean and the standard deviation of the estimates.</p><p>Table <ref type="table">1</ref>. Goodness-of-fit measures for the harmonic-regression models of BT and the estimated parameters. Here, we analysed the high-frequency BT data collected using a wearable sensor in <ref type="bibr">[16]</ref>. The mean of either the measures or the estimates, and their standard deviation (s.d.) are represented in the form of 'mean &#177; s.d.' in the table. The uncertainty estimate denotes the standard deviation of the estimated probability density of the parameters.</p><p>The number of harmonics, n n= 0 n = 1 n = 2 n = 3 goodness of fit measures RMSE 0.811 &#177; 0.320 0.692 &#177; 0.261 0.647 &#177; 0.245 0.641 &#177; 0.234 R 2 -0.003 &#177; 0.012 0.241 &#177; 0.175 0.329 &#177; 0.182 0.389 &#177; 0.184 AIC -410.40 &#177; 590.21 -628.80 &#177; 590.29 -723.85 &#177; 590.56 -797.12 &#177; 595.11 BIC -411.38 &#177; 590.21 -629.76 &#177; 590.29 -724.80 &#177; 590.56 -798.06 &#177; 595.12 mean estimate mesor ( C) 35.983 &#177; 0.639 35.985 &#177; 0.636 35.985 &#177; 0.636 35.985 &#177; 0.636 amp. ( C) 0.646 &#177; 0.373 0.896 &#177; 0.449 1.068 &#177; 0.504 phase (h) 10.183 &#177; 4.179 10.256 &#177; 4.174 10.162 &#177; 4.234 autocorr. strength 0.940 &#177; 0.059 0.921 &#177; 0.066 0.909 &#177; 0.071 0.899 &#177; 0.076 uncertainty estimate mesor ( C) 0.240 &#177; 0.142 0.168 &#177; 0.092 0.142 &#177; 0.078 0.124 &#177; 0.067 amp. ( C) 0.218 &#177; 0.118 0.228 &#177; 0.129 0.230 &#177; 0.134 phase (h) 2.150 &#177; 1.406 2.575 &#177; 1.836 2.498 &#177; 1.743 autocorr. strength 0.012 &#177; 0.007 0.014 &#177; 0.007 0.015 &#177; 0.008 0.016 &#177; 0.008 supplementary material, table <ref type="table">S4</ref>), which closely matched the previously reported value (approx. 0:5 C) obtained using the BT data measured in controlled laboratory settings <ref type="bibr">[18,</ref><ref type="bibr">35]</ref>. All possible estimates of phase defined to be the time of skin BT minimum were observed (figure <ref type="figure">4h</ref>) because we studied a population of cancer patients typically having disrupted BT rhythms <ref type="bibr">[2,</ref><ref type="bibr">36]</ref>. The population mean phase in skin BT was &#8764; 10.00 even when varying the number of harmonics (figure 4h and table <ref type="table">1</ref>), which was consistent with that reported in the previous studies <ref type="bibr">[37,</ref><ref type="bibr">38]</ref>. The estimates of autocorrelation strength were greater than or equal to &#8764; 0.9, although they slightly decreased when increasing the number of harmonics (figure <ref type="figure">4i</ref> and table <ref type="table">1</ref>). This indicates that a correlated-noise structure needs to be considered to accurately describe non-circadian fluctuations in wearable BT data, resulting in reliable extraction of circadian physiology. The average of the autocorrelation strength estimates with the two harmonics was 0.909, leading to a correlation time of &#8764; 1 h. This value was nearly identical to the previously reported estimate (0.897) obtained using constant-routine core BT data <ref type="bibr">[15]</ref>. Taken together, most of the circadian and non-circadian parameters extracted from wearable BT data using our method matched the parameters measured in controlled laboratory conditions. Our algorithm outputs both mean estimates and error estimates that describe the statistical uncertainty in the estimates. Specifically, the standard deviation of the probability density associated with the parameters, denoted by the 'uncertainty estimate' below, can be computed (table 1; electronic supplementary material, figure <ref type="figure">S3</ref> and table <ref type="table">S4</ref>). The uncertainty estimates typically act as a measure for the reliability of the parameter estimates and a surrogate measure for the strength of physiological signals (e.g. the BT circadian rhythm). That is, a low uncertainty can be interpreted as corresponding to reliable parameter estimation and a strong physiological signal inherent to the given measurements. In general, the uncertainty estimates were fairly small (table 1; electronic supplementary material, figure <ref type="figure">S3</ref>), suggesting that our method can reliably extract circadian rhythms from wearable data. Importantly, the uncertainty estimate of the phase increased when increasing the number of harmonics (table 1; electronic supplementary material, figure <ref type="figure">S3</ref>). This indicates that the single-harmonic model is more reliable than the multiple-harmonic models in phase extraction. We also found that the population mean of 2.5th percentiles of the amplitude estimates of 24 h rhythm, 12 h rhythm and 8 h rhythm were greater than zero ( p-value &lt; 10 -3 , T-test) (electronic supplementary material, table <ref type="table">S4</ref>). This indicates that the multiple-harmonic models might be needed to extract all the key physiological information from wearable BT data, matching the previous studies <ref type="bibr">[15,</ref><ref type="bibr">27]</ref>, while the single harmonic is sometimes enough or more appropriate to identify some parameters, such as the mesor (figure <ref type="figure">4f</ref> ) and the time of BT minimum (figure <ref type="figure">4h</ref> and table 1; electronic supplementary material, figure <ref type="figure">S3</ref>).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.5.">Estimation of real-world dynamics of the circadian rhythm in heart rate</head><p>We next analysed 183 613 days of real-world HR data that were anonymously collected from 1729 subjects by the 'Social Rhythms' Android and iPhone Application (see electronic supplementary material, figure <ref type="figure">S4</ref>) <ref type="bibr">[14,</ref><ref type="bibr">22]</ref>. Specifically, we computed the goodness-of-fit statistics and the parameter estimates of the HR data as we did for the BT data (electronic supplementary material, figure <ref type="figure">S5</ref> and tables S5 and S6). Similar to the result of the BT study (figure 4a-e and table <ref type="table">1</ref>), the zero-order harmonic model described the HR data least well. However, there was no significant difference in the goodness-of-fit values between the models (electronic supplementary material, figure <ref type="figure">S5</ref> and table <ref type="table">S5</ref>). This modest improvement resulting from consideration of the HR rhythmicity is expected because HR is strongly affected by many non-rhythmic external factors (e.g. stress) <ref type="bibr">[39]</ref><ref type="bibr">[40]</ref><ref type="bibr">[41]</ref> and, compared with them, the intensity of rhythmic signals, for example, from the sinoatrial node of the heart may not be much stronger <ref type="bibr">[14]</ref>. We found that the estimates of mesor, phase (defined to be the time of HR minimum), HRpS, and autocorrelation strength did not change significantly when varying the number of harmonics (electronic supplementary material, figure <ref type="figure">S5</ref> and table <ref type="table">S5</ref>), and they are similar to the previously reported values <ref type="bibr">[14,</ref><ref type="bibr">42]</ref>. The estimates of amplitude increased within the previously reported range (3.96-12.60 bpm) <ref type="bibr">[14,</ref><ref type="bibr">42]</ref> when increasing the number of harmonics (electronic supplementary material, figure <ref type="figure">S5</ref> and table <ref type="table">S5</ref>), as we observed in the BT data (figure <ref type="figure">4</ref> and table <ref type="table">1</ref>). Moreover, the uncertainty estimates of the phase increased when increasing the number of harmonics (electronic supplementary material, table <ref type="table">S5</ref>), suggesting that the single-harmonic model is a suitable choice to reliably extract and analyse the phase.</p><p>Using the ALSM with the suitable single-harmonic HR model, we studied the dynamics of the circadian rhythm in HR in free-living conditions. Figure <ref type="figure">5</ref> shows the circadian HR phase, defined to be the circadian minimum of HR tracked over a period of greater than 30 days, for four individuals from our Social Rhythms Application dataset. When an individual has consistent daily routines (i.e. regular activity-rest rhythms), the HR phase tracked with sleep (figure <ref type="figure">5a</ref>). When the activity pattern of individuals suddenly shifts and thus circadian misalignment occurs, the HR phase gradually followed the shift, achieving realignment within 10 days (figure <ref type="figure">5b</ref>,<ref type="figure">c</ref>). Importantly, we found that there were large interindividual differences in the adjustment to new activity patterns. The HR phase can start to be adjusted to follow the shift in activity pattern without a time delay (figure <ref type="figure">5b</ref>,<ref type="figure">c</ref>) while it can also remain unchanged (electronic supplementary material, figures S6A and B). Such different patterns can be observed even in an individual (figure <ref type="figure">5d</ref>). The HR phase remained unchanged at first (figure 5d(i)) and then gradually followed the shift (figure 5d(ii)). These findings matched the previously reported cases obtained by analysing wearable data from &#8764; 1000 medical interns <ref type="bibr">[14]</ref>. Interestingly, when the activity pattern was advanced right after its delay, increased fluctuations appeared in the HR phase (figure 5d(iii)), showing the circadian disruption effects of chronic external perturbations (e.g. shift work) in realworld settings. Lastly, we sometimes observed a quick shift in the HR phase following a dramatic shift in activity pattern (e.g. around day 50 in figure <ref type="figure">5d</ref> and electronic supplementary material, figure <ref type="figure">S7A</ref>). These large uncertainties with the quick shifts indicate that accurate parameter estimation becomes challenging when individuals experience continuous external perturbations. This difficulty may arise because evoked components, triggered by external cues, continuously and strongly influence the rhythmic outputs of endogenous oscillators <ref type="bibr">[43]</ref>, and the influences may not be completely filtered by our method. In this case where oscillatory and evoked components are intricately intertwined, caution should be taken when interpreting the estimation outcomes (electronic supplementary material, figure <ref type="figure">S7B</ref>).</p><p>We found that the circadian rhythm in HR typically tracked with sleep (figure <ref type="figure">5a-d</ref>; electronic supplementary material, figures S6A and B), which cannot be explained by the effects of sleep on HR because all the data collected during sleep were excluded in the analysis as in figure <ref type="figure">2a</ref>. To further explore the relationship between the circadian rhythm in HR and sleep, we calculated the difference in hours between the estimated HR phase and the sleep midpoint computed using sleep data from wearable devices, denoted by the phase difference. For instance, a phase difference of 2 h means that HR is at its lowest 2 h after the midpoint of sleep. The HR phase closely matched the midpoint of sleep on average (&#956; = -0.382 h), which was consistent with previous work (&#956; = -0.45 h) <ref type="bibr">[30]</ref> (figure <ref type="figure">5e</ref>). The range of their differences we found (&#963; = 2.361 h) was also similar to the previously reported one (&#963; = 2.25 h) <ref type="bibr">[14]</ref>. Moreover, the distribution of average absolute difference that averages only the magnitude of the phase difference (&#956; = 3.374 h, &#963; = 1.655 h) closely matched that previously obtained from a different wearable dataset (&#956; = 3.88 h, &#963; = 1.56 h) <ref type="bibr">[14]</ref> (figure <ref type="figure">5f</ref> ). We found that the large range of the differences greater than 2 h is due to the inter-and intra-individual difference in the relationship between the HR phase and sleep (figure <ref type="figure">5b-d</ref>; electronic supplementary material, figures S6C and D). Our findings that are consistent with the previous results <ref type="bibr">[14,</ref><ref type="bibr">22]</ref> indicate that circadian assessment can be performed efficiently using our method.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.6.">Efficient estimation of the clock state</head><p>To fully use wearable data when estimating the state space of the molecular clocks in tissues, a data assimilation algorithm based on the KF technique has been recently developed <ref type="bibr">[23]</ref>. This integrates the prediction of the clock state simulated by the mathematical model taking wearable activity data as an input with its observation (i.e. the HR phase) (see electronic supplementary material and <ref type="bibr">[23]</ref>). It allows us to estimate the evolution of the posterior distributions of the clock phase over days (electronic supplementary material, figure <ref type="figure">S8</ref>). Although this algorithm outperforms the previous one solely based on the phase prediction, its computational cost is high because it extracts the HR phase using the previously developed Bayesian MCMC algorithm (figure <ref type="figure">2f</ref> ) <ref type="bibr">[14]</ref>. We addressed this problem by replacing the Bayesian MCMC method with the computationally efficient ALSM in the KF framework (figure <ref type="figure">6a</ref>). We tested the updated method on the in silico data, showing that the updated method can successfully estimate the circadian phase (electronic supplementary material, Fig. <ref type="figure">S8</ref>). We next applied it to real-world data collected from a subject showing a large variation in the HR phase (figure <ref type="figure">6c</ref>) to explore the benefits of the KF approach.</p><p>The KF framework with the ALSM allowed us to reduce the uncertainty of the estimate by extracting information from HR data and integrating it with the model prediction (figure <ref type="figure">6b-f</ref> ). This efficient method provides the possibility of direct analysis of wearable data in consumer-grade wearable devices without resource-intensive steps such as the anonymous transmission of data to secure computer clusters.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Conclusion</head><p>Here, we developed a method named ALSM that efficiently extracts physiological information from densely sampled wearable time-series data (figures 1-5). We tested it on over 590 days of BT data and 183 613 days of HR data collected in real-world settings. This allowed systematic comparison of harmonic-regression models, resulting in identifying the suitable models for wearable BT and HR data (figures 3 and 4; electronic supplementary material, figures S3 and S5, and table 1; electronic supplementary material, tables S2-S6). We also showed the usefulness of our method in the assessment of inter-and intra-individual differences in the HR clock (figure <ref type="figure">5</ref>) and circadian biomarker development (figure <ref type="figure">6</ref>).</p><p>Our work and other ongoing large population field studies such as PiCADo <ref type="bibr">[44]</ref>, inCASA <ref type="bibr">[45]</ref>, Intern Health Study <ref type="bibr">[46]</ref> and Social Rhythms <ref type="bibr">[14]</ref> will rapidly facilitate the validation of wearables.</p><p>The extraction of useful interpretable information about physiological processes from wearable data is a longstanding challenge. Approaches for this can be primarily classified into non-parametric and parametric classes. In the non-parametric analysis, wearable data are analysed with non-parametric statistics such as interdaily variability that quantifies the disruption of rhythms <ref type="bibr">[47]</ref>. Although new useful nonparametric variables continue to be developed, we are still far from the complete exploitation of wearable data because of challenges in uncertainty quantification of the variables, which is important for clinicians to make a better decision about patient's treatment <ref type="bibr">[48]</ref>. To compensate for such limitations, sophisticated parametric methods for wearable physical activity time-series data, such as hidden Markov modelling <ref type="bibr">[48]</ref>, have recently been proposed. Together with the frameworks for activity data, our Fourier-based method for wearable BT and HR data opens the possibility of increasing the clinical applicability of wearable data. In particular, our method can be used to identify disease-induced abnormal changes in BT and HR by integrating it with machinelearning techniques <ref type="bibr">[30]</ref>. The efficiency of our method makes it particularly suited for such integrations.</p><p>The HR model (equation (2.5)) directly accounts for the effects of activity on HR, and indirectly accounts for other Here, the analysed real-world wearable-device data were adopted from <ref type="bibr">[23]</ref>.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_0"><p>Downloaded from https://royalsocietypublishing.org/ on 26 November 2025</p></note>
		</body>
		</text>
</TEI>
