# MDS Entanglement-Assisted Quantum Codes of Arbitrary Lengths and Arbitrary
Distances

Hao Chen Hao Chen is with the College of Information Science and
Technology/Cyber Security, Jinan University, Guangzhou, Guangdong Province,
510632, China<EMAIL_ADDRESS>The research of Hao Chen was supported by
NSFC Grant 62032009.

###### Abstract

Quantum error correction is fundamentally important for quantum information
processing and computation. Quantum error correction codes have been studied
and constructed since the pioneering papers of Shor and Steane. Optimal
(called MDS) $q$-qubit quantum codes attaining the quantum Singleton bound
were constructed for very restricted lengths $n\leq q^{2}+1$. Entanglement-
assisted quantum error correction (EAQEC) code was proposed to use the pre-
shared maximally entangled state for the enhancing of error correction
capability. Recently there have been a lot of constructions of MDS EAQEC codes
attaining the quantum Singleton bound for very restricted lengths. In this
paper we construct such MDS EAQEC $[[n,k,d,c]]_{q}$ codes for arbitrary $n$
satisfying $n\leq q^{2}+1$ and arbitrary distance $d\leq\frac{n+2}{2}$. It is
proved that for any given length $n$ satisfying $O(q^{2})=n\leq q^{2}+1$ and
any given distance $d$ satisfying $O(q^{2})=d\leq\frac{n+2}{2}$, there exist
at least $O(q^{2})$ MDS EAQEC $[[n,k,d,c]]_{q}$ codes with different $c$
parameters. Our results show that there are much more MDS entanglement-
assisted quantum codes than MDS quantum codes without consumption of the
maximally entangled state. This is natural from the physical point of view.
Our method can also be applied to construct MDS entanglement-assisted quantum
codes from the generalized MDS twisted Reed-Solomon codes.

Index terms: MDS quantum code, MDS entanglement-assisted quantum code,
Hermitian hull.

##  1 Introduction

Quantum error correction is fundamentally important for quantum information
processing and quantum computation. The Calderbank-Shor-Steane stabilizer
construction of quantum error correction codes from classical error-correcting
codes was proposed in [47, 49, 11, 48]. Then asymptotically good quantum error
correction codes and many quantum codes from classical codes were constructed,
see [12, 13, 14, 15, 1, 43, 3]. In [9, 23] entanglement-assisted quantum error
correction (EAQEC) code was proposed and the similar CSS stabilizer
construction was given. Comparing to an QECC, an EAQEC code has one more
parameter $c$ measuring the consumption of $c$ pre-shared copies of the
maximally entangled state. We refer to [10, 32, 33, 7, 37, 50, 45, 51, 24] for
related development of entanglement-assisted quantum error correction. There
have been a lot of effort to construct MDS entanglement-assisted quantum codes
with specific parameters attaining the quantum Singleton bound, for example,
see [44, 38, 39, 40, 25, 22, 26, 20, 18, 19] and references therein. One basic
problem in entanglement-assisted quantum error correction is that there are
how many such optimal codes.

The quantum Singleton bound for an $[[n,k,d]]_{q}$ quantum code is

$d+2k\leq n+2.$

On the other hand the quantum Singleton bound claims

$2d+k\leq n+c+2$

for an EAQEC $[[n,k,d,c]]_{q}$ code when $d\leq\frac{n+2}{2}$, see [9, 29].
Therefore an EAQEC code could have larger $k$ and $d$ because of the
consumption of pre-shared $c$ copies of the maximally entangled state. A
quantum code satisfying $d+2k=n+2$ is called an MDS quantum code. An EAQEC
code satisfying $2d+k=n+c+2$ and $d\leq\frac{n+2}{2}$ is called an MDS
entanglement-assisted quantum code. MDS quantum codes and MDS entanglement-
assisted quantum codes are considered as optimal quantum codes with the best
possible parameters. The defect $D({\bf C})$ of an EAQEC $[[n,k,d,c]]_{q}$
code ${\bf C}$ is defined by

$D({\bf C})=(n+c+2)-(2k+d)$

to measure its difference to the quantum Singleton bound. MDS EAQEC codes
constructed in papers [38, 22, 25, 39] are these codes with $D({\bf C})=0$.
Almost MDS EAQEC codes constructed in [46, 16] are the EAQEC codes satisfying
$D({\bf C})=2$. Quantum error correction codes from BCH codes were constructed
in [1]. The defects of these quantum BCH codes can be determined explicitly
and some of them are small when compared to the lengths. The construction of
linear codes with $h$-dimension Hermitian hull and their applications in EAQEC
codes have been an active topic in recent years, we refer to [38, 25, 46].
Entanglement-assisted concatenated codes was proposed in a recent paper [21].

There are few Hermitian self-dual MDS codes, while there have been a lot of
Hermitian self-orthogonal (or dual-containing) codes to construct MDS quantum
codes, see [30, 41, 42, 31, 3, 35] and references therein. However these MDS
quantum codes were only constructed for some special lengths. We refer to [3,
4, 5] for recent works on Hermitian self-orthogonal codes and [6] for a nice
survey on quantum codes. It is still unknown if MDS quantum codes exist for
every length $n\leq q^{2}+1$. To conjecture that there are much more MDS
entanglement-assisted quantum codes than MDS quantum codes seems reasonable
from the physical point of view. In our previous paper we proved that MDS
entanglement-assisted quantum $[n,k,d,c]]_{q}$ codes with nonzero $c$
parameters exist for any given length $n\leq q^{2}+1$.

In this paper we prove that for any given length $n$ satisfying
$O(q^{2})=n\leq q^{2}+1$ and any given distance $O(q^{2})=d\leq\frac{n+2}{2}$,
there exist at least $O(q^{2})$ MDS EAQEC $[[n,k,d,c]]_{q}$ codes with
different $c$ parameters. Since MDS quantum codes have been only constructed
for some restricted lengths. Our result shows that there are much more MDS
entanglement-assisted quantum codes than MDS quantum codes. Our method can
also be applied to give a lower bound of the dimensions of Hermitian hulls of
a class of generalized twisted Reed-Solomon codes. Then MDS entanglement-
assisted quantum codes are also constructed from the generalized MDS twisted
Reed-Solomon codes.

##  2 Preliminaries

The Hamming weight of a vector ${\bf a}\in{\bf F}_{q}^{n}$ is the number of
non-zero coordinate positions. The Hamming distance $d({\bf a},{\bf b})$
between two vectors ${\bf a}$ and ${\bf b}$ is the Hamming weight of ${\bf
a}-{\bf b}$. For a code ${\bf C}\subset{\bf F}_{q}^{n}$, its minimum Hamming
distance

$d({\bf C})=\min_{{\bf a}\neq{\bf b}}\\{d({\bf a},{\bf b}),{\bf a}\in{\bf
C},{\bf b}\in{\bf C}\\},$

is the minimum of Hamming distances $d({\bf a},{\bf b})$ between any two
different codewords ${\bf a}$ and ${\bf b}$ in ${\bf C}$. The shortening code
of ${\bf C}$ at the $i$-th coordinate position is the subcode of ${\bf C}$
consisting of codewords in ${\bf C}$ whose $i$-th coordinates are zero. The
punctured code of ${\bf C}$ at the $i$-th position is the image of ${\bf C}$
under the natural projection from ${\bf F}_{q}^{n}$ to ${\bf F}_{q}^{n-1}$ by
deleting the $i$-th coordinate. The minimum Hamming distance of a linear code
is its minimum Hamming weight. The Singleton bound asserts $d\leq n-k+1$ for a
linear $[n,k,d]_{q}$ code. When the equality holds, this code is an MDS code.
The main conjecture of MDS codes claims that the length of an MDS code over
${\bf F}_{q}$ is at most $q+1$, except some trivial exceptional cases. In [2]
the main conjecture of MDS codes was proved for codes over prime fields. We
refer to [34] for the theory of Hamming error-correcting codes.

The Euclidean inner product on ${\bf F}_{q}^{n}$ is defined by

$<{\bf x},{\bf y}>=\Sigma_{i=1}^{n}x_{i}y_{i},$

where ${\bf x}=(x_{1},\ldots,x_{n})$ and ${\bf y}=(y_{1},\ldots,y_{n})$. The
Euclidean dual of a linear code ${\bf C}\subset{\bf F}_{q}^{n}$ is

${\bf C}^{\perp}=\\{{\bf c}\in{\bf F}_{q}^{n}:<{\bf c},{\bf y}>=0,\forall{\bf
y}\in{\bf C}\\}.$

The Hermitian inner product on ${\bf F}_{q^{2}}^{2}$ is defined by

$<{\bf x},{\bf y}>_{H}=\Sigma_{i=1}^{n}x_{i}y_{i}^{q},$

where ${\bf x}=(x_{1},\ldots,x_{n})$ and ${\bf y}=(y_{1},\ldots,y_{n})$ are
two vectors in ${\bf F}_{q^{2}}^{n}$. The Hermitian dual of a linear code
${\bf C}\subset{\bf F}_{q^{2}}^{n}$ is

${\bf C}^{\perp_{H}}=\\{{\bf c}\in{\bf F}_{q^{2}}^{n}:<{\bf c},{\bf
y}>_{H}=0,\forall{\bf y}\in{\bf C}\\}.$

It is clear ${\bf C}^{\perp_{H}}=({\bf C}^{\perp})^{q}$, where

${\bf C}^{q}=\\{(c_{1}^{q},\ldots,c_{n}^{q}):(c_{1}\ldots,c_{n})\in{\bf
C}\\}.$

The minimum distance of the Euclidean dual is called the dual distance and is
denoted by $d^{\perp}$. The minimum distance of the Hermitian dual is the same
as $d^{\perp}$. A linear code ${\bf C}\subset{\bf F}_{q^{2}}^{n}$ is called
Hermitian self-dual if ${\bf C}={\bf C}^{\perp_{H}}$, Hermitian self-
orthogonal if ${\bf C}\subset{\bf C}^{\perp_{H}}$, and Hermitian dual-
containing if ${\bf C}^{\perp_{H}}\subset{\bf C}$. The linear code ${\bf
C}\bigcap{\bf C}^{\perp}$ is called the Euclidean hull of the linear code
${\bf C}\subset{\bf F}_{q}$. The intersection ${\bf C}\bigcap{\bf
C}^{\perp_{H}}$ is called the Hermitian hull of the linear code ${\bf
C}\subset{\bf F}_{q^{2}}^{n}$.

Two codes ${\bf C}_{1}$ and ${\bf C}_{2}$ in ${\bf F}_{q}^{n}$ are equivalent
if and only if ${\bf C}_{2}$ can be obtained from ${\bf C}_{1}$ by a
permutation of coordinates and the multiplication of a Hamming weight $n$
vector ${\bf v}=(v_{1},v_{2},\ldots,v_{n})\in{\bf F}_{q}^{n}$ on coordinates,
where $v_{i}\neq 0$ for $i=1,\ldots,n$. That is

${\bf C}_{2}=\\{{\bf c}=(c_{1},\ldots
c_{n}):(c_{1},\ldots,c_{n})=(v_{1}x_{1},\ldots,v_{n}x_{n}),{\bf x}\in
Perm({\bf C}_{1})\\},$

where $Perm({\bf C}_{1})$ is the code obtained from ${\bf C}_{1}$ by a
coordinate permutation. Equivalent codes have the same distances and weight
distributions. Obviously equivalent codes have different dual codes as
follows. Let ${\bf v}$ be a Hamming weight $n$ vector ${\bf
v}=(v_{1},v_{2},\ldots,v_{n})\in{\bf F}_{q}^{n}$, set ${\bf v}\cdot{\bf
C}=\\{(v_{1}c_{1},\ldots,v_{n}c_{n}):\forall{\bf
c}=(c_{1},\ldots,c_{n})\in{\bf C}\\}$. Then

$({\bf v}\cdot{\bf C})^{\perp}={\bf v}^{-1}\cdot{\bf C}^{\perp},$

where ${\bf v}^{-1}=(v_{1}^{-1},\ldots,v_{n}^{-1}).$ For a linear code ${\bf
C}\subset{\bf F}_{q^{2}}^{n}$ and a Hamming weight $n$ vector ${\bf v}\in{\bf
F}_{q^{2}}^{n}$, then

$({\bf v}\cdot{\bf C})^{\perp_{h}}={\bf v}^{-q}\cdot{\bf C}^{\perp_{h}},$

where ${\bf v}^{-q}=(v_{1}^{-q},\ldots,v_{n}^{-q})$.

The CSS stabilizer construction of quantum code implies that a quantum
$[[n,2k-n,d]]_{q}$ code can be obtained from a Hermitian dual-containing
$[n,k,d]_{q^{2}}$ code and a quantum $[[n,n-2k,d]]_{q}$ code can be obtained
from a Hermitian self-orthogonal $[n,k,d]_{q^{2}}$ code. From the CSS
construction of entanglement-assisted quantum code in [9], we recall the
following result in [9].

CSS construction of entanglement-assisted quantum codes. Let ${\bf
C}\subset{\bf F}_{q^{2}}$ be a linear $[n,k,d]_{q^{2}}$ code with the
$h$-dimensional Hermitian hull. Then an EAQEC $[[n,k-h,d,n-k-h]]_{q}$ code and
an EAQEC $[[n,n-k-h,d^{\perp},k-h]]_{q}$ code can be constructed. When
$d\leq\frac{n+2}{2}$ or $d^{\perp}\leq\frac{n+2}{2}$ and the code is MDS, then
the above code is an MDS EAQEC code.

In the above construction of EAQEC codes, the dimension $h$ of the hull of a
linear code is the key parameter to control the dimension and consumption
parameter of an EAQEC code, since the other parameters of codes are preserved
when a linear code is transformed to an equivalent linear code. This is an
important motivation to construct equivalent linear codes with various
dimension Hermitian hulls. In [16] it was proved for a linear
$[n,k,d]_{q^{2}}$ code ${\bf C}\subset{\bf F}_{q^{2}}^{n}$ with the Hermitian
hull of the dimension $\dim(Hermitianhull)\geq h$, then there exist at least
$h+1$ different entanglement-assisted quantum codes with different $c$
parameters and the same defect. On the other hand from the CSS construction of
entanglement-assisted quantum codes, if the dimension of the Hermitian hull is
large, a better EAQEC code with the smaller $c$ parameter and the same defect
can be constructed. From this motivation it is natural to ask that for fixed
$[n,k,d]_{q^{2}}$ linear codes, what is the largest possible Hermitian hull?
We refer to [16] for the study of this problem. In this paper we give a lower
bound of the dimensions of Hermitian hulls of a class of generalized twisted
Reed-Solomon codes.

##  3 Arbitrary length MDS codes with lower bounded dimension Hermitian hulls

We need the following result to adjust the dimensions of Hermitian hulls to
construct entanglement-assisted quantum codes.

Proposition 3.1. Let $q$ be a prime power satisfying $q\geq 3$. Let ${\bf
C}\subset{\bf F}_{q^{2}}$ be a linear $[n,k]_{q^{2}}$ code with $l$-dimension
Hermitian hull. Then for any nonnegative integer $l^{\prime}\leq l$ there is a
Hamming weight $n$ vector ${\bf v}$ such that ${\bf v}\cdot{\bf C}$ has the
$l^{\prime}$ dimension Hermitian hull. Thus from an arbitrary linear
$[n,k]_{q^{2}}$ code ${\bf C}\subset{\bf F}_{q^{2}}^{n}$ with its dual
distance $d^{\perp}\leq\frac{n+2}{2}$ and the $h$-dimension Hermitian hull, we
have an EAQEC $[[n,n-k-l,d^{\perp},k-l]]_{q}$ code, for each nonnegative
integer $l$ satisfying $l\leq h$.

Proof. We can assume that the generator matrix of ${\bf C}$ is of the
following form,

$\left(\begin{array}[]{ccccccc}{\bf I}_{l}&{\bf 0}_{l,k-l}&{\bf P}\\\ {\bf
0}_{k-l,l}&{\bf I}_{k-l}&{\bf Q}\\\ \end{array}\right)$

The first $l$ rows is an $l\times n$ matrix, which is a generator matrix of
${\bf C}\bigcap{\bf C}^{\perp_{H}}$. Then ${\bf
P}\cdot{\bf\bar{P}}^{\tau}=-{\bf I}_{l}$. Set ${\bf Q}=({\bf Q}_{1},{\bf
Q}_{2})$, where ${\bf Q}_{1}$ is a $(k-l)\times(k-l)$ matrix and ${\bf Q}_{2}$
is a $(k-l)\times(n-k-l)$ matrix. By multiplying a Hamming weight $n$ vector
${\bf v}=(\lambda_{1},\lambda_{l-l^{\prime}},1,\ldots,1)\in{\bf
F}_{q^{2}}^{n}$ such that $\lambda_{i}^{q+1}$ is not $1$. Now we prove that
the Hermitian hull is just the subcode generated by $l-l^{\prime}+1,\ldots,l$
rows.

Then the generator matrix ${\bf G}_{{\bf v}\cdot{\bf C}}$ of ${\bf v}\cdot{\bf
C}$ is of the following form,

$\left(\begin{array}[]{ccccccc}{\bf D_{\lambda}}&{\bf 0}_{l,k-l}&{\bf
P}_{1}&{\bf P}_{2}\\\ {\bf 0}_{k-l,l}&{\bf I}_{k-l}&{\bf Q}_{1}&{\bf Q}_{2}\\\
\end{array}\right)$

where ${\bf D_{\lambda}}$ is a $l\times l$ non-singular matrix of the
following form.

$\left(\begin{array}[]{ccccccccccccc}\lambda_{1}&0&0&\cdots&\cdots&\cdots&\cdots&0\\\
0&\lambda_{2}&0&\cdots&\cdots&\cdots&\cdots&0\\\
\cdots&\cdots&\cdots&\cdots&\cdots&\cdots&\cdots&\cdots\\\
0&0&0&\cdots&\lambda_{l-l^{\prime}}&0&\cdots&0\\\ 0&0&0&\cdots&0&1&\cdots&0\\\
0&0&0&\cdots&0&0&\cdots&1\\\ \end{array}\right)$

The Hermitian dual ${\bf C}^{\perp_{H}}$ has one generator matrix ${\bf
G}_{{\bf C}^{\perp_{H}}}$ of the form
$(-{\bf\bar{P}}^{\tau},-{\bf\bar{Q}}^{\tau},{\bf I}_{n-k})$. Consider the
following $(n-k)\times(n-k)$ nonsingular matrix ${\bf W}$,

$\left(\begin{array}[]{cccc}{\bf P}_{1}&{\bf P}_{2}\\\ {\bf 0}_{n-k-l,l}&{\bf
I}_{n-k-l}\\\ \end{array}\right)$

Then ${\bf W}\cdot{\bf G}_{{\bf C}^{\perp_{H}}}$ of the following form is also
one generator matrix of ${\bf C}^{\perp_{H}}$. Here ${\bf 0}_{l,k-l}$ and
${\bf 0}_{n-k-l,l}$ are the $l\times(k-l)$ and $(n-k-l)\times l$ zero matrix.

$\left(\begin{array}[]{cccc}{\bf I}_{l}&{\bf 0}_{l,k-l}&{\bf P}_{1}&{\bf
P}_{2}\\\ -{\bf\bar{P_{2}}}^{\tau}&-{\bf\bar{Q_{2}}}^{\tau}&{\bf
0}_{n-k-l,l}&{\bf I}_{n-k-l}\\\ \end{array}\right)$

Hence the Hermitian dual $({\bf v}\cdot{\bf C})^{\perp_{H}}={\bf
v}^{-q}\cdot{\bf C}^{\perp_{H}}$ has one generator matrix ${\bf G}_{{\bf
v}^{-q}\cdot{\bf C}^{\perp_{H}}}$ of the following form.

$\left(\begin{array}[]{cccc}{\bf D}_{\lambda}^{-q}&{\bf 0}_{l,k-l}&{\bf
P}_{1}&{\bf P}_{2}\\\ -{\bf\bar{P_{2}}}^{\tau}\dot{\bf
D}_{\lambda}^{-q}&-{\bf\bar{Q_{2}}}^{\tau}&{\bf 0}_{n-k-l,l}&{\bf
I}_{n-k-l}\\\ \end{array}\right)$

Then last $l^{\prime}$ rows of the above generator matrix of ${\bf C}$ and the
$l-l^{\prime}+1,l-l^{\prime}+2,\ldots,l$ rows of the above generator matrix of
$({\bf v}\cdot{\bf C})^{\perp_{H}}={\bf v}^{-q}\cdot{\bf C}^{\perp_{H}}$ are
the same. Thus the dimension of the Hermitian hull $({\bf v}\cdot{\bf
C})\bigcap({\bf v}\cdot{\bf C})^{\perp_{H}}$ is at least $l^{\prime}$.

It is clear that ${\bf C}\bigcap{\bf C}^{\perp_{H}}$ is the code generated by
the first $l$ rows of both generator matrices. It is Hermitian self-
orthogonal. From Theorem 2.1 in [17], ${\bf v}({\bf C}\bigcap{\bf
C}^{\perp_{H}})\bigcap{\bf v}^{-q}({\bf C}\bigcap{\bf
C}^{\perp_{H}})^{\perp_{H}}$ is of the dimension $l^{\prime}$. On the other
hand

${\bf v}^{-q}\cdot({\bf C}\bigcap{\bf C}^{\perp_{H}})^{\perp_{H}}={\bf
v}^{-q}({\bf C}^{\perp_{H}}\bigcup{\bf C}),$

has one generator matrix as follows.

$\left(\begin{array}[]{cccc}{\bf D}_{\lambda}^{-q}&{\bf 0}_{l,k-l}&{\bf
P}_{1}&{\bf P}_{2}\\\ -{\bf\bar{P_{2}}}^{\tau}\dot{\bf
D}_{\lambda}^{-q}&-{\bf\bar{Q_{2}}}^{\tau}&{\bf 0}_{n-k-l,l}&{\bf
I}_{n-k-l}\\\ {\bf 0}_{k-l,l}&{\bf I}_{k-l}&{\bf Q}_{1}&{\bf Q}_{2}\\\
\end{array}\right)$

Then the conclusion follows from Theorem 2.1 in [17] immediately.

Theorem 3.1. Let $q\geq 3$ be a prime power. For any given length $n\leq
q^{2}+1$ and any given distance $d\leq\frac{n+2}{2}$, there exists at least
one MDS EAQEC $[[n,d,k,c]]_{q}$ code with nonzero $c$ parameter.

Proof. For each length $n\leq q^{2}+1$ and distance $d\leq\frac{n+2}{2}$ we
take a Reed-Solomon $[n,n-d+1,d]_{q^{2}}$ code ${\bf C}$. Suppose that the
dimension of the Hermitian hull of this code is $h$. If $h\geq 1$. Then we
have at least $h$ equivalent $[n,n-d+1,d]_{q^{2}}$ linear codes with the
$l$-dimension Hermitian hull, where $0\leq l\leq h-1$. Then we have $h$ MDS
entanglement-assisted quantum $[[n,n-d+1-l,d,d-1-l]]_{q}$ codes with nonzero
$c$ parameters, since $l\leq n-k-1=d-2$. Even when this Reed-Solomon code is
Hermitian LCD, we have at least one MDS entanglement-assisted quantum
$[[n,n-d+1,d,d-1]]_{q}$ code with the nonzero $c$ parameter.

From the above proof for any given length $n\leq q^{2}+1$ and given distance
$d\leq\frac{n+2}{2}$ it is good to have a generalized Reed-Solomon
$[n,n-d+1,d]_{q^{2}}$ code with a $h$-dimension Hermitian hull such that $h$
is relatively large. Then we have at least $h$ different MDS entanglement-
assisted quantum $[[n,n-d+1-l,d,d-1-l]]_{q}$ codes, for $l=0,\ldots,h-1$. In
the following part of this section we construct many such generalized Reed-
Solomon codes for many lengths and many distances such that $h$ can have a
good lower bound. In general it is good to construct linear codes over ${\bf
C}_{q^{2}}$ with large Hermitian hulls.

Theorem 3.2. Let $n$ be a positive integer satisfying $n|q^{2}-1$ and $k$ be
any given positive integer satisfying $k\geq\frac{n}{2}$. Then there exists an
MDS linear code ${\bf C}\subset{\bf F}_{q^{2}}^{n}$ such that $\dim({\bf
C}\bigcap{\bf C}^{\perp_{H}})\geq\frac{k(n-k-2)}{q^{2}}$.

Proof. Let ${\bf G}=\\{a_{1},\ldots,a_{n}\\}$ be all elements of the subgroup
of the multiplicative group ${\bf F}_{q^{2}}^{*}$ of the order $n$. They are
$n$ distinct roots of

$h(x)=x^{n}-1=\prod_{i=1}^{n}(x-a_{i}).$

Set $RS(n,k)=\\{(f(a_{1}),\ldots,f(a_{n})):f\in{\bf F}_{q^{2}}[x],\deg(f)\leq
k-1\\}$. Then from the computation in [36], $RS(n,k)^{\perp}={\bf U}^{-1}\cdot
RS(n,n-k)$, where ${\bf U}=(u_{1},\ldots,u_{n})\in({\bf F}_{q^{2}}^{*})^{n}$,
and

$u_{i}=(a_{i}-a_{1})\cdots(a_{i}-a_{i-1})(a_{i}-a_{i+1})\cdots(a_{i}-a_{n}).$

Thus

$({\bf U}^{-1}\cdot RS)^{\perp}={\bf U}^{-1}\cdot RS(n,k)^{\perp}=RS(n,n-k),$

and

${\bf U}^{-1}\cdot
RS(n,k)=\\{(\frac{xf}{n}(a_{1}),\ldots,\frac{xf}{n}(a_{n})):\deg(f)\leq
k-1\\},$

where $\frac{xf}{n}$ is the polynomial product. It is clear

$(({\bf U}^{-1}\cdot RS(n,k))^{q})^{\perp_{H}}=RS(n,n-k).$

Set

$I=\\{x\cdot x^{j}:0\leq j\leq k-1\\}$

and

$J=\\{x^{i}:0\leq i\leq n-k-1\\}.$

We need to count how many common monomials in the set $I^{q}$ and $J$, where
$I^{q}=\\{{\bf e}^{q}:{\bf e}\in I\\}$. We have

$\dim(({\bf U}\cdot RS(n,k))^{q}\bigcap(({\bf U}\cdot
RS(n,k))^{q})^{\perp_{H}})=\dim(({\bf U}\cdot RS(n,k))^{q}\bigcap RS(n,n-k)),$

and

$\dim(({\bf U}\cdot RS(n,k))^{q}\bigcap RS(n,n-k))\geq|I^{q}\bigcap J|.$

For each $0\leq i\leq k-1$ with the expression $i=i_{1}q+i_{2},$ where $0\leq
i_{1}\leq q-1$ and $0\leq i_{2}\leq q-1$, $iq=i_{1}q^{2}+i_{2}q$. Then
$x^{iq}=x^{i_{2}q+i_{1}}$ for all elements in ${\bf F}_{q^{2}}$. Since the
exponents in the set $J$ are consecutive, Notice that $k\geq\frac{n}{2}$, the
conclusion follows immediately.

It was proved that the length $q^{2}+1$ generalized Reed-Solomon codes over
${\bf F}_{q^{2}}$ of the dimension $k\geq 1+q$ can not be Hermitian self-
orthogonal, see Theorem 5 in [3]. However when the length $n|q^{2}-1$, the
Hermitian hull ${\bf C}\bigcap{\bf C}^{\perp_{H}}$ in Theorem 2.2 is a
Hermitian self-orthogonal code with big dimension. This is a generalized Reed-
Solomon codes evaluated at a multiplicative subgroup.

Theorem 3.3. Let $n=vn_{1}$ be a positive integer satisfying $n_{1}|q^{2}-1$,
$(q+1)|n_{1}$, $v\leq q-1$, and $k=k_{1}q+k_{2}$, $0\leq k_{1}\leq q-1$ and
$0\leq k_{2}\leq q-1$ be any given positive integer satisfying
$k\geq\frac{n}{2}$. Then there exists an MDS linear code ${\bf C}\subset{\bf
F}_{q^{2}}^{n}$ such that $\dim({\bf C}\bigcap{\bf
C}^{\perp_{H}})\geq\frac{k_{1}(n-k-2)}{q}$.

Proof. Let ${\bf G}$ be the subgroup of the multiplicative group of the order
$n_{1}$. From the condition $n_{1}|q^{2}-1$ and $(q+1)|n_{1}$, it follows

${\bf G}\bigcap{\bf F}_{q}^{*}=\\{1\\}.$

We talk $v$ cosets $b_{1}{\bf G},\ldots,b_{v}{\bf G}$, where
$b_{1},\ldots,b_{v}$ are distinct elements in ${\bf F}_{q}\subset{\bf
F}_{q^{2}}$. Set $A=\bigcup_{i=1}^{v}b_{i}{\bf G}$, then we have

$h(x)=\prod_{a\in A}(x-a)=\prod_{i=1}^{v}(x^{n_{1}}-b_{i}^{n_{1}}).$

Then

$({\bf U}^{-1}\cdot RS(n,k))^{\perp}=RS(n,n-k),$

where ${\bf U}=(u_{1},\ldots,u_{n})$, $u_{i}=h^{\prime}(a_{i})$ for
$a_{1},\ldots,a_{n}\in A$. Therefore ${\bf
U}=(n_{1}a_{1}^{n-1}B_{1},\ldots,n_{1}a_{n}^{n_{1}-1}B_{n})$, where
$B_{1},\ldots,B_{n}$ are nonzero elements in ${\bf F}_{q}\subset{\bf
F}_{q^{2}}$. Set $B_{i}=\eta_{i}^{q+1}$ for some nonzero element
$\eta_{i}\in{\bf F}_{q^{2}}$, and ${\bf\eta}=(\eta_{1},\ldots,\eta_{n})$ and
${\bf B}=(B_{1},\ldots,B_{n})$, we have ${\bf\eta}^{q+1}={\bf B}$.

We have

$({\bf B}^{-1}\cdot({\bf\overrightarrow{h_{1}^{\prime}}}^{-1}\cdot
RS(n,k))^{q})^{\perp_{H}}=RS(n,n-k),$

where $h_{1}(x)=x^{n_{1}}-1$, $h_{1}^{\prime}(x)=n_{1}x^{n_{1}-1}$,
$\overrightarrow{h_{1}^{\prime}}=(h_{1}^{\prime}(a_{1}),\ldots,h_{1}^{\prime}(a_{n}))$.
Therefore

$(\frac{{\bf\eta}}{{\bf
B}}\cdot({\bf\overrightarrow{h_{1}^{\prime}}}^{-1}\cdot
RS(n,k))^{q})^{\perp_{H}}={\bf\eta}^{-q}RS(n,n-k),$

where $\frac{{\bf\eta}}{{\bf B}}={\bf\eta}^{-q}$. We only need to calculate
the dimension of

$\dim(({\bf\overrightarrow{h_{1}^{\prime}}}^{-1}\cdot RS(n,k))^{q}\bigcap
RS(n,n-k)).$

Notice that $h_{1}(x)=n_{1}x^{n_{1}-1}$, from a similar argument as in the
proof of Theorem 3.2, the conclusion follows immediately.

Corollary 3.1. Let $n=vn_{1}-t$ and $\frac{n}{2}\leq k=k_{1}q+k_{2}$, $0\leq
k_{1}\leq q-1$, $0\leq k_{2}\leq q-1$, be positive integers, where $n_{1}$ is
a positive integer satisfying $n_{1}|q^{2}-1$ and $(q+1)|n_{1}$, $v\leq q-1$
and $t<n-k+1$. Then there exists an MDS linear code ${\bf C}\subset{\bf
F}_{q^{2}}^{n}$ such that $\dim({\bf C}\bigcap{\bf
C}^{\perp_{H}})\geq\frac{k_{1}(n-k-2)}{q}-t$.

Proof. We consider the punctured code of a linear $[n,k]_{q^{2}}$ code ${\bf
C}\subset{\bf F}_{q^{2}}^{n}$ to ${\bf C}_{punctured,s}\subset{\bf
F}_{q^{2}}^{n-s}$ at the last $s$ coordinate positions. If $s<d_{H}({\bf C})$
the punctured mapping ${\bf C}\longrightarrow{\bf C}_{puncture,s}$ is linear
and injective. Let ${\bf C}_{1}\subset{\bf C}^{\perp_{H}}$ be the shortening
code at the last $s$ coordinate positions, it is clear that ${\bf
C}_{punctured,s}\subset{\bf C}_{1}^{\perp_{H}}$. On the other hand

$\dim({\bf C}_{1})=n-k-s,$

and

$\dim(({\bf C}_{punctured,s})^{\perp})=n-s-k,$

then

$({\bf C}_{punctured,s})^{\perp_{H}}={\bf C}_{1},$

if $s<d_{H}({\bf C})$.

It is clear ${\bf C}_{1}\subset({\bf C}^{\perp_{H}})_{punctured,s}$, then
${\bf C}_{punctured,s}\bigcap({\bf C}_{punctured,s})^{\perp_{H}}$ is the
shortening code of ${\bf C}\bigcap{\bf C}^{\perp_{H}}$. The conclusion follows
immediately.

From this CSS construction of entanglement-assisted quantum codes, the
following main results follows from the above results about the lower bound on
the dimensions of Hermitian hulls.

Corollary 3.2. Let $q\geq 3$ be a prime power. Let $n$ be a positive integer
satisfying $n|q^{2}-1$ and $k=k_{q}+k_{2}$, $0\leq k_{1}\leq q-1$ and $0\leq
k_{2}\leq q-1$ be any given positive integer satisfying $k\geq\frac{n}{2}$.
Then there exist at least $\frac{k_{1}(n-k-2)}{q}+1$ MDS entanglement-assisted
quantum $[[n,k-l,n-k+1,n-k-l]]_{q}$ codes with different nonzero $c$
parameters, where $0\leq l\leq\frac{k_{1}(n-k-2)}{q}$.

Corollary 3.3. Let $q\geq 3$ be a prime power. Let $n=vn_{1}$ be a positive
integer satisfying $n_{1}|q^{2}-1$, $(q+1)|n_{1}$, $v\leq q-1$, and
$k=k_{1}q+k_{2}$, $0\leq k_{1}\leq q-1$ and $0\leq k_{2}\leq q-1$ be any given
positive integer satisfying $k\geq\frac{n}{2}$. Then there exist at least
$\frac{k_{1}(n-k-2)}{q}+1$ MDS entanglement-assisted quantum
$[[n,k-l,n-k+1,n-k-l]]_{q}$ codes with different nonzero $c$ parameters, where
$0\leq l\leq\frac{k_{1}(n-k-2)}{q}$.

Corollary 3.4. Let $q\geq 3$ be a prime power. Let $n=vn_{1}-t$ and
$\frac{n}{2}\leq k=k_{1}q+k_{2}$, $0\leq k_{1}\leq q-1$, $0\leq k_{2}\leq
q-1$, be positive integers, where $n_{1}$ is a positive integer satisfying
$n_{1}|q^{2}-1$ and $(q+1)|n_{1}$, $v\leq q-1$ and $t<n-k+1$. Then there
exists at least $\frac{k_{1}(n-k-2)}{q}+1-t$ MDS entanglement-assisted quantum
$[[n,k,d,c]]_{q}$ codes with different nonzero $c$ parameters.

Since $n=q+1$ is a factor of $q^{2}-1$, we can take $n_{1}=q+1$ and
$v=1,2,\ldots,q-1$ and $t<\min\\{n-k+1,q\\}$ in Corollary 2.4. Then for the
given length $O(q^{2})=n\leq q^{2}+1$ and the given distance
$O(q^{2})=d\leq\frac{n+2}{2}$, there are at least $O(q^{2})$ different MDS
entanglement-assisted quantum codes with different $c$ parameters.

##  4 Hermitian hulls of generalized twisted Reed-Solomon codes

We consider a class of twisted Reed-Solomon codes introduced in [8]. For a
twisted Reed-Solomon code ${\bf C}_{{\bf\alpha},{\bf t},{\bf
h},{\bf\eta}}^{n,k}$ evaluated at a subgroup of the multiplicative group ${\bf
F}_{q}^{*}$, the dual is equivalent to another twisted Reed-Solomon code ${\bf
C}_{{\bf\alpha},k-{\bf h},n-k-{\bf t},-{\bf\eta}}^{n,n-k}$. If $q=2^{s}$, then
for suitable ${\bf h},{\bf t}$ and ${\bf\eta}$, from the method proposed in
[16], it is easy to get a self-dual twisted Reed-Solomon code. Some of them
are MDS codes.

In this section we calculate the Hermitian hulls of the generalized twisted
Reed-Solomon codes arising from the subgroup of f${\bf F}_{q^{2}}^{*}$, see
[8]. Let $n$ and $k$ be two positive integers satisfying $n|q^{2}-1$ and
$k\leq n-1$. Let $\alpha_{1},\ldots,\alpha_{n}$ be $n$ distinct elements in
the finite field ${\bf F}_{q^{2}}$ such that
${\bf\alpha}=\\{\alpha_{1},\ldots,\alpha_{n}\\}$ is a multiplicative subgroup
of ${\bf F}_{q^{2}}^{*}$. Let $\eta$ be a nonzero element of ${\bf
F}_{q^{2}}$. Set ${\bf g}_{0}=1+\eta x^{k}$, ${\bf g}_{1}=x$, …, ${\bf
g}_{k-1}=x^{k-1}$. Let ${\bf P}(\eta,k)$ be the linear span over ${\bf
F}_{q^{2}}$ by ${\bf g}_{0},\ldots,{\bf g}_{k-1}$. The linear code ${\bf
C}_{{\bf\alpha},\eta,k}$ is the evaluation code of these polynomials in ${\bf
P}(\eta,k)$ at the above $n$ distinct elements of the subgroup ${\bf\alpha}$.
The dimension of the Schur square of ${\bf C}_{{\bf\alpha},\eta,k}$ is at
least $2k$, see [8]. Thus this code is not equivalent to a Reed-Solomon code
when $2k\leq n$, even when it is MDS.

Set ${\bf h}_{0}=1$, ${\bf h}_{1}=x$, …, ${\bf h}_{n-k-1}=x^{n-k-1}-\eta
x^{n-1}$. Let ${\bf P}(-\eta,n-k)^{\perp}$ be the linear span over ${\bf
F}_{q^{2}}$ by ${\bf h}_{0},\ldots,{\bf h}_{n-k-1}$. Let ${\bf
C}_{{\bf\alpha},-\eta,n-k}$ be the linear code which is the evaluation code of
these polynomials in ${\bf P}(-\eta,n-k)^{\perp}$ at the above $n$ distinct
elements of the subgroup ${\bf\alpha}$.

Proposition 4.1 (or see Theorem 5 in [8]). The dual code of ${\bf
C}_{{\bf\alpha},\eta,k}$ is of the form ${\bf U}^{-1}\cdot{\bf
C}_{{\bf\alpha},-\eta,n-k}$, where ${\bf U}\in{\bf F}_{q^{2}}^{n}$ is a
Hamming weight $n$ vector as in Theorem 3.2.

Proof. First of all ${\bf C}_{{\bf\alpha},\eta,k}\subset RS(n,k+1)$, then
${\bf U}^{-1}\cdot RS(n,n-k-1)\subset{\bf C}_{{\bf\alpha},\eta,k}^{\perp}$. We
only need to prove that the products of ${\bf h}_{n-k-1}$ and ${\bf
g}_{0},\ldots,{\bf g}_{k-1}$ contain no terms $x^{v}$ satisfying $v\geq n-1$.
Because ${\bf\alpha}=\\{\alpha_{1},\alpha_{2},\ldots,\alpha_{n}\\}$ is a
multiplicative subgroup of ${\bf F}_{q^{2}}^{*}$, then $x^{n}=1$ for each
element in this subgroup. Hence $(1+\eta x^{k})(x^{n-k-1}-\eta
x^{n-1})=x^{n-k-1}-\eta^{2}x^{k-1}$, and $h_{n-k-1}x^{i}=x^{n-k-1+i}-\eta
x^{i-1}$ for $i=1,\ldots,k-1$, when evaluated at elements of this subgroup
${\bf\alpha}=\\{\alpha_{1},\ldots,\alpha_{n}\\}$. The conclusion follows
immediately.

Proposition 4.2 (or see Theorem 1 of [8]). If $\eta$ is not in the subgroup
${\bf\alpha}$, then ${\bf C}_{{\bf\alpha},\eta,k}$ is an MDS code.

Theorem 4.1. Let $n$ be a divisor of $q^{2}-1$ as in Theorem 3.2 and $k$ be a
positive integer satisfying $\frac{n}{2}\leq k\leq n$. The dimension of the
Hermitian hull of the code $({\bf U}^{-1}\cdot{\bf
C}_{{\bf\alpha},\eta,k})^{q}$ is at least $\frac{k(n-k-2)}{q^{2}}$.

Proof. It is clear that the code ${\bf U}^{-1}\cdot{\bf
C}_{{\bf\alpha},\eta,k}$ is the evaluation code of linear combinations of
$x{\bf g}_{0},\ldots,x{\bf g}_{k-1}$. We have $(({\bf U}^{-1}\cdot{\bf
C}_{{\bf\alpha},\eta,k})^{q})^{\perp_{H}}={\bf C}_{{\bf\alpha},-\eta,n-k}$,
which is the evaluation code of ${\bf h}_{0},\ldots,{\bf h}_{n-k-1}$. Set
$I=\\{xx^{j}:1\leq j\leq k\\}$ and $J=\\{x^{j}:1\leq i\leq n-k-2\\}$. We need
to count how many common monomials in $I^{q}\bigcap J$. The conclusion follows
from a similar argument as the proof of Theorem 3.2.

From Theorem 4.2 it is proved that MDS entanglement assisted quantum codes can
also be constructed from the generalized twisted Reed-Solomon codes.

##  5 Conclusion

Construction of MDS quantum codes and MDS entanglement-assisted quantum codes
have been a long-time challenging problem in the theory of quantum error
correction codes. Presently only few MDS quantum codes have been constructed
for restricted lengths. Before our paper [17], MDS entanglement-assisted
quantum codes have only been constructed for very specific lengths and
distances. In this paper we showed that for each possible length and each
possible distance there are at least one MDS entanglement-assisted quantum
code. On the other hand when the length $n$ and the distance are of the form
$O(q^{2})$, there exist at least $O(q^{2})$ different MDS entanglement-
assisted quantum codes. Therefore there are much more MDS entanglement-
assisted quantum codes than MDS quantum codes. This is natural from the
physical point of view. Our method can be applied to construct MDS
entanglement-assisted quantum codes from the generalized MDS twisted Reed-
Solomon codes. Therefore many new MDS entanglement assisted quantum codes from
the MDS twisted Reed-Solomon codes were constructed.

## References

  * [1] S. A. Aly, A. Klappenecker and P. K. Sarvepalli, On quantum and classical BCH codes, IEEE Trans. Inf. Theory, vol. 53, no. 3, pp. 1183-1188, 2007.
  * [2] S. Ball, On large subsets of a finite vector space in which every subset of basis size is a basis, J. EMS, vol. 14, pp. 733-748, 2012.
  * [3] S. Ball, Some constructions of quantum MDS codes, Des., Codes and Cryptogra. vol. 89, pp. 811-821, 2021.
  * [4] S. Ball and R. Vilar, Determining when a truncated generalised Reed-Solomon code is Hermitian self-orthogonal, IEEE Trans. Inf. Theory, vol. 68, pp. 3796-3805, 2022.
  * [5] S. Ball and R. Vilar, The geometry of Hermitian orthogonal codes, Journal of Geometry, vol. 113, artical no. 7, 2022.
  * [6] S. Ball, A. Centelles and F. Huber, Quantum error-correcting codes and their geometries, Annale de l’institut Henri Poincare, to appear, 2022.
  * [7] M. Berta, H. Gharibyan and M. Walter, Entanglement-assisted capacities of compound quantum channels, IEEE Trans. Inf. Theory, vol. 63, no. 5, pp. 3306-3321, 2017.
  * [8] P. Beelen, S. Puchinger and J. Rosenkilde, Twisted Reed-Solomon codes, IEEE Trans. Inf. Theory, vol. 68, no. 5, pp. 3047-3061, 2022.
  * [9] T. Brun, I. Devetak and Min-Hsiu Hsieh, Correcting quantum errors with entanglemnent, Science, vol. 304 (5798), no.6, pp. 436-439, 2006.
  * [10] T. Brun, I. Devetak and Min-Hsiu Hsieh, Catalytic quantum error correction, IEEE Trans. Inf. Theory, vol. 60, pp. 3073-3089, 2014.
  * [11] A. Calderbank and P. W. Shor, Good quantum error-correcting codes exist, Phys. Rev. A, Gen. Phys., vol. 54, no. 2, pp. 1098-1105, 1996.
  * [12] A. Calderbank, E. M. Rains, P. W. Shor and N. J. A. Sloane, Quantum error correction via codes over $GF(4)$, IEEE Trans. Inf. Theory, vol. 44, no. 4, pp. 1369-1387, 1998.
  * [13] H. Chen, Some good quantum error-correcting codes from algebraic geometric codes, IEEE Trans. Inf. Theory, vol. 47, no. 5, pp. 2059-2061, 2001.
  * [14] H. Chen, C. Xing and S. Ling, Asymptotically good quantum codes exceeding the Ashikhmin-Litsyn-Tsafasman bound, IEEE Trans. Inf. Theory, vol. 47, no. 5, pp. 2055-2058, 2001.
  * [15] H. Chen, C. Xing and S. Ling, Quantum codes from concatenated algebraic geometric codes, IEEE Trans. Inf. Theory, vol. 51, no. 8, pp. 2915-2920, 2005.
  * [16] H. Chen, On hull-variation problem of equivalent linear codes, arXiv:2206.14516, 2022.
  * [17] H. Chen, New MDS entanglement-assisted quantum codes from Hermitian self-orthogonal codes, arXiv:2206.13995, 2022.
  * [18] X. Chen, S. Zhu, W. Jiang and G. Luo, A new family of EAQMDS codes constructed from constacyclic codes, Des., Codes and Cryptogra., vol. 89, pp. 2179-2193, 2021.
  * [19] X. Chen, S. Zhu and W. Jiang, Cyclic codes and some new entanglement-assisted quantum MDS codes, Des., Codes and Cryptogra., vol. 89, pp. 2533-2551, 2021.
  * [20] R. B. Christensen, C. Munuera, F. R. F. Pereira and D. Ruano, An algorithmic approach to entanglement-assisted quantum error-correcting codes from Hermitian curves, Adv. Math. Commun., online first version, 2022.
  * [21] J. Fan, J. Li, Y. Zhou and H. V. Poor, Entanglement-assisted quantum concatenated codes, Proc. NAS, DOI.ORG/10/1073/PNAS/220235119, June, 2022.
  * [22] W. Fang, F. Fu, L. Li and S. Zhu, Euclid and Hermitian hulls of MDS codes and their application to quantum codes, IEEE Trans. Inf. Theory vol. 66. no. 6, pp. 3527-3537, 2020.
  * [23] D. Fattal, T. S. Cubitt, Y. Yamamoto, S. Bravyi and I. L. Chuang, Entanglement in the stablizer formalism, arXiv:quant-ph/04-6168, 2004.
  * [24] Y. Fujiwara, D. Clark, P. Vandendriessche, M. De Boeck and V. D. Tonchev, Entanglement-assisted quantum low-density parity check code, Phys. Rev. A, vol. 88, 012318, 2013.
  * [25] Y. Gao, Q. Yue, X. Huang and J. Zeng, Hulls of generalized Reed-Solomon codes via Goppa codes and their applications to quamtum codes, IEEE Trans. Inf. Theory, vol. 67, no. 10, pp. 6619-6626, 2021.
  * [26] C. Galindo, F. Hernando and D. Ruano, Entanglement-assisted quantum codes from RS codes and BCH codes with extension degree two, Quantum Inf. Process., vol. 20, pp. 158, 2016.
  * [27] G. Guo and R. Li, Hermitian self-dual GRS and entended GRS codes, IEEE Commun. Lett., vol. 25, no. 4, pp. 1062-1065, 2021.
  * [28] M. Grassl and T. A. Gulliver, On self-dual MDS codes, Proc. Int. Symp. Inf. Theory, pp. 1954-1957, 2008.
  * [29] M. Grassl, F. Huber and A, Winiter, Entropic proofs of Singleton bounds for quantum error-correcting codes, IEEE Trans. Inf. Theory, vol. 68, no. 6, pp. 3942-3950, 2021.
  * [30] G. G. La Guardia, New quantum MDS codes, IEEE Trans. Inf. Theory, vol. 57, no. 8, pp. 5551-5554, 2011.
  * [31] X. He, L. Xu and H. Chen, New $q$-ary quamtum MDS codes with distances bigger than $\frac{q}{2}$, Quantum Inf. Process., vol. 15, pp. 2745-2758, 2016.
  * [32] M-H. Hsieh, I Devetak and T. A. Brun, General entanglement-assisted quantum error-correcting codes, Phys. Rev. A, vol. 76, 062313, 2007.
  * [33] M-H. Hsieh, T. A. Brun and I Devetak, Entanglement-assisted quantum quasi-cyclic low-density parity-check codes, Phys. Rev. A, vol. 79, 032340, 2009.
  * [34] W. C. Huffman and V. Pless, Fundamentals of error-correcting codes, Cambridge University Press, Cambridge, U. K., 2003.
  * [35] L. Jin and C. Xing, Euclid and Hermitian self-orthogonal algebraic geometric codes and their applications to quantum codes, IEEE Trans. Inf. Theory, vol. 58, no. 8, pp. 5484-5489, 2012.
  * [36] L. Jin and C. Xing, New MDS self-dual codes from generalized Reed-Solomon codes, IEEE Trans. Inf. Theory, vol. 63, no. 3, pp. 14-34-1438, 2017.
  * [37] C-Y. Lai, T. A. Brun and M. M. Wilde, Duality in entanglement-assisted quantum codes, IEEE Trans. Inf. Theory, vol. 59, no. 6, pp. 4020-4024, 2013.
  * [38] G. Luo, X. Cao and X. Chen, MDS codes with hulls of arbitray dimensions and their quantum error correction, IEEE Trans. Inf. Theory, vol. 65, no. 5, pp. 2944-2952, 2019.
  * [39] G. Luo, M. F. Ezerman and S. Ling, Entanglement-assisted and subsystem quantum codes: new propagation rule and construction, arXiv:2206.09782, 2022.
  * [40] G. Luo, M. F. Ezerman, M. Grassl and S. Ling, How much entanglement does a quantum code need? arXiv4395197, 2022.
  * [41] X. Kai and S. Zhu, New quantum MDS codes from negacyclic codes, IEEE Trans. Inf. Theory, vol. 59, no. 2, pp. 1193-1197, 2013.
  * [42] X. Kai, S. Zhu and P. Li, Constacyclic codes and some new quantum MDS codes, IEEE Trans. Inf. Theory, vol. 60, no. 4, pp. 2080-2086, 2014.
  * [43] A. Klappenecker and P. K. Sarvepalli, Clifford code constructions of operators quantum error correcting codes, IEEE Trans. Inf. Theory, vol. 54, no. 12, pp. 5760-5765, 2008.
  * [44] M. E. Koroglu, New entanglement-assisted MDS quantum codes from constacyclic codes, Quantum Inf. Process., vol. 18, pp. 1-18, 2018.
  * [45] I. Kremsky, M-H. Hsieh and T. A. Brun, Classical enhansement of quantum error-correcting, Phys. Rev. A, vol. 78, 012341, 2008.
  * [46] F. R. F. Pereira, R. Pellikaan, G. G. La Guardia and F. Marcos, Entanglement-assisted quantum codes from algebraic geometry codes, IEEE Trans. Inf. Theory, vol. 67, no. 11, pp. 7110-7120, 2021.
  * [47] P. W. Shor, Scheme for redcuing decoherence in quantum memory, Phys. Rev. A, vol. 52, pp. R2493-2496, 1995.
  * [48] A. M. Steane, Error-correcting codes in quantum theory, Phys. Rev. Lett., vol. 77, no. 5, pp. 793-797, 1996.
  * [49] A. M. Steane, Mutiple particle interference and quantum error correction, Proc. Roy. Soc. London, vol. 452, pp. 2551-2577, 1996.
  * [50] M. M. Wilde, H. Krovi and T. A. Brun, Entanglement-assisted quantum error correction with linear optic, Phys. Rev. A, vol. 76, 052308, 2007.
  * [51] M. M. Wilde, and T. A. Brun, Optimal entanglement formulae for entanglement-assisted quantum coding, Phys. Rev. A, vol. 77, 064302, 2008.


# Personalized Federated Learning with Adaptive Batchnorm for Healthcare

Wang Lu, Jindong Wang, Yiqiang Chen, Xin Qin, Renjun Xu, Dimitrios
Dimitriadis, and Tao Qin,  Wang Lu and Xin Qin are with University of Chinese
Academy of Sciences and Institute of Computing Technology, Chinese Academy of
Sciences. E-mail: {luwang<EMAIL_ADDRESS>Jindong Wang and Tao Qin are
with Microsoft Research Asia.
E-mail: {jindong.wang<EMAIL_ADDRESS>Yiqiang Chen is with Institute of
Computing Technology (CAS) and Pengcheng Laboratory. E-mail<EMAIL_ADDRESS>Renjun Xu is with Zhejiang University. E-mail<EMAIL_ADDRESS>Dimitrios
Dimitriadis is with Microsoft Research.
E-mail<EMAIL_ADDRESS>Correspondence to Jindong Wang and Yiqiang Chen.
Manuscript received May 19, 2022.

###### Abstract

There is a growing interest in applying machine learning techniques to
healthcare. Recently, federated learning (FL) is gaining popularity since it
allows researchers to train powerful models without compromising data privacy
and security. However, the performance of existing FL approaches often
deteriorates when encountering non-iid situations where there exist
distribution gaps among clients, and few previous efforts focus on
personalization in healthcare. In this article, we propose FedAP to tackle
domain shifts and then obtain personalized models for local clients. FedAP
learns the similarity between clients based on the statistics of the batch
normalization layers while preserving the specificity of each client with
different local batch normalization. Comprehensive experiments on five
healthcare benchmarks demonstrate that FedAP achieves better accuracy compared
to state-of-the-art methods (e.g., 10%+ accuracy improvement for PAMAP2) with
faster convergence speed.

###### Index Terms:

Distributed Computing, Federated Learning, Personalization, Batch
Normalization, Healthcare.

##  1 Introduction

Machine learning has been widely adopted in many applications in people’s
daily life [1, 2, 3]. Specifically for healthcare, researchers can build
models to predict health status by leveraging health-related data, such as
activity sensors [4], images [5], and other health information [6, 7, 8]. To
achieve satisfying performance, machine learning healthcare applications often
require sufficient client data for model training. However, with the
increasing awareness of privacy and security, more governments and
organizations enforce the protection of personal data via different
regulations [9, 10]. In this situation, federated learning (FL) [11] emerges
to build powerful machine learning models with data privacy well-protected.

Figure 1: Data non-iid in federated learning: different clients have different
data distributions.

Personalization is important in healthcare applications since different
individuals, hospitals or countries usually have different demographics,
lifestyles, and other health-related characteristics [12], i.e., the non-iid
issue (not identically and independently distributed). Therefore, we are more
interested in achieving better personalized healthcare, i.e., building FL
models for each client to preserve their specific information while harnessing
their commonalities. As shown in Figure 1, there are three different clients
$A,B$, and $C$ with different statistics of data distributions (e.g., the
adult $A$ and the child $B$ may have different lifestyles and activity
patterns). Even if federated learning can perform in the standard way, the
non-iid issue cannot be easily handled. This will severely limit the
performance of existing federated learning algorithms.

The popular FL algorithm, FedAvg [13], has demonstrated superior performance
in many situations [14, 15]. However, FedAvg is unable to deal with non-iid
data among different clients since it directly averages the parameters of
models coming from all participating clients [16]. There are some algorithms
for this non-iid situation. FedProx [17] is designed for non-iid data.
However, FedProx only learns a global model for all clients, which means that
it is unable to obtain personalized models for clients. FedHealth [18],
another work for personalized healthcare, needs access to a large public
dataset, which is often impossible in real applications. FedBN [19] handles
the non-iid issue by learning local batch normalization layers for each client
but ignores the similarities across clients that can be used to boost the
personalization.

In this article, we propose FedAP, a personalized federated learning algorithm
via _adaptive batch normalization_ for healthcare. Specifically, FedAP learns
the similarities among clients with the help of a pre-trained model that is
easy to obtain. The similarities are determined by the distances of the data
distributions, which can be calculated via the statistical values of the
layers’ outputs of the pre-trained network. After obtaining the similarities,
the server averages the models’ parameters in a personalized manner and
generates a unique model for each client. Each client preserves its own batch
normalization and updates the model with a momentum method. In this way, FedAP
can cope with the non-iid issue in federated learning. FedAP is extensible and
can be deployed to many healthcare applications.

Our contributions are as follows:

  1. 1.

We propose FedAP, a personalized federated learning algorithm via adaptive
batch normalization for healthcare, which can aggregate the information from
different clients without compromising privacy and security, and learn
personalized models for each client.

  2. 2.

We evaluate the performance of FedAP in five public healthcare datasets across
time series and image modalities. Experiments demonstrate that our FedAP
achieves significantly better performance than state-of-the-art methods in all
datasets.

  3. 3.

FedAP reduces the number of rounds and speeds up the convergence to some
extent. Moreover, some experimental results illustrate FedAP may be able to
reduce communication costs with little performance degradation via increasing
local iterations and decreasing global communications.

##  2 Related Work

###  2.1 Machine Learning and Healthcare

With the rapid development of perception and computing technology, people can
make use of machine learning to help doctors diagnose [20] and assist doctors
in the operation [21], etc. Many methods are proposed to monitor people’s
health state [22] and diagnose diseases that may even have better performance
than doctors’, especially in the field of medical images [23]. Moreover,
machine learning can make disease warnings via daily behavior supervision with
simple wearable sensors [24]. For instance, certain activities in daily life
reflect early signals of some cognitive diseases. Through daily observation of
gait changes and finger flexibility, the machine can tell people whether they
are suffering from Parkinson [25]. In addition, some studies worked for better
personalization in healthcare [26, 27].

Unfortunately, a successful healthcare application needs a large amount of
labeled data of persons. However, in real applications, data are often
separate and few people or organizations are willing to disclose their private
data. In addition, an increasing number of regulations, such as [9, 10], hold
back the leakages of data. These make different clients cannot exchange data
directly, and the scattered data forms separate data islands, which makes it
impossible to learn a traditional model with aggregated data.

###  2.2 Federated Learning

Federated learning is a usual way to combine each client’s information while
protecting data privacy and security [11]. It was first proposed by Google
[13], where they proposed FedAvg to train machine learning models via
aggregating distributed mobile phones’ information without exchanging data.
The key idea is to replace direct data exchanges with model parameter-related
exchanges. FedAvg is able to resolve the data islanding problems.

Although federated learning is an emerging field, it has attracted much
attention [28, 29]. Federated learning can be divided into horizontal
federated learning, vertical federated learning, and federated transfer
learning according to the characteristics data. When the client features of
the two datasets overlap a lot but the clients overlap little, horizontal
federated learning can be applied [13]. In the horizontal federated learning,
datasets are split horizontally and the clients share the same features
finally. For example, Smith et al. [30] proposed a novel systems-aware
optimization method, MOCHA, to solve security problems in multitasking. When
the client features of the two datasets overlap little but the clients overlap
a lot, we can utilize vertical federated learning, where different clients
have different columns of the features [31]. For example, Cheng et al. [32]
proposed a novel lossless privacy-preserving tree-boosting system known as
SecureBoost to jointly conduct over multiple parties with partially common
client samples but different feature sets. When the clients and client
features of the two datasets both rarely overlap, federated transfer learning
is often utilized [33, 34]. For example, Yoon et al. [35] proposed a novel
federated continual learning framework, Federated Weighted Inter-client
Transfer (FedWeIT), which decomposed the network weights into global federated
parameters and sparse task-specific parameters. In [35], each client received
selective knowledge from other clients by taking a weighted combination of
their task-specific parameters. In addition, many methods, such as
differential privacy, are proposed to protect data further [36, 37]. In this
paper, we mainly focus on horizontal federated learning when the training data
are not independent and identically distributed (Non-IID) on the clients.

Figure 2: The structure of the FedAP method.

Although FedAvg works well in many situations, it may still suffer from the
non-iid data and fail to build personalized models for each client [30, 38,
39]. A survey about federated Learning on non-iid Data can be found here [40].
FedProx [17] tackled data non-iid by allowing partial information aggregation
and adding a proximal term to FedAvg. [41] aggregated the models of the
clients with weights computed via $L_{1}$ distance among client models’
parameters. These works focus on a common model shared by all clients while
some other works try to obtain a unique model for each client. [42] exchanged
information of base layers and preserved personalization layer to combat the
ill-effects of non-iid. [43] utilized Moreau envelopes as clients’ regularized
loss function and decoupled personalized model optimization from the global
model learning in a bi-level problem stylized for personalized FL. [44]
evaluated three techniques for local adaptation of federated models: fine-
tuning, multi-task learning, and knowledge distillation. [45] also proposed
and analyzed three approaches: user clustering, data interpolation, and model
interpolation. [46] tried to jointly learn compact local representations on
each device and a global model across all devices with a theoretic analysis.
[47] proposed APFL where each client would train their local models while
contributing to the global model. Another work [48], Clustered Federated
Learning (CFL), grouped the client population into clusters with jointly
trainable data distributions. Two works most relevant to our method are
FedHealth [18] and FedBN [19]. FedHealth needs to share some datasets with all
clients while FedBN used local batch normalization to alleviate the feature
shift before averaging models. Although there are already some works to cope
with data non-iid, few works pay attention to feature shift non-iid and other
shifts at the same time and obtaining an individual model for each client in
healthcare.

###  2.3 Batch Normalization

Batch Normalization (BN) [49] is an important component of deep learning.
Batch Normalization improves the performance of the model and has a natural
advantage in dealing with domain shifts. Li et al. [50] proposed an adaptive
BN for domain adaptation where they learned domain-specific BN layers.
Nowadays, researchers have explored many effects of BN, especially in transfer
learning [51]. FedBN [19] is one of few applications of BN in the field of FL
field. However, FedBN does still not make full use of BN properties, and it
does not consider the similarities among the clients.

##  3 Method

###  3.1 Problem Formulation

In federated learning, there are $N$ different clients (organizations or
users), denoted as $\\{C_{1},C_{2},\cdots,C_{N}\\}$ and each client has its
own dataset, i.e.
$\\{\mathcal{D}_{1},\mathcal{D}_{2},\cdots,\mathcal{D}_{N}\\}$. Each dataset
$\mathcal{D}_{i}=\\{(\mathbf{x}_{i,j},y_{i,j})\\}_{j=1}^{n_{i}}$ contains two
parts, i.e. a train dataset
$\mathcal{D}_{i}^{tr}=\\{(\mathbf{x}_{i,j}^{tr},y_{i,j}^{tr})\\}_{j=1}^{n_{i}^{tr}}$
and a test dataset
$\mathcal{D}_{i}^{te}=\\{(\mathbf{x}_{i,j}^{te},y_{i,j}^{te})\\}_{j=1}^{n_{i}^{te}}$.
Obviously, $n_{i}=n_{i}^{tr}+n_{i}^{te}$ and
$\mathcal{D}_{i}=\mathcal{D}_{i}^{tr}\cup\mathcal{D}_{i}^{te}$. All of the
datasets have different distributions, i.e. $P(\mathcal{D}_{i})\neq
P(\mathcal{D}_{j})$. Each client has its own model denoted as
$\\{f_{i}\\}_{i=1}^{N}$. Our goal is to aggregate information of all clients
to learn a good model $f_{i}$ for each client on its local dataset
$\mathcal{D}_{i}$ without private data leakage:

$\min_{\\{f_{k}\\}_{k=1}^{N}}\frac{1}{N}\sum_{i=1}^{N}\frac{1}{n_{i}^{te}}\sum_{j=1}^{n_{i}^{te}}\ell(f_{i}(\mathbf{x}_{i,j}^{te}),y_{i,j}^{te}),$
(1)

where $\ell$ is a loss function.

###  3.2 Motivation

There are mainly two challenges for personalized healthcare: data islanding
and personalization. Following FedAvg [13] and some other traditional
federated learning methods [52, 53], it is easy to cope with the first
challenge. Personalization is a must in many applications, especially in
healthcare. It is better to train a unique model in each client for
personalization. However, one client often lacks enough data to train a model
with high accuracy in federated learning. In addition, clients do not have
access to the data of other clients. Overall, it is a challenge that how to
achieve personalization to obtain high accuracy in federated learning. As
mentioned in [50], batch normalization (BN) layers contain sufficient
statistics (including mean and standard deviation) of features (outputs of
layers). Therefore, BN has been utilized to represent distributions of
training data indirectly in many works [50, 54]. We mainly use BN to represent
the distributions of clients. Therefore, on the one hand, we utilize local BN
to preserve clients’ feature distributions. On the other hand, we also use BN-
related statistics to calculate the similarity between clients for better
personalization with weighted aggregation111Please note that we only share the
statistics of the batch normalization layers, and no existing work shows that
any methods can restore the specific sample with the statistics of certain
layers [55, 56]..

Figure 3: The concrete process of the FedAP.

###  3.3 Our Approach: FedAP

In this paper, we propose FedAP (Adaptive Federated Learning) to achieve
accurate personal healthcare via adaptive batch normalization without
compromising data privacy and security. Figure 2 gives an overview of its
structure. Without loss of generality, we assume there are three clients,
which can be extended to more general cases. The structure mainly contains
five steps:

  1. 1.

The server distributes the pre-trained model to each client.

  2. 2.

Each client computes statistics of the outputs of specific layers according to
local data.

  3. 3.

The server obtains the client similarities denoted by weight matrix
$\mathbf{W}$ to guide aggregation.

  4. 4.

Each client updates its own model with the local train data and pushes its
model to the server.

  5. 5.

The server aggregates models and obtains $N$ models delivered to $N$ clients
respectively.

For stability and simplicity, we only calculate $\mathbf{W}$ once and we show
that computing once is enough to achieve acceptable performance in
experiments. Note that all processes do not involve the direct transmission of
data, so FedAP avoids the leakage of private data and ensures security. The
keys of FedAP are obtaining $\mathbf{W}$ and aggregating the models. We will
introduce how to compute $\mathbf{W}$ after describing the process of model
aggregation.

We denote the parameters of each model $f_{i}$ as
$\boldsymbol{\theta}_{i}=\boldsymbol{\phi}_{i}\cup\boldsymbol{\psi}_{i}$,
where $\boldsymbol{\phi}_{i}$ corresponds to the parameters of BN layers
specific to each client and $\boldsymbol{\psi}_{i}$ is the parameters of the
other layers (colored blocks in Figure 3). $\mathbf{W}$ is an $N\times N$
matrix, which describes the similarities among the clients. $w_{ij}\in[0,1]$
represents the similarity between client $i$ and client $j$: the larger
$w_{ij}$ is, the more similar the two clients are.

Figure 3 demonstrates the process of model aggregation. As shown in Figure 3,
$\boldsymbol{\phi}_{i}$ is particular while $\boldsymbol{\psi}_{i}$ is
computed according to $\mathbf{w}_{i}$, where $\mathbf{w}_{i}$ means the
$i-$th row of $\mathbf{W}$, and $\boldsymbol{\psi}$, where
$\boldsymbol{\psi}=\\{\boldsymbol{\psi}_{i}\\}_{i=1}^{N}$.
$\boldsymbol{\phi}_{i}$ is BN parameters that are not shared across clients
while $\boldsymbol{\psi}_{i}$ is other parameters that are shared. Let
$\boldsymbol{\theta}_{i}^{t}=\boldsymbol{\phi}_{i}^{t}\cup\boldsymbol{\psi}_{i}^{t}$
represent the parameters of the model from client $i$ in the round $t$. After
updating $\boldsymbol{\theta}_{i}^{t}$ with the local data from the $i-$th
client, we obtain updated parameters
$\boldsymbol{\theta}_{i}^{t*}=\boldsymbol{\phi}_{i}^{t*}\cup\boldsymbol{\psi}_{i}^{t*}$.
We use the $*$ notation to denote updated parameters. Then, for aggregation on
the server, we have the following updating strategy:

$\begin{cases}\boldsymbol{\phi}_{i}^{t+1}=&\boldsymbol{\phi}_{i}^{t*}\\\
\boldsymbol{\psi}_{i}^{t+1}=&\sum_{j=1}^{N}w_{ij}\boldsymbol{\psi}_{j}^{t*}.\end{cases}$
(2)

The overall process of FedAP is described in Algorithm 1. In the next
sections, we will introduce how to compute the weight matrix $\mathbf{W}$.

Algorithm 1 FedAP

Input: A pre-trained model $f$, data of $N$ clients
$\\{\mathcal{D}_{i}\\}_{i=1}^{N}$, $\lambda$
Output: Client models $\\{f_{i}\\}_{i=1}^{N}$

1:Distribute $f$ to each client

2:Each client computes its statistics
$(\boldsymbol{\mu}_{i},\boldsymbol{\sigma}_{i})$, where $\boldsymbol{\mu}_{i}$
represents the mean values while $\boldsymbol{\sigma}_{i}$ represents the
covariance matrices. Push $(\boldsymbol{\mu}_{i},\boldsymbol{\sigma}_{i})$ to
the server

3:Compute $\mathbf{W}$ according to the statistics

4:Update clients’ model with local data. Push updated parameter
$\\{\boldsymbol{\theta}_{i}^{t*}\\}_{i=1}^{N}$ to the server

5:Update $\\{\boldsymbol{\theta}_{i}^{t+1}\\}_{i=1}^{N}$ according to Eq. (2)
and distribute them to the corresponding clients

6:Repeat steps $4\sim 5$ until convergence or maximum round reached

###  3.4 Evaluate Weights

In this section, we will evaluate the weights with a pre-trained model $f$ and
propose two alternatives to compute the weights. We mainly rely on the feature
output statistics of clients’ data in the pre-trained network to compute
weights.

We denote with $l\in\\{1,2,\cdots,L\\}$ in superscript notations the different
batch normalization layers in the model. And $\mathbf{z}^{i,l}$ represents the
input of $l-$th batch normalization layer in the $i-$th client. The input of
the classification layer in the $i-$th client is denoted as $\mathbf{z}^{i}$
which represents the domain features. We assume $\mathbf{z}^{i,l}$ is a
matrix, $\mathbf{z}^{i,l}_{c_{i,l}\times s_{i,l}}$ where $c_{i,l}$ corresponds
to the channel number while $s_{i,l}$ is the product of the other dimensions.
Similarly, $\mathbf{z}^{i}=\mathbf{z}^{i}_{c_{i}\times s_{i}}$. We feed
$\mathcal{D}_{i}$ into $f$, and we can obtain $\mathbf{z}^{i,l}_{c_{i,l}\times
s_{i,l}}$. Obviously, $s_{i,l}=e\times n_{i}$ where $e$ is an integer. Now, we
try to compute statistics on the channels, and we treat $\mathbf{z}^{i,l}$ as
a Gaussian distribution. For the $l-$th layer of the $i-$th client, it is easy
to obtain its distribution,
$\mathcal{N}(\boldsymbol{\mu}^{i,l},\boldsymbol{\sigma}^{i,l})$. We only
compute statistics of inputs of BN layers. And the BN statistics of the $i-$th
client is formulated as:

$(\boldsymbol{\mu}_{i},\boldsymbol{\sigma}_{i})=[(\boldsymbol{\mu}^{i,1},\boldsymbol{\sigma}^{i,1}),(\boldsymbol{\mu}^{i,2},\boldsymbol{\sigma}^{i,2}),\cdots,(\boldsymbol{\mu}^{i,L},\boldsymbol{\sigma}^{i,L})].$
(3)

Now we can calculate the similarity between two clients. It is popular to
adopt the Wasserstein distance to calculate the distance between two Gaussian
distributions:

$\displaystyle
W_{2}^{2}(\mathcal{N}(\boldsymbol{\mu}^{i,l},\boldsymbol{\sigma}^{i,l}),\mathcal{N}(\boldsymbol{\mu}^{j,l},\boldsymbol{\sigma}^{j,l}))$
(4) $\displaystyle=$
$\displaystyle||\boldsymbol{\mu}^{i,l}-\boldsymbol{\mu}^{j,l}||^{2}+$
$\displaystyle
tr(\boldsymbol{\sigma}^{i,l}+\boldsymbol{\sigma}^{j,l}-2((\boldsymbol{\sigma}^{i,l})^{1/2}\boldsymbol{\sigma}^{j,l}(\boldsymbol{\sigma}^{i,l})^{1/2})^{1/2}),$

where $tr$ is the trace of the matrix. Obviously, it is costly and difficult
to perform efficient calculations. Similar to BN, we perform approximations
and consider that each channel is independent of the others. Therefore,
$\boldsymbol{\sigma}^{i,l}$ is a diagonal matrix, i.e.
$\boldsymbol{\sigma}^{i,l}=Diag(\mathbf{r}^{i,l})$. Therefore, we compute the
approximation of Wasserstein distance as:

$\displaystyle
W_{2}^{2}(\mathcal{N}(\boldsymbol{\mu}^{i,l},\boldsymbol{\sigma}^{i,l}),\mathcal{N}(\boldsymbol{\mu}^{j,l},\boldsymbol{\sigma}^{j,l}))$
(5) $\displaystyle=$
$\displaystyle||\boldsymbol{\mu}^{i,l}-\boldsymbol{\mu}^{j,l}||^{2}+||\sqrt{\mathbf{r}^{i,l}}-\sqrt{\mathbf{r}^{j,l}}||_{2}^{2}.$

Thus, the distance between two clients $i,j$ is computed as:

$\displaystyle d_{i,j}$
$\displaystyle=\sum_{l=1}^{L}W_{2}(\mathcal{N}(\boldsymbol{\mu}^{i,l},\boldsymbol{\sigma}^{i,l}),\mathcal{N}(\boldsymbol{\mu}^{j,l},\boldsymbol{\sigma}^{j,l}))$
(6)
$\displaystyle=\sum_{l=1}^{L}(||\boldsymbol{\mu}^{i,l}-\boldsymbol{\mu}^{j,l}||^{2}+||\sqrt{\mathbf{r}^{i,l}}-\sqrt{\mathbf{r}^{j,l}}||_{2}^{2})^{1/2}.$

Large $d_{i,j}$ means the distribution distance between the $i-$th client and
the $j$th client is large. Therefore, the larger $d_{i,j}$ is, the less
similar the two clients are, which means the smaller $w_{i,j}$ is. And we set
$\tilde{w}_{i,j}$ as the inverse of $d_{i,j}$, i.e.
$\tilde{w}_{i,j}=1/d_{i,j},j\neq i$. Normalize $\tilde{w}_{i}$ and we have

$\hat{w}_{i,j}=\frac{\tilde{w}_{i,j}}{\sum_{j=1,j\neq
i}^{N}\tilde{w}_{i,j}},~{}\text{where}~{}j\neq i$ (7)

For stability in training, we take $\boldsymbol{\psi}^{t*}$ into account for
$\boldsymbol{\psi}^{t+1}$. We update $\boldsymbol{\psi}^{t+1}$ in a moving
average style, and we set $w_{i,i}=\lambda$. Therefore,

$w_{i,j}=\begin{cases}\lambda,&i=j,\\\ (1-\lambda)\times\hat{w}_{i,j},&i\neq
j.\end{cases}$ (8)

We denote this weighting method as the original _FedAP_. Similarly, we can
obtain the corresponding $\mathbf{W}$ using only the last layer
$\mathbf{z}^{i}$ and we denote this variant as _d-FedAP_.

###  3.5 Discussion

In some extreme cases, there may not exist a pre-trained model. In this
situation, we can evaluate weights with models trained from several rounds of
FedBN [19].

Figure 4: Running mean, running var of a BN layer and the inputs statistics of
the corresponding layer in a client model.

As we can see from Figure 4, the running mean of the BN layer has a positive
correlation with the statistical mean of the corresponding layer’s inputs. And
the variance has a similar relationship. From this, we can use running means
and running variances of the BN layers instead of the statistics respectively.
Therefore, we can perform several rounds of FedBN [19] which preserves local
batch normalization, and utilize parameters of BN layers to replace the
statistics when there does not exist a pre-trained model. We denote this
variant as _f-FedAP_.

##  4 Experiments

We evaluate the performance of FedAP on five healthcare datasets in time
series and image modalities222Code is released at
https://github.com/jindongwang/tlbook-code/tree/main/chap19_fl and
https://github.com/microsoft/PersonalizedFL.. The statistical information of
each dataset is shown in TABLE I.

(a) OrganAMNIST

(b) OrganCMNIST

(c) OrganSMNIST

(d) PAMAP2

(e) COVID-19

Figure 5: The number of samples per class allocated to each client (indicated
by dot size).

###  4.1 Datasets

PAMAP2. We adopt a public human activity recognition dataset called PAMAP2
[57]. The PAMAP2 dataset contains data of 18 different physical activities,
performed by 9 subjects wearing 3 inertial measurement units and a heart rate
monitor. We use data of 3 inertial measurement units which are collected at a
constant rate of 100Hz to form data containing 27 channels. We exploit the
sliding window technique and filter out 10 classes of data333We split PAMAP2
in this style mainly for two reasons. On the one hand, the data numbers of the
subjects are different which may introduce some other problems, e.g. some
clients cannot be adequately evaluated. On the other hand, this splitting
routing is widely adopted in much work [58, 59]. We select 10 classes with the
most samples.. In order to construct the problem situation in FedAP, we use
the Dirichlet distribution as in [58] to create disjoint non-iid splits.
client training data. Figure 5(d) visualizes how samples are distributed among
20 clients. In each client, half of the data are used to train and the
remaining data are for testing as in [19].

COVID-19. We also adopt a public COVID-19 posterior-anterior chest radiography
images dataset [60]. This is a combined curated dataset of COVID-19 Chest
X-ray images obtained by collating 15 public datasets and it contains 9,208
instances of four classes (1,281 COVID-19 X-Rays, 3,270 Normal X-Rays, 1,656
viral-pneumonia X-Rays, and 3,001 bacterial-pneumonia X-Rays) in total. In
order to construct the problem situation in FedAP, we split the dataset
similar to PAMAP2. Figure 5(e) visualizes how samples are distributed among 20
clients for COVID-19. Note that this dataset is more unbalanced in classes
which is an ideal testbed to test the performance under label shift (i.e.,
imbalanced class distribution for different clients). In each client, half of
the data are used to train and the remaining data are for testing.

MedMnist. MedMNIST [61, 62] is a large-scale MNIST-like collection of
standardized biomedical images, including 12 datasets for 2D and 6 datasets
for 3D. All images are $28\times 28$ (2D) or $28\times 28\times 28$ (3D). We
choose 3 datasets which have most classes from 12 2D datasets: OrganAMNIST,
OrganCMNIST, OrganSMNIST [63, 64]. These three datasets are all about
Abdominal CT images and all contain 11 classes. There are 58,850, 23,660 and
25,221 samples respectively. As operations in PAMAP2, each dataset is split
into 20 clients with Dirichlet distributions, and Figure 5(a)-5(c) visualizes
how samples are distributed for OrganAMNIST, OrganCMNIST, and OrganSMNIST
respectively. In each client, half of the data are used to train and the
remaining data are for testing.

TABLE I: Statistical information of five datasets.

Dataset | Type | #Class | #Sample
---|---|---|---
PAMAP2 | Sensor-based time series | 18 | 3,850,505
COVID-19 | Image | 4 | 9,208
OrganAMNIST | Image | 11 | 58,850
OrganCMNIST | Image | 11 | 23,660
OrganSMNIST | Image | 11 | 25,221

TABLE II: Activity recognition results on PAMAP2. Bold and underline mean the best and second-best results, respectively. Client | Base | FedAvg | FedBN | FedProx | FedPer | FedAP
---|---|---|---|---|---|---
1 | 92.86 | 60.27 | 60.72 | 60.5 | 48.31 | 77.2
2 | 17.68 | 62.36 | 62.59 | 62.36 | 97.51 | 77.55
3 | 100 | 50.56 | 50.34 | 50.34 | 61.4 | 77.43
4 | 83.52 | 73.98 | 73.53 | 73.98 | 47.29 | 79.64
5 | 18.78 | 74.27 | 74.72 | 73.81 | 58.47 | 81.94
6 | 77.66 | 62.9 | 62.44 | 61.76 | 23.98 | 79.86
7 | 95.05 | 64.03 | 62.9 | 63.57 | 49.55 | 86.2
8 | 17.58 | 87.78 | 88.24 | 87.78 | 91.86 | 95.02
9 | 92.39 | 74.49 | 74.27 | 74.27 | 51.24 | 85.33
10 | 93.37 | 64.71 | 64.48 | 64.71 | 77.6 | 69.23
11 | 29.12 | 65.24 | 65.69 | 66.37 | 89.16 | 91.42
12 | 84.78 | 63.35 | 62.9 | 63.12 | 57.92 | 79.41
13 | 98.9 | 68.33 | 68.33 | 68.33 | 42.53 | 74.43
14 | 24.18 | 64.79 | 65.24 | 65.69 | 49.44 | 69.75
15 | 98.91 | 63.12 | 62.44 | 62.44 | 58.6 | 81.67
16 | 98.9 | 85.26 | 85.94 | 85.49 | 86.62 | 94.1
17 | 41.44 | 66.21 | 65.99 | 66.21 | 77.32 | 82.77
18 | 93.62 | 59.64 | 59.64 | 59.41 | 52.38 | 75.74
19 | 85.71 | 67.87 | 68.1 | 67.87 | 73.08 | 77.15
20 | 37.02 | 72.46 | 72.69 | 72.46 | 97.52 | 86.91
avg | 69.07 | 67.58 | 67.56 | 67.52 | 64.59 | 81.14
TABLE III: Accuracy on OrganAMNIST. Bold and underline mean the best and second-best results, respectively. Client | Base | FedAvg | FedBN | FedProx | FedPer | FedAP
---|---|---|---|---|---|---
1 | 48.35 | 80.03 | 96.06 | 80.37 | 83.22 | 81.86
2 | 55.25 | 92.46 | 93.14 | 92.26 | 78.68 | 94.5
3 | 34.04 | 86.15 | 96.27 | 86.22 | 71.08 | 97.08
4 | 61.54 | 77.65 | 87.91 | 77.58 | 41.71 | 88.52
5 | 41.44 | 92.32 | 100 | 92.66 | 100 | 99.93
6 | 52.13 | 84.38 | 97.55 | 84.92 | 80.57 | 95.52
7 | 42.31 | 83.42 | 50.07 | 82.95 | 64.06 | 87.84
8 | 48.9 | 92.81 | 97.15 | 92.94 | 87.86 | 96.95
9 | 38.04 | 74.66 | 84.1 | 74.39 | 62.16 | 85.46
10 | 38.12 | 72.27 | 82.98 | 72.34 | 53.22 | 87.53
11 | 59.89 | 74.88 | 90.36 | 74.88 | 66.33 | 91.79
12 | 59.78 | 78.41 | 90.56 | 78.28 | 72.84 | 89.75
13 | 44.75 | 91.17 | 97.69 | 91.04 | 78.14 | 97.42
14 | 52.2 | 83.76 | 92.26 | 83.9 | 61.28 | 90.29
15 | 53.26 | 89.61 | 87.84 | 90.42 | 58.29 | 94.29
16 | 70.88 | 83.31 | 93.62 | 83.18 | 73.54 | 91.59
17 | 36.46 | 92.93 | 62.77 | 92.93 | 45.92 | 94.97
18 | 46.81 | 77.99 | 96.94 | 77.92 | 78.12 | 96.67
19 | 31.32 | 92.05 | 96.94 | 92.26 | 93.95 | 96.47
20 | 45.3 | 81.02 | 91.32 | 80.75 | 49.36 | 93.97
avg | 48.04 | 84.06 | 89.28 | 84.11 | 70.02 | 92.62
TABLE IV: Accuracy on OrganCMNIST. Bold and underline mean the best and second-best results, respectively. Client | Base | FedAvg | FedBN | FedProx | FedPer | FedAP
---|---|---|---|---|---|---
1 | 32.61 | 79.22 | 90.54 | 79.73 | 77.87 | 94.59
2 | 52.17 | 95.61 | 100 | 95.95 | 100 | 100
3 | 47.1 | 85.83 | 88.7 | 85.83 | 72.85 | 93.93
4 | 37.23 | 84.34 | 96.97 | 84.01 | 74.41 | 96.3
5 | 48.91 | 92.41 | 96.46 | 92.24 | 84.49 | 97.13
6 | 51.45 | 65.6 | 75.89 | 65.6 | 53.96 | 85.5
7 | 64.49 | 86.22 | 86.72 | 86.55 | 76.64 | 89.08
8 | 45.65 | 50.93 | 61.38 | 50.59 | 38.45 | 92.07
9 | 26.09 | 81.28 | 91.23 | 80.61 | 45.03 | 86.68
10 | 57.25 | 54.56 | 93.41 | 54.9 | 80.07 | 91.89
11 | 54.89 | 79.73 | 94.76 | 79.73 | 83.78 | 91.39
12 | 50.72 | 90.56 | 95.78 | 90.39 | 67.28 | 89.38
13 | 66.67 | 49.33 | 54.71 | 49.16 | 52.36 | 89.73
14 | 37.16 | 74.32 | 88.34 | 73.99 | 70.61 | 87.33
15 | 58.57 | 75.93 | 86.36 | 75.59 | 51.52 | 89.9
16 | 52.9 | 81.25 | 98.82 | 80.91 | 98.99 | 98.82
17 | 50 | 67.45 | 83.81 | 67.45 | 70.66 | 81.11
18 | 52.9 | 88.18 | 90.71 | 88.18 | 65.37 | 91.89
19 | 26.28 | 94.26 | 100 | 94.26 | 100 | 99.83
20 | 59.78 | 90.25 | 88.91 | 90.25 | 58.49 | 93.78
avg | 48.64 | 78.36 | 88.18 | 78.3 | 71.14 | 92.02
TABLE V: Accuracy on OrganSMNIST. Bold and underline mean the best and second-best results, respectively. Client | Base | FedAvg | FedBN | FedProx | FedPer | FedAP
---|---|---|---|---|---|---
1 | 25.27 | 47.39 | 91.76 | 39.94 | 85.74 | 90.65
2 | 32.04 | 55.7 | 96.04 | 62.82 | 94.78 | 93.51
3 | 30.85 | 63.13 | 71.84 | 66.3 | 52.69 | 73.89
4 | 41.21 | 59.65 | 78.8 | 61.71 | 64.56 | 75.32
5 | 37.02 | 68.45 | 80.28 | 73.03 | 68.61 | 83.12
6 | 40.43 | 48.02 | 77.02 | 52.3 | 58 | 80.67
7 | 38.46 | 78.2 | 83.57 | 71.25 | 78.2 | 85.47
8 | 40.11 | 57.44 | 53.48 | 41.93 | 96.52 | 96.2
9 | 42.39 | 83.73 | 94.94 | 87.99 | 92.42 | 94.94
10 | 24.86 | 88.45 | 99.21 | 87.97 | 97.47 | 99.37
11 | 38.46 | 60.79 | 45.04 | 37.17 | 54.49 | 76.06
12 | 41.3 | 79.15 | 81.67 | 83.57 | 78.04 | 88.47
13 | 43.65 | 66.98 | 79.94 | 67.93 | 58.29 | 80.57
14 | 44.51 | 84.99 | 95.73 | 86.57 | 84.52 | 92.58
15 | 44.57 | 80.7 | 88.77 | 84.49 | 73.1 | 87.34
16 | 48.9 | 52.06 | 73.58 | 53.64 | 71.36 | 73.58
17 | 36.46 | 36.55 | 78.48 | 39.56 | 61.55 | 76.42
18 | 45.74 | 58.7 | 79.43 | 60.44 | 69.3 | 79.59
19 | 30.77 | 53.48 | 86.23 | 61.87 | 64.72 | 91.46
20 | 35.91 | 72.51 | 72.99 | 77.57 | 86.57 | 68.4
avg | 38.15 | 64.8 | 80.44 | 64.9 | 74.55 | 84.38

###  4.2 Implementations Details and Comparison Methods

For PAMAP2, we adopt a CNN for training and predicting. The network is
composed of two convolutional layers, two pooling layers, two batch
normalization layers, and two fully connected layers. For three MedMNIST
datasets, we all adopt LeNet5 [65]. For COVID-19, we adopt Alexnet [66]. We
use a three-layer fully connected neural network as the classifier with two BN
layers after the first two fully connected layers following [19]. For model
training, we use the cross-entropy loss and SGD optimizer with a learning rate
of $10^{-2}$. If not specified, our default setting for local update epochs is
$E=1$ where $E$ means training epochs in one round. And we set $\lambda=0.5$
for our method, since we can see that $\lambda$ has few influences on accuracy
and it only affects convergence speeds in the appendix. In addition, we
randomly select $20\%$ of the data to train a model of the same architecture
as the pre-trained model. We run three trials to record the average results.

We compare three extensions of our method with five methods including common
FL methods and some FL methods designed for non-iid data:

  * •

Base: Each client uses local data to train its local models without federated
learning.

  * •

FedAvg [13]: The server aggregates all client models without any particular
operations for non-iid data.

  * •

FedProx [17]: Allow partial information aggregation and add a proximal term to
FedAvg.

  * •

FedPer [42]: Each client preserves some local layers.

  * •

FedBN [19]: Each client preserves the local batch normalization.

Figure 6: Average accuracy of 20 clients on COVID-19.

(a) The weighting technique

(b) Different clients

(c) The local BN sharing

(d) Client Acc on PAMAP2

Figure 7: The effects of weighting and preserving local batch normalization.
Each point has equal status in Figure 7(b) and Figure 7(d). We use a line
chart just for better visualization effects but not trends.

(a) Dataset Split

(b) Iteration-Round

Figure 8: Influence of Dataset split and Iteration-Round.

###  4.3 Classification Accuracy

The classification results for each client on PAMAP2 are shown in TABLE II.
From these results, we have the following observations: 1) Our method achieves
the best results on average. It is obvious that our method significantly
outperforms other methods with a remarkable improvement (over $\mathbf{10}\%$
on average). 2) In some clients, the base method achieves the best test
accuracy. As it can be seen from Figure 5(d), the distributions on the clients
are very inconsistent, which inevitably leads to the various difficulty levels
in different clients. And some distributions in the corresponding clients are
so easy that only utilizing the local data can achieve the ideal effects. 3)
FedBN does not achieve the desired results. This could be caused by that FedBN
is designed for the feature shifts while our experiments are mainly set in the
label shifts.

The classification results for each client on three MedMNIST datasets are
shown in TABLE III, IV, V respevtively. From these results, we have the
following observations: 1) Our method significantly outperforms other methods
with a remarkable improvement (over $\mathbf{3.5}\%$ on average). 2) For all
these three benchmarks, Base achieves the worst average accuracy, which
demonstrates Base without communicating with each other does not have enough
information for these relatively difficult tasks. 3) FedBN achieves the second
best results on all three benchmarks. This could be because that there exist
feature shifts among clients.

The classification results for each client on COVID-19 are shown in Figure 6.
From these results, we have the following observations: 1) Our method achieves
the best average accuracy which outperforms the second-best method FedPer by
$\mathbf{6.3}\%$ on average accuracy. 2) FedBN gets the worst results. This
demonstrates that FedBN is not good at dealing with label shifts where label
distributions of each client are different, which is a challenging situation.
FedBN does not consider the similarities among different clients. From Figure
5(e), we can see that label shifts are serious in COVID-19 since it only has
four classes.

###  4.4 Analysis and discussion

We consider the influence of data splits and local iterations in this section.
As shown in Figure 8(a), we evaluate Fedavg and FedAP on three MedMNIST
benchmarks with two different splits: $\alpha=0.1$ and $\alpha=0.05$
respectively. Smaller $\alpha$ means distributions among clients are more
different from each other. Figure 8(a) demonstrates that the performance of
Fedavg which does not consider data non-iid will drop when encountering
clients with greater different distributions while our method is not affected
much by the degree of data non-iid, which means our method may be more robust.
Figure 8(b) shows the influence of local iterations and total rounds on FedBN
and our method. It is obvious that FedBN drops seriously with more local
iterations and fewer communication rounds while our method declines slowly,
which means when limiting communication costs, our method may be more
effective.

(a) PAMAP2

(b) COVID

Figure 9: Evaluating two variants of FedAP.

(a) Client Number

(b) Local Epochs

(c) $\lambda$

(d) $\lambda$

Figure 10: Parameter sensitivity analysis.

###  4.5 Ablation Study

Effects of Weighting.

To demonstrate the effect of weighting which considers the similarities among
the different clients, we compare the average accuracy on PAMAP2 and COVID-19
between the experiments with it and without it. Without weighting, our method
degenerates to FedBN. From Figure 7(a), we can see that our method performs
much better than FedBN which does not include the weighting part. Moreover,
from Figure 7(b), we can see our method performs better than FedBN on all
clients. These results demonstrate that our method with weighting can cope
with the label shifts while FedBN cannot deal with this situation, which means
our method is more applicable and effective.

Effects of Preserving Local Batch Normalization.

We illustrate the importance of preserving local batch normalization. Figure
7(c) shows the average accuracy between the experiments with preserving local
batch normalization and the experiments with sharing common batch
normalization while Figure 7(d) shows the results on each client. LBN means
preserving local batch normalization while SBN means sharing common batch
normalization. Obviously, the improvements are not particularly significant
compared with weighting. This may be caused by there mainly exist the label
shifts in our experiments while preserving local batch normalization is for
the feature shifts. However, our method still has a slight improvement,
indicating its superiority.

Different Implementations of Our methods.

In Method section, we propose three implementations of our method: FedAP,
d-FedAP, and f-FedAP. The main differences among them are how to calculate
$\mathbf{W}$. In Figure 9(a) and Figure 9(b), we can see that all three
implementations achieve better average accuracy on both PAMAP2 and COVID
compared with FedAvg and FedBN. In addition, f-FedAP performs slightly worse
than the other two variants, which may be because it only utilizes weighting
during half rounds for fairness and the other half are for obtaining
$\mathbf{W}$.

Figure 11: Convergence analysis of different methods.

###  4.6 Convergence and Parameter Sensitivity

We study the convergence of our method. From Figure 11, we can see our method
almost convergences in the $10$th round. And in the actual experiments, 20
rounds are enough for our method while FedBN needs over 400 rounds.

Then, we evaluate the parameter sensitivity of FedAP. Our method is affected
by three parameters: local epochs, client number, and $\lambda$. We change one
parameter and fix the other parameters.

From Figure 10(a), we can see that our method still achieves acceptable
results. When the client numbers increase, our method goes down which may be
due to that few data in local clients make the weight estimation inaccurate.
And we may take f-FedAP instead. In Figure 10(b), we can see our method is the
best and it is descending with local epochs increasing, which may be caused
that we keep the total number of the epochs unchanged and the communication
among the clients are insufficient. Figure 10(c)-10(d) demonstrates $\lambda$
slightly affects the average accuracy of our method while it can change the
convergence rate. The results reveal that FedAP is more effective and robust
than other methods under different parameters in most cases.

##  5 Conclusions and Future Work

In this article, we proposed FedAP, a weighted personalized federated transfer
learning algorithm via batch normalization for healthcare. FedAP aggregates
the data from different organizations without compromising privacy and
security and achieves relatively personalized model learning through combing
considering similarities and preserving local batch normalization. Experiments
have evaluated the effectiveness of FedAP. In the future, we plan to apply
FedAP to more personalized and flexible healthcare. And we will consider
better ways to calculate and update similarities among clients.

## Acknowledgement

This work is supported by the National Key Research and Development Plan of
China No.2021YFC2501202, Natural Science Foundation of China (No. 61972383,
No. 61902377, No. 61902379), Beijing Municipal Science & Technology Commission
No.Z211100002121171.

## References

  * [1] S. Sharma, V. Elvira, E. Chouzenoux, and A. Majumdar, “Recurrent dictionary learning for state-space models with an application in stock forecasting,” _Neurocomputing_ , vol. 450, pp. 1–13, 2021.
  * [2] B. Brattoli, J. Tighe, F. Zhdanov, P. Perona, and K. Chalupka, “Rethinking zero-shot video classification: End-to-end training for realistic applications,” in _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , 2020, pp. 4613–4623.
  * [3] W. Lu, J. Wang, and Y. Chen, “Local and global alignments for generalizable sensor-based human activity recognition,” in _ICASSP 2022-2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_. IEEE, 2022, pp. 3833–3837.
  * [4] W. Lu, Y. Chen, J. Wang, and X. Qin, “Cross-domain activity recognition via substructural optimal transport,” _Neurocomputing_ , vol. 454, pp. 65–75, 2021.
  * [5] Z. Fei, E. Yang, D. D.-U. Li, S. Butler, W. Ijomah, X. Li, and H. Zhou, “Deep convolution network based emotion analysis towards mental health care,” _Neurocomputing_ , vol. 388, pp. 212–227, 2020.
  * [6] E. Choi, C. Xiao, J. Sun, and W. F. Stewart, “Mime: Multilevel medical embedding of electronic health records for predictive healthcare,” vol. 2018, pp. 4547–4557, 2018.
  * [7] A. B. Ünal, M. Akgün, and N. Pfeifer, “Escaped: Efficient secure and private dot product framework for kernel-based machine learning algorithms with applications in healthcare,” in _Proceedings of the AAAI Conference on Artificial Intelligence_ , vol. 35, no. 11, 2021, pp. 9988–9996.
  * [8] W. Lu, J. Wang, Y. Chen, S. Pan, C. Hu, and X. Qin, “Semantic-discriminative mixup for generalizable sensor-based cross-domain activity recognition,” _Proceedings of the ACM on Interactive, Mobile, Wearable, and Ubiquitous Technologies_ , 2022.
  * [9] N. Inkster, _China’s cyber power_. Routledge, 2018.
  * [10] P. Voigt and A. Von dem Bussche, “The eu general data protection regulation (gdpr),” _A Practical Guide, 1st Ed., Cham: Springer International Publishing_ , vol. 10, p. 3152676, 2017.
  * [11] Q. Yang, Y. Liu, T. Chen, and Y. Tong, “Federated machine learning: Concept and applications,” _ACM Transactions on Intelligent Systems and Technology (TIST)_ , vol. 10, no. 2, pp. 1–19, 2019.
  * [12] J. Xu, B. S. Glicksberg, C. Su, P. Walker, J. Bian, and F. Wang, “Federated learning for healthcare informatics,” _Journal of Healthcare Informatics Research_ , vol. 5, no. 1, pp. 1–19, 2021.
  * [13] B. McMahan, E. Moore, D. Ramage, S. Hampson, and B. A. y Arcas, “Communication-efficient learning of deep networks from decentralized data,” in _Artificial Intelligence and Statistics_. PMLR, 2017, pp. 1273–1282.
  * [14] T. Ching, D. S. Himmelstein, B. K. Beaulieu-Jones, A. A. Kalinin, B. T. Do, G. P. Way, E. Ferrero, P.-M. Agapow, M. Zietz, M. M. Hoffman _et al._ , “Opportunities and obstacles for deep learning in biology and medicine,” _Journal of The Royal Society Interface_ , vol. 15, no. 141, p. 20170387, 2018\.
  * [15] W. Zhu, L. Xie, J. Han, and X. Guo, “The application of deep learning in cancer prognosis prediction,” _Cancers_ , vol. 12, no. 3, p. 603, 2020.
  * [16] X. Li, K. Huang, W. Yang, S. Wang, and Z. Zhang, “On the convergence of fedavg on non-iid data,” in _International Conference on Learning Representations_ , 2019.
  * [17] T. Li, A. K. Sahu, M. Zaheer, M. Sanjabi, A. Talwalkar, and V. Smith, “Federated optimization in heterogeneous networks,” in _Proceedings of Machine Learning and Systems 2020, MLSys 2020, Austin, TX, USA, March 2-4, 2020_. mlsys.org, 2020.
  * [18] Y. Chen, X. Qin, J. Wang, C. Yu, and W. Gao, “Fedhealth: A federated transfer learning framework for wearable healthcare,” _IEEE Intelligent Systems_ , vol. 35, no. 4, pp. 83–93, 2020.
  * [19] X. Li, M. Jiang, X. Zhang, M. Kamp, and Q. Dou, “Fedbn: Federated learning on non-iid features via local batch normalization,” in _International Conference on Learning Representations (ICLR)_ , 2021.
  * [20] Z. Chen, J. Zhang, S. Che, J. Huang, X. Han, and Y. Yuan, “Diagnose like a pathologist: Weakly-supervised pathologist-tree network for slide-level immunohistochemical scoring,” in _35th AAAI Conference on Artificial Intelligence (AAAI-21)_. AAAI Press, 2021, pp. 47–54.
  * [21] I. Avellino, G. Bailly, G. Canlorbe, J. Belgihti, G. Morel, and M.-A. Vitrani, “Impacts of telemanipulation in robotic assisted surgery,” in _Proceedings of the 2019 CHI Conference on Human Factors in Computing Systems_ , 2019, pp. 1–15.
  * [22] G. Muhammad, M. S. Hossain, and N. Kumar, “Eeg-based pathology detection for home health monitoring,” _IEEE Journal on Selected Areas in Communications_ , vol. 39, no. 2, pp. 603–610, 2020.
  * [23] W. Ji, S. Yu, J. Wu, K. Ma, C. Bian, Q. Bi, J. Li, H. Liu, L. Cheng, and Y. Zheng, “Learning calibrated medical image segmentation via multi-rater agreement modeling,” in _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , 2021, pp. 12 341–12 351.
  * [24] F. Sun, W. Zang, R. Gravina, G. Fortino, and Y. Li, “Gait-based identification for elderly users in wearable healthcare systems,” _Information fusion_ , vol. 53, pp. 134–144, 2020.
  * [25] Y. Chen, X. Yang, B. Chen, C. Miao, and H. Yu, “Pdassist: Objective and quantified symptom assessment of parkinson’s disease via smartphone,” in _2017 IEEE International Conference on Bioinformatics and Biomedicine (BIBM)_. IEEE, 2017, pp. 939–945.
  * [26] F. R. Vogenberg, C. I. Barash, and M. Pursel, “Personalized medicine: part 1: evolution and development into theranostics,” _Pharmacy and Therapeutics_ , vol. 35, no. 10, p. 560, 2010.
  * [27] I. Chung, S. Kim, J. Lee, K. J. Kim, S. J. Hwang, and E. Yang, “Deep mixed effect model using gaussian processes: A personalized and reliable prediction for healthcare,” in _Proceedings of the AAAI Conference on Artificial Intelligence_ , vol. 34, no. 04, 2020, pp. 3649–3657.
  * [28] S. Abdulrahman, H. Tout, H. Ould-Slimane, A. Mourad, C. Talhi, and M. Guizani, “A survey on federated learning: The journey from centralized to distributed on-site learning and beyond,” _IEEE Internet of Things Journal_ , vol. 8, no. 7, pp. 5476–5497, 2020.
  * [29] C. Zhang, Y. Xie, H. Bai, B. Yu, W. Li, and Y. Gao, “A survey on federated learning,” _Knowledge-Based Systems_ , vol. 216, p. 106775, 2021.
  * [30] V. Smith, C.-K. Chiang, M. Sanjabi, and A. Talwalkar, “Federated multi-task learning,” in _Proceedings of the 31st International Conference on Neural Information Processing Systems_ , 2017, pp. 4427–4437.
  * [31] S. Hardy, W. Henecka, H. Ivey-Law, R. Nock, G. Patrini, G. Smith, and B. Thorne, “Private federated learning on vertically partitioned data via entity resolution and additively homomorphic encryption,” _arXiv preprint arXiv:1711.10677_ , 2017.
  * [32] K. Cheng, T. Fan, Y. Jin, Y. Liu, T. Chen, D. Papadopoulos, and Q. Yang, “Secureboost: A lossless federated learning framework,” _IEEE Intelligent Systems_ , 2021.
  * [33] Y. Liu, Y. Kang, C. Xing, T. Chen, and Q. Yang, “A secure federated transfer learning framework,” _IEEE Intelligent Systems_ , vol. 35, no. 4, pp. 70–82, 2020.
  * [34] C. He, M. Annavaram, and S. Avestimehr, “Group knowledge transfer: Federated learning of large cnns at the edge,” vol. 33, 2020.
  * [35] J. Yoon, W. Jeong, G. Lee, E. Yang, and S. J. Hwang, “Federated continual learning with weighted inter-client transfer,” in _International Conference on Machine Learning_. PMLR, 2021, pp. 12 073–12 086.
  * [36] C. Dwork, “Differential privacy: A survey of results,” in _International conference on theory and applications of models of computation_. Springer, 2008, pp. 1–19.
  * [37] N. Agarwal, A. T. Suresh, F. Yu, S. Kumar, and H. B. McMahan, “cpsgd: communication-efficient and differentially-private distributed sgd,” in _Proceedings of the 32nd International Conference on Neural Information Processing Systems_ , 2018, pp. 7575–7586.
  * [38] M. Khodak, M.-F. F. Balcan, and A. S. Talwalkar, “Adaptive gradient-based meta-learning methods,” in _Advances in Neural Information Processing Systems_ , vol. 32, 2019, pp. 5917–5928.
  * [39] Z. Zhu, J. Hong, and J. Zhou, “Data-free knowledge distillation for heterogeneous federated learning,” in _Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event_ , vol. 139. PMLR, 2021, pp. 12 878–12 889.
  * [40] H. Zhu, J. Xu, S. Liu, and Y. Jin, “Federated learning on non-iid data: A survey,” _arXiv preprint arXiv:2106.06843_ , 2021.
  * [41] Y. Yeganeh, A. Farshad, N. Navab, and S. Albarqouni, “Inverse distance aggregation for federated learning with non-iid data,” in _Domain Adaptation and Representation Transfer, and Distributed and Collaborative Learning_. Springer, 2020, pp. 150–159.
  * [42] M. G. Arivazhagan, V. Aggarwal, A. K. Singh, and S. Choudhary, “Federated learning with personalization layers,” _arXiv preprint arXiv:1912.00818_ , 2019.
  * [43] C. T Dinh, N. Tran, and T. D. Nguyen, “Personalized federated learning with moreau envelopes,” in _Advances in Neural Information Processing Systems_ , vol. 33, 2020.
  * [44] T. Yu, E. Bagdasaryan, and V. Shmatikov, “Salvaging federated learning by local adaptation,” _arXiv preprint arXiv:2002.04758_ , 2020.
  * [45] Y. Mansour, M. Mohri, J. Ro, and A. T. Suresh, “Three approaches for personalization with applications to federated learning,” _arXiv preprint arXiv:2002.10619_ , 2020.
  * [46] P. P. Liang, T. Liu, L. Ziyin, N. B. Allen, R. P. Auerbach, D. Brent, R. Salakhutdinov, and L.-P. Morency, “Think locally, act globally: Federated learning with local and global representations,” _arXiv preprint arXiv:2001.01523_ , 2020.
  * [47] Y. Deng, M. M. Kamani, and M. Mahdavi, “Adaptive personalized federated learning,” _arXiv preprint arXiv:2003.13461_ , 2020.
  * [48] F. Sattler, K.-R. Müller, and W. Samek, “Clustered federated learning: Model-agnostic distributed multitask optimization under privacy constraints,” _IEEE transactions on neural networks and learning systems_ , vol. 32, no. 8, pp. 3710–3722, 2020.
  * [49] S. Ioffe and C. Szegedy, “Batch normalization: Accelerating deep network training by reducing internal covariate shift,” in _International conference on machine learning_. PMLR, 2015, pp. 448–456.
  * [50] Y. Li, N. Wang, J. Shi, X. Hou, and J. Liu, “Adaptive batch normalization for practical domain adaptation,” _Pattern Recognition_ , vol. 80, pp. 109–117, 2018.
  * [51] M. Segù, A. Tonioni, and F. Tombari, “Batch normalization embeddings for deep domain generalization,” _arXiv preprint arXiv:2011.12672_ , 2020.
  * [52] H. Gao, A. Xu, and H. Huang, “On the convergence of communication-efficient local sgd for federated learning,” in _Proceedings of the AAAI Conference on Artificial Intelligence_ , vol. 35, no. 9, 2021, pp. 7510–7518.
  * [53] X. Cao, J. Jia, and N. Z. Gong, “Provably secure federated learning against malicious clients,” in _Proceedings of the AAAI Conference on Artificial Intelligence_ , vol. 35, no. 8, 2021, pp. 6885–6893.
  * [54] W.-G. Chang, T. You, S. Seo, S. Kwak, and B. Han, “Domain-specific batch normalization for unsupervised domain adaptation,” in _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , 2019, pp. 7354–7362.
  * [55] L. Zhu, Z. Liu, and S. Han, “Deep leakage from gradients,” _Advances in Neural Information Processing Systems_ , vol. 32, 2019.
  * [56] H. Yin, A. Mallya, A. Vahdat, J. M. Alvarez, J. Kautz, and P. Molchanov, “See through gradients: Image batch recovery via gradinversion,” in _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , 2021, pp. 16 337–16 346.
  * [57] A. Reiss and D. Stricker, “Introducing a new benchmarked dataset for activity monitoring,” in _2012 16th International Symposium on Wearable Computers_. IEEE, 2012, pp. 108–109.
  * [58] M. Yurochkin, M. Agarwal, S. Ghosh, K. Greenewald, N. Hoang, and Y. Khazaeni, “Bayesian nonparametric federated learning of neural networks,” in _International Conference on Machine Learning_. PMLR, 2019, pp. 7252–7261.
  * [59] T. Lin, S. P. Karimireddy, S. Stich, and M. Jaggi, “Quasi-global momentum: Accelerating decentralized deep learning on heterogeneous data,” in _International Conference on Machine Learning_. PMLR, 2021, pp. 6654–6665.
  * [60] U. Sait, K. G. Lal, S. Prajapati, R. Bhaumik, T. Kumar, S. Sanjana, and K. Bhalla, “Curated dataset for covid-19 posterior-anterior chest radiography images (x-rays),” _Mendeley Data_ , vol. 1, 2020.
  * [61] J. Yang, R. Shi, and B. Ni, “Medmnist classification decathlon: A lightweight automl benchmark for medical image analysis,” in _IEEE 18th International Symposium on Biomedical Imaging (ISBI)_ , 2021, pp. 191–195.
  * [62] J. Yang, R. Shi, D. Wei, Z. Liu, L. Zhao, B. Ke, H. Pfister, and B. Ni, “Medmnist v2: A large-scale lightweight benchmark for 2d and 3d biomedical image classification,” _arXiv preprint arXiv:2008.#TODO_ , 2021.
  * [63] P. Bilic, P. F. Christ, E. Vorontsov, G. Chlebus, H. Chen, Q. Dou, C.-W. Fu, X. Han, P.-A. Heng, J. Hesser _et al._ , “The liver tumor segmentation benchmark (lits),” _arXiv preprint arXiv:1901.04056_ , 2019.
  * [64] X. Xu, F. Zhou, B. Liu, D. Fu, and X. Bai, “Efficient multiple organ localization in ct image using 3d region proposal network,” _IEEE transactions on medical imaging_ , vol. 38, no. 8, pp. 1885–1898, 2019.
  * [65] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based learning applied to document recognition,” _Proceedings of the IEEE_ , vol. 86, no. 11, pp. 2278–2324, 1998.
  * [66] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep convolutional neural networks,” in _Advances in neural information processing systems_ , vol. 25, 2012, pp. 1097–1105.