# FedHealth: A Federated Transfer Learning Framework for Wearable Healthcare

Yiqiang Chen1,2,3111Corresponding Author Jindong Wang4 Chaohui Yu1,2 Wen
Gao${}^{{}^{3}}$ Xin Qin1,2
1Beijing Key Lab. of Mobile Computing and Pervasive Devices, Inst. of
Computing Tech., CAS
2University of Chinese Academy of Sciences, Beijing, China
3Pengcheng Laboratory, Shenzhen, China
4Microsoft Research Asia, Beijing, China<EMAIL_ADDRESS><EMAIL_ADDRESS>
###### Abstract

With the rapid development of computing technology, wearable devices such as
smart phones and wristbands make it easy to get access to people’s health
information including activities, sleep, sports, etc. Smart healthcare
achieves great success by training machine learning models on large quantity
of user data. However, there are two critical challenges. Firstly, user data
often exists in the form of isolated islands, making it difficult to perform
aggregation without compromising privacy security. Secondly, the models
trained on the cloud fail on personalization. In this paper, we propose
FedHealth, the first federated transfer learning framework for wearable
healthcare to tackle these challenges. FedHealth performs data aggregation
through federated learning, and then builds personalized models by transfer
learning. It is able to achieve accurate and personalized healthcare without
compromising privacy and security. Experiments demonstrate that FedHealth
produces higher accuracy (5.3% improvement) for wearable activity recognition
when compared to traditional methods. FedHealth is general and extensible and
has the potential to be used in many healthcare applications.

##  1 Introduction

Activities of daily living (ADL) are highly related to people’s health.
Recently, the development of wearable technologies helps people to understand
their health status by tracking activities using wearable devices such as
smartphone, wristband, and smart glasses. Wearable healthcare has the
potential to provide early warnings to several cognitive diseases such as
Parkinson’s Chen et al. (2017, 2019) and small vessel diseases Chen et al.
(2018b). Other applications include mental health assessment Wang et al.
(2014), fall detection Wang et al. (2017b), and sports monitoring Wang et al.
(2019a). In fact, there is a growing trend for wearable healthcare over the
years Andreu-Perez et al. (2015); Hiremath et al. (2014).

In healthcare applications, machine learning models are often trained on
sufficient user data to track health status. Traditional machine learning
approaches such as Support Vector Machines (SVM), Decision Tree (DT), and
Hidden Markov Models (HMM) are adopted in many healthcare applications Ward et
al. (2016). The recent success of deep learning achieves satisfactory
performances by training on larger sizes of user data. Representative networks
include Convolutional Neural Networks (CNN), Recurrent Neural Networks (RNN),
and Autoencoders Wang et al. (2019a).

Figure 1: The data islanding and personalization problems in wearable
healthcare

Unfortunately, there are two critical challenges in today’s wearable
healthcare (Figure 1). First of all, in real life, data often exists in the
form of isolated islands. Although there are plenty of data in different
organizations, institutes, and subjects, it is not possible to share them due
to privacy and security concerns. In Figure 1, when the same user uses
different products from two companies, his data stored in two clouds cannot be
exchanged. This makes it hard to train powerful models using these valuable
data. Additionally, recently, China, the United States, and the European Union
enforced the protection of user data via different regularizations Inkster
(2018); Voigt and Von dem Bussche (2017). Hence, the acquisition of massive
user data is not possible in real applications.

The other important issue is personalization. Most of the methods are based on
a common server model for nearly all users. After acquiring sufficient user
data to train a satisfactory machine learning model, the model itself is then
distributed to all the user devices on which the daily health information can
be tracked. This process lacks personalization. As can be seen, different
users have different physical characteristics and daily activity patterns.
Therefore, the common model fails to perform personalized healthcare.

In this paper, we propose FedHealth, the first federated transfer learning
framework for wearable healthcare. FedHealth can solve both of the data
islanding and personalization problems. Through federated learning Yang et al.
(2019, 2018) and homomorphic encryption Rivest et al. (1978), FedHealth
aggregates the data from separate organizations to build powerful machine
learning models with the users’ privacy well preserved. After the cloud model
is built, FedHealth utilizes transfer learning Pan and Yang (2010) methods to
achieve personalized model learning for each organization. The framework can
incrementally update. FedHealth is extensible and can be deployed to many
healthcare applications to continuously enhance their learning abilities in
real life.

In summary, this paper makes the following contributions:

1\. We propose FedHealth, the first federated transfer learning framework for
wearable healthcare, which aggregates the data from different organizations
without compromising privacy security, and achieves personalized model
learning through knowledge transfer.

2\. We show the excellent performance achieved by FedHealth in smartphone
based human activity recognition. Experiments show that FedHealth dramatically
improves the recognition accuracy by 5.3% compared to traditional learning
approaches.

3\. FedHealth is extensible and can be the standard framework to many
healthcare applications. With the users’ privacy well preserved and good
performance achieved, it can be easily deployed to other healthcare
applications.

##  2 Related Work

In this section, we introduce the related work in three aspects: wearable
healthcare, federated machine learning, and transfer learning.

###  2.1 Wearable Healthcare

Certain activities in daily life reflect early signals of some cognitive
diseases Atkinson et al. (2007); Michalak et al. (2009). For instance, the
change of gait may result in small vessel disease or stroke. A lot of
researchers pay attention to monitor users’ activities using body-worn sensors
Voigt and Von dem Bussche (2017), through which daily activities and sports
activities can be recognized. With the development of wearable technology,
smartphone, wristbands, and smart glasses provide easy access to this
information. Many endeavors have been made Wang et al. (2014); Albinali et al.
(2010); Wang et al. (2017b). Other than activities, physiological signals can
also help to detect certain diseases. EEG (electroencephalography) is used to
detect seizures Menshawy et al. (2015); Hiremath et al. (2014). Authors can
also use RGB-D cameras to detect users’ activities Lei et al. (2012); Rashidi
and Cook (2010). For a complete survey on sensors based activity recognition
and healthcare, interested readers are recommended to refer to Wang et al.
(2019a).

It is noteworthy that traditional healthcare applications often build the
model by aggregating all the user data. However, in real applications, data
are often separate and cannot be easily shared due to privacy issues Inkster
(2018); Voigt and Von dem Bussche (2017). Moreover, the models built by
applications lack the ability of personalization.

###  2.2 Federated Machine Learning

A comprehensive survey on federated learning is in Yang et al. (2019).
Federated machine learning was firstly proposed by Google Konečnỳ et al.
(2016, 2016), where they trained machine learning models based on distributed
mobile phones all over the world. The key idea is to protect user data during
the process. Since then, other researchers started to focus on privacy-
preserving machine learning Bonawitz et al. (2017); Shokri and Shmatikov
(2015); Geyer et al. (2017), federated multi-task learning Smith et al.
(2017), as well as personalized federated learning Chen et al. (2018a).
Federated learning has the ability to resolve the data islanding problems by
privacy-preserving model training in the network.

According to Yang et al. (2019), federated learning can mainly be classified
into three types: 1) horizontal federated learning, where organizations share
partial features; 2) vertical federated learning, where organizations share
partial samples; and 3) federated transfer learning, where neither samples or
features have much in common. FedHealth belongs to federated transfer learning
category. It is the first of its kind tailored for wearable healthcare
applications.

###  2.3 Transfer Learning

Transfer learning aims at transferring knowledge from existing domains to a
new domain. In the setting of transfer learning, the domains are often
different but related, which makes knowledge transfer possible. The key idea
is to reduce the distribution divergence between different domains. To this
end, there are mainly two kinds of approaches: 1) instance reweighting Huang
et al. (2012, 2007), which reuses samples from the source domain according to
some weighting technique; and 2) feature matching, which either performs
subspace learning by exploiting the subspace geometrical structure Wang et al.
(2018b); Sun et al. (2016); Fernando et al. (2013); Gong et al. (2012), or
distribution alignment to reduce the marginal or conditional distribution
divergence between domains Wang et al. (2019b, 2018a, 2017a); Pan et al.
(2011). Recently, deep transfer learning methods have made considerable
success in many application fields Rozantsev et al. (2019); Ganin and
Lempitsky (2015); Tzeng et al. (2014). For a complete survey, please refer to
Pan and Yang (2010).

FedHealth is mainly related to deep transfer learning. Most of the methods
assume the availability of training data, which is not realistic. FedHealth
makes it possible to do deep transfer learning in the federated learning
framework without accessing the raw user data. Therefore, it is more secure.

Figure 2: Overview of the FedHealth framework. “User” represents organizations

##  3 The Proposed FedHealth Framework

In this section, we introduce the FedHealth framework for federated transfer
learning based wearable healthcare.

###  3.1 Problem Definition

We are given data from $N$ different users (organizations), denoted the users
by $\\{\mathcal{S}_{1},\mathcal{S}_{2},\cdots,\mathcal{S}_{N}\\}$ and the
sensor readings they provide are denoted by
$\\{\mathcal{D}_{1},\mathcal{D}_{2},\cdots,\mathcal{D}_{N}\\}$. Conventional
methods train a model $\mathcal{M}_{ALL}$ by combining all the data
$\mathcal{D}=\mathcal{D}_{1}\cup\mathcal{D}_{2}\cup\cdots\cup\mathcal{D}_{N}$.
All the data have different distributions. In our problem, we want to
collaborate all the data to train a federated model $\mathcal{M}_{FED}$, where
any user $\mathcal{S}_{i}$ does not expose its data $\mathcal{D}_{i}$ to each
other. If we denote the accuracy as $\mathcal{A}$, then the objective of
FedHealth is to ensure the accuracy of federated learning is close to or
superior to that of conventional learning denoted by:

$\mathcal{A}_{FED}-\mathcal{A}_{ALL}>\Delta,$ (1)

where $\Delta$ is an extremely small non-negative real number.

###  3.2 Overview of the Framework

FedHealth aims to achieve accurate personal healthcare through federated
transfer learning without compromising privacy security. Figure 2 gives an
overview of the framework. Without loss of generality, we assume there are 3
users (organizations) and 1 server, which can be extended to the more general
case. The framework mainly consists of four procedures. First of all, the
cloud model on the server end is train based on public datasets. Then, the
cloud model is distributed to all users where each of them can train their own
model on their data. Subsequently, the user model can be uploaded to the cloud
to help train a new cloud model. Note that this step does not share any user
data or information but the encrypted model parameters. Finally, each user can
train personalized models by integrating the cloud model and its previous
model and data for personalization. In this step, since there is large
distribution divergence between cloud and user model, transfer learning is
performed to make the model more tailored to the user (right part in Figure
2). It is noteworthy that all the parameter sharing processes does not involve
any leakage of user data. Instead, they are finished through homomorphic
encryption Rivest et al. (1978).

The federated learning paradigm is the main computing model for the whole
FedHealth framework. It deals with model building and parameter sharing during
the entire process. After the server model is learned, it can be directly
applied to the user. This is just what traditional healthcare applications do
for model learning. It is obvious that the samples in the server are having
highly different probability distribution with the data generated by each
user. Therefore, the common model fails in personalization. Additionally, user
models cannot easily be updated continuously due to the privacy security
issue.

###  3.3 Federated Learning

FedHealth adopts the federated learning paradigm Yang et al. (2019) to achieve
encrypted model training and sharing. This step mainly consists of two
critical parts: cloud and user model learning. After obtaining the server
model, it is distributed to the user end to help them train their own models.
As for each user, it trains its own model with the help of the server model.

In FedHealth, we adopt deep neural networks to learn both the cloud and user
model. Deep networks perform end-to-end feature learning and classifier
training by taking the raw inputs of the user data as inputs. Let $f_{S}$
denote the server model to be learned, then the learning objective becomes:

$\arg\min_{\Theta}\mathcal{L}=\sum_{i=1}^{n}\ell(y_{i},f_{S}(\mathbf{x}_{i})),$
(2)

where $\ell(\cdot,\cdot)$ denotes the loss for the network, e.g. cross-entropy
loss for classification tasks. $\\{\mathbf{x}_{i},y_{i}\\}^{n}_{i=1}$ are
samples from the server data with $n$ their sizes. $\Theta$ denotes all the
parameters to be learned, i.e. the weight and bias.

After acquiring the cloud model, it is distributed to all the users. As we can
see from the “wall” in Figure 2, direct sharing of user information is
forbidden. This process uses homomorphic encryption Rivest et al. (1978) to
avoid information leakage. Since the encryption is not our main contribution,
we will show the process of additively homomorphic encryption using real
numbers. The encryption scheme of the weight matrix and bias vector are
following the same idea. The additively homomorphic encryption of a real
number $a$ is denoted as $\langle a\rangle$. In additively homomorphic
encryption, for any two numbers $a$ and $b$, we have $\langle a\rangle+\langle
b\rangle=\langle a+b\rangle$. Therefore, the parameter sharing can be done
without leaking any information from the users. Through federated learning, we
can aggregate user data without compromising privacy security.

Technically, the learning objective for user $u$ is denoted as:

$\arg\min_{\Theta^{u}}\mathcal{L}_{1}=\sum_{i=1}^{n^{u}}\ell(y^{u}_{i},f_{u}(\mathbf{x}^{u}_{i})).$
(3)

It is important to note that FedHealth does not perform parameter sharing as
in Cheng et al. (2019) for computational efficiency. After all the user model
$f_{u}$ is trained, it is uploaded to the server for aggregation. As for
aggregation, server can align the old model with the model from each user
subsequently. Considering the computational burden, server can also achieve
scheduled update (e.g. every night) using uploading user models. The result is
a new server model $f_{S}^{\prime}$. Note that the new server model
$f_{S}^{\prime}$ is based on the knowledge from all users. Therefore, it has
better generalization ability.

###  3.4 Transfer Learning

Federated learning solves the data islanding problem. Therefore, we can build
models using all the user data. Another important factor is the
personalization. Even if we can directly use the cloud model, it still
performs poor on a particular user. This is due to the distribution difference
between the user and the cloud data. The common model in the server only
learns the coarse features from all users, while it fails in learning the
fine-grained information on a particular user.

In this paper, FedHealth uses transfer learning to build a personalized model
for each user. Recall that features in deep networks are highly transferable
in the lower levels of the network since they focus on learning common and
low-level features. The higher layers learn more specific features to the task
Yosinski et al. (2014). In this way, after obtaining the parameters of the
cloud model, we can perform transfer learning on the user to learn their
personalized models.

Figure 3: The transfer learning process of FedHealth

Figure 3 presents the process of transfer learning for a specific
convolutional neural network (CNN). Suppose the network is composed of two
convolutions layers (conv1, conv2), two max-pooling layers (pool1, pool2), two
fully connected layers (fc1, fc2), and one softmax layer for classification.
The network is designed for human activity recognition where the input data is
the activity signals for a user and the output is his activity classes.

In model transfer, we think that the convolution layers aims at extracting
low-level features about activity recognition. Thus we keep these layers along
with the max-pooling layers frozen, which means we do not update their
parameters in backpropagation. As for the fully connected layers fc1 and fc2,
since they are higher level, we believe they focus on learning specific
features for the task and user. Therefore, we update their parameters during
training. The softmax serves as the classification function, which can be
formulated as:

$y_{j}=\frac{e^{z_{c}}}{\sum_{c=1}^{C}e^{z_{c}}},$ (4)

where $z_{c}$ denotes the learned probability for class $C$, and $y_{j}$ is
the final classification result.

Algorithm 1 The learning procedure of FedHealth

0: Data from different users
$\\{\mathcal{D}_{1},\mathcal{D}_{2},\cdots,\mathcal{D}_{N}\\}$, $\eta$

0: Personalized user model $f_{u}$

1: Construct a cloud model $f_{S}$ using Eq. (2)

2: Distribute $f_{S}$ to all users via homomorphic encryption

3: Train user models using Eq. (3)

4: Update all user models to the server using homomorphic encryption. Then
server update its model by aligning with user model

5: Distribute $f_{S}^{\prime}$ to all users, then perform transfer learning on
each user to get their personalized model $f_{u}$ using Eq. (6)

6: Repeat the above procedures with the continuously emerging user data

FedHealth adapts the inputs from different domains by replacing fc2 with an
alignment layer. This is strictly different that in DDC Tzeng et al. (2014)
and other recent methods where we have access to both the source and target
data. In our problem, we only have the user data and the cloud model. To this
end, we borrow the idea from Rozantsev et al. (2018) and regularize the
weights. Given the network from the server and user, we add a correlation
alignment Sun et al. (2016) layer before the softmax layer to further adapt
the domains. This alignment function is used to align the second-order
statistics between the inputs. Formally, the loss of correlation alignment is
computed as follows:

$\ell_{CORAL}=\frac{1}{4d^{2}}\left\|C_{S}-C_{T}\right\|_{F}^{2}$ (5)

where $\left\|\cdot\right\|_{F}^{2}$ denotes the squared matrix Frobenius norm
and $d$ is the dimension of the embedding features. $C_{S}$ and $C_{T}$ are
the covariance matrices of the source and target weights computed by Sun et
al. (2016). Therefore, denote $\eta$ the trade-off parameter, the loss for the
user model is computed by:

$\arg\min_{\Theta_{u}}\mathcal{L}_{u}=\sum_{i=1}^{n_{u}}\ell(y^{u}_{i},f_{u}(\mathbf{x}^{u}_{i}))+\eta\ell_{CORAL}.$
(6)

###  3.5 Learning Process

The learning procedure of FedHealth is presented in Algorithm 1. Note that
this framework works continuously with the new emerging user data. FedHealth
can update the user model and cloud model simultaneously when facing new user
data. Therefore, the longer the user uses the product, the more personalized
the model can be. Other than transfer learning, FedHealth can also embed other
popular methods for personalization such as incremental learning Rebuffi et
al. (2017).

The entire framework can also adopt other machine learning methods other than
deep networks. For instance, the gradient boosting decision tree can be
integrated into the framework to harness the power of ensemble learning. These
lightweight models can be deployed to computation restricted wearable devices.
This makes FedHealth more general to real applications.

##  4 Experiments

In this section, we evaluate the performance of the proposed FedHealth
framework via extensive experiments on human activity recognition.

###  4.1 Datasets

We adopt a public human activity recognition dataset called UCI Smartphone
Anguita et al. (2012). This dataset contains 6 activities collected from 30
users. The 6 activities are WALKING, WALKING-UPSTAIRS, WALKING-DOWNSTAIRS,
SITTING, STANDING, and LAYING. There are 30 volunteers within an age bracket
of 19-48 years. Each volunteer wears a smartphone (Samsung Galaxy S II) on the
waist. Using its embedded accelerometer and gyroscope, collectors captured
3-axial linear acceleration and 3-axial angular velocity at a constant rate of
50Hz. The experiments have been video-recorded to label the data manually. The
obtained dataset has been randomly partitioned into two sets, where 70% of the
volunteers were selected for generating the training data and 30% the test
data. There are 10,299 instances in total. The statistical information of the
dataset is shown in Table 1.

Table 1: Statistical information of the dataset

Subject | Activity | Sampling rate | Sensor | Instance | Channel
---|---|---|---|---|---
30 | 6 | 50 Hz |  | Accelerometer
---
Gyroscope
10,299 | 9

In order to construct the problem situation in FedHealth, we change the
standard setting for the dataset. We extracted 5 subjects (Subject IDS 26
$\sim$ 30) and regard them as the isolated users which cannot share data due
to privacy security. Data on the remaining 25 users are used to train the
cloud model. Henceforth, the objective is to use the cloud model and all the 5
isolated subjects to improve the activity recognition accuracy on the 5
subjects without compromising the privacy. In short, it is a variant of the
framework in Figure 2 where there are 5 users.

###  4.2 Implementation Details

On both the server and the user end, we adopt a CNN for training and
prediction. The network is composed of 2 convolutional layers, 2 pooling
layers, and 3 fully connected layers. The network adopts a convolution size of
$1\times 9$. It uses mini-batch Stochastic Gradient Descent (SGD) for
optimization. During training, we use 70% of the training data for model
training, while the rest 30% is for model evaluation. We fix $\eta=0.01$. We
set the learning rate to be 0.01 with batch size of 64 and training epochs
fixed to 80. The accuracy of user $u$ is computed as
$\mathcal{A}_{u}=\frac{\left|\mathbf{x}:\mathbf{x}\in\mathcal{D}_{u}\wedge\hat{y}(\mathbf{x})=y(\mathbf{x})\right|}{\left|\mathbf{x}:\mathbf{x}\in\mathcal{D}_{u}\right|}$,
where $y(\mathbf{x})$ and $\hat{y}(\mathbf{x})$ denote the true and predicted
labels on sample $\mathbf{x}$, respectively.

We follow Rivest et al. (1978) for homomorphic encryption in federated
learning. During transfer learning, we freeze all the convolutional and
pooling layers in the network. Only the parameters of the fully connected
layers are updated with SGD. To show the effectiveness of FedHealth, we
compare its performance with traditional learning, where we record the
performances on each subject using the server model only. For notational
brevity, we use NoFed to denote this setting. We also compare the performances
of KNN, SVM, and random forest (RF) with FedHealth. The hyperparameters of all
the comparison methods are tuned using cross-validation. For the fair study,
we run all the experiments 5 times to record the average accuracies.

###  4.3 Classification Accuracy

The classification accuracies of activity recognition for each subject are
shown in Table 2. The results indicate that our proposed FedHealth achieves
the best classification accuracy on all users. Compared to NoFed, it
significantly improves the average results by 5.3%. Compared to the
traditional methods (KNN, SVM, and RF), FedHealth also greatly improves the
recognition results. In short, it demonstrates the effectiveness of our
proposed FedHealth framework.

Table 2: Classification accuracy (%) of the test subject

Subject | KNN | SVM | RF | NoFed | FedHealth
---|---|---|---|---|---
P1 | 83.8 | 81.9 | 87.5 | 94.5 | 98.8
P2 | 86.5 | 96.9 | 93.3 | 94.5 | 98.8
P3 | 92.2 | 97.2 | 88.9 | 93.4 | 100.0
P4 | 83.1 | 95.9 | 91.0 | 95.5 | 99.4
P5 | 90.5 | 98.6 | 91.6 | 92.6 | 100.0
AVG | 87.2 | 94.1 | 90.5 | 94.1 | 99.4

Figure 4: Extending FedHealth with other transfer learning methods

The results also show that for activity recognition, the deep methods (NoFed
and FedHealth) achieve better results than traditional methods. This is due to
the representation capability of deep neural networks, while traditional
methods have to rely on hand-crafted feature learning. Another advantage of
deep learning is that the models can be updated online and incrementally
without retraining, while traditional methods require further incremental
algorithms. This property is extremely valuable in federated transfer learning
where model reuse is important and helpful.

###  4.4 Evaluation of Extensibility

In this section, we analyze the extensibility of FedHealth with different
transfer learning approaches. We compare its performance with two methods: 1)
fine-tuning, which only fine-tunes the network on each subject without
explicitly reducing the distribution divergence between domains; and 2)
transfer with MMD (Maximum Mean Discrepancy) Wang et al. (2018b), which
replaces the alignment loss with MMD loss. The comparison results are shown in
Figure 4.

From the results, we can see that other than the alignment loss, FedHealth can
also achieve promising results using fine-tuning or MMD. The results of
transfer learning significantly outperform no transfer by 4% on average
accuracy. This indicates that the transfer learning procedure of FedHealth is
highly effective and extensible. Therefore, FedHealth is general and can be
extended in many applications by integrating other transfer learning
algorithms. Moreover, the federated learning procedure can also be extended
using other encryption methods, which can be the future research.

###  4.5 Detailed Analysis

We provide detailed analysis to FedHealth via comparing its confusion matrix
with that of NoFed. The confusion matrix is known as an effective metric to
show the efficacy of a method since it provides fine-grained classification
results on each task. For simplicity, we show the confusion matrices of
subject 2 in Table 3. The results of other subjects follow the same tendency.
Along with the confusion matrix, the precision ($P$), recall ($R$), and macro
$F1$ score ($F1$) are all computed to give a thorough view of the results.

Combining the results in Table 2 and 3, we can clearly see that FedHealth can
not only achieve the best accuracy, but also reach the best precision, recall,
and $F1$ scores. The confusion matrix shows that FedHealth can reduce the
misclassification rate, especially on class $C1$ (Walking). Since walking is
the most common activities in healthcare, it means that FedHealth is effective
in recognizing this activity. To summarize, FedHealth is more accurate in
recognizing personalized activities, which makes it more advantageous in
healthcare applications.

##  5 Discussions

FedHealth is a general framework for wearable healthcare. This paper provides
a specific implementation and evaluation of this idea. It is adaptable to
several healthcare applications. In this section, we discuss its potential to
be extended and deployed to other situations with possible solutions.

1\. FedHealth with incremental learning. Incremental learning Rebuffi et al.
(2017) has the ability to update the model with the gradually changing time,
environment, and users. In contrast to transfer learning that focuses on model
adaptation, incremental learning makes it possible to update the model in
real-time without much computation.

2\. FedHealth as the standard for wearable healthcare in the future. FedHealth
provides such a platform where all the companies can safely share data and
train models. In the future, we expect that FedHealth be implemeted with
blockchain technology Zheng et al. (2018) where user data can be more securely
stored and protected. We hope that FedHealth can become the standard for
wearable healthcare.

3\. FedHealth to be applied in more applications. This work mainly focuses on
the possibility of federated transfer learning in healthcare via activity
recognition. In real situations, FedHealth can be deployed at large-scale to
more healthcare applications such as elderly care, fall detection, cognitive
disease detection, etc. We hope that through FedHealth, federated learning can
become federated computing which can become a new computing model in the
future.

Table 3: Classification report of NoFed and FedHealth

NoFed
---
| $C1$ | $C2$ | $C3$ | $C4$ | $C5$ | $C6$ | $P$ | $R$ | $F1$
$C1$ | 70.4% | 7.4% | 22.2% |  |  |  | 1 | 0.7 | 0.83
$C2$ |  | 96.9% | 3.1% |  |  |  | 0.94 | 0.97 | 0.95
$C3$ |  |  | 100% |  |  |  | 0.74 | 1 | 0.85
$C4$ |  |  |  | 100% |  |  | 1 | 1 | 1
$C5$ |  |  |  |  | 100% |  | 1 | 1 | 1
$C6$ |  |  |  |  |  | 100% | 1 | 1 | 1
Average | 0.96 | 0.94 | 0.94
FedHealth
| $C1$ | $C2$ | $C3$ | $C4$ | $C5$ | $C6$ | $P$ | $R$ | $F1$
$C1$ | 88.9% | 3.7% | 7.4% |  |  |  | 1 | 0.89 | 0.94
$C2$ |  | 100% |  |  |  |  | 0.97 | 1 | 0.98
$C3$ |  |  | 100% |  |  |  | 0.91 | 1 | 0.95
$C4$ |  |  |  | 100% |  |  | 1 | 1 | 1
$C5$ |  |  |  |  | 100% |  | 1 | 1 | 1
$C6$ |  |  |  |  |  | 100% | 1 | 1 | 1
Average | 0.98 | 0.98 | 0.98

##  6 Conclusions and Future Work

In this paper, we propose FedHealth, the first federated transfer learning
framework for wearable healthcare. FedHealth aggregates the data from
different organizations without compromising privacy security, and achieves
personalized model learning through knowledge transfer. Experiments on human
activity recognition have demonstrated the effectiveness of the framework. We
also present a detailed discussion for its potential from specific technical
improvement to the potential for healthcare applications.

FedHealth opens a new door for future research in wearable healthcare. In the
future, we plan to extend FedHealth to the detection of Parkinson’s disease
where it can be deployed in hospitals.

## Acknowledgements

This paper is supported in part by National Key R & D Plan of China (No.
2017YFB1002802), NSFC (No. 61572471), and Beijing Municipal Science &
Technology Commission (No.Z171100000117017).

## References

  * Albinali et al. [2010] Fahd Albinali, Stephen Intille, William Haskell, and Mary Rosenberger.  Using wearable activity type detection to improve physical activity energy expenditure estimation.  In Proceedings of the 12th ACM international conference on Ubiquitous computing, pages 311–320. ACM, 2010.
  * Andreu-Perez et al. [2015] Javier Andreu-Perez, Daniel R Leff, Henry MD Ip, and Guang-Zhong Yang.  From wearable sensors to smart implants—toward pervasive and personalized healthcare.  IEEE Transactions on Biomedical Engineering, 62(12):2750–2762, 2015\.
  * Anguita et al. [2012] Davide Anguita, Alessandro Ghio, Luca Oneto, Xavier Parra, and Jorge L Reyes-Ortiz.  Human activity recognition on smartphones using a multiclass hardware-friendly support vector machine.  In International workshop on ambient assisted living, pages 216–223. Springer, 2012.
  * Atkinson et al. [2007] Hal H Atkinson, Caterina Rosano, Eleanor M Simonsick, Jeff D Williamson, Cralen Davis, Walter T Ambrosius, Stephen R Rapp, Matteo Cesari, Anne B Newman, Tamara B Harris, et al.  Cognitive function, gait speed decline, and comorbidities: the health, aging and body composition study.  The Journals of Gerontology Series A: Biological Sciences and Medical Sciences, 62(8):844–850, 2007.
  * Bonawitz et al. [2017] Keith Bonawitz, Vladimir Ivanov, Ben Kreuter, Antonio Marcedone, H Brendan McMahan, Sarvar Patel, Daniel Ramage, Aaron Segal, and Karn Seth.  Practical secure aggregation for privacy-preserving machine learning.  In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, pages 1175–1191. ACM, 2017.
  * Chen et al. [2017] Yiqiang Chen, Xiaodong Yang, Biao Chen, Chunyan Miao, and Hanchao Yu.  Pdassist: Objective and quantified symptom assessment of parkinson’s disease via smartphone.  In 2017 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), pages 939–945. IEEE, 2017.
  * Chen et al. [2018a] Fei Chen, Zhenhua Dong, Zhenguo Li, and Xiuqiang He.  Federated meta-learning for recommendation.  arXiv preprint arXiv:1802.07876, 2018.
  * Chen et al. [2018b] Yiqiang Chen, Chunyu Hu, Bin Hu, Lisha Hu, Han Yu, and Chunyan Miao.  Inferring cognitive wellness from motor patterns.  IEEE Transactions on Knowledge and Data Engineering, 30(12):2340–2353, 2018.
  * Chen et al. [2019] Yiqiang Chen, Jindong Wang, Meiyu Huang, and Han Yu.  Cross-position activity recognition with stratified transfer learning.  Pervasive and Mobile Computing, 57:1–13, 2019.
  * Cheng et al. [2019] Kewei Cheng, Tao Fan, Yilun Jin, Yang Liu, Tianjian Chen, and Qiang Yang.  Secureboost: A lossless federated learning framework.  CoRR, abs/1901.08755, 2019.
  * Fernando et al. [2013] Basura Fernando, Amaury Habrard, Marc Sebban, and Tinne Tuytelaars.  Unsupervised visual domain adaptation using subspace alignment.  In Proceedings of the IEEE international conference on computer vision, pages 2960–2967, 2013.
  * Ganin and Lempitsky [2015] Yaroslav Ganin and Victor Lempitsky.  Unsupervised domain adaptation by backpropagation.  In Interntional Conference on Machine Learning (ICML), 2015.
  * Geyer et al. [2017] Robin C Geyer, Tassilo Klein, and Moin Nabi.  Differentially private federated learning: A client level perspective.  arXiv preprint arXiv:1712.07557, 2017.
  * Gong et al. [2012] Boqing Gong, Yuan Shi, Fei Sha, and Kristen Grauman.  Geodesic flow kernel for unsupervised domain adaptation.  In 2012 IEEE Conference on Computer Vision and Pattern Recognition, pages 2066–2073. IEEE, 2012.
  * Hiremath et al. [2014] Shivayogi Hiremath, Geng Yang, and Kunal Mankodiya.  Wearable internet of things: Concept, architectural components and promises for person-centered healthcare.  In 2014 4th International Conference on Wireless Mobile Communication and Healthcare-Transforming Healthcare Through Innovations in Mobile and Wireless Technologies (MOBIHEALTH), pages 304–307. IEEE, 2014.
  * Huang et al. [2007] Jiayuan Huang, Arthur Gretton, Karsten Borgwardt, Bernhard Schölkopf, and Alex J Smola.  Correcting sample selection bias by unlabeled data.  In Advances in neural information processing systems, pages 601–608, 2007.
  * Huang et al. [2012] Pipei Huang, Gang Wang, and Shiyin Qin.  Boosting for transfer learning from multiple data sources.  Pattern Recognition Letters, 33(5):568–579, 2012.
  * Inkster [2018] Nigel Inkster.  China’s Cyber Power.  Routledge, 2018.
  * Konečnỳ et al. [2016] Jakub Konečnỳ, H Brendan McMahan, Daniel Ramage, and Peter Richtárik.  Federated optimization: Distributed machine learning for on-device intelligence.  arXiv preprint arXiv:1610.02527, 2016.
  * Lei et al. [2012] Jinna Lei, Xiaofeng Ren, and Dieter Fox.  Fine-grained kitchen activity recognition using rgb-d.  In Proceedings of the 2012 ACM Conference on Ubiquitous Computing, pages 208–211. ACM, 2012.
  * Menshawy et al. [2015] Mohamed EL Menshawy, Abdelghani Benharref, and Mohamed Serhani.  An automatic mobile-health based approach for eeg epileptic seizures detection.  Expert Systems with Applications, 42(20):7157–7174, 2015.
  * Michalak et al. [2009] Johannes Michalak, Nikolaus F Troje, Julia Fischer, Patrick Vollmar, Thomas Heidenreich, and Dietmar Schulte.  Embodiment of sadness and depression—gait patterns associated with dysphoric mood.  Psychosomatic medicine, 71(5):580–587, 2009.
  * Pan and Yang [2010] Sinno Jialin Pan and Qiang Yang.  A survey on transfer learning.  IEEE Transactions on knowledge and data engineering, 22(10):1345–1359, 2010.
  * Pan et al. [2011] Sinno Jialin Pan, Ivor W Tsang, James T Kwok, and Qiang Yang.  Domain adaptation via transfer component analysis.  IEEE Transactions on Neural Networks, 22(2):199–210, 2011.
  * Rashidi and Cook [2010] Parisa Rashidi and Diane J Cook.  Mining sensor streams for discovering human activity patterns over time.  In 2010 IEEE International Conference on Data Mining, pages 431–440. IEEE, 2010.
  * Rebuffi et al. [2017] Sylvestre-Alvise Rebuffi, Alexander Kolesnikov, Georg Sperl, and Christoph H. Lampert.  icarl: Incremental classifier and representation learning.  In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017.
  * Rivest et al. [1978] Ronald L Rivest, Len Adleman, Michael L Dertouzos, et al.  On data banks and privacy homomorphisms.  Foundations of secure computation, 4(11):169–180, 1978.
  * Rozantsev et al. [2018] Artem Rozantsev, Mathieu Salzmann, and Pascal Fua.  Beyond sharing weights for deep domain adaptation.  IEEE Transactions on Pattern Analysis and Machine Intelligence, 41:801–814, 2018.
  * Rozantsev et al. [2019] Artem Rozantsev, Mathieu Salzmann, and Pascal Fua.  Beyond sharing weights for deep domain adaptation.  IEEE transactions on pattern analysis and machine intelligence, 41(4):801–814, 2019.
  * Shokri and Shmatikov [2015] Reza Shokri and Vitaly Shmatikov.  Privacy-preserving deep learning.  In Proceedings of the 22nd ACM SIGSAC conference on computer and communications security, pages 1310–1321. ACM, 2015.
  * Smith et al. [2017] Virginia Smith, Chao-Kai Chiang, Maziar Sanjabi, and Ameet S Talwalkar.  Federated multi-task learning.  In Advances in Neural Information Processing Systems, pages 4424–4434, 2017.
  * Sun et al. [2016] Baochen Sun, Jiashi Feng, and Kate Saenko.  Return of frustratingly easy domain adaptation.  In Thirtieth AAAI Conference on Artificial Intelligence, 2016.
  * Tzeng et al. [2014] Eric Tzeng, Judy Hoffman, Ning Zhang, Kate Saenko, and Trevor Darrell.  Deep domain confusion: Maximizing for domain invariance.  arXiv preprint arXiv:1412.3474, 2014.
  * Voigt and Von dem Bussche [2017] Paul Voigt and Axel Von dem Bussche.  The eu general data protection regulation (gdpr).  A Practical Guide, 1st Ed., Cham: Springer International Publishing, 2017.
  * Wang et al. [2014] Rui Wang, Fanglin Chen, Zhenyu Chen, Tianxing Li, Gabriella Harari, Stefanie Tignor, Xia Zhou, Dror Ben-Zeev, and Andrew T Campbell.  Studentlife: assessing mental health, academic performance and behavioral trends of college students using smartphones.  In Proceedings of the 2014 ACM International Joint Conference on Pervasive and Ubiquitous Computing, pages 3–14. ACM, 2014.
  * Wang et al. [2017a] Jindong Wang, Yiqiang Chen, Shuji Hao, Wenjie Feng, and Zhiqi Shen.  Balanced distribution adaptation for transfer learning.  In 2017 IEEE International Conference on Data Mining (ICDM), pages 1129–1134. IEEE, 2017.
  * Wang et al. [2017b] Yuxi Wang, Kaishun Wu, and Lionel M Ni.  Wifall: Device-free fall detection by wireless networks.  IEEE Transactions on Mobile Computing, 16(2):581–594, 2017.
  * Wang et al. [2018a] Jindong Wang, Yiqiang Chen, Lisha Hu, Xiaohui Peng, and S Yu Philip.  Stratified transfer learning for cross-domain activity recognition.  In 2018 IEEE International Conference on Pervasive Computing and Communications (PerCom), pages 1–10. IEEE, 2018.
  * Wang et al. [2018b] Jindong Wang, Wenjie Feng, Yiqiang Chen, Han Yu, Meiyu Huang, and Philip S Yu.  Visual domain adaptation with manifold embedded distribution alignment.  In 2018 ACM Multimedia Conference on Multimedia Conference, pages 402–410. ACM, 2018.
  * Wang et al. [2019a] Jindong Wang, Yiqiang Chen, Shuji Hao, Xiaohui Peng, and Lisha Hu.  Deep learning for sensor-based activity recognition: A survey.  Pattern Recognition Letters, 119:3–11, 2019.
  * Wang et al. [2019b] Jindong Wang, Yiqiang Chen, Han Yu, Meiyu Huang, and Qiang Yang.  Easy transfer learning by exploiting intra-domain structures.  In IEEE International Conference on Multimedia and Expo (ICME), 2019\.
  * Ward et al. [2016] Jamie A Ward, Gerald Pirkl, Peter Hevesi, and Paul Lukowicz.  Towards recognising collaborative activities using multiple on-body sensors.  In Proceedings of the 2016 ACM International Joint Conference on Pervasive and Ubiquitous Computing: Adjunct, pages 221–224. ACM, 2016.
  * Yang et al. [2018] Qiang Yang, Yang Liu, Tianjian Chen, and Yongxin Tong.  Federated learning.  Communications of the CCF, 11:49–55, 2018.
  * Yang et al. [2019] Qiang Yang, Yang Liu, Tianjian Chen, and Yongxin Tong.  Federated machine learning: Concept and applications.  ACM Transactions on Intelligent Systems and Technology (TIST), 10(2):12, 2019.
  * Yosinski et al. [2014] Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson.  How transferable are features in deep neural networks?  In Advances in neural information processing systems, pages 3320–3328, 2014.
  * Zheng et al. [2018] Zibin Zheng, Shaoan Xie, Hong-Ning Dai, Xiangping Chen, and Huaimin Wang.  Blockchain challenges and opportunities: a survey.  International Journal of Web and Grid Services, 14(4):352–375, 2018\.


# A Novel Approach to Encode Two-Way Epistatic Interactions Between Single
Nucleotide Polymorphisms

Nathaniel Gunter
Department of Radiology
Mayo Clinic
Rochester, MN
<EMAIL_ADDRESS>
&Prashanthi Vemuri
Department of Radiology
Mayo Clinic
Rochester, MN
Vijay Ramanan
Department of Neurology
Mayo Clinic
Rochester MN
&Robel K. Gebre
Department of Radiology
Mayo Clinic
Rochester, MN

(15 June, 2023)

###### Abstract

Introduction

Modelling gene-gene epistatic interactions when computing genetic risk scores
is not a well-explored subfield of genetics and could have potential to
improve risk stratification in practice. Though applications of machine
learning (ML) show promise as an avenue of improvement for current genetic
risk assesments, they frequently suffer from the problem of two many features
and to little data. We propose a method that when combined with ML allows
information from individual genetic contributors to be preserved while
incorporating information on their interactions in a single feature. This
allows second-order analysis, while simultaneously increasing the number of
input features to ML models as little as possible. Methods

Data was retrieved from the Aging and Dementia Neuroimaging Initiative,
consisting of genotype, age, sex, genetic principal components, and amyloid
centiloid metrics. The data were then put through one of three genetic
interaction methods, and the resultant interaction features were used as
inputs for a series of machine learning models. The $r^{2}$ association
between actual and predicted amyloid centiloid was collected for each of a
hundred runs and used to construct distributions for each set of generated
features.

Results

We presented three methods that can be utilized to account for genetic
interactions. We found that interaction methods that preserved information
from the constituent SNPs performed significantly better than the simplest
interaction method. Since the currently available ML methods are able to
account for complex interactions, utilizing raw SNP genotypes alone is
sufficient because the simplest model outperforms all the interaction methods

Discussion

Given that understanding and accounting for epistatic interactions is one of
the most promising avenues for increasing explained variability in heritable
disease, this work represents a first step toward an algorithmic interaction
method that preserves the information in each component. This is relevant not
only because of potential improvements in model quality, but also because
explicit interaction terms allow a human readable interpretation of potential
interaction pathways within the disease.

##  1 Introduction

Many diseases are polygenic in nature. Additionally, many biological disease
pathways are known to rely on more than one single nucleotide polymorphism
(SNP). Methods exist to aggregate genetic influence on a disease across large
parts of the genome, primarily polygenic risk scores (PRS), which are a linear
combination of the dosage of individual SNPs. Despite this, influence
resulting from interactions between is difficult to account for using a PRS
due to the need for a weighting value for each SNP, which does not exist for
interactions.

Using Alzheimer’s Disease (AD) as a model disease (specifically data from the
Alzheimer’s Disease Neuroimaging Initiative) we show that explicit encoding of
two gene interaction terms benefits from more nuance used to include the
information from both component SNPs as well as interaction information. This
second-order encoding is a first step towards understanding combinations of
genes that may have an outsized impact when compared to the constituent genes
considered individually, potentially due to biological pathways that depend on
multiple risk alleles being present.

##  2 Methods

###  2.1 Participant Selection and Description

The Alzheimer’s Disease Neuroimaging Initiative (ADNI) is a longitudinal
multicenter study to facilitate development of clinical, imaging, genetic, and
biochemical markers for the early detection and tracking of AD [14, 15].
Individuals were recruited from over 50 sites across the United States and
Canada. Further information about ADNI can be found at
http://adni.loni.usc.edu/. Primary inclusion critera included the presence of
genome-wide SNP genotype data and cross-sectional amyloid PET data.

####  2.1.1 Genomic Data

Array data was acquired from a large genome wide association study (GWAS) and
filtered for standard quality control metrics, described previously [10, 12].
Processed genotype files for participants from the various ADNI study phases
were downloaded from the LONI web data sharing platform. Overly related
samples were removed as described previously [11]. Genome-wide imputation
using the TOPMed Imputation Server [5, 13] and TOPMed GRch38/hg38 build
reference panel was performed separately within each batch (by GWAS array) and
then merged. Monomorphic variants and SNPs with low imputation quality
($r^{2}<0.8$) were removed. This resulted in 16,502,548 variants (8,054769
with MAF $\geq 1\%$) for 1661 individuals within the ADNI dataset.

####  2.1.2 Neuroimaging Data

Amyloid PET imaging was performed with 18F-florbetapir (AV-45) using
acquisition and processing protocols as described at http://www.adni-info.org,
and with summary measures of global cortical amyloid load downloaded from the
ADNI database [6]. Specifically, the centiloid (CL) scale [7] metric was used
as the outcome of interest for global amyloid PET burden.

###  2.2 Dataset Feature Selection

To select a minimum viable feature set for proof of concept in this work, we
focused first on the top 20 independent SNPs defined by largest effect size
for association with clinical AD according to a recent large case/control
genome wide association study [1]. APOEe4 and APOEe2 were also included due to
well-known associations with AD [3, 4, 9]. From this starting point, SNPs with
minor allele frequency < 5% were excluded to remove sparse features. Age, sex,
and the first five genetic principal component eigenvecters were included in
all models as covariates. A dataset was created from each of the following
encoding methods, using interactions with APOEe4.

###  2.3 Encoding Methods for Explicit SNP-SNP Interaction Terms

The simplest possible encoding scheme for whether two SNPs are interacting is
to assign an and operator between the SNP dosages. Because this results in
either a one (if both SNPs are present) or a zero (if at least one SNP is
missing), we call this binary encoding. Explicitly, this is:

$A\times B=\begin{cases}0&\text{if }A=0,B=0\\\ 1&\text{if }A\neq 0\text{ and
}B\neq 0\end{cases}.$ (1)

This is perhaps the most common method of consideration when attempting to
define SNP-SNP interactions. However, it also fails to distinguish, which SNP
is missing. Even in cases where both SNPs are present, there may be subtle
differences between having one copy of each allele and two that this method
fails to capture.

The next option that one may approach would likely be a linear encoding method
as is here:

$A\times B=\begin{cases}A-B&\text{if }A\neq B\\\ A+B&\text{if
}A=B\end{cases}.$ (2)

This improves the variability preserved, allowing for distinction between
$(A,B)=(2,2)$ and $(A,B)=(1,1)$ for example. However, this introduces a new
problem, specifically that we now have $(1,0)=(2,1)$, a notable defect.

(a)

(b)

(c)

Figure 1: Heatmaps of encoded values for all values of SNP A and SNP B. Note
that as encoding grows more complex, more variance within the pairing of SNPs
is observed.

Having discovered issues with both potential simpler methods, the next step
was to add and subtract in quadrature. This allowed a preservation of all
variance allowed by dosage values of zero, one or two by using the following
schema:

$A\times B=\begin{cases}\sqrt{A^{2}-B^{2}}&\text{if }A>B\\\
\sqrt{A^{2}+B^{2}}&\text{if }A=B\\\ -\sqrt{|A^{2}-B^{2}|}&\text{if
}A<B\par\end{cases}.$ (3)

As with the linear encoding method, we add instead of subtract values on the
diagonal to prevent it from simply going to zero. By using this method, we
condense two individual SNPs into a single term that includes both the
information in each individual feature and the interaction information between
the two SNPs. Heatmaps illustrating differences between can be seen in Figure
1.

###  2.4 Machine Learning Pipeline

A series of machine learning (ML) models were applied to each dataset, and the
best performing in each was selected for comparison to the other datasets.
Models were chosen for robustness to the multicolinearity introduced by our
encoding method (all interactions with APOEe4 should have some collinearity,
for example). Several linear regressions with varying penalization methods
were used as a baseline, before moving to more advanced methods. Tree based
ensemble methods were applied as the more robust models, including XGBoost and
a Random Forest. Finally, a stacked meta-regression was constructed from the
three best models in the sequence. All models excepting XGBoost were sourced
from the scikit-learn library [8]. XGBoost was sourced from the xgboost
package [2]. This collection of models was run a hundred times on each
dataset, and the $r^{2}$ correlation between actual and predicted amyloid
centiloid values was collected as the primary outcome for each run. The
hundred runs were then used to construct a sample distribution of $r^{2}$
values, boxplots of which are shown in Figure 2.

##  3 Results

###  3.1 Linear and Quadratic Encoding Improve Results Over Binary Encoding

Both linear and quadratic encoding schemes significantly (p<0.0001) improve
the correlation between predicted and actual amyloid CL values(Fig 2). Though
the difference between linear and quadratric encoding was not significant, we
still see that quadratic encoding does slightly better, likely as a result of
preserving the entire variance in the interacting dosages.

Figure 2: Boxplot comparison of best model for each interaction encoding
method applied to APOEe4 interactions, as well as the raw SNP genotype.

##  4 Discussion

We found that across various explicit encoding methods for two-way SNP
interactions, those that take into account relative dosage performed
significantly better than those that do not. Any interaction we applied did
worse than the raw genotype dataset, though because we applied only
interactions with APOEe4 this may be due to interactions that are not
accounted for among the rest of the SNPs in our set. This study represents a
potential first step towards explicitly encoding gene-gene interactions such
that feature importance can provide biological insights in an intuitive
manner.

## References

  * [1] C. Bellenguez et al.  “New insights into the genetic etiology of Alzheimer’s disease and related dementias”  In _Nat Genet_ 54.4, 2022, pp. 412–436
  * [2] Tianqi Chen and Carlos Guestrin  “XGBoost: A Scalable Tree Boosting System”  In _Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining_ , KDD ’16  San Francisco, California, USA: ACM, 2016, pp. 785–794  DOI: 10.1145/2939672.2939785
  * [3] E H Corder et al.  “Gene dose of apolipoprotein E type 4 allele and the risk of Alzheimer’s disease in late onset families”  In _Science_ 261.5123 American Association for the Advancement of Science (AAAS), 1993, pp. 921–923
  * [4] E H Corder et al.  “Protective effect of apolipoprotein E type 2 allele for late onset Alzheimer disease”  In _Nat. Genet._ 7.2 Springer ScienceBusiness Media LLC, 1994, pp. 180–184
  * [5] Sayantan Das et al.  “Next-generation genotype imputation service and methods”  In _Nat. Genet._ 48.10, 2016, pp. 1284–1287
  * [6] William J Jagust et al.  “The Alzheimer’s Disease Neuroimaging Initiative positron emission tomography core”  In _Alzheimers. Dement._ 6.3 Wiley, 2010, pp. 221–229
  * [7] William E Klunk et al.  “The Centiloid Project: standardizing quantitative amyloid plaque estimation by PET”  In _Alzheimers. Dement._ 11.1, 2015, pp. 1–15.e1–4
  * [8] F. Pedregosa et al.  “Scikit-learn: Machine Learning in Python”  In _Journal of Machine Learning Research_ 12, 2011, pp. 2825–2830
  * [9] V K Ramanan et al.  “APOE and BCHE as modulators of cerebral amyloid deposition: a florbetapir PET genome-wide association study”  In _Mol. Psychiatry_ 19.3 Springer ScienceBusiness Media LLC, 2014, pp. 351–357
  * [10] Vijay K Ramanan et al.  “Coping with brain amyloid: genetic heterogeneity and cognitive resilience to Alzheimer’s pathophysiology”  In _Acta Neuropathol. Commun._ 9.1 Springer ScienceBusiness Media LLC, 2021, pp. 48
  * [11] Vijay K Ramanan et al.  “Polygenic scores of Alzheimer’s disease risk genes add only modestly to APOE in explaining variation in amyloid PET burden”  In _J. Alzheimers. Dis._ 88.4 IOS Press, 2022, pp. 1615–1625
  * [12] Andrew J Saykin et al.  “Genetic studies of quantitative MCI and AD phenotypes in ADNI: Progress, opportunities, and plans”  In _Alzheimers. Dement._ 11.7, 2015, pp. 792–814
  * [13] Daniel Taliun et al.  “Sequencing of 53,831 diverse genomes from the NHLBI TOPMed Program”  In _Nature_ 590.7845 Springer ScienceBusiness Media LLC, 2021, pp. 290–299
  * [14] Dallas P Veitch et al.  “Understanding disease progression and improving Alzheimer’s disease clinical trials: Recent highlights from the Alzheimer’s Disease Neuroimaging Initiative”  In _Alzheimers. Dement._ 15.1 Wiley, 2019, pp. 106–152
  * [15] Michael W Weiner et al.  “The Alzheimer’s disease neuroimaging initiative: progress report and future plans”  In _Alzheimers. Dement._ 6.3 Wiley, 2010, pp. 202–11.e7


For the second step, consider an arbitrary element $h\in G_{g}$. By Lemma A.4,
there exists an isotopy $(h_{s})_{s\in[0,1]}$ between $h$ and the identity
satisfying
$\overline{\operatorname{\mathsf{Supp}}_{Z}(h_{s})}=\overline{\operatorname{\mathsf{Supp}}_{Z}(h)}$
for every $s\in[0,1)$. Choose an increasing sequence
$0=s_{0}<s_{1}<\cdots<s_{N-1}<s_{N}=1$, so that for every
$i\in\\{0,\ldots,N-1\\}$, the element $f_{i}=h_{s_{i}}h^{-1}_{s_{i+1}}$
displaces any point of at most $\varepsilon/2$ along its leaf. Note that we
have $h=f_{0}\cdots f_{N-1}$. Since
$\overline{\operatorname{\mathsf{Supp}}_{Z}(f_{i})}\subseteq\overline{\operatorname{\mathsf{Supp}}_{Z}(h)}$,
we can reason as in the first step to deduce that each $f_{i}$ can be written
as a product of elements in $\\{H_{C_{i},I_{i}}\\}_{i\in\mathcal{I}}$, where
$H_{C_{i},I_{i}}\subset\mathsf{H}_{0}(\varphi,\sigma)$ is the subgroup of
homeomorphisms supported on $Z_{C_{i},I_{i}}$ of the form
$(x,t)\mapsto(x,f_{x}(t))$. On the other hand, the classical fact that
Thompson’s group $F_{I}$ is dense in $\operatorname{\mathsf{Homeo}}_{0}(I)$
implies that $G_{C_{i},I_{i}}$ is dense in $H_{C_{i},I_{i}}$. Thus, for any
$i\in\\{0,\ldots,N-1\\}$, we can approximate each $f_{i}$ (and hence $h$) by
an element of $K$. This allows to find an element $k\in K$ such that $hk^{-1}$
displaces points by at most $\varepsilon/2$ along leaves. Hence, using the
first step again, we get $hk^{-1}\in K$, and so $h\in K$.∎

###  A.3. Finite generation

Here we prove Theorem 4.12, which says that when $(X,\varphi,\sigma)$ is a
reversible subshift, the group $G$ is finitely generated.

Given an open interval $I$, we denote by $\mathscr{F}_{I}^{c}$ the subgroup of
$\mathscr{F}_{I}$ whose elements have their support compactly contained in
$I$. Recalling the notation from §5.2, given a chart $Z_{C,I}\cong C\times I$,
we will write $\mathscr{F}_{C,I}$ for the subgroup $(\mathscr{F}_{I})_{C}$ of
$G_{C,I}$ of elements which act trivially on the factor $C$ and as a fixed
element of $\mathscr{F}_{I}$ on $I$. Similarly, we write
$\mathscr{F}_{C,I}^{c}$ for the subgroup $(\mathscr{F}_{I}^{c})_{C}$.

The following lemma is the analogue of [MB-T, Lemma 4.7].

######  Lemma A.5 (Intersection lemma).

Consider charts $Z_{C,I}$ and $Z_{D,J}$, where $(C,I)$ and $(D,J)$ are such
that $C\cap D\neq\varnothing$ and $I\cap J\neq\varnothing$. Then, the group
$\langle\mathscr{F}_{C,I}^{c},\mathscr{F}_{D,J}^{c}\rangle$ contains the
subgroups $\mathscr{F}_{C\cap D,I}^{c}$ and $\mathscr{F}_{C\smallsetminus
D,I}^{c}$.

###### Proof.

For every interval $L\subset I\cap J$, the charts $Z_{C,L}$ and $Z_{D,L}$ are
both well defined. Choose $L$ that avoids the lattice of half integers
$\frac{1}{2}\mathbb{Z}$. Then every non-trivial element $\gamma\in D_{\infty}$
must map $L$ disjointly from itself. We deduce that $\gamma(C\times
L)\cap(D\times L)=\varnothing$ for any such $\gamma$. It follows that
$Z_{C,L}\cap Z_{D,L}=Z_{C\cap D,L}$. Taking commutators as in the proof of
[MB-T, Lemma 4.7], we find that $\mathscr{F}_{C\cap
D,L}^{c}\leq\langle\mathscr{F}_{C,I}^{c},\mathscr{F}_{D,J}^{c}\rangle$. Now,
conjugating $\mathscr{F}_{C\cap D,L}^{c}$ by an element of
$\mathscr{F}_{C,I}^{c}$, we conclude as in [MB-T, Lemma 4.7]. ∎

###### Proof of Theorem 4.12.

Since $\varphi:X\to X$ is a subshift, $X$ admits a clopen partition
$C_{1}\sqcup\cdots\sqcup C_{k}$ whose $\varphi$-translates form a prebasis of
the topology. Fix dyadic intervals $I_{-1},I_{0},I_{1}\subset\mathbb{R}$ of
length $|I_{j}|<1$ containing respectively $-1,0,1$, and whose union covers an
open neighbourhood of $[-1,1]$. Using Lemma A.1, for every
$i\in\\{1,\ldots,k\\}$, and $x\in C_{i}$, we can find a clopen subset
$D\subset C_{i}$ containing $x$ such that the charts $Z_{D,I_{\omega}}$ are
admissible for $\omega\in\\{-1,0,1\\}$. Thus, upon refining the partition
$\\{C_{i}\\}$, we can assume that all charts $Z_{C_{i},I_{\omega}}$ are
admissible. Let
$H=\left\langle\bigcup_{i=1}^{k}\bigcup_{\omega\in\\{-1,0,1\\}}\mathscr{F}_{C_{i},I_{\omega}}\right\rangle.$
By Lemma 4.9, $H$ is finitely generated. We want to prove that
$H=\mathscr{T}(\varphi,\sigma)$.

######  Claim.

Fix integers $m\leq 0\leq n$, and a sequence
$(i_{j})_{j=m}^{n}\subset\\{1,\ldots,k\\}$ such that
$D:=\bigcap_{j=m}^{n}\varphi^{j}(C_{i_{j}})$ is non-empty. Let $J$ be an
interval contained in one of the intervals $I_{\omega}$, for
$\omega\in\\{-1,0,1\\}$. Then $\mathscr{F}_{D,J}^{c}\leq H$.

###### Proof of claim.

Fix a dyadic interval $L\subset I_{0}$ containing 0, and small enough so that
$L-1\subset I_{-1}$ and $L+1\subset I_{1}$. We begin by observing that if
$D\subset C_{i}$ for some $i\in\\{1,\ldots,k\\}$, and if
$\mathscr{F}_{D,L}^{c}\leq H$, then actually we have
$\mathscr{F}_{D,J}^{c}\leq H$ for every dyadic interval $J$ as in the
statement of the claim. Indeed, by conjugating $\mathscr{F}_{D,L}^{c}\leq H$
by elements of $\mathscr{F}_{C_{i},I_{0}}^{c}$, we obtain the conclusion for
$J\subset I_{0}$. Choose $J\subset I_{0}\cap I_{1}$, and repeat the reasoning
to obtain the conclusion for $J\subset I_{1}$, and argue in the same way for
$J\subset I_{-1}$.

We now proceed by induction on $m\leq 0\leq n$. If $n=m=0$, then $D=C_{i_{0}}$
and $\mathscr{F}_{D,L}^{c}\leq\mathscr{F}^{c}_{C_{i_{0}},I_{0}}\leq H$. Assume
that $n>0$. Set $D^{\prime}=\bigcap_{j=m}^{n-1}\varphi^{j}(C_{i_{j}})$. By
induction we have $\mathscr{F}^{c}_{D^{\prime},L}\leq H$ and thus, since
$L-1\subset I_{-1}$, we also have $\mathscr{F}^{c}_{D^{\prime},L-1}\leq H$.
Now note that
$\mathscr{F}^{c}_{D^{\prime},L-1}=\mathscr{F}^{c}_{\varphi^{-1}(D^{\prime}),L}$
by the chart identification rules. Since $\varphi^{-1}(D^{\prime})\subset
C_{i_{1}}$, we can iterate this reasoning, and we find that
$\mathscr{F}^{c}_{\varphi^{-j}(D^{\prime}),L}$ for all $j\in\\{1,\ldots,n\\}$.
In particular this holds true for $j=n$, and since
$\varphi^{-n}(D^{\prime})\cap C_{i_{n}}=\varphi^{-n}(D)$, the intersection
lemma (Lemma A.5) implies that $\mathscr{F}^{c}_{\varphi^{-n}(D),L}\leq H$.
Now applying again the observation at the beginning of the paragraph, we have
that
$\mathscr{F}^{c}_{\varphi^{-n+1}(D),L}=\mathscr{F}^{c}_{\varphi^{-n}(D),L+1}\leq
H$, and iterating this reasoning $n$ times we find $\mathscr{F}^{c}_{D,L}\leq
H$. The inductive step on $m$ is similar. ∎

Now, let $Z_{C,J}$ be an arbitrary chart, and let us show that
$\mathscr{F}_{C,J}\leq H$. Since $\mathscr{F}_{C,J}$ is generated by its
subgroups $\mathscr{F}^{c}_{C,J^{\prime}}$, where $J^{\prime}\subset J$ is
arbitrarily small, it is enough to show this for the subgroups
$\mathscr{F}^{c}_{C,J}$ such that $|J|\leq\varepsilon$ for some given
$\varepsilon$. Moreover, using that
$\mathscr{F}^{c}_{C,J}=\mathscr{F}^{c}_{\varphi^{n}(C),J-n}$, we can assume
that $J$ intersects $[0,1]$. If $\varepsilon$ is sufficiently small, this
implies that $J$ is entirely contained in $I_{0}$ or $I_{1}$. Since the
subsets $C_{i}$ form a generating partition for $\varphi$, we have a partition
$C=D_{1}\sqcup\cdots\sqcup D_{k}$, where each $D_{i}$ is as in the claim. This
gives the inclusion
$\mathscr{F}^{c}_{C,J}\leq\langle\bigcup_{i=1}^{k}\mathscr{F}^{c}_{D_{i},J}\rangle\leq
H$, as desired.

As observed in the proof of Lemma 5.12, the subgroup $G_{C,J}$ is identified
with the group $\mathcal{C}(C,\mathscr{F}_{J})$, and it is therefore generated
by its subgroups $\mathscr{F}_{D,J}$, with $D\subset C$. Therefore, we have
$G_{C,J}\leq H$. The fragmentation lemma (Proposition 5.11), gives finally
$G\leq H$, as desired. ∎

## References

Joaquín Brum
IMERL, Facultad de Ingeniería, Universidad de la República, Uruguay
Julio Herrera y Reissig 565, Montevideo, Uruguay
<EMAIL_ADDRESS>
Nicolás Matte Bon
CNRS & Institut Camille Jordan (ICJ, UMR CNRS 5208)
Université de Lyon
43 blvd. du 11 novembre 1918, 69622 Villeurbanne, France
<EMAIL_ADDRESS>
Cristóbal Rivas
Dpto. de Matemáticas
Universidad de Chile
Las Palmeras 3425, Ñuñoa, Santiago, Chile
<EMAIL_ADDRESS>
Michele Triestino
Institut de Mathématiques de Bourgogne (IMB, UMR CNRS 5584)
Université de Bourgogne
9 av. Alain Savary, 21000 Dijon, France
<EMAIL_ADDRESS>