Skip to main content

Bayesian Inference Federated Learning for Heart Rate Prediction

  • Conference paper
  • First Online:

Abstract

The advances of sensing and computing technologies pave the way to develop novel applications and services for wearable devices. For example, wearable devices measure heart rate, which accurately reflects the intensity of physical exercise. Therefore, heart rate prediction from wearable devices benefits users with optimization of the training process. Conventionally, Cloud collects user data from wearable devices and conducts inference. However, this paradigm introduces significant privacy concerns. Federated learning is an emerging paradigm that enhances user privacy by remaining the majority of personal data on users’ devices. In this paper, we propose a statistically sound, Bayesian inference federated learning for heart rate prediction with autoregression with exogenous variable (ARX) model. The proposed privacy-preserving method achieves accurate and robust heart rate prediction. To validate our method, we conduct extensive experiments with real-world outdoor running exercise data collected from wearable devices.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

References

  1. Cardiovascular diseases. https://www.who.int/health-topics/cardiovascular-diseases/#tab=tab_1. Accessed 22 Aug 2020

  2. Hilmkil, A., Ivarsson, O., Johansson, M., Kuylenstierna, D., Erp, T.V.: Towards machine learning on data from professional cyclists. In: 12th World Congress on Performance Analysis of Sports, Opatija, Croatia (2018)

    Google Scholar 

  3. Ni, J.M., Muhlstein, L., McAuley, J.: Modeling heart rate and activity data for personalized fitness. In: WWW 2019, 13–17 May 2019, San Francisco, CA, USA (2019)

    Google Scholar 

  4. EU: Regulation (EU) 2016/679 of the European Parliament and of the Council of 27 April 2016 on the protection of natural persons with regard to the processing of personal data and on the free movement of such data, and repealing directive 95/46/EC (general data protection regulation). Off. J. Eur. Union L119, 1–88 (2016). http://eur-lex.europa.eu/legal-content/EN/TXT/?uri=OJ:L:2016:119:TOC

  5. Konečný, J., McMahan, H.B., Ramage, D., Richtárik, P.: Federated optimization: distributed machine learning for on-device intelligence. arXiv:1610.02527 (2016)

  6. Cheng, T.M., Savkin, A.V., Celler, B.G., Su, S.W., Wang, L.: Nonlinear modeling and control of human heart rate response during exercise with various work load intensities. IEEE Trans. Biomed. Eng. 55(11), 2499–2508 (2008)

    Article  Google Scholar 

  7. Su, S.W., Wang, L., Celler, B.G., Savkin, A.V., Guo, Y.: Identification and control for heart rate regulation during treadmill exercise. IEEE Trans. Biomed. Eng. 54(7), 1238–1246 (2007b)

    Article  Google Scholar 

  8. Mohammad, S., Guerra, T.M., Grobois, J.M., Hecquet, B.: Heart rate control during cycling exercise using Takagi-Sugeno models. In: 8th IFAC World Congress, Milano, Italy, pp. 12783–12788 (2011)

    Google Scholar 

  9. Ludwig, M., Hoffmann, K., Endler, S., Asteroth, A., Wiemeyer, J.: Measurement, prediction, and control of individual heart rate responses to exercise-basics and options for wearable devices. Front. Physiol. (2018). https://doi.org/10.3389/fphys.2018.00778

  10. Kairouz, P., et al.: Advances and open problems in federated learning. arXiv:1912.04977 (2019)

  11. Xu, D.L., et al.: Edge intelligence: architectures, challenges, and applications. arXiv:2003.12172 (2020)

  12. McMahan, B., Moore, E., Ramage, D., Hampson, S., Arcas, B.A.: Communication-efficient learning of deep networks from decentralized data. In: Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, pp. 1273–1282 (2017)

    Google Scholar 

  13. Smith, V., Chiang, C.K., Sanjabi, M., Talwalkar, A.S.: Federated multi-task learning. In: NIPS 2017, Long Beach, CA, USA, pp. 4424–4434 (2017)

    Google Scholar 

  14. Lian, X., Zhang, C., Zhang, H., Hsieh, C.J., Zhang, W., Liu, J.: Can decentralized algorithms outperform centralized algorithms? A case study for decentralized parallel stochastic gradient descent. In: Advances in Neural Information Processing Systems, vol. 30, pp. 5330–5340 (2017)

    Google Scholar 

  15. Dean, J., et al.: Large scale distributed deep networks. In: Advances in Neural Information Processing Systems, vol. 25, pp. 1223–1231 (2012)

    Google Scholar 

  16. Chen, Y., Qin, X., Wang, J., Yu, C., Gao, W.: FedHealth: a federated transfer learning framework for wearable healthcare. IEEE Intell. Syst. 35(4), 83–93 (2020)

    Article  Google Scholar 

  17. Yurochkin, M., Agarwal, M., Ghosh, S., Greenewald, K., Hoang, N., Khazaeni, Y.: Bayesian nonparametric federated learning of neural networks. In: PMLR, vol. 97, pp. 7252–7261 (2019)

    Google Scholar 

  18. Gelman, A., Carlin, J.B., Stern, H.S., Dunson, D.B., Vehtari, A., Rubin, D.B.: Bayesian Data Analysis. CRC Press, Boca Raton (2013)

    Book  Google Scholar 

  19. Wei, G.C., Tanner, M.A.: A Monte Carlo implementation of the EM algorithm and the poor man’s data augmentation algorithms. J. Am. Stat. Assoc. 85(411), 699–704 (1990)

    Article  Google Scholar 

  20. Minka, T.P.: Estimating a gamma distribution. Technical report, Microsoft Research, Cambridge, UK (2002)

    Google Scholar 

Download references

Acknowledgement

This work has been partially supported by the UK EPSRC under grant number EP/N007565/1, “Science of Sensor Systems Software”, and by Academy of Finland projects, grant number 325774, 3196669, 319670, 326305, and 325570.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Lei Fang .

Editor information

Editors and Affiliations

A EM Algorithm for Hyperparameter Estimation for Hierarchical Bayesian Regression Model

A EM Algorithm for Hyperparameter Estimation for Hierarchical Bayesian Regression Model

E step: The complete data log likelihood is

$$\begin{aligned} L(\varvec{\varPhi }_0)&=\log P (\{\varvec{\beta }_i, \sigma ^2_i\}_1^n, \{\mathcal {D}_i\}_i^n |\varvec{\varPhi }_0) \\&= \log ( P(\{\mathcal {D}_i\}_i^n |\{\varvec{\beta }_i, \sigma ^2_i\}_1^n, \varvec{\varPhi }_0) P(\{\varvec{\beta }_i, \sigma ^2_i\}_1^n| \varvec{\varPhi }_0)) \\&= \log \left( \prod _{i=1}^n \text {N}(\varvec{y}_i; \varvec{X}_i\varvec{\beta }_i, \sigma ^2_i\varvec{I})\text {NIG}\left( \{\varvec{\beta }_i, \sigma ^2_i\};\varvec{\varPhi }_0\right) \right) \\&= \sum _{i=1}^n \log \left( \text {NIG}\left( \{\varvec{\beta }_i, \sigma ^2_i\};\varvec{\varPhi }_0\right) \right) + C, \end{aligned}$$

where C contains all the terms that are independent of \(\varvec{\varPhi }_0\). The conditional expected complete data likelihood is:

$$\begin{aligned} Q(\varvec{\varPhi }_0|\varvec{\varPhi }_0^{t-1})&=E_{\{\varvec{\beta }_i, \sigma ^2_i\}_1^n|\varvec{\varPhi }_0^{t-1}, \{\mathcal {D}_i\}_i^n}[ L(\varvec{\varPhi }_0) ] \\&\approx \frac{1}{nL} \sum _{m=1}^{L} \sum _{i=1}^n \log (\text {NIG}(\{\varvec{\beta }_i, \sigma ^{2}_i\}^{(m)}; \varvec{\varPhi }_0) \end{aligned}$$

where \(\{\varvec{\beta }_i, \sigma ^{2}_i\}^{(m)}\) denotes the m-th i.i.d. sample from \(P(\varvec{\beta }_i, \sigma ^2_i|\mathcal {D}_i, \varvec{\varPhi }_0^{t-1})\), which are NIG distributed. Sampling from a NIG distribution is straightforward by a standard two step procedure by firstly sampling \(\sigma ^2\) from \(\text {Inv-Gamma}(a_i,b_i)\) then sampling from \(\varvec{\beta }\) from \(\text {N}(\varvec{m}_i, \sigma ^2\varvec{\varLambda }_i^{-1})\). Essentially, we are approximating the conditional expectation with a Monte Carlo estimator with L samples from the posterior \(P(\{\varvec{\beta }_i, \sigma ^2_i\}_1^n|\{\mathcal {D}_i\}_1^n, \varvec{\varPhi }_0^{t-1})\). The EM algorithm degenerates to a Monte Carlo Expectation Maximization (MCEM) [19].

M step: the objective here is to maximize the conditional expectation, namely

$$\begin{aligned} \varvec{\hat{\varPhi }}_0&= {\mathop {\hbox {argmax}}_{\varvec{\varPhi }_0}}\, Q(\varvec{\varPhi }_0|\varvec{\varPhi }_0^{t-1})\end{aligned}$$
(7)
$$\begin{aligned}&= {\mathop {\hbox {argmax}}_{\varvec{\varPhi }_0}}\, \frac{1}{nL} \sum _{m=1}^{L} \sum _{i=1}^n \log (\text {N}(\varvec{\beta }_i^{(m)}; \varvec{m}_0, \sigma ^{2(m)}_i \varvec{\varLambda }_0^{-1} )) + \log \left( \text {G}\left( \sigma ^{-2(m)}_i; a_0, b_0\right) \right) \end{aligned}$$
(8)

where we have used the property that if \(x\sim \text {Inv-Gamma}(a,b)\), then 1/x is Gamma distributed with shape and rate parameters ab, denoted as \(\text {G}(a,b)\). It is easy to see that the optimal \(\hat{a}_0 ,\hat{b}_0\) w.r.t Q are just the maximum likelihood estimator of a Gamma distribution with dataset \(\{\sigma ^{2(m)}_i\}_{i,m=1}^{n,L}\) (the second term of Eq. (8)). An iterative generalized Newton’s method can be used to find the ML estimator of Gamma as follows [20].

$$\begin{aligned} \frac{1}{a_0}&= \frac{1}{a_0} + \frac{\overline{\log \sigma ^{-2}} -\log (\overline{\sigma ^{-2}}) + \log a_0 - \varPsi (a_0)}{a_0^2 (1/a_0 - \varPsi '(a_0))}\end{aligned}$$
(9a)
$$\begin{aligned} b_0&= \frac{\overline{\sigma ^{-2}}}{a_0}, \end{aligned}$$
(9b)

where

$$\begin{aligned} \overline{\sigma ^{-2}} =\frac{\sum _{m=1}^{L} \sum _{i=1}^n 1/\sigma ^{2(m)}_i}{nL},\; \overline{\log \sigma ^{-2}} =\frac{\sum _{m=1}^{L} \sum _{i=1}^n \log (1/\sigma ^{2(m)}_i)}{nL}. \end{aligned}$$

Take the derivative of the Gaussian term in Eq. (8) w.r.t \(\varvec{m}_0, \varvec{\varLambda }_0\) and set them to zero, we can find the estimators for \(\varvec{m}_0, \varvec{\varLambda }_0\):

$$\begin{aligned} \varvec{m}_0&= \frac{\sum _{m=1}^{L} \sum _{i=1}^n \frac{1}{\sigma ^{2(m)}_i} \varvec{\beta }_i^{(m)}}{\sum _{m=1}^{L} \sum _{i=1}^n \frac{1}{\sigma ^{2(m)}_i}} \end{aligned}$$
(9c)
$$\begin{aligned} \varvec{\varLambda }_0^{-1}&= \frac{1}{nL} \sum _{m=1}^{L} \sum _{i=1}^n \frac{1}{\sigma ^{2(m)}_i}(\varvec{\beta }_i^{(m)}-\varvec{m}_0)(\varvec{\beta }_i^{(m)}-\varvec{m}_0)^{T} \end{aligned}$$
(9d)

Rights and permissions

Reprints and permissions

Copyright information

© 2021 ICST Institute for Computer Sciences, Social Informatics and Telecommunications Engineering

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Fang, L. et al. (2021). Bayesian Inference Federated Learning for Heart Rate Prediction. In: Ye, J., O'Grady, M.J., Civitarese, G., Yordanova, K. (eds) Wireless Mobile Communication and Healthcare. MobiHealth 2020. Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering, vol 362. Springer, Cham. https://doi.org/10.1007/978-3-030-70569-5_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-70569-5_8

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-70568-8

  • Online ISBN: 978-3-030-70569-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics