\section{Introduction}

Given an infinite real matrix $A=(a_{n,k})$, we say that $A$ sums a real sequence $x$ if $Ax=(\sum_k a_{n,k}x_k)$ is well defined and convergent.
The matrix $A$ is regular if it maps convergent sequences into convergent sequences, preserving the corresponding limits.

The classical Steinhaus' theorem states that a regular matrix $A$ cannot sum all $\{0,1\}$-valued sequences, see e.g. \cite{MR795251}. This can be rewritten equivalently as follows: a regular matrix $A$ cannot sum all subsequences of a divergent $\{0,1\}$-valued sequence $x$. We recall also that Hahn's theorem \cite[Theorem 2.4.5]{MR1817226} states that a matrix $A$ sums all $\{0,1\}$-valued sequences if and only if it sums all bounded sequences. On this direction, Buck \cite{MR9208, MR81983} showed that a regular matrix $A$ cannot sum all subsequences of a given divergent sequence $x$.

Let $\Sigma$ be the set of strictly increasing functions $\sigma: \mathbf{N}\to \mathbf{N}$, so that a subsequence of a sequence $x$ is uniquely identified by some $\sigma \in \Sigma$, and write $\sigma(x):=(x_{\sigma(n)})$. Accordingly, Buck's result tells us that, if $A$ is regular and $x$ is divergent, then the set
\begin{equation}\label{eq:definitionsigmaxA}
\Sigma_{x,A}:=\{\sigma \in \Sigma: A\sigma(x) \in c\}
\end{equation}
cannot be equal to $\Sigma$. Finally, Keogh and Petersen \cite{MR92024} proved the following:
\begin{thm}\label{thm:keoghpetersen}
Let $x$ be a divergent sequence and $A$ be a regular matrix. Then $\Sigma_{x,A}$ is meager.
\end{thm}
This is meaningful since $\Sigma$ is a $G_\delta$-subset of the Polish space $\mathbf{N}^{\mathbf{N}}$, hence it is a Polish space as well by Alexandrov's theorem; in particular, $\Sigma$ is not meager in itself.
Special instances of Theorem \ref{thm:keoghpetersen} have been recently rediscovered in \cite{MR4049166, MR3809152, MR3216022}. Related results can be found in \cite[Theorem 2.3]{MR13435} and \cite{MR404918, MR425410, MR261220, MR1123336}.

Note that, if $x$ is convergent and $A$ is regular, then $\Sigma_{x,A}$ is equal to the whole $\Sigma$. Therefore, by Theorem \ref{thm:keoghpetersen}, $x$ is convergent if and only if there exists a regular matrix $A$ such that $\Sigma_{x,A}$ is not meager.
The aim of this work is to show that Theorem \ref{thm:keoghpetersen} holds even if the space of convergent sequences $c$ in the definition of $\Sigma_{x,A}$ in \eqref{eq:definitionsigmaxA} is replaced by a much bigger set, e.g., the space of statistically convergent sequences (see Section \ref{sec:main}).
Our methods are different from those employed by Keogh and Petersen, and rely on more recent result on filter games and ideal Baire classes.

\section{Main result}\label{sec:main}

Let $\mathcal{I}$ be an ideal on the positive integers $\mathbf{N}$, that is, a hereditary family of subsets of $\mathbf{N}$ closed under finite unions;
moreover, it is assumed that $\mathcal{I}$ contains the family of finite sets $\mathrm{Fin}$ and it is different from $\mathcal{P}(\mathbf{N})$.
Let
$\mathcal{I}^\star:=\{S\subseteq \mathbf{N}: S^c\in \mathcal{I}\}$ be its dual filter.
Every subset of $\mathcal{P}(\mathbf{N})$ is endowed with the relative Cantor-space topology.
In particular, we may speak about $F_\sigma$-subsets of $\mathcal{P}(\mathbf{N})$, meager ideals, etc.
In addition, let $\mathcal{Z}$ be the ideal of asymptotic density zero sets, that is,
$$
\textstyle
\mathcal{Z}:=\left\{S\subseteq \mathbf{N}: \lim_n |S\cap [1,n]|/n=0\right\}.
$$
For our purposes, it will be important also to recall the definition of the ideal $\mathrm{Fin}\times \mathrm{Fin}$, which can be represented as an ideal on $\mathbf{N}$ by
$$
\textstyle
\mathrm{Fin}\times \mathrm{Fin}:=\left\{S\subseteq \mathbf{N}: \forall^\infty k\in \mathbf{N}, \{n \in S: \nu_2(n)=k\}\in \mathrm{Fin}\right\},
$$
where $\nu_2(n)$ stands for the $2$-adic valuation of $n\in \mathbf{N}$ (that is, $\nu_2(n)=\max\{k\ge 0: 2^k \text{ divides }n\}$).
We recall that $\mathcal{Z}$ is a $F_{\sigma\delta}$-ideal, while $\mathrm{Fin}\times \mathrm{Fin}$ is $F_{\sigma\delta\sigma}$.
Given ideals $\mathcal{I}, \mathcal{J}$ on $\mathbf{N}$, we say that $\mathcal{I}$ contains an isomorphic copy of $\mathcal{J}$ if there exists an injection $\iota: \mathbf{N} \to \mathbf{N}$ such that $S \in \mathcal{J}$ if and only if $\iota^{-1}[S] \in \mathcal{I}$ for all $S\subseteq \mathbf{N}$; see e.g. \cite{MR1711328}.

Let $\omega$ be the vector space of all real sequences, together with its classical subspaces $\ell_\infty$, $c$, $c_0$, $\ell_1$, $c_{00}$ of bounded, convergent, convergent to $0$, absolutely summable, and eventually $0$ sequences, respectively.
In addition, given an ideal $\mathcal{I}$ on $\mathbf{N}$, we define also the following subspaces of $\omega$:
\begin{displaymath}
\begin{split}
\ell_\infty(\mathcal{I}) &:=\{\,\mathcal{I}\text{-bounded sequences }\}, \\
c(\mathcal{I})& :=\{\,\mathcal{I}\text{-convergent sequences }\}, \\
c_b(\mathcal{I})&:= \{\,\mathcal{I}\text{-convergent bounded sequences }\}. \\
\end{split}
\end{displaymath}
Note that $c=c(\mathrm{Fin})=c_b(\mathrm{Fin})$
and $\ell_\infty=\ell_\infty(\mathrm{Fin})$. Here, a sequence $x \in \omega$ is $\mathcal{I}$-bounded if there exists $k$ such that $\{n\in \mathbf{N}: |x_n|\ge k\} \in \mathcal{I}$.
Moreover, $x$ is $\mathcal{I}$-convergent to $\eta \in \mathbf{R}$, shortened as $\mathcal{I}\text{-}\lim x=\eta$, provided that $\{n \in \mathbf{N}: |x_n-\eta|>\varepsilon\} \in \mathcal{I}$ for all $\varepsilon>0$.
Every subspace of $\ell_\infty$ will be endowed with the topology induced by the supremum norm.
In the literature, $\mathcal{Z}$-convergence is usually called \emph{statistical convergence}.

At this point, for each infinite real matrix $A=(a_{n,k})$, let $\omega_A$ be the set of sequences $x$ such that $Ax$ is well defined, so that
$$
\textstyle
\omega_A:=\left\{x \in \omega: \sum_ka_{n,k}x_k \text{ converges for all }n\right\}.
$$
For all nonempty $X,Y\subseteq \omega$, let $(X,Y)$ be the matrix class of matrices $A$ which map sequences in $X$ into sequences in $Y$, i.e.,
$
\textstyle
(X,Y):=\{A: x \in \omega_A \text{ and } Ax \in Y \text{ for all }x \in X\}.
$
Given ideals $\mathcal{I}, \mathcal{J}$ on $\mathbf{N}$, a matrix $A$ is $\bm{(\mathcal{I}, \mathcal{J})}$\textbf{-regular} if it is maps $\mathcal{I}$-convergent bounded sequences into $\mathcal{J}$-convergent bounded sequences, preserving the corresponding ideal limits, that is,
$$
\textstyle
A \in (c_b(\mathcal{I}),c_b(\mathcal{J}))
\quad \text{ and } \quad
\mathcal{I}\text{-}\lim x=\mathcal{J}\text{-}\lim Ax
\,\,\text{ for all }
 x \in c_b(\mathcal{I}).
$$
Note that $(\mathrm{Fin}, \mathrm{Fin})$-regular matrices are simply the classical regular matrices.
Probably the most important regular matrix is the Cesàro matrix $C_1=(a_{n,k})$ defined by $a_{n,k}=\frac{1}{n}$ if $k\le n$ and $a_{n,k}=0$ otherwise.
Classes of $(\mathcal{I}, \mathcal{J})$-regular matrices have been recently used and characterized in \cite{ConnorLeo}.
In particular, the following result extends the classical Silverman--Toeplitz characterization, see \cite[Theorem 1.2 and Theorem 1.3]{ConnorLeo}:
\begin{thm}\label{thm:connotleofinJ}
A matrix $A$ is $(\mathrm{Fin},\mathcal{I})$-regular if and only if:
\begin{enumerate}[label={\rm (\textsc{R}\arabic{*})}]
\item \label{item:R1} $\sup_n \sum_k|a_{n,k}|<\infty$\textup{;}
\item \label{item:R2} $\mathcal{I}\text{-}\lim_n a_{n,k}=0$ for all $k \in \mathbf{N}$\textup{;}
\item \label{item:R3} $\mathcal{I}\text{-}\lim_n \sum_k a_{n,k}=1$\textup{.}
\end{enumerate}
\end{thm}

Finally, for each real sequence $x$, matrix $A$, and ideal $\mathcal{I}$, define
$$
\textstyle
\Sigma_{x,A}(\mathcal{I}):=\left\{\sigma \in \Sigma: A\sigma(x) \in c(\mathcal{I})\right\}.
$$
Note that $\Sigma_{x,A}=\Sigma_{x,A}(\mathrm{Fin})$.
Our main result follows (for the proof, see Section \ref{sec:mainproof}):
\begin{thm}\label{thm:mainTauberianFinI}
Let $x$ be a divergent sequence, $\mathcal{I}$ be a Borel ideal on $\mathbf{N}$ which does not contain an isomorphic copy of $\mathrm{Fin}\times \mathrm{Fin}$, and $A$ be a $(\mathrm{Fin}, \mathcal{I})$-regular matrix. Then $\Sigma_{x,A}(\mathcal{I})$ is meager.
\end{thm}

Some remarks are in order. First of all, Theorem \ref{thm:mainTauberianFinI} holds for $(\mathrm{Fin}, \mathcal{I})$-regular matrices, hence in particular it holds for regular matrices. Secondly, all $F_{\sigma\delta}$-ideals satisfy the above hypothesis, see Remark \ref{rmk:caseinclusions} below.
In particular, Theorem \ref{thm:mainTauberianFinI} holds for
the ideal $\mathcal{Z}$ of asymptotic density zero sets,
for the ideals generated by nonnegative regular matrices (see \cite[Proposition 13]{MR3405547}),
for the ideal $\mathrm{Fin}$ (hence, providing another proof of Theorem \ref{thm:keoghpetersen}), and for the ideal of Banach density zero sets.
Lastly, if $x$ is convergent then $\Sigma_{x,A}(\mathcal{I})=\Sigma$.

Putting everything together, we obtain:
\begin{cor}\label{cor:characterization}
A real sequence $x$ is convergent if and only if there exists a regular matrix $A$ such that $\{\sigma \in \Sigma: A\sigma(x) \text{ is statistically convergent}\,\}$ is not meager.
\end{cor}

In particular, letting $x$ be the sequence $(0,1,0,1,\ldots)$,
we obtain that $\{\sigma(x): \sigma \in \Sigma\}=\{0,1\}^\mathbf{N}$ and $\Sigma_{x,A}(\mathcal{Z})\neq \Sigma$, which give us a stronger version of Steinhaus' theorem:
\begin{cor}\label{cor:steinhaus}
For each regular matrix $A$, there exists a $\{0,1\}$-valued sequence $x$ such that $Ax$ is not statistically convergent.
\end{cor}

On a similar direction, letting $A$ be the infinite identity matrix, it follows that, a real sequence $x$ is convergent if and only if $\{\sigma \in \Sigma: \sigma(x) \in c(\mathcal{I})\}$ is not meager, provided that $\mathcal{I}$ is an ideal on $\mathbf{N}$ as in Theorem \ref{thm:mainTauberianFinI}. For the latter class of ideals, this gives us a generalization of \cite[Corollary 2.7]{MR4165727}, which states that $\lim x=\eta$ if and only if $\{\sigma \in \Sigma: \mathcal{I}\text{-}\lim \sigma(x)=\eta\}$ is not meager, provided that $\mathcal{I}$ is a meager ideal and $\mathcal{I}\text{-}\lim x=\eta$ (note that $\eta$ is explicit).
Other Tauberian theorems related to statistical convergence can be found in \cite{
MR4052262,
MR2324333, MR1659877, MR1653457, MR1002541, MR1260176}.

Finally, note that Theorem \ref{thm:mainTauberianFinI} does not hold without any restriction on the ideal $\mathcal{I}$.
Indeed, if $A$ is a $(\mathrm{Fin},\mathcal{I})$-regular matrix, then it satisfies condition \ref{item:R1} of Theorem \ref{thm:connotleofinJ}, so that $A \in (\ell_\infty,\ell_\infty)$.
Thus, if $x\in \ell_\infty\setminus c$ and $\mathcal{I}$ is a maximal ideal, then every subsequence $\sigma(x)$ is bounded, hence $A\sigma(x) \in c_b(\mathcal{I})$.
In particular, for each bounded divergent sequence $x$, there exist an ideal $\mathcal{I}$ and a $(\mathrm{Fin}, \mathcal{I})$-regular matrix $A$ such that $\Sigma_{x,A}(\mathcal{I})$ is not meager.

\section{Preliminaries}\label{sec:preliminaries}

Given an ideal $\mathcal{I}$, let $G(\mathcal{I})$ be the following game introduced by Laflamme in \cite{MR1367134}: at stage $n \in \mathbf{N}$ player I chooses a set $A_n \in \mathcal{I}^\star$ and, then, player II chooses a nonempty finite set $F_n\subseteq A_n$. At the end of the game, player II is declared the winner if $\bigcup_n F_n \notin \mathcal{I}$.
Moreover, a sequence $(F_k)$ of nonempty finite sets is said to be a $\mathcal{I}^\star$\emph{-universal set} if each $A \in \mathcal{I}^\star$ contains some $F_k$. We say that $\mathcal{I}^\star$ is $\omega$\emph{-diagonalizable by} $\mathcal{I}^\star$\emph{-universal sets} if there exists an infinite matrix $(F_{n,k})$ of nonempty finite sets such that each row is a $\mathcal{I}^\star$-universal set and, moreover, for each $A \in \mathcal{I}^\star$ there exist $n,m \in \mathbf{N}$ such that $F_{n,k} \cap A\neq \emptyset$ for all $k>m$.
\begin{thm}\label{thm:laflamme}
Let $\mathcal{I}$ be an ideal on $\mathbf{N}$. Then the following are equivalent:
\begin{enumerate}[label={\rm (\textsc{c}\arabic{*})}]
\item \label{item:c1} $\mathcal{I}^\star$ is $\omega$-diagonalizable by $\mathcal{I}^\star$-universal sets\textup{;}
\item \label{item:c2} player II has a winning strategy in the game $G(\mathcal{I})$.
\end{enumerate}
If, in addition, $\mathcal{I}$ is a Borel ideal, then they are also equivalent to\textup{:}
\begin{enumerate}[label={\rm (\textsc{c}\arabic{*})}]
\setcounter{enumi}{2}
\item \label{item:c3} $\mathcal{I}$ does not contain an isomorphic copy of $\mathrm{Fin}\times \mathrm{Fin}$\textup{;}
\item \label{item:c4} $\mathcal{I}$ is $F_\sigma$-separated from its dual filter $\mathcal{I}^\star$ \textup{(}that is, there exists an $F_\sigma$-set $\mathcal{K}$ such that $\mathcal{I}\subseteq \mathcal{K}$ and $\mathcal{K}\cap \mathcal{I}^\star=\emptyset$\textup{)}.
\end{enumerate}
\end{thm}
\begin{proof}
See \cite[Theorem 2.16(ii)]{MR1367134} for \ref{item:c1} $\Longleftrightarrow$ \ref{item:c2}. For the other equivalences, see \cite{MR2491780}.
\end{proof}

\begin{rmk}\label{rmk:caseinclusions}
As it has been shown in \cite[Corollary 1.5]{MR1758325}, all $F_{\sigma\delta}$-ideals satisfy condition \ref{item:c4}. Related results on condition \ref{item:c4} can be found in \cite[Proposition 3.6]{MR3090420} and \cite[Theorem 2.1]{MR3968131}.
\end{rmk}

At this point, for each ideal $\mathcal{I}$ and topological space $X$, define the $\mathcal{I}$-Baire one class
$$
\mathcal{B}_1^{\mathcal{I}}(X):=\left\{f \in \mathbf{R}^X: \exists (f_n) \in C(X)^{\mathbf{N}}, \forall x \in X,\,\, f(x)=\mathcal{I}\text{-}\lim f_n(x)\right\},
$$
where $C(X)$ stands for the space of real-valued continuous functions on $X$. Note that $\mathcal{B}_1^{\mathcal{I}}(X)$ coincides with the classical Baire one class $\mathcal{B}_1(X)$ if $\mathcal{I}=\mathrm{Fin}$. However, it has been shown in \cite[Proposition 8]{MR2491780}, the same holds if $X$ is a complete metric space and $\mathcal{I}$ is an ideal for which player II has a winning strategy in the game $G(\mathcal{I})$, cf. also \cite{MR2520152} for related results.
Some years later,
Filip\'{o}w and Szuca proved in \cite{MR2899832}, in particular, that the hypothesis of completeness on $X$ is unnecessary to obtain the latter conclusion:
\begin{thm}\label{thm:filipowszuca}
Let $\mathcal{I}$ be an ideal on $\mathbf{N}$ such that $\mathcal{I}^\star$ is $\omega$-diagonalizable by $\mathcal{I}^\star$-universal sets. Moreover, let $X$ be a perfectly normal topological space. Then $\mathcal{B}_1^{\mathcal{I}}(X)=\mathcal{B}_1(X)$.
\end{thm}
\begin{proof}
See \cite[Theorem 3.2]{MR2899832}.
\end{proof}
This
has been also obtained in \cite[Corollary 12]{MR2491780} for nonpathological analytic P-ideals $\mathcal{I}$ and arbitrary topological spaces $X$.
We recall also the classical Baire classification theorem.
\begin{thm}\label{thm:baireclassification}
Let $X$ be a metrizable space and fix a Baire one function $f \in \mathcal{B}_1(X)$. Then the set of points of continuity of $f$ is a comeager $G_\delta$-set.
\end{thm}
\begin{proof}
See \cite[Theorem 24.14]{MR1321597}.
\end{proof}

Finally, we will use the well-known characterization of meager ideals due to Talagrand.
\begin{thm}\label{prop:talagrand}
Let $\mathcal{I}$ be an ideal on $\mathbf{N}$. Then the following are equivalent:
\begin{enumerate}[label={\rm (\textsc{m}\arabic{*})}]
\item \label{item:m1} $\mathcal{I}$ is meager\textup{;}
\item \label{item:m2} there exists $\sigma \in \Sigma$ such that $A \notin \mathcal{I}$ whenever $\mathbf{N} \cap [\sigma(n),\sigma(n+1)) \subseteq A$ for infinitely many $n \in \mathbf{N}$\textup{;}
\item \label{item:m3} $\mathcal{I}$ is $F_\sigma$-separated from the Fr\'{e}chet filter $\mathrm{Fin}^\star$ \textup{(}that is, there exists a sequence $(F_n)$ of closed sets such that $\mathcal{I}\subseteq \bigcup_n F_n$ and $F_n \cap \mathrm{Fin}^\star=\emptyset$ for all $n\in \mathbf{N}$\textup{)}\textup{.}
\end{enumerate}
\end{thm}
\begin{proof}
See \cite[Proposition 3.1]{MR4165727} and \cite[Theorem 2.1]{MR579439}.
\end{proof}

At this point, we split the intermediate results into two cases: the first one assumes that $x$ is a bounded divergent sequence, the second one that $x$ is unbounded.

\subsection{Bounded case}

\begin{lem}\label{lem:continuity}
Fix two sequences $x \in \ell_\infty$ and $a \in \ell_1$.
Then the  map
$$
\textstyle
\Sigma\to \mathbf{R}: \sigma\mapsto a\cdot \sigma(x)
$$
is uniformly continuous.
\end{lem}
\begin{proof}
The claim holds trivially for $x=0$, hence suppose hereafter that $x\neq 0$, so that $\|x\|>0$.
Note that the topology on $\Sigma$ is metrizable by $d: \Sigma\times \Sigma \to \mathbf{R}$ defined as
$$
\forall \sigma_1, \sigma_2 \in \Sigma, \quad d(\sigma_1,\sigma_2)=\sum_{i \in\, \mathrm{Im}(\sigma_1) \bigtriangleup \,\mathrm{Im}(\sigma_2)}\frac{1}{2^i}.
$$
Fix $\varepsilon>0$. Since $a \in \ell_1$, there exists $k_0 \in \mathbf{N}$ such that $\sum_{k> k_0}|a_k|<\frac{\varepsilon}{2\|x\|}$.
At this point, define $\delta:=1/2^{k_0}$ and note that, if there exists $k\le k_0$ such that $k \in \mathrm{Im}(\sigma_1) \bigtriangleup \mathrm{Im}(\sigma_2)$ then $d(\sigma_1,\sigma_2) \ge 1/2^k\ge \delta$. Therefore, for each $\sigma_1,\sigma_2 \in \Sigma$ with $d(\sigma_1,\sigma_2)<\delta$, we obtain that the least element of
$\mathrm{Im}(\sigma_1) \bigtriangleup \mathrm{Im}(\sigma_2)$ is greater than $k_0$, which implies that
$$
\textstyle
|a\cdot \sigma_1(x)-a\cdot \sigma_2(x)|
=\left|\sum_{k>k_0}a_k(x_{\sigma_1(k)}-x_{\sigma_2(k)}))\right|
\le 2\|x\|\sum_{k>k_0}|a_k|<\varepsilon.
$$
This concludes the proof.
\end{proof}

\begin{cor}\label{cor:continuitypartialmaps}
Fix a matrix $A \in (c_0, \ell_\infty)$ and a sequence $x \in \ell_\infty$. Then the map
$$
\textstyle
\Sigma \to \mathbf{R}:\sigma \mapsto \sum_k a_{n,k}x_{\sigma(k)}
$$
is uniformly continuous for each $n \in \mathbf{N}$.
\end{cor}
\begin{proof}
Thanks to \cite[Theorem 2.3.5]{MR1817226}, $A$ belongs to $(c_0, \ell_\infty)$ if and only if $\sup_n \sum_k |a_{n,k}|<\infty$. The claim follows by Lemma \ref{lem:continuity}.
\end{proof}

\begin{lem}\label{lem:discontinuousverythwre}
Fix a bounded divergent sequence $x \in \ell_\infty\setminus c$, an ideal $\mathcal{I}$ on $\mathbf{N}$, and $(\mathrm{Fin}, \mathcal{I})$-matrix $A$.
Then $\Sigma_{x,A}(\mathcal{I})$ is dense and the map
\begin{equation}\label{eq:mapTj}
\textstyle
T: \Sigma_{x,A}(\mathcal{I}) \to \mathbf{R}: \sigma \mapsto \mathcal{I}\text{-}\lim_n \sum_k a_{n,k}x_{\sigma(k)}
\end{equation}
is everywhere discontinuous.
\end{lem}
\begin{proof}
Let $B\subseteq \Sigma$ an arbitrary open ball. Observe that there exist $\sigma_1,\sigma_2\in B$ such that $\lim \sigma_1(x)=\alpha$ and $\lim \sigma_2(x)=\beta$, where $\alpha:=\limsup_n x_n$ and $\beta:=\liminf_n x_n$ are finite and distinct since $x \in \ell_\infty\setminus c$.
Considering that $A$ is $(\mathrm{Fin}, \mathcal{I})$-regular, we obtain that $\alpha=\mathcal{I}\text{-}\lim A\sigma_1(x)$ and $\beta=\mathcal{I}\text{-}\lim A\sigma_2(x)$.
In particular, $B\cap \Sigma_{x,A}(\mathcal{I})\neq \emptyset$, hence $\Sigma_{x,A}(\mathcal{I})$ is dense.

In addition, $\sup_{\sigma, \sigma^\prime \in B \cap \Sigma_{x,A}(\mathcal{I})}|T(\sigma)-T(\sigma^\prime)|\ge \alpha-\beta$ for every open ball $B\subseteq \Sigma$, therefore $T$ cannot be continuous at any point of $\Sigma_{x,A}(\mathcal{I})$.
\end{proof}

\begin{rmk}\label{rmk:borelmeasurability}
With the same hypotheses of Lemma \ref{lem:discontinuousverythwre}, assume that $\mathcal{I}$ is a Borel ideal.
Then $\Sigma_{x,A}(\mathcal{I})$ is Borel and the map $T$ defined in \eqref{eq:mapTj} is Borel measurable.
For, note that necessarily $A \in (c_0, \ell_\infty)$. Hence the map $T$ is the $\mathcal{I}$-pointwise limit of the sequence of functions $T_n: \sigma \mapsto \sum_k a_{n,k}x_k$ restricted to $\Sigma_{x,A}(\mathcal{I})$, which are continuous for each $n \in \mathbf{N}$ thanks to Corollary \ref{cor:continuitypartialmaps}. In particular, each of them is Borel measurable. The claim follows by \cite[Lemma 1 and Lemma 2]{MR2390885}.
However, as  remarked in \cite[Example 1]{MR2390885}, some assumptions on $\mathcal{I}$ are needed to ensure that the $\mathcal{I}$-pointwise limit of measurable functions is still measurable.
\end{rmk}

\begin{thm}\label{thm:conclusionmaincategorybounded}
Fix a bounded divergent sequence $x \in \ell_\infty\setminus c$, an ideal $\mathcal{I}$ on $\mathbf{N}$ such that $\mathcal{I}^\star$ is $\omega$-diagonalizable by $\mathcal{I}^\star$-universal sets, and a $(\mathrm{Fin}, \mathcal{I})$-regular matrix $A$.

Then $\Sigma_{x,A}(\mathcal{I})$ is meager.
\end{thm}
\begin{proof}
Set $X:=\Sigma_{x,A}(\mathcal{I})$ and let $T$ be the map defined in \eqref{eq:mapTj}.
Thanks to Corollary \ref{cor:continuitypartialmaps},  $T \in \mathcal{B}_1^{\mathcal{I}}(X)$.
Since $X$ is metrizable and $\mathcal{I}^\star$ is $\omega$-diagonalizable by $\mathcal{I}^\star$-universal sets, then $T \in \mathcal{B}_1(X)$ by Theorem \ref{thm:filipowszuca}.
At this point, it follows by Theorem \ref{thm:baireclassification} that the set of continuity points of $T$ is a comeager subset of $X$.
Hence, by Lemma \ref{lem:discontinuousverythwre}, $X$ is a dense subset of $\Sigma$ which is meager in itself.
We conclude that $X$ is meager in $\Sigma$.
\end{proof}

\subsection{Unbounded case.}

\begin{thm}\label{lem:domaindefinition}
Fix sequences $x \in \omega\setminus \ell_\infty$ and $a \in \omega\setminus c_{00}$. Then
$$
\textstyle
\left\{\sigma \in \Sigma: \left(\sum_{k\le n} a_k x_{\sigma(k)}\right) \in \ell_\infty\right\}
$$
is meager.

\end{thm}
\begin{proof}
Let $E$ be the claimed set. Observe that $E=\bigcup_{m}E_m$, where
$$
\textstyle
\forall m \in \mathbf{N}, \quad E_m:=\left\{\sigma \in \Sigma: \left|\sum_{k\le n} a_k x_{\sigma(k)}\right|\le m \text{ for all }n\right\}.
$$
We are going each $E_{m}$ is nowhere dense. Note that each $E_m$ is closed. Thus, let us assume for the sake of contradiction that there exists $m_0$ such that $E_{m_0}$ has nonempty interior, hence there exist positive integers $t_1<\cdots<t_j$ such that $\sigma \in E_{m_0}$ whenever $\sigma(s)=t_s$ for all $s=1,\ldots,j$.
Since $a \notin c_{00}$, there exists a minimal integer $i_0\ge j+1$ such that $a_{i_0}\neq 0$.
In addition, since $x \notin \ell_\infty$, there exists an integer $t_0 \ge t_j+i_0$ such that
\begin{equation}\label{eq:contradictionabsolutevalues}
\textstyle
|a_{i_0}x_{t_0}|\ge m_0+1+\left|\sum_{k\le j} a_k x_{t_k}\right|.
\end{equation}

Finally, define  $\sigma_0: \mathbf{N}\to \mathbf{N}$ as follows:
\begin{enumerate}[label=(\roman*)]
\item \label{item:sigma1} $\sigma_0(s)=t_s$ for all $s=1,\ldots,j$;
\item \label{item:sigma2} $\sigma_0(j+s)=t_j+s$ for all $s=1,\ldots, i_0-j-1$;
\item \label{item:sigma3} $\sigma_0(i_0+s)=t_0+s$ for all integers $s\ge 0$.
\end{enumerate}
Note that $\sigma_0$ is strictly increasing, hence $\sigma_0 \in \Sigma$. Moreover, thanks to \ref{item:sigma1}, $\sigma_0 \in E_{m_0}$. On the other hand, by \ref{item:sigma3} we have $\sigma_0(i_0)=t_0$. And by the minimality of $i_0$ we get $a_{j+s}=0$ for all $s=1,\ldots,i_0-j-1$. Putting everything together with \eqref{eq:contradictionabsolutevalues}, we obtain that
$$
\textstyle
\left|\sum_{k\le i_0}a_k x_{\sigma_0(k)}\right|=\left|a_{i_0}x_{t_0}+\sum_{k\le j}a_kx_{t_k}\right|\ge m_0+1,
$$
which would imply that $\sigma_0 \notin E_{m_0}$. This contradiction concludes the proof.
\end{proof}

A matrix $A$ is said \emph{row finite} if every row is in $c_{00}$, that is, for each $n$ there exists $k_0 \in \mathbf{N}$ such that $a_{n,k}=0$ for all $k\ge k_0$.
\begin{cor}\label{cor:unboundedcase1}
Let $A$ be a matrix which is not row finite, and fix $x \in \omega \setminus \ell_\infty$.

Then
$
\textstyle
\{\sigma \in \Sigma: \sigma(x) \in \omega_A\}
$
is meager.
\end{cor}
\begin{proof}
By hypothesis, there exists $r_0 \in \mathbf{N}$ such that $a_{r_0,k}\neq 0$ for infinitely many $k$.
Hence
\begin{displaymath}
\begin{split}
\textstyle
\{\sigma \in \Sigma: \sigma(x) \in \omega_A\}&\textstyle = \bigcap_r \left\{\sigma \in \Sigma: \left(\sum_{k\le n}a_{r,k}x_{\sigma(k)}\right) \in c\right\}\\
&\textstyle
\subseteq
\left\{\sigma \in \Sigma: \left(\sum_{k\le n}a_{r_0,k}x_{\sigma(k)}\right) \in \ell_\infty\right\}.
\end{split}
\end{displaymath}
The conclusion follows by Theorem \ref{lem:domaindefinition}.
\end{proof}

\begin{thm}\label{thm:unboundedrowfinite}
Let $\mathcal{I}$ be a meager ideal on $\mathbf{N}$. Fix an unbounded sequence $x \in \omega \setminus \ell_\infty$ and a row finite matrix $A$ such that
\begin{equation}\label{eqitem:U1}
\textstyle
\forall w \in \mathbf{N}, \quad
Z_w:=\{n \in \mathbf{N}: a_{n,k}=0 \text{ for all }k\ge w\} \in \mathcal{I}.
\end{equation}

Then
$
\textstyle
\{\sigma \in \Sigma: A\sigma(x) \in \ell_\infty(\mathcal{I})\}
$
is meager.
\end{thm}
\begin{proof}
Thanks to Theorem \ref{prop:talagrand}, there exists a sequence $(F_n)$ of closed sets in $\mathcal{P}(\mathbf{N})$ such that $\mathcal{I}\subseteq \bigcup_n F_n$ and $F_n \cap \mathrm{Fin}^\star=\emptyset$ for all $n\in \mathbf{N}$.
Fix $w \in \mathbf{N}$.
Since $Z_w\in\mathcal{I}$ by condition \eqref{eqitem:U1}, it follows that the family $\mathcal{J}_w:=\{U\setminus Z: U\in \mathcal{I}\}$ is an ideal on $T_w:=\mathbf{N}\setminus Z_w$ such that $\mathcal{J}_w\subseteq \bigcup_n G_n$ and $G_n \cap \mathrm{Fin}^\star=\emptyset$ for all $n \in \mathbf{N}$, where $G_n:=F_n \cap \mathcal{P}(T_w)$ is closed in $\mathcal{P}(T_w)$.
It follows, again by Theorem \ref{prop:talagrand}, that $\mathcal{J}_w$ is a meager ideal on $T_w$.
Hence there exists a partition $\{I_{w,1}, I_{w_2},\ldots\}$ of $T_w$ into nonempty finite subsets such that a set $U\subseteq T_w$ does not belong to $\mathcal{J}_w$ whenever $I_{w,n} \subseteq U$ for infinitely many $n$.

At this point, let $S$ be the claimed set. Since $T_w \in \mathcal{I}^\star$ for each $w \in \mathbf{N}$, we obtain that
\begin{displaymath}
\begin{split}
\textstyle
\forall w \in \mathbf{N}, \quad
S&\textstyle =\bigcup_m\{\sigma \in \Sigma: \{n \in \mathbf{N}: |\sum_ka_{n,k}x_{\sigma(k)}|\ge m\}\in \mathcal{I}\}\\
&\textstyle
=\bigcup_m\{\sigma \in \Sigma: \{n \in T_w: |\sum_{k} a_{n,k}x_{\sigma(k)}|\ge m\}\in \mathcal{J}_w\}\\
&\textstyle
\subseteq \bigcup_m\{\sigma \in \Sigma: \{n \in I_{w,q}: |\sum_k a_{n,k}x_{\sigma(k)}|\ge m\}\neq I_{w,q} \text{ for all large }q\}\\
&\textstyle
= \bigcup_m\bigcup_p \bigcap_{q\ge p}\{\sigma \in \Sigma: \{n \in I_{w,q}: |\sum_ka_{n,k}x_{\sigma(k)}|\ge m\}\neq I_{w,q}\}\\
&\textstyle
= \bigcup_m\bigcup_p \bigcap_{q\ge p} \bigcup_{J\subsetneq I_{w,q}} \{\sigma \in \Sigma: \{n \in I_{w,q}: |\sum_ka_{n,k}x_{\sigma(k)}|\ge m\}=J\}.
\end{split}
\end{displaymath}
Note that all the inner sets are closed, so that also each
$$
\textstyle
S_w(m,p):=\bigcap_{q\ge p} \{\sigma \in \Sigma: \forall q\ge p, \exists n \in I_{w,q}, |\sum_ka_{n,k}x_{\sigma(k)}|< m\}
$$
is closed. Since $S\subseteq \bigcup_{m,p}S_w(m,p)$, it is sufficient to show that there exists $w \in \mathbf{N}$ such that each $S_w(m,p)$ has empty interior: this would imply that $S$ is contained in a countable union of nowhere dense sets.

To this aim, suppose for the sake of contradiction that there exist $m_0,p_0 \in \mathbf{N}$ and positive integers $t_{1}<\cdots<t_{j_0}$ such that $\sigma \in S(m_0,p_0)$ whenever $\sigma(s)=t_{s}$ for all $s=1,\ldots,j_0$.
Set $w_0:=j_0+1$.
By condition \eqref{eqitem:U1}, the set $T_{w_0}$ belongs to $\mathcal{I}^\star$, hence it is nonempty.
Note that, by construction, $r_n \ge w_0$ for all $n\in T_{w_0}$.
Define $n_0:=\min T_{w_0}$, let $p_1$ be the positive integer for which $n_0 \in I_{w_0,p_1}$, and finally set
$$
\textstyle
\alpha:=\min\{|a_{n,k}|: a_{n,k} \neq 0 \text{ and }n \in I_{w_0,q_0}\}, \,\,
\text{ where }q_0:=\max\{p_0, p_1+1\}.
$$
Note that $\alpha$ is well defined since $A$ is row finite, and set $k_0:=\max\{r_n: n \in I_{w_0,q_0}\}$.

Finally, define $\sigma_0: \mathbf{N}\to \mathbf{N}$ recursively as follows:
\begin{enumerate}[label=\textup{(}\roman*\textup{)}]
\item \label{item:cond1} $\sigma_0(s)=t_s$ for all $s=1,\ldots,j_0$;
\item \label{item:cond2} for each $s=j_0+1,\ldots,k_0$, if $\sigma_0(1)<\cdots<\sigma_0(s-1)$ are already defined, then $\sigma_0(s)$ is an integer $h>\sigma_0(s-1)$ such that
$$
\textstyle
|x_h|\ge \frac{1}{\alpha}\left(m_0+\max\left\{\left|\sum_{k< s}a_{n,k}x_{\sigma_0(k)}\right|: n \in I_{w_0,q_0}\right\}\right).
$$
\item \label{item:cond3} $\sigma_0(k_0+s)=\sigma_0(k_0)+s$ for all $s \in \mathbf{N}$.
\end{enumerate}
Considering that $\sigma_0$ is strictly increasing by construction, it follows by \ref{item:cond1} that $\sigma_0 \in S_{w_0}(m_0,p_0)$.
At the same time, since $j_0<r_n\le k_0$ for all $n \in I_{w_0,q_0}$, we obtain by \ref{item:cond2} that
\begin{displaymath}
\begin{split}
\textstyle
\forall n\in I_{w_0,q_0}, \quad |\sum_ka_{n,k}x_{\sigma_0(k)}|
&\textstyle =|\sum_{k\le r_n}a_{n,k}x_{\sigma_0(k)}|\\
&\textstyle \ge |a_{n,r_n} x_{\sigma_0(r_n)}|-\left|\sum_{k< r_n}a_{n,k}x_{\sigma_0(k)}\right|\\
&\textstyle \ge \alpha |x_{\sigma_0(r_n)}|- \max\left\{\left|\sum_{k< r_n}a_{i,k}x_{\sigma_0(k)}\right|: i \in I_{w_0,q_0}\right\}\ge m_0.
\end{split}
\end{displaymath}
This implies that $\sigma_0 \notin S_{w_0}(m_0,p_0)$, hence we obtained the desired contradiction.
\end{proof}

\section{Proof of Theorem \ref{thm:mainTauberianFinI}}\label{sec:mainproof}

\begin{proof}[Proof of Theorem \ref{thm:mainTauberianFinI}]
First, suppose that $x$ is a bounded divergent sequence. Then $\Sigma_{x,A}(\mathcal{I})$ is meager by Theorem \ref{thm:laflamme} and Theorem \ref{thm:conclusionmaincategorybounded}.

Secondly, suppose that $x$ is unbounded. If $A$ is not row finite, then $\Sigma_{x,A}(\mathcal{I})\subseteq \{\sigma \in \Sigma: \sigma(x) \in \omega_A\}$, which is meager by Corollary \ref{cor:unboundedcase1}.
Otherwise, suppose hereafter that $A$ is a row finite $(\mathrm{Fin}, \mathcal{I})$-regular matrix.
Note that $\mathcal{I}$ is a Borel ideal, hence it is meager.
Thanks to Theorem \ref{thm:connotleofinJ}, $A$ satisfies conditions \ref{item:R1}--\ref{item:R3}.
For each $w \in \mathbf{N}$, it follows by \ref{item:R2} and \ref{item:R3} that $\mathcal{I}\text{-}\lim_n\sum_{k\ge w}a_{n,k}=1$.
In particular, $Z_w$ is contained in $\{n \in \mathbf{N}: \sum_{k\ge w}a_{n,k}=0\}$, which belongs to $\mathcal{I}$.
This implies that condition \eqref{eqitem:U1} in Theorem \ref{thm:unboundedrowfinite} holds.
It follows that $\Sigma_{x,A}(\mathcal{I})$ is contained in $\{\sigma \in \Sigma: A\sigma(x) \in \ell_\infty(\mathcal{I})\}$, which is meager by Theorem \ref{thm:unboundedrowfinite}.
\end{proof}

\section{Concluding remarks}

It doesn't come as a surprise that, under suitable hypotheses on the matrix $A$ and the ideal $\mathcal{I}$, the set $\Sigma_{x,A}(\mathcal{I})$ is either meager or the whole $\Sigma$. Indeed, by a known topological $0$-$1$ law, see e.g. \cite[Theorem 8.47]{MR1321597}, a tail subset of $\Sigma$ with the Baire property is either meager or comeager. This applies also in our case. For, let $\mathcal{I}$ be a Borel ideal and $A$ be a $(\mathrm{Fin}, \mathcal{I})$-regular matrix. Then, it follows by Remark \ref{rmk:borelmeasurability} that $\Sigma_{x,A}(\mathcal{I})$ is Borel, hence it has the Baire property. Moreover, if $\sigma_1(n)=\sigma_2(n)$ for all but finitely many $n$, then $y\in c_0$ where $y_n:=x_{\sigma_2(n)}-x_{\sigma_1(n)}$ for all $n$. Hence, if $\sigma_1 \in \Sigma_{x,A}(\mathcal{I})$ then
$$
\textstyle
\mathcal{I}\text{-}\lim A\sigma_2(x)=\mathcal{I}\text{-}\lim A\sigma_1(x)+\mathcal{I}\text{-}\lim Ay=\mathcal{I}\text{-}\lim A\sigma_1(x).
$$
This implies that also $\sigma_2 \in \Sigma_{x,A}(\mathcal{I})$, proving that $\Sigma_{x,A}(\mathcal{I})$ is also a tail set.

In the same direction of \cite{MR404918, MR382890, MR425410}, we leave as open question for the interest reader to check whether the analogues of Theorem \ref{thm:mainTauberianFinI} hold for permutations and strechings of the sequence $x$.

Finally, our main result seems to be related also to a conjecture of DeVos \cite{MR501124} which can be reformulated as follows: if $E$ is an FK-space (that is, a locally convex vector space of $\omega$ which is also Fr\'{e}chet and with continuous coordinates) containing $c_{00}$, then $\{0,1\}^{\mathbf{N}}\subseteq E$ if and only if $E \cap \{0,1\}^{\mathbf{N}}$ is not meager. However, it seems quite unlikely that spaces of the type $\{x \in \omega: Ax \in c(\mathcal{I})\}$ may provide a counterexample to the latter conjecture. Indeed,  it has been shown by Connor in \cite[Theorem 3.3]{MR954458} that, even for the well-behaved ideal $\mathcal{I}=\mathcal{Z}$, the unique FK-space containing $c(\mathcal{Z})$ is $\omega$.

\bibliographystyle{amsplain}


\section{Implementation Details}

In this section, we will provide full details of our experiments, including experimental environment,   hyperparameter setting, and local model architectures.

\subsection{Experimental Environment}
For the three image datasets (including MNIST, CIFAR-10, and SVHN), we simulate the federated learning setup (1 server and $K$ devices) on a commodity machine with 1 Intel$^\circledR$ E5-2650 v4 CPU and 1 NVIDIA$^\circledR$ 2080Ti GPU.

\subsection{Parameters}
In our experiments, there are several parameters that are shared by baselines and the proposed {{\texttt{FedSiam}}} framework as shown in Table~\ref{tab-fl-para}.
The values of those parameters are refereed to existing works~\cite{Albaseer2020ExploitingUD, Jeong2020FederatedSL, McMahan2017CommunicationEfficientLO}.
We use $BS_{tr}=10$ and $BS_{te}=128$ for the image classification tasks. In all experiments, we set $seed = 1234$ during dataset splitting and model training.
\begin{table}[h]
\centering
\caption{Shared parameters for all baselines and {{\texttt{FedSiam}}}.}
\label{tab-fl-para}
\vspace{-0.1in}
\begin{tabulary}{\linewidth}{lll}
\toprule
 \textbf{Symbol}&\textbf{Value}&\textbf{Definition}\\
\midrule
$R_G$ & 50/150/200 & round of global training\\
$K$ & 100 & total number of clients\\
$B$ & 10 & number of active clients\\
$R_L$ & 5/1 & number of local epochs \\
$BS_{tr}$ & 10/100   & local training batch size \\
$BS_{te}$ & 128/64   & local testing batch size \\
$\gamma$ & 0.01/0.1/0.15/0.2 & fraction of labeled data\\
\midrule
$lr$ & 0.01   & learning rate \\
$M$ & 0.9   & momentum \\
$wd$ & 1e-4 & weight-decay \\
$Seed$ & 1234 & random seed\\
\bottomrule
\end{tabulary}
\end{table}

Table~\ref{tab-baseline-para} shows some key parameters of baselines, including FedSem~\cite{Albaseer2020ExploitingUD}, FedFixMatch~\cite{Jeong2020FederatedSL}, and FedMatch~\cite{Jeong2020FederatedSL}. Most of those settings are the same as the primitive parameter mentioned in those works. The strong data argumentation technique is only used in FedMatch and FedFixmatch baselines.

\begin{table}[h]
\centering
\caption{Parameters for other baselines.}
\label{tab-baseline-para}
\vspace{-0.1in}
\begin{tabulary}{\linewidth}{CCl}
\toprule
 \textbf{Symbol}&\textbf{Value}&\textbf{Definition}\\
\midrule

$R_G^1$ & 30 & rounds of Phase 1 of FedSem\\
$R_G^2$ & 20 & rounds of Phase 2 of FedSem\\
$T$ & 0.95 & pseudo label threshold in Fed(Fix)Match\\
$H$ & 2 & number of helper model in FedMatch \\
$n$ & 10 & count of strong data argumentation type\\
$m$ & 10 & usage count of each argumentation type\\
\bottomrule
\end{tabulary}
\end{table}

Table~\ref{tab-fedsemi-para} shows the hyperparameters of the proposed {{\texttt{FedSiam}}} framework. Note that the tipping point 1 of quantile curve $\phi_g = 3$ in linear quantile curve (Eq. (11)) and $\phi_g = 10$ in rectangle quantile curve (Eq. (12)). $\varphi_g$ is only used in rectangle quantile curve (Eq. (12)).
\begin{table}[h]
\centering
\caption{Hyperparameters for {{\texttt{FedSiam}}} framework.}
\label{tab-fedsemi-para}
\vspace{-0.1in}
\begin{tabulary}{\linewidth}{lll}
\toprule
 \textbf{Symbol}&\textbf{Value}&\textbf{Definition}\\
\midrule
$\alpha^k_{max}$ & 0.999 & maximum value of moving average $\alpha^k$ \\
$\phi_l$  & 10 & coefficient threshold of consistent loss  \\
$\phi_g$ & 3/10 & tipping point 1 of quantile curve\\
$\varphi_g$ & 40 & tipping point 2 of rectangle quantile curve\\
$\tau_g$  & 0.5   &  communication rate of $\omega_s$\\
\bottomrule
\end{tabulary}
\end{table}

\subsection{Local Model Architectures}
We use the same local model for all the baselines and {{\texttt{FedSiam}}} on each dataset. For the MNIST dataset, we adopt a CNN~\cite{lecun1998gradient} with two 5x5 convolution layers and two linear layers (21840 total parameters). For the CIFAR-10 $\&$ SVHN datasets, we apply a CNN with six convolution layers and three linear layers (5,852,170 total parameters). The details of each model architecture are shown in Table~\ref{tab-local-arch}.

\begin{table}[!htb]
\centering
\caption{Local Model Architectures.}
\label{tab-local-arch}
\vspace{-0.1in}
\begin{tabulary}{\linewidth}{c|c|c}
\toprule
Dataset & ID & Operation \\\midrule
\multirow{4}{*}{\\MNIST}
& 1 & \makecell{Convolution ($10 \times 5 \times 5$) \\+ Max Pooling ($2\times2$)}\\ \cline{2-3}
& 2 & \makecell{Convolution ($20 \times 5 \times 5$) \\+ Max Pooling ($2\times2$)} \\ \cline{2-3}
& 3 & \makecell{Fully Connected ($320 \times 50$) + ReLU} \\ \cline{2-3}
& 4 & \makecell{Fully Connected ($50 \times 10$) + Softmax} \\ \midrule

\multirow{9}{*}{\makecell{\\\\\\\\CIFAR \\\& \\ SVHN}}
& 1 & \makecell{Convolution ($32 \times 3 \times 3$) \\+ BatchNorm + ReLU}\\\cline{2-3}
& 2 & \makecell{Convolution ($64 \times 3 \times 3$) \\+ ReLU + Max Pooling ($2\times2$)}\\\cline{2-3}
& 3 & \makecell{Convolution ($128 \times 3 \times 3$) \\+ BatchNorm + ReLU}\\\cline{2-3}
& 4 & \makecell{Convolution ($128 \times 3 \times 3$) \\+ ReLU + Max Pooling ($2\times2$) + dropout(0.05)}\\\cline{2-3}
& 5 & \makecell{Convolution ($256 \times 3 \times 3$) \\+ BatchNorm + ReLU}\\\cline{2-3}
& 6 & \makecell{Convolution ($256 \times 3 \times 3$) \\+ ReLU +Max Pooling ($2\times2$)}\\\cline{2-3}
& 7 & \makecell{Fully Connected ($4096 \times 1024$) \\+ ReLU + Dropout (0.1)} \\\cline{2-3}
& 8 & \makecell{Fully Connected ($1024 \times 512$) \\+ ReLU + Dropout (0.1)} \\\cline{2-3}
& 9 & \makecell{Fully Connected ($512 \times 10$) + Softmax} \\
\bottomrule
\end{tabulary}
\end{table}

\section{Additional Experimental Results}
We also show the convergence curves of the other two datasets with different settings in Figure~\ref{MNIST-IID-convergence} and Figure~\ref{CIFAR-IID-convergence}. We can have similar observations as those on the SVHN dataset, where the proposed {{\texttt{FedSiam}}} has the fastest convergence rate and highest accuracy performance compared with other baselines.

\begin{figure*}[!h]
\centering
\includegraphics[width=0.72\textwidth]{LaTeX/pic/MNIST_Converg_curve.pdf}
 \vspace{-0.1in}
\caption{Convergence curves of approaches with different settings on the MNIST dataset. }
\label{MNIST-IID-convergence}
\end{figure*}

\begin{figure*}[!h]
\centering
\includegraphics[width=0.72\textwidth]{LaTeX/pic/CIFAR10_Converg_curve.pdf}
 \vspace{-0.1in}
\caption{Convergence curves of approaches with different settings on the CIFAR-10 dataset. }
\label{CIFAR-IID-convergence}
\end{figure*}

\section{Conclusion}
In this work, we focus on the practical and challenging setting in federated semi-supervised learning (FedSSL). To fully consider the new fundamental challenges causing by unlabeled data, we introduce two new non-IID settings in the labels-at-client scenario. Correspondingly, we propose a novel and general framework, called {{\texttt{FedSiam}}}, which is not only effective and robust for several new FedSSL Non-IID scenarios but also takes communication efficiency into consideration. Experiments on three image datasets under the IID and Non-IID settings in both labels-at-client and labels-at-server scenarios demonstrate the effectiveness of the proposed {{\texttt{FedSiam}}} framework compared with state-of-the-art baselines for the federated semi-supervised learning task.

\section{Experiments}

\subsection{Experimental Setup}
\noindent\textbf{Datasets}.
In our experiments, we use three public available datasets, including MNIST\footnote{\url{http://yann.lecun.com/exdb/mnist/}}, CIFAR-10\footnote{\url{https://www.cs.toronto.edu/~kriz/cifar.html}}, and SVHN\footnote{\url{http://ufldl.stanford.edu/housenumbers/}}.
The MNIST dataset is divided into a training set of 60,000 images and a test set of 10,000 images. There are 50,000 training samples and 10,000 testing samples in the CIFAR-10 dataset. In the SVHN dataset, 73,257 digits are used for training and 26,032 digits for testing. These three datasets are all used for the image classification task with 10 categories.

\smallskip
\noindent\textbf{Labels-at-Client Scenario}.
Each dataset will be randomly shuffled and distributed to $K = 100$ clients, and each client will have $\frac{|D|}{K}$ instances, where $|D|$ is the number of training data. Let $\gamma$ represent the ratio of the labeled data on each client. Namely, there are $\frac{|D|}{K} * \gamma$ labeled data and $\frac{|D|}{K} * (1-\gamma)$ unlabelled data stored on each client.
We set $\gamma = 0.1,0.15,$ and $0.2$ in the experiments.

For the \textbf{IID} setting, both labeled and unlabeled data all have $C$ categories.
Since there are three settings under this scenario, we denote the traditional setting as \textbf{Non-IID-I} setting,  where both the labeled and unlabeled data contain 2 random categories (i.e., $C^\prime = 2$).
We also propose two new settings, which are denoted as {Non-IID-II} and {Non-IID-III}, respectively.
For the three Non-IID settings, we will use different approaches to partition the data.
In the \textbf{Non-IID-II} setting, the labeled data have 2 categories, but the unlabeled data contain all the 10 categories.
In the \textbf{Non-IID-III} setting, both labeled and unlabeled data all have the 10 categories. However, the different client will have different ratios of labeled data. In our experiments, 10 clients own 55\% labeled data, and 90 clients only own 5\% labeled data.

\smallskip
\noindent\textbf{Labels-at-Server Scenario}.
In this scenario, each dataset will be randomly shuffled into two parts, i.e., labeled and unlabeled data.
Let $\gamma$ represent the ratio of the labeled data on the entire dataset. There are $|D| * \gamma$ labeled data at the server side, and $|D| * (1-\gamma)$ unlabelled data are distributed to clients, where $|D|$ is the number of training data.
We then divided the unlabelled data into $K = 100$ clients, and each client has $\frac{|D| * (1-\gamma)}{K}$ unlabeled instances.
We set $\gamma = 0.01$ and $0.10$ in the experiments.

For the \textbf{IID} setting, both labeled and unlabeled data all have $C$ categories. In the \textbf{Non-IID} setting, the labeled data on the server have all the 10 categories, but each client only contains 2 random categories (i.e., $C^\prime = 2$) of unlabeled data.

\smallskip
\noindent\textbf{Baselines}.
To fairly validate the proposed {{\texttt{FedSiam}}} framework, we use the following state-of-the-art baselines.
\begin{itemize}[leftmargin=*]
    \item \emph{Federated semi-supervised learning models}: FedSem~\cite{Albaseer2020ExploitingUD}, FedFixMatch~\cite{Jeong2020FederatedSL}, and FedMatch~\cite{Jeong2020FederatedSL}.
    \item \emph{Federated supervised learning models}: FedAvg~\cite{McMahan2017CommunicationEfficientLO} and FedAvg$+$, which employs data augmentation techniques over FedAvg.

\end{itemize}
These baselines will compare with the proposed {{\texttt{FedSiam}}} framework, which has three different implements with different choices of the values of $\tau$ and $\alpha^k$, including {{\texttt{FedSiam}}}-$\Pi$ ($\tau=0$ and $\alpha^k=0$), {{\texttt{FedSiam}}}-MT ($\tau=1$ and $\alpha^k>0$), and {{\texttt{FedSiam}}}-D. {{\texttt{FedSiam}}}-D does not fix the values of $\tau$ and $\alpha^k$, which are \emph{dynamically} adjusted using Eq.~(\ref{l_tau}) or Eq.~(\ref{r_tau}). The rank of communication cost is {{\texttt{FedSiam}}}-$\Pi < $ {{\texttt{FedSiam}}}-D $<$ {{\texttt{FedSiam}}}-MT.

\smallskip
\noindent\textbf{Implementation}.
For the three image datasets (including MNIST, CIFAR-10, and SVHN), we simulate the federated learning setup (1 server and $K$ devices) on a commodity machine with 1 Intel$^\circledR$ E5-2650 v4 CPU and 1 NVIDIA$^\circledR$ 2080Ti GPU.
We use the same local model for all the baselines and {{\texttt{FedSiam}}} on each dataset. For the MNIST dataset, we adopt a CNN~\cite{lecun1998gradient} with two 5x5 convolution layers and two linear layers (21840 total parameters). For the CIFAR-10 $\&$ SVHN datasets, we apply a CNN with six convolution layers and three linear layers (5,852,170 total parameters). The details of each model architecture are shown in Table~\ref{tab-local-arch}.

\begin{table}[!htb]
\centering
\caption{Local Model Architectures.}
\label{tab-local-arch}
\vspace{-0.1in}
\resizebox{0.47\textwidth}{!}{
\begin{tabulary}{\linewidth}{c|c|l}
\toprule
Dataset & ID & Operation \\\midrule
\multirow{4}{*}{MNIST}
& 1 & \makecell[l]{Convolution ($10 \times 5 \times 5$) + Max Pooling ($2\times2$)}\\ \cline{2-3}
& 2 & \makecell[l]{Convolution ($20 \times 5 \times 5$) + Max Pooling ($2\times2$)} \\ \cline{2-3}
& 3 & \makecell[l]{Fully Connected ($320 \times 50$) + ReLU} \\ \cline{2-3}
& 4 & \makecell[l]{Fully Connected ($50 \times 10$) + Softmax} \\ \midrule
\multirow{9}{*}{\makecell{\\CIFAR \\\& \\ SVHN}}
& 1 & \makecell[l]{Convolution ($32 \times 3 \times 3$) + BatchNorm + ReLU}\\\cline{2-3}
& 2 & \makecell[l]{Convolution ($64 \times 3 \times 3$) + ReLU + Max Pooling ($2\times2$)}\\\cline{2-3}
& 3 & \makecell[l]{Convolution ($128 \times 3 \times 3$) + BatchNorm + ReLU}\\\cline{2-3}
& 4 & \makecell[l]{Convolution ($128 \times 3 \times 3$) \\+ ReLU + Max Pooling ($2\times2$) + dropout(0.05)}\\\cline{2-3}
& 5 & \makecell[l]{Convolution ($256 \times 3 \times 3$) + BatchNorm + ReLU}\\\cline{2-3}
& 6 & \makecell[l]{Convolution ($256 \times 3 \times 3$) + ReLU +Max Pooling ($2\times2$)}\\\cline{2-3}
& 7 & \makecell[l]{Fully Connected ($4096 \times 1024$) + ReLU + Dropout (0.1)} \\\cline{2-3}
& 8 & \makecell[l]{Fully Connected ($1024 \times 512$) + ReLU + Dropout (0.1)} \\\cline{2-3}
& 9 & \makecell[l]{Fully Connected ($512 \times 10$) + Softmax} \\
\bottomrule
\end{tabulary}
}
\end{table}

For all the baselines and {{\texttt{FedSiam}}}, we adopt the weak data argumentation technique for the three datasets, and the main process contains random reflect, flip, contrast adjustment, grayscale, and crop.
In our experiments, there are several parameters that are shared by baselines and the proposed {{\texttt{FedSiam}}} framework as shown in Table~\ref{tab-fl-para}.
The values of those parameters are refereed to existing works~\cite{Albaseer2020ExploitingUD, Jeong2020FederatedSL, McMahan2017CommunicationEfficientLO}.
We use $BS_{tr}=10$ and $BS_{te}=128$ for the image classification tasks. In all experiments, we set $seed = 1234$ during dataset splitting and model training.
\begin{table}[h]
\centering
\caption{Shared parameters for all baselines and {{\texttt{FedSiam}}}.}
\label{tab-fl-para}
\vspace{-0.1in}
\begin{tabulary}{\linewidth}{lll}
\toprule
 \textbf{Symbol}&\textbf{Value}&\textbf{Definition}\\
\midrule
$R_G$ & 50/150/200 & round of global training\\
$K$ & 100 & total number of clients\\
$B$ & 10 & number of active clients\\
$R_L$ & 5/1 & number of local epochs \\
$BS_{tr}$ & 10/100   & local training batch size \\
$BS_{te}$ & 128/64   & local testing batch size \\
$\gamma$ & 0.01/0.1/0.15/0.2 & fraction of labeled data\\
\midrule
$lr$ & 0.01   & learning rate \\
$M$ & 0.9   & momentum \\
$wd$ & 1e-4 & weight-decay \\
$Seed$ & 1234 & random seed\\
\bottomrule
\end{tabulary}
\end{table}

Table~\ref{tab-baseline-para} shows some key parameters of baselines, including FedSem~\cite{Albaseer2020ExploitingUD}, FedFixMatch~\cite{Jeong2020FederatedSL}, and FedMatch~\cite{Jeong2020FederatedSL}. Most of those settings are the same as the primitive parameter mentioned in those works. The strong data argumentation technique is only used in FedMatch and FedFixmatch baselines.

\begin{table}[h]
\centering
\caption{Parameters for other baselines.}
\label{tab-baseline-para}
\vspace{-0.1in}
\begin{tabulary}{\linewidth}{CCl}
\toprule
 \textbf{Symbol}&\textbf{Value}&\textbf{Definition}\\
\midrule

$R_G^1$ & 30 & rounds of Phase 1 of FedSem\\
$R_G^2$ & 20 & rounds of Phase 2 of FedSem\\
$T$ & 0.95 & pseudo label threshold in Fed(Fix)Match\\
$H$ & 2 & number of helper model in FedMatch \\
$n$ & 10 & count of strong data argumentation type\\
$m$ & 10 & usage count of each argumentation type\\
\bottomrule
\end{tabulary}
\end{table}

Table~\ref{tab-fedsemi-para} shows the hyperparameters of the proposed {{\texttt{FedSiam}}} framework. Note that the tipping point 1 of quantile curve $\phi_g = 3$ in linear quantile curve (Eq. (11)) and $\phi_g = 10$ in rectangle quantile curve (Eq. (12)). $\varphi_g$ is only used in rectangle quantile curve (Eq. (12)).
\begin{table}[h]
\centering
\caption{Hyperparameters for {{\texttt{FedSiam}}} framework.}
\label{tab-fedsemi-para}
\vspace{-0.1in}
\begin{tabulary}{\linewidth}{lll}
\toprule
 \textbf{Symbol}&\textbf{Value}&\textbf{Definition}\\
\midrule
$\alpha^k_{max}$ & 0.999 & maximum value of moving average $\alpha^k$ \\
$\phi_l$  & 10 & coefficient threshold of consistent loss  \\
$\phi_g$ & 3/10 & tipping point 1 of quantile curve\\
$\varphi_g$ & 40 & tipping point 2 of rectangle quantile curve\\
$\tau_g$  & 0.5   &  communication rate of $\omega_s$\\
\bottomrule
\end{tabulary}
\end{table}

\begin{table*}[t]
\centering
\caption{Average accuracy of three runs on the three datasets under different settings for the labels-at-client scenario. Note that the Non-IID-III setting is different from other settings, where the ratios of labeled and unlabeled data are different on different clients.
}
\label{tab:lc}
\vspace{-0.1in}
\begin{small}
\begin{tabulary}{\linewidth}{c|l|ccc|ccc|ccc||ccc}
\toprule
 \multicolumn{2}{c|}{\textbf{Setting}} &\multicolumn{3}{c|}{\textbf{IID}}&\multicolumn{3}{c|}{\textbf{Non-IID-I}}&\multicolumn{3}{c||}{\textbf{Non-IID-II}}&\multicolumn{3}{c}{\textbf{Non-IID-III}}\\\hline
\textbf{ Ratio} &\textbf{Model} &{MNIST}&{CIFAR}&{SVHN}&{MNIST}&{CIFAR}&{SVHN}&{MNIST}&{CIFAR}&{SVHN}&{MNIST}&{CIFAR}&{SVHN}\\
\midrule
\multirow{8}{*}{$\gamma=0.10$}
&FedAvg      & 95.13\%   & 49.14\% & 79.41\% &  88.66\%   & 38.09\% & 45.84\%&  88.66\%   & 38.09\% & 45.84\%& 94.94\%   & 54.59\% & 80.12\%\\
&FedAvg$+$   & 96.20\%   & 57.37\% & 86.12\% &  92.95\%   & 40.78\% & 75.27\%&  92.95\%   & 40.78\% & 75.27\%& 96.08\%   & 57.73\% & 82.96\%\\
&FedSem      & 96.49\%   & 50.61\% & 85.70\% &  90.79\%   & 30.64\% & 52.50\%& 93.85\%   & 32.23\% & 62.28\%& 96.05\%   & 53.94\% & 82.12\%\\
&FedFixMatch & 93.19\%   & 56.47\% & 87.04\% &  86.68\%   & 41.98\% & 74.78\%& 86.80\%   & 43.49\% & 77.25\%& 92.92\%   & 55.32\% & 84.04\%\\
&FedMatch    & 94.11\%   & 55.17\% & 86.92\% &  86.61\%   & 44.88\% & 78.18\%& 88.66\%   & 45.81\% & 77.35\%& 92.91\%   & 49.64\% & 84.56\%\\\cline{2-14}
&{{\texttt{FedSiam}}}-$\Pi$  & 97.04\%   & 60.87\% & 87.33\% & 95.35\%   & 45.78\% & 81.30\% & 94.28\%   & 48.01\% & 81.60\%& 96.79\%   & 55.05\% & 84.93\%\\
&{{\texttt{FedSiam}}}-MT  & 97.16\% & \textbf{64.44\%} & 87.66\% &  94.95\% & 45.70\% & \textbf{81.87\%}& 94.36\% & \textbf{58.77\%} & 84.60\%& 97.00\% & \textbf{59.42\%} & 86.34\%\\
&{{\texttt{FedSiam}}}-D   & \textbf{97.22\%} & 64.12\% & \textbf{88.76\%} & \textbf{95.61\%} & \textbf{48.11\%} & 81.61\% & \textbf{95.20\%} & 57.71\% & \textbf{84.95\%}& \textbf{97.01\%} & 59.24\% & \textbf{87.80\%}\\
\bottomrule
\multirow{8}{*}{$\gamma=0.15$}
&FedAvg      & 95.84\%   & 57.42\% & 83.60\%& 92.37\%   & 43.13\% & 58.98\% & 92.37\%   & 43.13\% & 58.98\% & -- & -- & --\\
&FedAvg$+$   & 96.77\%   & 62.37\% & 88.21\%& 92.73\%   & 42.52\% & 75.52\%& 92.73\%   & 42.52\% & 75.52\%& -- & -- & --\\
&FedSem      & 96.47\%   & 58.70\% & 87.61\%& 89.88\%   & 31.91\% & 59.87\%& 93.62\%   & 38.32\% & 57.13\% & -- & -- & --\\
&FedFixMatch & 94.29\%   & 61.66\% & 88.61\%& 89.84\%   & 45.01\% & 74.70\%& 89.54\%   & 49.81\% & 79.11\%  & -- & -- & --\\
&FedMatch    & 93.52\%   & 62.61\% & 88.88\%& 85.98\%   & 44.49\% & 78.55\%& 88.49\%   & 48.16\% & 76.51\%& -- & -- & --\\\cline{2-14}
&{{\texttt{FedSiam}}}-$\Pi$  & 97.09\%   & 65.70\% & 89.55\%& 94.84\%   & 46.43\% & 83.01\% & 94.20\%   & 49.25\% & 82.32\%& -- & -- & --\\
&{{\texttt{FedSiam}}}-MT  & 97.22\% & 65.70\% & \textbf{91.63\%}& 95.44\% & \textbf{47.21\%}  & \textbf{83.95\%} & \textbf{95.66\%} & \textbf{61.00\%} & 85.70\%& -- & -- & --\\
&{{\texttt{FedSiam}}}-D   & \textbf{97.59\%} & \textbf{68.10\%} & 89.37\%& \textbf{95.89\%} & 46.40\%& 83.17\% & \textbf{95.66\%} & 57.40\% & \textbf{86.39\%}& -- & -- & --\\
\bottomrule
\multirow{8}{*}{$\gamma=0.20$}
&FedAvg      & 96.30\%   & 65.53\% & 87.57\% & 92.82\%   & 45.37\% & 68.98\%& 92.82\%   & 45.37\% & 68.98\%& -- & -- & --\\
&FedAvg$+$   & 97.25\%   & 66.51\% & 89.49\% & 92.88\%   & 48.22\% & 80.34\%& 92.88\%   & 48.22\% & 80.34\%& -- & -- & --\\
&FedSem      & 97.11\%   & 67.58\% & 89.24\% & 92.26\%   & 32.24\% & 65.75\%& 92.37\%   & 41.16\% & 69.81\% & -- & -- & --\\
&FedFixMatch & 94.68\%   & 66.54\% & 90.60\% & 90.25\%   & 45.31\% & 78.97\%& 87.44\%   & 49.62\% & 78.92\%& -- & -- & --\\
&FedMatch    & 94.92\%   & 64.73\% & 89.88\% & 86.14\%   & 46.36\% & 80.62\%& 87.70\%   & 49.41\% & 79.54\%& -- & -- & --\\\cline{2-14}
&{{\texttt{FedSiam}}}-$\Pi$  & 97.58\%   & 68.26\% & 91.02\% & 95.03\%   & 45.84\% & 84.92\% & 95.71\%   & 45.52\% & 83.29\%& -- & -- & --\\
&{{\texttt{FedSiam}}}-MT  & \textbf{97.60\%} & \textbf{71.79\%} & \textbf{91.36\%} & 95.60\% & \textbf{52.57\%}  & 83.72\% & \textbf{95.89\%} & \textbf{62.60\%} & 86.47\% & -- & -- & --\\
&{{\texttt{FedSiam}}}-D   & 97.53\% & 69.87\% & 90.29\% & \textbf{96.47\%} & 47.04\%& \textbf{84.96\%} & 95.68\% & 59.45\% & \textbf{86.61\%}& -- & -- & --\\
\bottomrule
\end{tabulary}
\end{small}
\end{table*}

\subsection{Labels-at-Client Evaluation}
In this section, we evaluate the performance of the proposed {{\texttt{FedSiam}}} framework using four settings, including one IID and three Non-IID settings. The performance of different approaches on three datasets can be found in Table~\ref{tab:lc}. We can observe that the proposed {{\texttt{FedSiam}}} achieves the best performance compared with baselines.

\subsubsection{Performance Evaluation for the IID Setting}
FedAvg and FedAvg$+$ are two federated supervised learning approaches. From the accuracy values on the four datasets, we can observe that FedAvg$+$ performs better than FedAvg, which indicates that the data augmentation technique is powerful when the number of labeled data is limited.
FedSem achieves the best performance among all the baselines on the MNIST dataset.
Since the MNIST dataset has clear patterns for the digit images, the pseudo labels are also of good quality. Such a way can be treated as increasing the training data size. Thus, the accuracy of FedSem is greater than that of FedAvg$+$. However, the other two image datasets are much complicated compared with the MNIST dataset, which makes FedSem perform worse than FedAvg$+$.

On the MNIST and CIFAR datasets, the accuracy of FedFixMatch and FedMatch is usually lower than that of FedAvg$+$, even though they all take unlabeled data into consideration but in different manners. These results illustrate that we need to design an effective way of using unlabeled data. Otherwise, the unlabeled data may degrade the performance. SVHN is a widely-used semi-supervised dataset. On this dataset, FedFixMatch and FedMatch perform better compared with FedAvg$+$.

\begin{figure*}[!h]
\centering
\includegraphics[width=0.9\textwidth]{LaTeX/pic/SVHN_Converg_curve_3.pdf}
 \vspace{-0.15in}
\caption{Convergence curves of approaches on SVHN with $\gamma = 0.1$. Similar patterns can be observed when $\gamma = 0.15$ or $0.2$.}
\label{SVHN-IID-convergence}
\vspace{-0.15in}
\end{figure*}

From our three implements, we can conclude that Siamese-network-based models are better than $\Pi$-based model in the IID setting. Though the model capacity of {{\texttt{FedSiam}}}-MT is larger than that of {{\texttt{FedSiam}}}-D, {{\texttt{FedSiam}}}-D still achieves comparable performance with {{\texttt{FedSiam}}}-MT on the three datasets. This demonstrates that the designed communication compression approach is reasonable and effective by dynamically adjusting the global parameter $\tau$ and the local parameter $\alpha^k$.

\subsubsection{Performance Evaluation for the Non-IID Settings}
From Table~\ref{tab:lc}, we can observe that our proposed approaches still outperform all the baselines. Compared with the results of the IID setting, we find that all the accuracy drops for both Non-IID-I and Non-IID-II settings. This observation is in accord with the fact, that is, the Non-IID setting is more challenging than the IID setting for federated learning. The accuracy of most approaches in the Non-IID-II setting is larger than that in the Non-IID-I setting. In particular, the difference of the best performance in two settings on the CIFAR-10 dataset (48.11\% and 58.77\%) is as large as 10\%. These results validate that even increasing the categories of unlabeled data may be helpful for federated semi-supervised learning.

Under the Non-IID-III setting, we can observe that most of the accuracy values are worse than those in the IID settings, which indicates that the ratios of labeled data on different clients may hurt the performance. Compared with the results of both Non-IID-I and Non-IID-II settings, we can conclude that this imbalanced setting is easier than the previous ones, and all the approaches can increase the performance significantly.

\subsubsection{Convergence Rate} Figure~\ref{SVHN-IID-convergence} shows the test accuracy changes with respect to the number of global communication rounds or epochs $R_g$ under the IID and Non-IID settings on the SVHN dataset. We choose {{\texttt{FedSiam}}}-D as the representative of our framework compared with all baselines. We can observe that to archive the target accuracy (i.e., the dotted line) on the SVHN dataset under all the settings, {{\texttt{FedSiam}}}-D needs much fewer rounds but achieves greater accuracy compared with baselines. These results indicate that the fast convergence rate of {{\texttt{FedSiam}}} also increases its efficiency.

\subsection{Labels-at-Server Evaluation}
In this section, we evaluate the performance of the proposed {{\texttt{FedSiam}}} framework in the labels-at-server scenario, including both the IID and Non-IID settings. Since the scenario only contains unlabeled data on each client, FedAvg, FedAvg$+$, FedSem, and {{\texttt{FedSiam}}}-D do not fit this setting. Thus, we use the remaining four approaches to validate the performance, which can be found in Table~\ref{tab:ls}. We can observe that the proposed {{\texttt{FedSiam}}} achieves the best performance compared with baselines.
\begin{table}[!ht]
\centering
\caption{Average accuracy of three runs on the three datasets under the labels-at-server scenario with different ratios of labeled data. }
\label{tab:ls}
\vspace{-0.1in}
\resizebox{0.47\textwidth}{!}{
\begin{tabulary}{\linewidth}{c|l|ccc|ccc}
\toprule
 \multicolumn{2}{c|}{\textbf{Setting}} &\multicolumn{3}{c|}{\textbf{IID}}&\multicolumn{3}{c}{\textbf{Non-IID}}\\\hline
\textbf{ Ratio} &\textbf{Model} &{MNIST}&{CIFAR}&{SVHN}&{MNIST}&{CIFAR}&{SVHN}\\
\midrule
\multirow{5}{*}{$\gamma=0.01$}
&FedFixMatch & 88.67\%   & 49.75\% & 75.05\% &  89.27\%   & 48.93\% & 75.92\%\\
&FedMatch    & 90.16\%   & 52.64\% & 78.52\% &  89.61\%   & 52.65\% & 77.84\%\\
\cline{2-8}
&{{\texttt{FedSiam}}}-$\Pi$  & \textbf{91.28\%}   & 52.70\% & \textbf{80.10\%} & \textbf{91.61\%}   & 50.77\% & 80.69\%\\
&{{\texttt{FedSiam}}}-MT  & 91.25\% & \textbf{53.90\%} & 77.27\% &  90.93\% & \textbf{55.26\%} & \textbf{81.51\%}\\
\bottomrule
\multirow{5}{*}{$\gamma=0.10$}
&FedFixMatch & 95.97\%   & 74.75\% & 92.10\% &  96.15\%   & 75.88\% & 92.08\%\\
&FedMatch    & 96.09\%   & 80.16\% & 92.09\% &  95.70\%   & 79.50\% & 91.46\%\\\cline{2-8}
&{{\texttt{FedSiam}}}-$\Pi$  & \textbf{96.18\%}   & 80.19\% & 92.13\% & \textbf{96.32\%}   & \textbf{80.10\%} & 92.18\%\\
&{{\texttt{FedSiam}}}-MT  & 95.82\% & \textbf{80.50\%} & \textbf{92.32\%} &  96.07\% & 79.61\% & \textbf{92.33\%}\\
\bottomrule
\end{tabulary}
}
\end{table}

\subsubsection{Performance Evaluation for the IID Setting}
On all three datasets, the accuracy of FedMatch is higher than that of FedFixMatch, because it introduces two helper networks and parameter deposition strategy in the labels-at-client scenario. These results illustrate that fixMatch-based methods can have a great performance with some new mechanisms.

From our implements, we can conclude that siamese network-based models are better than fixmatch-based models in the IID setting of labels-at-server scenario. On all three datasets, {{\texttt{FedSiam}}}-$\Pi$ and {{\texttt{FedSiam}}}-MT achieve better performance compared with other baselines. When the radio of labeled data $\gamma$ = 0.10, the advantage of our proposed {{\texttt{FedSiam}}} framework is more obvious. This demonstrates that {{\texttt{FedSiam}}} have a great capacity for the situation that labeled data are plentiful, and data distribution is even in the labels-at-server scenario.

\subsubsection{Performance Evaluation for the Non-IID Setting}
For the Non-IID setting with $\gamma$ = 0.10, the accuracy of FedFixMatch in MNIST and SVHN is lower than that of FedMatch, even though it brings the helper networks and parameter deposition strategy into the basic fixmatch-based method in the labels-at-client scenario. These results illustrate that we need to design an effective way of using unlabeled data while considering the effect of the Non-IID setting. Otherwise, the data heterogeneity may degrade the model performance.

From Table~\ref{tab:ls}, we can observe that our {{\texttt{FedSiam}}} outperforms other baselines in labels-at-server scenario. On all three datasets, {{\texttt{FedSiam}}}-$\Pi$ and {{\texttt{FedSiam}}}-MT achieve up to 4\% performance gain compared with other baselines. The advantage of our framework is more obvious when $\gamma$ = 0.01. This demonstrates that {{\texttt{FedSiam}}} have greater performance gain in the Non-IID setting when the labeled data are extremely limited. For the SVHN dataset, {{\texttt{FedSiam}}}-MT model perform better than {{\texttt{FedSiam}}}-$\Pi$. We can conclude that the siamese network has more advantages for dealing with classical semi-supervised learning datasets.

\subsection{{Ablation Studies}}
In this section, we conduct experiments to analyze the importance of various aspects of {{\texttt{FedSiam}}} under the labels-at-client scenario. We conduct experiments with $\gamma =0.1$, varying one or a few hyperparameters at a time while keeping the others fixed.

\smallskip
\noindent\textbf{Communication Efficiency}.
One benefit of the proposed {{\texttt{FedSiam}}} framework is that it can reduce model communication cost in an adaptive manner. To explore the relationship between communication cost and accuracy, we conduct experiments by changing the hyperparameter $\mu$, which represents the target reduced communication cost compared with the full siamese network. {{\texttt{FedSiam}}}-MT is built upon the full siamese network, which has the largest communication cost compared with FedAvg$+$, {{\texttt{FedSiam}}}-$\Pi$, and {{\texttt{FedSiam}}}-D. FedAvg$+$ and {{\texttt{FedSiam}}}-$\Pi$ have the lowest communication cost.
Figure~\ref{ccp} shows the results on the two datasets under the IID setting. The X-axis represents the value of $\mu$, and Y-axis denotes the value of accuracy.

We can observe that with the decrease of communication cost, i.e, increasing the value of $\mu$, the accuracy obtained by {{\texttt{FedSiam}}}-D increases until achieving the peak value, which is larger than that of FedAvg$+$, {{\texttt{FedSiam}}}-$\Pi$, and even {{\texttt{FedSiam}}}-MT. A interesting result is that reducing the network communication ({{\texttt{FedSiam}}}-D) even leads to performance improve compared with {{\texttt{FedSiam}}}-MT. We can understand the layer's removal and splicing as the random noise added into the model during the training, which can contribute to the robustness and performance of our model in some cases. This shows that the proposed dynamically adaptive layer selection mechanism is reasonable and essential. After the peak value, the accuracy of {{\texttt{FedSiam}}}-D then drops, which shows that there exists a trade-off between reducing communication cost and persevering performance.

\begin{figure}[!htb]
\centering
\includegraphics[width=1\columnwidth]{LaTeX/pic/02_miu_1x2.pdf}
\vspace{-0.2in}
\caption{Test accuracy v.s. $\mu$ for on the MNIST and SVHN datasets under the IID setting when $\gamma = 0.10$. }
\label{ccp}
\end{figure}

\smallskip
\noindent\textbf{Siamese Network \& Momentum Update}. We firstly experiment with the siamese network and momentum update, which controls the training of models. We report the performance of {{\texttt{FedSiam}}}-$NoSiam$, i.e, without using the siamese network, as shown in the second row of Table~\ref{tab:as}. The result suggests that the siamese network plays a important role with regard to model performance. An essential hyperparameter of {{\texttt{FedSiam}}} is the EMA decay on training $\alpha^k$. We conduct experiments to select the best value of $\alpha^k$ and validate the sensitivity of our model to these values. From the third row of Table~\ref{tab:as}, we can see that the model accuracy first increases and then degrades quickly as the $\alpha^k$ grows. According to these results, we use $\alpha^k=0.999$ in each training run, which receives the best performance among all the settings.

\smallskip
\noindent\textbf{Quantile Curve for $\tau$}. We experiment with the ramp-up curve for $\tau$, which controls the amount of unloaded parameters. We report the accuracy value of two quantile curves in the last row of Table~\ref{tab:as}, with total 50 rounds training with the IID case in the label-at-client scenario. The result demonstrates that {{\texttt{FedSiam}}}-D achieves the best performance with the linear quantile curve on the MNIST and SVHN datasets, while the model with rectangle curve performs the best among the CIFAR-10 dataset, but the gap is small compared with the linear version. With these results, we use the linear quantile curve for the MNIST and SVHN datasets and rectangle curve for the CIFAR-10 dataset.

\begin{table}[!ht]
\centering
\caption{Mean accuracy with $\gamma=0.1$ under the IID setting over four runs per hyperparameter setting. In each experiment, we vary one hyperparameter and fix other hyperparameters listed in Table~\ref{tab-fl-para}. }
\label{tab:as}
\vspace{-0.1in}
\resizebox{0.47\textwidth}{!}{
\begin{tabulary}{\linewidth}{c|l|ccc}
\toprule
\textbf{} &\textbf{Settings} &{MNIST}&{CIFAR}&{SVHN}\\
\midrule
\multirow{2}{*}{Siamese Network}
&{{\texttt{FedSiam}}}-NoSiam & 97.03\%   & 60.78\% & 87.24\% \\
&{{\texttt{FedSiam}}}-D    & \textbf{97.22\%}   & \textbf{64.12\%} & \textbf{88.76\%} \\
\midrule
\multirow{4}{*}{Momentum Update $\alpha^k$}
&0.9 & 97.08\%   & 63.86\% & 88.22\% \\
&0.99    & 96.93\%   & 63.48\% & 88.25\% \\
&0.999 & \textbf{97.22\%}   & \textbf{64.12\%} & \textbf{88.76\%} \\
&0.9999    & 96.94\%   & 63.13\% & 88.60\% \\
\midrule
\multirow{2}{*}{Quantile Curve for $\tau$}
&linear & \textbf{97.22\%}   & 64.08\% & \textbf{88.76\% }\\
&rectangle   & 97.13\%   & \textbf{64.12\% }& 88.63\% \\
\bottomrule
\end{tabulary}
}
\end{table}

\smallskip
\noindent\textbf{Loss Function}. To choose the suitable loss function as the consistency loss $J$ under the FedSSL scenario, we conduct the ablation experiments on two different losses, i.e., Mean Squared Error (MSE) loss and Kullback-Leibler (KL) Divergence loss in three datasets. From Table~\ref{tab:as}, we can observe that under the IID setting, the models with MSE loss and KL Divergence loss perform better than baselines listed in Table~\ref{tab:lc}, and using MSE loss leads to the best accuracy on the three datasets. Thus, we choose to use the MSE loss for the IID setting. However, in the Non-IID-I setting, using KL Divergence loss can achieve much higher accuracy compared with the MSE loss on the CIFAR dataset, and on the MNIST and SVHN datasets, the modes with MSE loss still outperform the ones with KL Divergence loss. Based on these observations, we choose the KL Divergence loss for the CIFAR dataset and the MSE loss for both MNIST and SVHN datasets when running experiments under the Non-IID settings.

\begin{table}[!ht]
\centering
\caption{Mean accuracy with $\gamma=0.1$ under the IID and Non-IID-I setting over four runs per hyperparameter setting. In each experiment, we change the consistency losses and fix other hyperparameters listed in Table~\ref{tab-fl-para}. }
\label{tab:as}
\vspace{-0.1in}
\resizebox{0.47\textwidth}{!}{
\begin{tabulary}{\linewidth}{c|l|ccc}
\toprule
\textbf{} &\textbf{Settings} &{MNIST}&{CIFAR}&{SVHN}\\
\midrule
\multirow{2}{*}{IID}
&MSE loss & \textbf{97.22\%}   & \textbf{64.12\%} & \textbf{88.76\%} \\
&KL Divergence loss   & 96.16\%   & 63.52\% & 88.71\% \\
\midrule
\multirow{2}{*}{Non-IID-I}
&MSE loss & \textbf{95.61\%}   & 41.09\% & \textbf{81.61\%} \\
&KL Divergence loss   & 87.04\%   & \textbf{48.11\%} & 73.69\% \\
\bottomrule
\end{tabulary}
}
\end{table}

\section{Introduction}

Federated Learning (FL) attracts increasing attention from both academic and industrial researchers, due to its unique characteristic of collaborating in training machine learning models without actually sharing local data and leaking privacy~\cite{McMahan2017CommunicationEfficientLO,DBLP:journals/corr/abs-1902-04885,DBLP:journals/corr/abs-1912-04977}. FL has been widely applied in different applications, such as keyboard prediction~\cite{DBLP:journals/corr/abs-1811-03604}, vocal classifier~\cite{Leroy2019FederatedLF}, financial risk prediction~\cite{Yang2019FFDAF}, and medical researches~\cite{Brisimi2018FederatedLO}.
Existing FL studies~\cite{Sahu2018OnTC,Li2020OnTC,han2020robust} mainly focus on learning a global model by aggregating local model parameters, which are trained with fully labeled data. However, labeling data is expensive, time-consuming, and may need the participation of domain experts. Thus, how to utilize unlabeled data residing on local clients to learn the global model is a new challenge for FL.

Recently, federated semi-supervised learning (FedSSL) approaches ~\cite{jin2020utilizing} are proposed to tackle this challenge by integrating unlabeled data into the federated supervised learning framework, such as FedSem~\cite{Albaseer2020ExploitingUD} and FedMatch~\cite{Jeong2020FederatedSL}. FedSem employs the pseudo-labeling technique to generate fake labels for unlabeled data based on the trained FedAvg~\cite{McMahan2017CommunicationEfficientLO} model with labeled data. The data with pseudo labels are further used to retrain FedAvg to obtain the final global model. Thus, FedSem easily overfits to imperfect annotations from the pre-trained FedAvg and further leads to unsatisfactory performance. FedMatch is the state-of-the-art model for FedSSL, which introduces a new inter-client consistency loss and decomposition of the parameters learned from labeled and unlabeled data, but this approach ignores some new settings of FedSSL.

\begin{figure}[t]
\centering
\includegraphics[width=0.48\textwidth]{LaTeX/pic/two_settings.pdf}
\vspace{-0.3in}
\caption{Illustration of two scenarios in federated semi-supervised learning. (a) Labels-at-Client scenario: both labeled and unlabeled data are available at local clients. (b) Labels-at-Server scenario: labeled data are available only at the server, while unlabeled data are available at local clients.}
\label{fig:two_scenarios}
\vspace{-0.15in}
\end{figure}

\begin{figure*}[t]
\centering
\vspace{-0.2in}
\includegraphics[width=0.95\textwidth]{LaTeX/pic/fedsemi.pdf}
\caption{Overview of the proposed {{\texttt{FedSiam}}} Framework. (a) \textit{{{\texttt{FedSiam}}} architecture}. Each client $k$ updates the siamese network with its own data and uploads the model to the server. At the server side, the global parameters $\boldsymbol{\theta}^G$ will be updated by averaging all the local parameters and further distributed to each client. In the labels-at-server scenario, a server update for $\boldsymbol{\theta}^G$ is required before the next round. (b) \textit{Local Model for Label-at-Client Scenario}. The local model will be trained to minimize both a classification loss and a consistency loss with a momentum update (MU). The layer-level weight divergence of the siamese network is calculated. Based on a designed adaptive measure, some layers of the online net will be removed when uploading local parameters to the server. (c) \textit{Label-at-Server Scenario}. Unlike the Labels-at-Client Scenario, the Labels-at-Server Scenario only updates its local model by the consistency loss, where the layer selection (LS) and momentum update (MU) is required. Stop Gradient (SG) is a part of momentum update (MU).}

\label{framework_overivew}
\end{figure*}

\smallskip
\noindent\textbf{Motivation}.
There are two general scenarios of FedSSL, i.e., \textit{labels-at-client} and \textit{labels-at-server} as shown in Figure~\ref{fig:two_scenarios}. Labels-at-client means that there are both labeled and unlabeled data on each client, but there is no data on the server. Labels-at-server indicates that there is no labeled data on any client, and all the labeled data are stored on the server.
A fundamental challenge of both FL and FedSSL comes from the statistical heterogeneity of data distributions, i.e, the non-IID challenges.
The current non-IID setting used by existing FedSSL studies follows that used in supervised federated learning. Assume that the number of label categories is $C$ in the whole dataset. The non-IID setting of the labels-at-client scenario assumes that there are only $C^\prime_k < C$ categories' data, including both labeled and unlabeled data, stored on the $k$-th client. However, this type of federated semi-supervised learning setting is too restricted to handle various types of data distributions in complicated real-world applications.

\smallskip
\noindent\textbf{New Settings of Non-IID FedSSL}.
In this paper, we consider two new settings under the labels-at-client scenario by relaxing the assumption of the existing non-IID setting. First, we assume that the number of labeled data is $C^\prime_k < C$ on the $k$-th client, but the number of categories of unlabeled data is $C$. This setting is realistic since collecting unlabeled data is much easier than labeling all the categories' data. In real-world applications, the number of labeled and unlabeled data on each client may be different. Thus, in the second new setting, we assume that both labeled and unlabeled data have $C$ categories' data on each client. However, the ratios of labeled and unlabeled data varies on different clients. Therefore, it is necessary to design a new, effective, and general federated semi-supervised learning framework to handle these four non-IID settings simultaneously, i.e., two new settings for the labels-at-client scenario and two traditional non-IID setting for corresponding scenarios.

\smallskip
\noindent\textbf{{Our Solution}}.
To tackle all the aforementioned challenges, we propose a general federated semi-supervised learning framework, named {{\texttt{FedSiam}}} as shown in Figure~\ref{framework_overivew}, which is not only effective and robust for several new FedSSL settings but also takes communication efficiency into consideration.
{{\texttt{FedSiam}}} firstly introduces a siamese network into federated semi-supervised learning, which has received great success in semi-supervised learning~\cite{Tarvainen2017MeanTA} and self-supervised learning~\cite{grill2020bootstrap}. The siamese network consists of two sub-networks, i.e., an online net and a target net, which enables the model to memorize the non-IID information and provide a possible solution to solve the data heterogeneity.

Except for utilizing a siamese network, we also propose to use a consistency loss that utilizes the unlabeled data and further enhances the stability of learning. This loss provides a principled way for the model to account for heterogeneity associated with partial information and the overall accuracy of federated learning in heterogeneous networks.
Besides, we introduce a new metric to measure the divergence of each local model layer. Then an adaptive layer selection approach is designed to significantly reduce the communication cost during the training process while maintaining the global performance.

\smallskip
\noindent\textbf{Contributions}.
In summary, the main contributions of this work are as follows:
\begin{itemize}[leftmargin=*]
    \item We investigate two new settings of federated semi-supervised learning by considering different types of data heterogeneity in real world applications.
    \item We propose a general, accurate, and adaptive framework for federated semi-supervised learning, called {{\texttt{FedSiam}}}\footnote{The source code of the proposed {{\texttt{FedSiam}}} framework is publicly available at \url{https://anonymous.4open.science/r/fedsiam-cikm2021-B420/}}, which handles the challenge of unlabeled data by introducing a siamese network and a consistency loss.
    \item We further introduce a new adaptive measure to automatically select local model layers during the global parameter aggregation, which is effective for reducing communication cost as well as guaranteeing model performance.
    \item We validate the proposed framework on three image datasets under both labels-at-client and labels-at-server scenarios with both IID and non-IID settings. Experimental results demonstrate the effectiveness and efficiency of the proposed {{\texttt{FedSiam}}} framework.
\end{itemize}

\section{Methodology}

To alleviate the new dilemma caused by unlabeled data, we propose {{\texttt{FedSiam}}}, an efficient FedSSL framework as shown in Figure~\ref{framework_overivew}. A siamese network is employed as the local model to effectively handle the unlabeled data, which consists of two nets, i.e., an online net and a target net.
However, uploading the parameters of two nets to the server significantly increases the communication cost. To solve this issue, we further introduce a dynamic hyperparameter regulatory mechanism and a communication-efficient parameter selection based on the designed weight divergence. Next, we will give the details of the proposed {{\texttt{FedSiam}}} framework.

\subsection{Siamese Network}

As described previously, {{\texttt{FedSiam}}} uses a siamese network to utilize the unlabeled data on each client and solve the data heterogeneity. The siamese network consists of two sub-networks, i.e., an online net and a target net. For the online net $\theta_{s,q}$, we update its parameters by minimizing the loss with SGD. Then we define the target net parameters $\theta_{t,q}$ at training step $q$ as the exponential moving average (EMA) of successive $\theta_{s,q}$. Specifically, given a target decay rate $\alpha \in [0,1]$, after each training step we perform the following update, as:
\begin{equation}\label{ema}
\theta_{t,q} = \alpha \theta_{t,q-1}+ (1-\alpha) \theta_{s,q}.
\end{equation}

Siamese network has received a great success in semi-supervised learning~\cite{Tarvainen2017MeanTA} and self-supervised learning~\cite{grill2020bootstrap}. However, we now argue that the siamese network can contribute to solve the non-IID dilemma. An intuitive explanation is that the online model and target model within the siamese network have a clear division of labor. \emph{The online network keeps updating the parameter from the non-IID training data in clients; while the target network updates slowly with the momentum mechanism and reserves the long-term information from previous training.} This division of labor enables the proposed {{\texttt{FedSiam}}} framework to extract the feature information efficiently from the non-IID data.

\subsection{Framework Design}

\subsubsection{Loss Design}
In the proposed {{\texttt{FedSiam}}} framework, to utilize the unlabeled data on each client, we introduce the \textbf{consistency loss} into model training. Let $\boldsymbol{\theta}^k_t$ be the parameter set of the target net. Given two perturbed inputs $\mathbf{x}^k_i + \eta$ and $\mathbf{x}^k_i + \eta^\prime$, the consistency loss disciplines the difference between the online net’s predicted probabilities $f(\mathbf{x}^k_i + \eta; \boldsymbol{\theta}^k_s)$ and the target net's predicted probabilities $f(\mathbf{x}^k_i + \eta^\prime; \boldsymbol{\theta}^k_t)$. The consistency loss is typically represented by the Mean Squared Error (MSE):
\begin{equation}\label{mse_loss}
    J = \frac{1}{n^\prime + m^{\prime}}\sum_{j = 1}^{n^\prime + m^{\prime}} \|f(\mathbf{x}^k_j + \eta^\prime; \boldsymbol{\theta}^k_t) - f(\mathbf{x}^k_j + \eta; \boldsymbol{\theta}^k_s)\|^2
\end{equation}
or Kullback–Leibler (KL) divergence:
\begin{equation}\label{kl_loss}
    J = \frac{1}{n^\prime + m^{\prime}}\sum_{j = 1}^{n^\prime + m^{\prime}} \mathrm{KL}(f(\mathbf{x}^k_j + \eta^\prime; \boldsymbol{\theta}^k_t) \| f(\mathbf{x}^k_j + \eta; \boldsymbol{\theta}^k_s)),
\end{equation}
where $n^\prime$ denotes the total number of labeled data and their perturbations, $m^\prime$ denotes the total number of original unlabeled and perturbed unlabeled data, $f(\cdot;\cdot)$ represents a deep neural network, and $\boldsymbol{\theta}^k_s$ is the parameter set of the online net.

We apply the widely used \textbf{cross-entropy loss} as the classification loss for the labeled data, i.e.,
\begin{equation}\label{classification_loss}
    L = \frac{1}{n^\prime}\sum_{i=1}^{n^\prime} \sum_{c=1}^C p(y_i^k = c) \log f(\mathbf{x}^{k}_i; \boldsymbol{\theta}^k_s).
\end{equation}

\subsubsection{Framework Learning} The key of federated semi-supervised learning is how to utilize the unlabeled data on each client without intervening in the classification task of other clients. {{\texttt{FedSiam}}} employs a similar loss as Eq.~(\ref{client_ssl_loss}).
For each client $k$ in the \textit{labels-at-client} scenario, {{\texttt{FedSiam}}} aim to update the local model as,
\begin{equation}\label{client_loss_beta}
\hat{\boldsymbol{\theta}}^k = \min_{\boldsymbol{\theta}^k \in \boldsymbol{\Theta}} L + \beta^k J,
\end{equation}
or in the \textit{labels-at-server} scenario:
\begin{equation}\label{client_loss_beta_disjoint}
\begin{array}{c}
\hat{\boldsymbol{\theta}} = \min_{\boldsymbol{\theta} \in \boldsymbol{\Theta}} L,\\
\hat{\boldsymbol{\theta}}^k = \min_{\boldsymbol{\theta}^k \in \boldsymbol{\Theta}} \beta^k J,
\end{array}
\end{equation}
where $\hat{\boldsymbol{\theta}}^k$ is the optimal parameter set of the $k$-th local model, $\hat{\boldsymbol{\theta}}$ is the optimal parameter set of the global model, $L$ is the classification loss on the labeled data, $J$ is the consistency loss on the unlabeled data, and $\beta^k$ is a dynamic hyperparameter to control the influence of the unlabeled data.

To optimize the local model, we first learn the parameters of the online net by minimizing Eq.~(\ref{client_loss_beta}) and Eq.~(\ref{client_loss_beta_disjoint}). Then we define the target net parameters $\boldsymbol{\theta}^k_t$ at training step $q$ as the
exponential moving average (EMA) of successive $\boldsymbol{\theta}^k_s$ as:
\begin{equation}\label{ema}
\boldsymbol{\theta}^k_{t,q} = \alpha^k \boldsymbol{\theta}^k_{t,q-1}+ (1-\alpha^k) \boldsymbol{\theta}^k_{s,q},
\end{equation}
where the target net weight in local $k$ at training step $q$ is composed of the moving average of the target net's weight at training step $q-1$ and the online net's weight at training step $q$. $\alpha^k$ is a dynamic hyperparameter to control the update proportion of target net. We use the ramp-up technique with an upper EMA decay during training because the online net improves quickly early in the training, and thus the target net should forget the old, inaccurate, online weights quickly.

\subsection{Layer Selection}

Though the siamese network tightly couples target and online nets to enhance each other, in the federated learning setting, especially for the Non-IID settings, the performance of the siamese network easily degrades due to unavoidable data bias in each client. Such a challenge makes it necessary to synchronize the parameters of target and online nets across the different clients. However, full synchronization of different target and online networks easily leads to expensive communication costs.

To solve the aforementioned challenge, we propose to remove the layers of the target net during the uploading process to the server, which are similar to those of the target net. When conducting parameter aggregation, we can borrow the removed layers of online nets from the corresponding target nets first and then use Eq.~(\ref{parameter_aggregation}) to obtain the global model $G$. In such a way, we can significantly reduce the communication cost compared with uploading all the parameters. Next, we will introduce how to calculate layer-level similarity and then describe how to remove similar layers.

\subsubsection{Layer-level Divergence}
For calculating the layer-level model divergences, we propose a new Fair-and-Square Metric (FSM), which is defined as follows:
\begin{equation}
    \text{FSM}^k[j] = \frac{\| {\boldsymbol{\theta}}^k_t [j] - {\boldsymbol{\theta}}^k_s[j]\|}{\| {\boldsymbol{\theta}}^k_s[j]\|},
\end{equation}
where $[j]$ represents the $j$-th layer of the online or target net, and ${\left\|\cdot \right\|} $ is the Euclidean norm. \emph{Intuitively, the smaller the $\text{FSM}^k[j]$ value, the more similar the two layers of online and target nets.}  It enables us to reduce the communication cost while guaranteeing the model performance by substituting the most similar layer of the online net for the same layer of the corresponding target network.

However, the challenge here is how to determine the boundary FSM value of removing useless layers. In the FL setting, all parameters are distributed in different clients, and thus, it is impossible to manually define a threshold for each local model. Moreover, the model might have difficulty to synchronize the boundary values in asynchronous updates. To address this issue, we design a new approach to automatically estimate a global boundary value.

\subsubsection{Adaptive Boundary Estimation}
The proposed method utilizes the $\tau$ quantile of all the layer-level divergences from clients as the boundary value. Suppose that each local model $l_k$ consists of $V$ layers, which equals to the length of $\text{FSM}^k$ vector. This vector will upload to the center sever. At the $R_{g}$-th communication round or global training epoch, we can collect $V*B$ layer-level divergence values from $B$ selected clients, which is denoted as $\text{FSM}_{R_g}$. In total, the sever side stores a divergence aggregation vector $\Lambda = [\text{FSM}_1, \cdots, \text{FSM}_{R_g}]$ with length $R_{g}*V*B$ when $R_g \leq \phi_g$. To reduce the workload of the server side, we only keep $\Lambda =[\text{FSM}_{R_{g} - \phi_g + 1}, \cdots, \text{FSM}_{R_g}]$ with length $\phi_g*V*B$ if $R_g > \phi_g$.
The $\tau$-th quantile of $\Lambda$ is considered as the estimated boundary value.
This value will be distributed to each client. If the $j$-th value in $\text{FSM}^k$ is smaller than the $\tau$ quantile of $\Lambda$, then the corresponding layer in the online model will be not uploaded to the center sever. Though the uploading and downloading of $\Lambda$ increases the communication cost, comparing with the reduced cost from model parameters, it can be ignored. Thus, the overall communication cost can be significantly reduced with our approach.

\subsubsection{The Value of $\tau$}
From Eq.~(\ref{client_loss_beta}), Eq.~(\ref{client_loss_beta_disjoint}) and Eq.~(\ref{ema}), we can observe that when the global training epoch $R_g$ is small, the online and target nets are relatively similar, and the consistency loss does not dominate the optimization. Thus, it is not necessary to upload the online net to the server. However, with the increase of $R_g$, the weight of the consistency loss increases, which leads to the difference between the target and online nets. At this time, we need to sacrifice communication cost and upload a part of parameters from the online net. As the training process keeps going on, the similarity of the two nets increases. Thus, the number of uploaded parameters from the online net should be decreased. To satisfy these intuitions, we design the following two choices of ramp-down curves for the hyperparameter $\tau$:

\begin{figure}[htb]
    \centering

    \begin{minipage}{0.24\textwidth}\label{fig:l_tau}
        \centering
        \includegraphics[height=1.0in]{LaTeX/pic/l_tau.pdf}
        \vspace{-0.1in}
        \caption{Linear.}
    \end{minipage}%
    \begin{minipage}{0.24\textwidth}
        \centering
        \includegraphics[height=1.0in]{LaTeX/pic/r_tau.pdf}
        \vspace{-0.1in}
        \caption{Rectangle.}
    \end{minipage}

\end{figure}
\noindent\textbf{Linear quantile curve}. As shown in Figure~3, the hyperparameter $\tau$ is 0 before the training rounds $\phi_g$ and then keeps reduce to 0 linearly until the end of training.
\begin{equation}\label{l_tau}
\tau =
\begin{cases}
0,&  {R}_{g} \leq \phi_g;\\
-\frac{2* (1-\mu) * R_G}{(R_G-\phi_g)^2} (R_{g}-R_G),&  \phi_g < {R}_{g} \leq R_G.
\end{cases}
\end{equation}

\smallskip
\noindent\textbf{Rectangle quantile curve}. As shown in Figure~4, the hyperparameter $\tau$ is 0 before the training rounds $\phi_g$, then keeps as a constant until the training rounds $\varphi_g$, and equals to 0 again.
\begin{equation}\label{r_tau}
\tau =
\begin{cases}
0,&  {R}_{g} \leq \phi_g \quad\text{or}\quad \varphi_g \leq {R}_{g} \leq R_G;\\
\frac{(1-\mu) * R_G}{\varphi_g - \phi_g},&   \phi_g < {R}_{g} < \varphi_g,
\end{cases}
\end{equation}
where $\mu \in [0, 1]$ is a predefined target of reduced communication rate compared with the siamese network, $R_{g}$ is the global epoch at that time, $\varphi_g$ is a predefined ending epoch, and $R_G$ is the total number of training epochs.

\noindent{\textbf{Remark}}. When ${R}_{g} \leq \phi_g$, we have $\tau=0$ and $\alpha^k=0$, which means that the proposed {{\texttt{FedSiam}}} only updates the target net, which is equivalent to the $\Pi$-model. Compared with the Mean-Teacher model, the $\Pi$-model can converge quickly.
When $\phi_g < {R}_{g} \leq R_G$, indicating $\tau>0$ and $\alpha^k>0$, {{\texttt{FedSiam}}} updates both the target and online nets, which is similar to the Mean-Teacher model.
Thus, the proposed {{\texttt{FedSiam}}} framework is more general and fully makes use of the advantages of both state-of-the-art models to not only reduce the communication rate but also increase the model convergence rate.

\section{Preliminaries}

\subsection{Federated Learning}

Federated learning is a new collaborative learning paradigm, which aims to learn a global model without sharing local client data. Let $G$ represent the global model and $\mathcal{L} = \{l_k\}_{k=1}^K$ denote a set of local models for $K$ client\textcolor{blue}{}s. For the $k$-th client, $\mathcal{D}_L^k = \{ (\mathbf{x}^k_1,y^k_1),\cdots, (\mathbf{x}^k_n,y^k_n) \}$ represents a set of labeled data, where $\mathbf{x}^k_i$ ($i \in\{1, \cdots, n\}$) is a data instance, $y^k_i \in \{1, \cdots, C\}$ is the corresponding label, and $C$ is the number of label categories. For learning the global model $G$, federated learning usually contains two steps: \emph{local update} and \emph{parameter aggregation}.

\smallskip
\noindent
\textbf{{Local Update.}}
Federated learning algorithms, such as FedAvg, first randomly selects $B$ local models (denoted as $\mathcal{L}^B \subset \mathcal{L}$ where $B < K$) at each communication round.
Let $\boldsymbol{\theta}^b$ represent the learned parameter set from the $b$-th local model $l_b$ using the labeled data $\mathcal{D}_L^b$, i.e., minimizing the loss function $L(\mathcal{D}_L^b)$ with stochastic gradient descent (SGD) method.

\smallskip
\noindent
\textbf{{Parameter Aggregation.}}
The average of the learned parameters $\{\boldsymbol{\theta}^1, \cdots, \boldsymbol{\theta}^B\}$ is treated as the parameter set of the global model $G$, i.e., $\boldsymbol{\theta}^G \leftarrow \frac{1}{B} \sum_{b=1}^B \boldsymbol{\theta}^b$. The global model $G$ then broadcasts $\boldsymbol{\theta}^G$ to local models, i.e, local update. This procedure is repeated until $\boldsymbol{\theta}^G$ converges.

\subsection{Federated Semi-Supervised Learning}
As shown in Figure~\ref{fig:two_scenarios}, there are two kinds federated semi-supervised learning (FedSSL) scenarios, including \textit{labels-at-client} and \textit{labels-at-server}.

\smallskip
\noindent
\textbf{{Labels-at-Client FedSSL.}}
This scenario shares the same framework with classical federated supervised learning. The main difference is that each client only annotates a small portion of their local data (i.e., 10\% of the entire data), leaving the rest of the data unlabeled. This is a common scenario for user-generated personal data, where the clients can easily annotate partial data but may not have time or motivation to label all the data (e.g. annotating faces in pictures for photo albums or social networking).

Taking the $k$-th client as an example, we have a set of labeled data $\mathcal{D}_L^k$ as illustrated in supervised federated learning setting. Besides, we have a set of unlabeled data denoted as $\mathcal{D}_U^k = \{ \mathbf{x}^k_{n+1},\cdots, \mathbf{x}^k_{n+m}\}$, where $m$ is the number of unlabeled data. In general, $n \ll m $. In the setting of standard semi-supervised learning, we need to simultaneously minimize losses from both labeled and unlabeled data to learn the parameters $\boldsymbol{\theta}^k$ in the \emph{local update} step as follows:
\begin{equation}\label{client_ssl_loss}
\ell^k= L(\mathcal{D}_L^k) + J(\mathcal{D}_U^k),
\end{equation}
where $L(\mathcal{D}_L^k)$ is the loss for labeled data, and $J(\mathcal{D}_U^k)$ represents the loss for the unlabeled data.

Similar to supervised federated learning in the \emph{parameter aggregation} step, we can obtain $G$ using the average of $B$ selected local models after $R_g$ communication rounds as follows:
\begin{equation}\label{parameter_aggregation}
\boldsymbol{\theta}^G_{R_g}=\sum_{b=1}^{B} \frac{n^{(b)}}{\sum_{j=1}^{B} n^{(j)}} \boldsymbol{\theta}^b_{R_g},
\end{equation}
where $n^{(b)}$ denotes the total number of data on the $b$-th local client.

\smallskip
\noindent
\textbf{{Labels-at-Server FedSSL.}}
Another realistic scenario assumes that labels are only available at the server side, while local clients work with unlabeled data. This is a common case of real-world applications where labeling requires expert knowledge (e.g., annotating medical images and evaluating body postures for exercises), but the data cannot be shared with the third parties due to privacy concerns.

In this scenario, $\mathcal{D}_L = \{ (\mathbf{x}_1,y_1),\cdots, (\mathbf{x}_n,y_n) \}$ represents all the labeled data, which are located on the server. In general, $n \ll |D| $, where $|D|$ is the number of training data. on each client $k$, we have a set of unlabeled data denoted as $\mathcal{D}_U^k = \{ \mathbf{x}^k_{n+1},\cdots, \mathbf{x}^k_{n+m}\}$. The overall learning procedure is similar to the labels-at-client scenario, except that we need to minimize losses from labeled data at the server side to modify the parameters $\theta^G$ after aggregation using $\ell= L(\mathcal{D}_L)$.

For the local update, we modify our loss function due to the absence of labeled data on each client, which is $\ell^k= J(\mathcal{D}_U^k)$.
Similar to standard federated semi-supervised learning in the \emph{parameter aggregation} step, we can obtain $G$ using the average of $B$ selected local models by Eq.~(\ref{parameter_aggregation}).

\section{Related Work}
\subsection{Federated Learning}
Federated learning aims to collaboratively build a joint model through data from different parties or clients. Most algorithms of FL focus on the supervised setting and mainly solving three challenges: statistical heterogeneity~\cite{DBLP:journals/corr/abs-1806-00582,DBLP:journals/corr/abs-1812-06127,DBLP:journals/corr/abs-1811-12629}, system constraints~\cite{Caldas2018ExpandingTR,Wang2019CMFLMC,Chen2018FederatedMW}, and trustworthiness~\cite{Bhowmick2018ProtectionAR,Geyer2017DifferentiallyPF,Bonawitz2016PracticalSA}. In this paper, we mainly aim to solve the challenge of statistical heterogeneity, i.e., the Non-IID setting.
To address this challenge, various algorithms have been proposed like sharing a some part of data ~\cite{DBLP:journals/corr/abs-1806-00582}, training personal model for each client~\cite{DBLP:journals/corr/abs-1812-06127}, or adjusting the SGD convergence of FL \cite{DBLP:journals/corr/abs-1811-12629}.

However, introducing unlabeled data into federated learning significantly increases the difficulty of the Non-IID setting.
Regarding FL in the semi-supervised scenario, relatively little attention has been paid to this area. A simple two-phase training with pseudo labeling is introduced to FL~\cite{Albaseer2020ExploitingUD}. A study on inter-client consistency suggested that a simple application of SSL methods might not perform well in FL, and the inter-client level consistency might improve the performance~\cite{Jeong2020FederatedSL}. However, these efforts do not propose a more general and practical algorithm and validation of its potentials on new challenges of federated semi-supervised learning.

\subsection{Semi-supervised Learning}
Semi-supervised learning mitigates the requirement for labeled data by providing a means of leveraging unlabeled data~\cite{4787647}.
The recent works in SSL are diverse but a trend of unity. Pseudo label, which converts the unlabeled data to labeled data, utilizes unlabeled data by labeling the data with a dynamic threshold~\cite{Lee2013PseudoLabelT}. A nature and well-working idea on consistency regularization has been widely adopted in SSL~\cite{Rasmus2015SemisupervisedLW,Tarvainen2017MeanTA,Laine2017TemporalEF,Miyato2019VirtualAT,park2017adversarial}. A further discussion on how loss geometry interacts with training procedures suggests that the flat platform of SGD leads to the convergence dilemma of consistency-based SSL~\cite{Athiwaratkun2019ThereAM}. By exploring further or mixing many practical methods, UDA ~\cite{Xie2019UnsupervisedDA}, MixMatch~\cite{Berthelot2019MixMatchAH} , ReMixMatch ~\cite{Berthelot2019ReMixMatchSL}, and Fixmatch ~\cite{Sohn2020FixMatchSS} are proposed. In our work, we mainly focus on utilizing the pure consistency-based methods working with federated learning.