# A Bayesian treatment of the German tank problem

Cory M. Simon  School of Chemical, Biological, and Environmental Engineering.
Oregon State University. Corvallis, OR. USA.

###### Abstract

The German tank problem has an interesting historical background and is an
engaging problem of statistical estimation for the classroom. The objective is
to estimate the size of a population of tanks inscribed with sequential serial
numbers, from a random sample. In this tutorial article, we outline the
Bayesian approach to the German tank problem, (i) whose solution assigns a
probability to each tank population size, thereby quantifying uncertainty, and
(ii) which provides an opportunity to incorporate prior information and/or
beliefs about the tank population size into the solution. We illustrate with
an example. Finally, we survey problems in other contexts that resemble the
German tank problem.

##  1 Background

###  1.1 History

To inform their military strategy during World War II (1939-1945), the Allies
sought to estimate Germany’s rate of production of various military equipment
(tanks, tires, rockets, etc.). Conventional methods to estimate armament
production—including (i) extrapolating data on prewar manufacturing
capabilities, (ii) obtaining reports from secret sources, and (iii)
interrogating prisoners of war—were unreliable and/or contradictory.

In 1943, British and American economic intelligence agencies exploited a
German manufacturing practice in order to statistically estimate their
armament production. Specifically, Germany marked their military equipment
with serial numbers and codes for the date and/or place of manufacture. Their
intention was to facilitate handling spare parts and trace defective
equipment/parts back to the manufacturer for quality control. However, these
markings on a captured sample of German equipment conveyed information to the
Allies about Germany’s production of it.

To estimate Germany’s production of tanks, the Allies collected serial numbers
on the chassis, engines, gearboxes, and bogie wheels of samples of tanks by
inspecting captured tanks and examining captured records111Eg., captured
records from tank repair depots listed serial numbers of the chassis and
engine of repaired tanks, and records from divisional headquarters listed
chassis serial numbers of tanks held by a specific unit.. Despite lacking an
_exhaustive_ sample, the sequential nature of222 Gearboxes on captured tanks,
for example, were inscribed with serial numbers belonging to an unbroken
sequence. Chassis serial numbers, on the other hand, were broken into blocks
to distinguish models/designs, leaving gaps between the serial numbers
assigned to them.  and patterns in these samples of serial numbers enabled the
Allies to estimate Germany’s tank production—postwar, we know—much more
accurately than conventional intelligence methods (Tab. 1).

See Ruggles and Brodie [1] for the detailed historical account of serial
number analysis to estimate German armament production during World War II.

Table 1: Monthly production of tanks by Germany. [1] | estimates |
---|---|---
date |  conventional American & British Intelligence |  serial number analysis |  German records
June, 1940 |  1000 |  169 |  122
June, 1941 |  1550 |  244 |  271
August, 1942 |  1550 |  327 |  342

###  1.2 The German tank problem

Simplification of the historical context to estimate German tank production
via serial number analysis [1] motivated the formulation of the textbook-
friendly _German tank problem_ [2]:

Problem statement In the backdrop of World War II, the German military has $n$
tanks. Each tank is inscribed with a unique serial number in $\\{1,...,n\\}$.
As the Allies, we do not know $n$, but we captured (without replacement, of
course) a sample of $k$ German tanks with inscribed serial numbers
$(s_{1},...,s_{k})$. $s_{1}$ $s_{2}$ $\cdots$ $s_{k}$ Assuming all tanks in
the population were equally likely to be captured, our objective is to
estimate $n$ in consideration of the data $(s_{1},...,s_{k})$.

In 1942, Alan Turing and Andrew Gleason discussed a variant of the German tank
problem, “how to best to estimate the total number of taxicabs in a town,
having seen a random selection of their license numbers”, in a crowded
restaurant in Washington DC [3, 4]. Today, with its interesting historical
background [1], the German tank problem is still a suitable conversation topic
for dinners and serves as an intellectually engaging, challenging, and
enjoyable problem to illustrate combinatorics and statistical estimation in
the classroom [5, 6, 7, 8].

##### Uncertainty quantification.

Any estimate of the tank population size $n$ from the data $(s_{1},...,s_{k})$
is subject to uncertainty, since we (presumably) have not captured _all_ of
the tanks (ie., $k\neq n$, probably). Quantifying uncertainty in our estimate
of $n$ is important because high-stakes military decisions may be made on its
basis.

##### Our contribution.

In this pedagogical article, we outline the Bayesian approach to the German
tank problem, (i) whose solution assigns a probability to each tank population
size, thereby quantifying uncertainty, and (ii) which provides an opportunity
to incorporate prior information and/or beliefs about the tank population size
into the solution.

###  1.3 Survey of previous work on the German tank problem

##### The frequentist approach.

Border [9] calls the German tank problem a ”weird case” in frequentist
estimation. The maximum likelihood estimator of the tank population size $n$
is the maximum serial number observed among the $k$ captured tanks,
$m^{(k)}:=\max_{i\in\\{1,...,k\\}}s_{i}$. This is a biased estimator, as
certainly $m^{(k)}\leq n$.

Goodman [2, 10] derives the minimum-variance, unbiased estimator of the tank
population size

$\hat{n}=m^{(k)}+\left(\frac{m^{(k)}}{k}-1\right).$ (1)

To intuit $\hat{n}$, note (i) $n$ must be greater than or equal to $m^{(k)}$
and (ii) if we observe large (small) gaps between the serial numbers
$(s_{1},...,s_{k})$ after sorting them (incl. the gap preceding the smallest
serial number), then $n$ is likely (unlikely) to be much greater than
$m^{(k)}$. The estimator of $n$ in eqn. 1 quantifies how far beyond the
maximum serial number $m^{(k)}$ we should estimate the tank population size,
based on the gaps; $m^{(k)}/k-1$ is the average size of the gaps. Goodman also
derives a frequentist confidence interval for $n$.

Clark, Gonye, and Miller explore using simulations and linear regression to
discover the estimator in eqn. 1 [11].

##### For pedagogy.

Champkin highlights the historical context of the German tank problem as a
”great moment in statistics” [12]. Johnson lists and evaluates several
intuitive point estimators for the size of the tank population [5]. Scheaffer,
Watkins, Gnanadesikan, and Witmer [13] propose a hands-on learning activity to
illustrate the German tank problem by sampling chips, labeled with numbers
from 1 to $n$, from a bowl. Berg [6] uses the German tank problem as a
competition in the classroom.

##### The Bayesian approach.

Closely related to our paper, Roberts [14], Höhle and Held [15], and Linden,
Dose, and Toussaint [16], and Cocco, Monasson, and Zamponi [17] provide a
Bayesian analysis of the German tank problem. They derive an analytical
formula for the mean of the posterior distribution of the tank population size
under an improper, uniform prior distribution. Andrews [18] outlines the
Bayesian approach to the German tank problem in a blog post containing code in
the R language.

##### Generalizations/variants.

Goodman [2, 10] poses a variant of the German tank problem where the initial
serial number is not known; ie., where the $n$ tanks are inscribed with serial
numbers $\\{b+1,...,n+b\\}$ with $b$ and $n$ unknown. Lee and Miller
generalize the German tank problem to the settings where the serial numbers
are continuous and/or lie in two dimensions [19].

###  1.4 Overview of the Bayesian approach to the German tank problem

Under a Bayesian perspective [20, 8, 21], we treat the (unknown) total number
of tanks as a discrete random variable $N$ (hence, capitalization) to model
our uncertainty in it. A probability mass function of $N$ assigns a
probability to each possible tank population size $n$. This probability is a
measure of our degree of belief, perhaps with some basis in knowledge/data,
that the tank population size is $n$ [22].

Because the observed serial numbers $(s_{1},...,s_{k})$ provide information
about the tank population size, the probability mass function of $N$ differs
before and after they are collected and considered. Hence, $N$ has a _prior_
and _posterior_ probability mass function.

The three inputs to a Bayesian treatment of the German tank problem are:

  1. 1.

the _prior_ mass function of $N$, which expresses a combination of our
subjective beliefs and objective knowledge about the tank population size
before we collect and consider the sample of serial numbers.

  2. 2.

the _data_ , the observed serial numbers $(s_{1},...,s_{k})$, viewed as
realizations of random variables owing to the stochasticity of tank-capturing.

  3. 3.

the _likelihood_ function, giving the probability of the data
$(s_{1},...,s_{k})$ under each tank population size $N=n$, based on a
probabilistic model of the tank-capturing process.

The output of a Bayesian treatment of the German tank problem is the
_posterior_ mass function of the tank population size $N$, conditioned on the
data $(s_{1},...,s_{k})$. The posterior follows from Bayes’ theorem and can be
viewed as an update to the prior in light of the data. The posterior mass
function of $N$ assigns each possible tank population size $n$ with a
probability according to a compromise between its (i) likelihood, which
quantifies the support the observed serial numbers $(s_{1},...,s_{k})$ lend to
the tank population size being $n$ according to our probabilistic tank-
capturing model, and (ii) prior probability, which quantifies how likely we
thought the tank population size might be $n$ before the serial numbers
$(s_{1},...,s_{k})$ were collected and considered. [21]

The posterior mass function of $N$ is the raw, uncertainty-quantifying,
Bayesian solution to the German tank problem. We may summarize the posterior
by reporting its median and the high-mass subset of the natural numbers that
credibly contains the tank population size. Also, we can use the posterior to
answer questions such as, ”what is the probability that $N$ exceeds some
threshold quantity $n^{\prime}$ that would alter military strategy?”.

##  2 A Bayesian approach to the German tank problem

We now tackle the German tank problem from a Bayesian standpoint.

For reference, the variables are listed in Tab. 2. We use upper- and lower-
case letters to represent random variables and realizations of them,
respectively. Throughout, we employ the indicator function
$\mathcal{I}_{A}(x)$ which maps its input $x$ to 1 if $x$ belongs to the set
$A$ and to 0 otherwise (if $x\notin A$).

Table 2: List of parameters/variables. parameter/variable | $\in$ | description
---|---|---
$n$ | $\mathbb{N}_{\geq 0}$ | size of population of tanks
$k$ | $\mathbb{N}_{>0}$ | number of captured tanks
$s_{i}$ | $\mathbb{N}_{>0}$ | serial number on captured tank $i$
$s^{(k)}$ | $\mathbb{N}_{>0}^{k}$ | vector listing the serial numbers on the $k$ captured tanks
$m^{(k)}$ | $\mathbb{N}_{>0}$ | maximum serial number among the $k$ captured tanks

###  2.1 The data, data-generating process, and likelihood function

##### The data.

The data we obtain in the German tank problem is the vector of serial numbers
inscribed on the $k$ captured tanks

$s^{(k)}:=(s_{1},...,s_{k}).$ (2)

We view the data $s^{(k)}$ as a realization of the discrete random vector
$S^{(k)}:=(S_{1},...,S_{k})$. Note, at this point, we are entertaining the
possibility that the order in which tanks are captured matters.

##### The data-generating process.

The stochastic _data-generating process_ constitutes sequential capture of $k$
tanks from a population of $n$ tanks, without replacement, then inspecting
their serial numbers to construct $s^{(k)}$. We assume that each tank in the
population is equally likely to be captured at each step. Then,
mathematically, the stochastic data-generating process is sequential, uniform
random selection of $k$ integers, without replacement, from the set
$\\{1,...,n\\}$.

##### The likelihood function.

The _likelihood function_ specifies the probability of the data
$S^{(k)}=s^{(k)}$ given each tank population size $N=n$. Each outcome
$s^{(k)}$ in the sample space $\Omega_{n}^{(k)}$ is equally likely, where

$\Omega_{n}^{(k)}:=\\{(s_{1},...,s_{k})_{\neq}:s_{i}\in\\{1,...,n\\}\;\text{for
all }i\in\\{1,...,k\\}\\},$ (3)

with $(\cdots)_{\neq}$ meaning the elements of the vector $(\cdots)$ are
unique. The number of outcomes in the sample space, $|\Omega_{n}^{(k)}|$, is
the number of distinct ordered arrangements of $k$ distinct integers from the
set $\\{1,...,n\\}$, given by the falling factorial:

$(n)_{k}:=n(n-1)\cdots(n-k+1)=n!/(n-k)!.$ (4)

Under the data-generating process, then, the probability of observing data
$S^{(k)}=s^{(k)}$ given the tank population size $N=n$ is the uniform
distribution:

$\pi_{\text{likelihood}}(S^{(k)}=s^{(k)}\mid
N=n)=\dfrac{1}{(n)_{k}}\mathcal{I}_{\Omega_{n}^{(k)}}\left(s^{(k)}\right).$
(5)

###### Interpretation.

The likelihood quantifies the support the serial numbers on the $k$ captured
tanks in $s^{(k)}$ lend for any particular tank population size $n$, according
to our probabilistic model of the tank-capturing process [21]. We view
$\pi_{\text{likelihood}}(S^{(k)}=s^{(k)}\mid N=n)$ as a function of $n$, since
in practice we possess the data $s^{(k)}$ but not $n$.

###### The likelihood as a sequence of events.

Alternatively, we may arrive at eqn. 5 from a perspective of sequential events
$S_{1}=s_{1},S_{2}=s_{2},...,S_{k}=s_{k}$. First, the probability of a given
serial number on the $i$th captured tank, conditioned on the tank population
size and the outcomes of the previous serial numbers, is the uniform
distribution

$\pi(S_{i}=s_{i}\mid
N=n,S_{1}=s_{1},...,S_{i-1}=s_{i-1})=\dfrac{1}{n-i+1}\mathcal{I}_{\\{1,...,n\\}\setminus\\{s_{1},...,s_{i-1}\\}}(s_{i})$
(6)

since there are $n-i+1$ tanks to choose from at uniform random. By the chain
rule, the joint probability

$\pi_{\text{likelihood}}(S_{1}=s_{1},...,S_{k}=s_{k}\mid
N=n)=\displaystyle\prod_{i=1}^{k}\pi(S_{i}=s_{i}\mid
N=n,S_{1}=s_{1},...,S_{i-1}=s_{i-1})$ (7)

giving eqn. 5 after simplifying the product of indicator functions.

###### The likelihood function in terms of the maximum observed serial number.

We will find in Sec. 2.3 that only two independent features of the data
$(s_{1},...,s_{k})$ provide information about the tank population size, $N$:
its (i) size, $k$, and (ii) maximum observed serial number

$m^{(k)}=\max_{i\in\\{1,...,k\\}}s_{i}.$ (8)

Thus, we also write a different likelihood: the probability of observing a
maximum serial number $m^{(k)}$ given the tank population size $N=n$,
$\pi_{\text{likelihood}}(M^{(k)}=m^{(k)}\mid N=n)$.

Because each outcome $s^{(k)}\in\Omega_{n}^{(k)}$ is equally likely,
$\pi_{\text{likelihood}}(M^{(k)}=m^{(k)}\mid N=n)$ is the fraction of sample
space under population size $n$ where the maximum serial number is $m^{(k)}$.
To count the outcomes $(s_{1},...,s_{k})\in\Omega_{n}^{(k)}$ where the maximum
serial number is $m^{(k)}$, consider (i) one of the $k$ captured tanks has
serial number $m^{(k)}$ and (ii) the remaining $k-1$ tanks have a serial
number in $\\{1,...,m^{(k)}-1\\}$. For each of the $k$ possible positions of
the maximum serial number in the vector $s^{(k)}$, there are
$(m^{(k)}-1)_{k-1}$ distinct outcomes specifying the other $k-1$ entries.
Thus:

$\pi_{\text{likelihood}}(M^{(k)}=m^{(k)}\mid
N=n)=\dfrac{k(m^{(k)}-1)_{k-1}}{(n)_{k}}\mathcal{I}_{\\{k,...,n\\}}(m^{(k)}).$
(9)

###  2.2 The prior distribution

The _prior probability mass function_ $\pi_{\text{prior}}(N=n)$ expresses a
combination of our subjective beliefs and objective knowledge about the total
number of tanks $N$ before the data $(s_{1},...,s_{k})$ are collected and
considered.

The prior mass function we impose on $N$ is context-dependent. Based on the
amount of uncertainty it admits about the tank population size (measured by
eg. entropy [23]), prior distributions roughly belong to one of the ordinal
categories of informative, weakly informative, or diffuse [21]. If we do not
possess prior information about the tank population size, we adopt the
principle of indifference and impose a diffuse prior, eg. a uniform
distribution over a set of feasible tank population sizes. On the other hand,
an informative prior might concentrate its mass around some estimate of the
total number of tanks obtained through other means.

Thinking ahead, about the posterior mass function of $N$, which balances the
prior and the likelihood (the latter based on the data): (1) an informative
prior will have a larger impact on the posterior than a diffuse one [21],
which ”lets the data speak for itself” [8]; (2) generally, as the number of
captured tanks $k$ increases (decreases), we expect the prior to have a
smaller (larger) impact on the posterior [8] as the data ”overwhelms” the
prior.

###  2.3 The posterior distribution

The _posterior probability mass function_ of $N$ assigns a probability to each
possible tank population size $n$ in consideration of its consistency with (1)
the data $(s_{1},...,s_{k})$, according to the likelihood in eqn. 5, and (2)
our prior beliefs/knowledge encoded in $\pi_{\text{prior}}(N=n)$.

The posterior distribution is a conditional distribution related to the
likelihood and prior mass functions by Bayes’ theorem:

$\pi_{\text{posterior}}(N=n\mid
S^{(k)}=s^{(k)})=\frac{\pi_{\text{likelihood}}(S^{(k)}=s^{(k)}\mid
N=n)\pi_{\text{prior}}(N=n)}{\pi_{\text{data}}(S^{(k)}=s^{(k)})},$ (10)

where the denominator is the probability of the data $s^{(k)}$:

$\pi_{\text{data}}(S^{(k)}=s^{(k)})=\displaystyle\sum_{n^{\prime}=0}^{\infty}\pi_{\text{likelihood}}(S^{(k)}=s^{(k)}\mid
N=n^{\prime})\pi_{\text{prior}}(N=n^{\prime}).$ (11)

We view $\pi_{\text{posterior}}(N=n\mid S^{(k)}=s^{(k)})$ as a probability
mass function of $N$, since in practice we have $s^{(k)}$. Then,
$\pi_{\text{data}}(S^{(k)}=s^{(k)})$ is just a normalizing factor for the
numerator in eqn. 10.

Interpreting eqn. 10, the prior mass function of $N$ is _updated_ , in light
of the data $(s_{1},...,s_{k})$, to yield the posterior mass function of $N$.
The posterior probability of $N=n$ is proportional to the product of the
likelihood at and prior probability of $N=n$, a compromise between the
likelihood and prior.

We simplify the posterior mass function of $N$ in eqn. 10 by (i) substituting
eqn. 5, (ii) restricting the sum in eqn. 11 to tank population sizes where the
likelihood is nonzero, and (iii) noting the only two features of the data
$(s_{1},...,s_{k})$ that appear are (a) its size $k$ and (b) the maximum
serial number $m^{(k)}$:

$\pi_{\text{posterior}}(N=n\mid
M^{(k)}=m^{(k)})=\frac{\displaystyle(n)_{k}^{-1}\pi_{\text{prior}}(N=n)}{\displaystyle\sum_{n^{\prime}=m^{(k)}}^{\infty}(n^{\prime})_{k}^{-1}\pi_{\text{prior}}(N=n^{\prime})}\mathcal{I}_{\\{m^{(k)},m^{(k)}+1,...\\}}(n)$
(12)

Note, we may arrive at eqn. 12 through eqn. 9 as well.

##### Interpretation.

The posterior probability mass function of $N$ in eqn. 12 is our raw,
uncertainty-quantifying solution to the German tank problem. It assigns a
probability to each tank population size $n$ in consideration of the serial
numbers $(s_{1},...,s_{k})$ observed on the captured tanks, our probabilistic
model of the tank-capturing process, and our prior beliefs and knowledge about
the tank population size expressed in the prior mass function.

##### A remark on ”uncertainty”.

The spread of the posterior mass function of $N$ in eqn. 12 reflects epistemic
[24] uncertainty about the tank population size. The source of this posterior
uncertainty is a lack of complete data: we have not captured all of the
tanks333 Certainly, $k<n$ if there are gaps in the observed serial numbers
$(s_{1},...,s_{k})$. Even if there are no gaps in $(s_{1},...,s_{k})$, we
cannot be certain we have captured the tank with the largest serial number.
and observed their serial numbers to be certain of the tank population size.
In practice, an additional source of posterior uncertainty about the tank
population size is the possible inadequacy of the model of the tank-capturing
process (uniform sampling) in eqn. 5. Ie., selection bias could be present in
the tank-capturing process. Our analysis here neglects this source of
uncertainty.

##### Summarizing the posterior mass function of $N$.

We may summarize the posterior mass function of $N$ with a point estimate of
the tank population size and a credible subset of the natural numbers that
likely444Well, ”likely”, under our assumptions embedded in the likelihood and
prior mass functions. contains it. A suitable point estimate of the tank
population size is a median of the posterior mass function of $N$; by
definition, the posterior probability that the tank population size is greater
(less) than or equal to a median is at least 0.5. A suitable credible subset,
which entertains multiple tank population sizes, is the $\alpha$-high-mass
subset [25]

$\mathcal{H}_{\alpha}:=\\{n^{\prime}:\pi_{\text{posterior}}(N=n^{\prime}\mid
M^{(k)}=m^{(k)})\geq\pi_{\alpha}\\}$ (13)

where $\pi_{\alpha}$ is the largest mass to satisfy

$\pi_{\text{posterior}}(N\in\mathcal{H}_{\alpha}\mid M^{(k)}=m^{(k)})\geq
1-\alpha.$ (14)

In words, the $\alpha$-high-mass subset $\mathcal{H}_{\alpha}$ is the smallest
to (i) contain at least a fraction $1-\alpha$ of the posterior mass of $N$ and
(ii) ensure every tank population size belonging to it is more probable than
any outside of it.

##### Querying the posterior distribution.

We may find the posterior probability that the tank population size belongs to
any set of interest by summing the posterior mass over it. Eg., the
probability the tank population size exceeds some number $n^{\prime}$ is:

$\pi_{\text{posterior}}(N>n^{\prime}\mid
M^{(k)}=m^{(k)})=\sum_{n=n^{\prime}+1}^{\infty}\pi_{\text{posterior}}(N=n\mid
M^{(k)}=m^{(k)}).$ (15)

####  2.3.1 Posterior predictive checking

We may check the consistency of the data $s^{(k)}$ with the posterior mass
function of $N$. Conceptually, we can simulate new data $\tilde{s}^{(k)}$
using the model of the tank-capturing process under a sample of the tank
population size from the posterior, then compare the simulated data
$\tilde{s}^{(k)}$ to the real data $s^{(k)}$ [26, 21]. More appropriately, we
can compare the serial numbers in the real data $(s_{1},...,s_{k})$ with the
mass function giving the probability that the tank with serial number
$\tilde{s}$ would be captured under this process:

$\pi(\tilde{s}\in\tilde{S}^{(k)})=\sum_{n^{\prime}=k}^{\infty}\frac{k}{n^{\prime}}\pi_{\text{posterior}}(N=n^{\prime}\mid
S^{(k)}=s^{(k)})\mathcal{I}_{\\{1,...,n^{\prime}\\}}(\tilde{s}),$ (16)

since $k/n^{\prime}$ is the probability any given viable serial number
$\tilde{s}$ will be observed given the tank population size $N=n^{\prime}$.

##  3 Example

We illustrate the Bayesian approach to the German tank problem through an
example.

(a) prior mass function of $N$

(b) the data $s^{(k=3)}$

(c) the likelihood function

(d) posterior mass function of $N$

Figure 1: A Bayesian approach to the German tank problem. (a, prior) The prior
mass function. (b, data) The data $s^{(3)}$, with maximum observed serial
number $m^{(3)}=15$. (c, likelihood) The likelihood function associated with
the data $s^{(3)}$. (d, posterior) The posterior mass function of $N$.
$\mathcal{H}_{0.2}$ highlighted; median marked with vertical, dashed line.

##### The prior probability mass function of $N$.

Suppose we have an upper bound $n_{\text{max}}$ for the possible number of
tanks but no other information. Then, we may impose a diffuse prior, a uniform
prior probability mass function:

$\pi_{\text{prior}}(N=n)=\dfrac{1}{n_{\max}+1}\mathcal{I}_{\\{0,...,n_{\text{max}}\\}}(n).$
(17)

This prior mass function expresses: in the absence of any data
$(s_{1},...,s_{k})$ (ie., no serial numbers, not $k$ either), we believe the
total number of tanks $N$ is equally likely to be a value in
$\\{0,...,n_{\text{max}}\\}$. Particularly, suppose $n_{\text{max}}=35$. Fig.
1(a) visualizes $\pi_{\text{prior}}(N=n)$.

##### The data $(s_{1},...,s_{k})$.

Now suppose we capture $k=3$ tanks, with serial numbers $s^{(3)}=(15,14,3)$.
See Fig. 1(b). So, the maximum observed serial number is $m^{(3)}=15$.

##### The posterior probability mass function of $N$.

Under the uniform prior in eqn. 17, the posterior probability mass function of
$N$ in eqn. 12 becomes:

$\pi_{\text{posterior}}(N=n\mid
M^{(k)}=m^{(k)})=\dfrac{(n)_{k}^{-1}}{\displaystyle\sum_{n^{\prime}=m^{(k)}}^{n_{\text{max}}}(n^{\prime})_{k}^{-1}}\mathcal{I}_{\\{m^{(k)},m^{(k)}+1,...,n_{\text{max}}\\}}(n).$
(18)

Fig. 1(d) visualizes the posterior probability mass function of $N$ for the
data $s^{(3)}$ in Fig. 1(b) and the prior in eqn. 17 ($n_{\text{max}}=35$).

###### Summarizing the posterior.

Summarizing the posterior mass function of $N$, its median is $19$ and its
high-mass credible subset $\mathcal{H}_{0.2}=\\{15,...,25\\}$ (highlighted in
Fig. 1(d)). For what it’s worth, the data in Fig. 1(b) was generated from a
tank population size of $n=20$ (explaining the choice of scale in Fig. 1(b)).

###### Querying the posterior.

Suppose our military strategy would change if the size of the tank population
were to exceed 30. From the posterior distribution of $N$, we calculate
$\pi_{\text{posterior}}(N>30\mid M^{(3)}=15)\approx 0.066$.

###### Posterior predictive checking.

As a posterior predictive check, Fig. 2(a) shows how the observed serial
numbers in the data $s^{(3)}$ compare with the probability of observing each
serial number under the posterior mass function of $N$, according to eqn. 16.

##### Sensitivity of the posterior to the prior.

Because of the subjectivity involved in constructing the prior, checking the
sensitivity of the posterior to the prior is good practice [21]. Fig. 2(b)
shows how the posterior mass function of $N$ changes as we increase the upper-
bound on the tank population $n_{\text{max}}$ we impose via the prior mass
function of $N$ in eqn. 17. The median of the posterior under
$n_{\text{max}}\in\\{60,70\\}$ is 20 (an increase of one compared to
$n_{\text{max}}=35$). The maximum of the high-mass subset $\mathcal{H}_{0.2}$
increases to 29 for $n_{\text{max}}=70$.

(a) posterior predictive check

(b) sensitivity of the posterior to the prior

Figure 2: Checking (a) the consistency of the data $s^{(3)}$ with the
probability of observing each serial number under the tank-capturing process
and the posterior mass function of $N$ and (b) the sensitivity of the
posterior mass function of $N$ to the upper bound $n_{\text{max}}$ imposed by
the prior mass function of $N$.

##### Capturing more tanks.

Suppose we capture an additional 9 tanks and re-run the Bayesian analysis.
Fig. 3 shows the updated posterior mass function of $N$. The high-mass
credible subset $\mathcal{H}_{0.2}$ shrinks considerably, to $\\{19,20\\}$.
This shows how more data—increasing the number of tanks captured,
$k$—generally reduces our uncertainty about the tank population size.

(a) the updated data $s^{(k=12)}$

(b) the updated posterior mass function of $N$

Figure 3: The updated posterior mass function of $N$ (b) after we capture an
additional 9 tanks with serial numbers in (a).

##  4 Discussion

##### Selection bias.

A strict assumption in the textbook-friendly German tank problem, which
enables us to estimate the size of the population of tanks from a random
sample of their (sequential) serial numbers, is that sampling is uniform. To
check consistency of the sample with this model of the tank-capturing process,
Goodman [10] demonstrates a test of the hypothesis that the sample of serial
numbers is from a uniform distribution. Interesting extensions of the textbook
German tank problem could involve modeling selection bias in the tank-
capturing process. Such bias could arise eg. hypothetically, if older tanks
with smaller serial numbers were more likely to be deployed in the fronts
opened earlier in the war, where capturing tanks is more difficult than at
less fortified fronts opened more recently.

##### The German tank problem in other contexts.

The Bayesian probability theory to solve the German tank problem applies
(perhaps, with modification) to many other contexts where we wish to estimate
the size of some finite, hidden set [27], eg.: the number of taxicabs in a
city [12], the number of accounts at a bank [15], the number of furniture
pieces purchased by a university [10], the number of aircraft operations at an
airport [28], the extent of leaked classified government communications [29],
the time needed to complete a project deadline [30], the time-coverage of
historical records of extreme events like floods [31], the length of a short-
tandem repeat allele [32], the size of a social network [33], the number of
cases in court [34], the lifetime of a flower of a plant [35], or the duration
of existence of a species [36]. Mark and recapture methods in ecology to
estimate the size of an animal population [37, 38] are tangentially related to
the German tank problem.

##### The practice of inscribing sequential serial numbers on military
equipment.

Germany adopted the practice of marking their military equipment with serial
numbers and codes to trace the equipment/parts/components back to the
manufacturer. However, the sequential nature of these serial numbers was
exploited by the Allies to estimate their armament production. To reduce
vulnerability to serial number analysis for estimating production while
maintaining advantages of tracing equipment back to the manufacturer, serial
numbers and codes could instead be obfuscated by eg. chaffing [39].

## Data and code availability

The Julia [40] code to reproduce all of our visualizations drawn using
Makie.jl [41] is available on Github at
github.com/SimonEnsemble/the_German_tank_problem.

## Acknowledgements

Thanks to Bernhard Konrad for providing detailed feedback on the first draft
and to my students Gbenga Fabusola, Adrian Henle, and Paul Morris for feedback
on the introduction.

## References

  * [1] Richard Ruggles and Henry Brodie.  An empirical approach to economic intelligence in World War II.  Journal of the American Statistical Association, 42(237):72–91, 1947.
  * [2] Leo A Goodman.  Serial number analysis.  Journal of the American Statistical Association, 47(260):622–634, 1952.
  * [3] Andrew Hodges.  Alan Turing: the enigma.  In Alan Turing: The Enigma. Princeton University Press, 2014.
  * [4] Marshall Hall.  Alan Turing, Marshall Hall, and the Alignment of WW2 Japanese Naval Intercepts.  Notices of the AMS, 61(3), 2014.
  * [5] Roger W Johnson.  Estimating the size of a population.  Teaching Statistics, 16(2):50–52, 1994.
  * [6] Arthur Berg.  Bayesian modeling competitions for the classroom.  Revista Colombiana de Estadística, 44(2):243–252, 2021.
  * [7] Frederick Mosteller.  Fifty challenging problems in probability with solutions.  Courier Corporation, 1987.
  * [8] Allen B Downey.  Think Bayes 2.  https://allendowney.github.io/ThinkBayes2/index.html, 2021.
  * [9] Kim. C Border.  Lecture 18: Estimation.  https://healy.econ.ohio-state.edu/kcb/Ma103/ (2021 version), 2017\.
  * [10] Leo A Goodman.  Some practical techniques in serial number analysis.  Journal of the American Statistical Association, 49(265):97–112, 1954.
  * [11] George Clark, Alex Gonye, and Steven J Miller.  Lessons from the german tank problem.  The Mathematical Intelligencer, 43(4):19–28, 2021.
  * [12] Carlos Gómez Grajalez, Eileen Magnello, Robert Woods, and Julian Champkin.  Great moments in statistics.  Significance, 10(6):21–28, 2013.
  * [13] Richard L Scheaffer, Ann Watkins, Mrudulla Gnanadesikan, and Jeffrey Witmer.  Activity-based statistics: student guide.  Springer Science & Business Media, 2013.
  * [14] Harry V Roberts.  Informative stopping rules and inferences about population size.  Journal of the American Statistical Association, 62(319):763–775, 1967.
  * [15] Michael Höhle and Leonhard Held.  Bayesian estimation of the size of a population.  Technical Report 499, LMU Munich, Discussion Paper, 2006.
  * [16] Wolfgang Von der Linden, Volker Dose, and Udo Von Toussaint.  Bayesian probability theory: applications in the physical sciences.  Cambridge University Press, 2014.
  * [17] Simona Cocco, Rémi Monasson, and Francesco Zamponi.  From Statistical Physics to Data-Driven Modelling: with Applications to Quantitative Biology.  Oxford University Press, 2022.
  * [18] Mark Andrews.  German tank problem: A bayesian analysis.  https://www.mjandrews.org/blog/germantank.  Accessed: 2022-12-03.
  * [19] Anthony Lee and Steven J Miller.  Generalizing the german tank problem.  arXiv preprint arXiv:2210.15339, 2022.
  * [20] William M Bolstad and James M Curran.  Introduction to Bayesian statistics.  John Wiley & Sons, 2016.
  * [21] Rens van de Schoot, Sarah Depaoli, Ruth King, Bianca Kramer, Kaspar Märtens, Mahlet G Tadesse, Marina Vannucci, Andrew Gelman, Duco Veen, Joukje Willemsen, and Christopher Yau.  Bayesian statistics and modelling.  Nature Reviews Methods Primers, 1(1):1–26, 2021.
  * [22] Jayanta K Ghosh, Mohan Delampady, and Tapas Samanta.  An introduction to Bayesian analysis: theory and methods, volume 725.  Springer, 2006.
  * [23] Kevin P Murphy.  Probabilistic machine learning: an introduction.  MIT press, 2022.
  * [24] Craig R Fox and Gülden Ülkümen.  Chapter 1: Distinguishing two dimensions of uncertainty.  Perspectives on Thinking, Judging, and Decision Making, 2011.
  * [25] Rob J Hyndman.  Computing and graphing highest density regions.  The American Statistician, 50(2):120–126, 1996.
  * [26] Jonah Gabry, Daniel Simpson, Aki Vehtari, Michael Betancourt, and Andrew Gelman.  Visualization in Bayesian workflow.  Journal of the Royal Statistical Society: Series A (Statistics in Society), 182(2):389–402, 2019.
  * [27] Si Cheng, Daniel J Eck, and Forrest W Crawford.  Estimating the size of a hidden finite set: Large-sample behavior of estimators.  Statistics Surveys, 14:1–31, 2020.
  * [28] John H Mott, Margaret L McNamara, and Darcy M Bullock.  Estimation of aircraft operations at airports using nontraditional statistical approaches.  In 2016 IEEE Aerospace Conference, pages 1–11. IEEE, 2016.
  * [29] Michael Gill and Arthur Spirling.  Estimating the severity of the WikiLeaks US diplomatic cables disclosure.  Political Analysis, 23(2):299–305, 2015.
  * [30] Thomas M Fehlmann and Eberhard Kranich.  A new approach for continuously monitoring project deadlines in software development.  In Proceedings of the 27th International Workshop on Software Measurement and 12th International Conference on Software Process and Product Measurement, pages 161–169, 2017.
  * [31] Ilaria Prosdocimi.  German tanks and historical records: the estimation of the time coverage of ungauged extreme events.  Stochastic environmental research and risk assessment, 32(3):607–622, 2018.
  * [32] Haibao Tang, Ewen F Kirkness, Christoph Lippert, William H Biggs, Martin Fabani, Ernesto Guzman, Smriti Ramakrishnan, Victor Lavrenko, Boyko Kakaradov, Claire Hou, Barry Hicks, David Heckerman, Franz J. Och, C. Thomas Caskey, J. Craig Venter, and Amalio Telenti.  Profiling of short-tandem-repeat disease alleles in 12,632 human whole genomes.  The American Journal of Human Genetics, 101(5):700–715, 2017.
  * [33] Liran Katzir, Edo Liberty, and Oren Somekh.  Estimating sizes of social networks via biased sampling.  In Proceedings of the 20th international conference on World wide web, pages 597–606, 2011.
  * [34] Xiaohan Wu, Margaret E Roberts, Rachel E Stern, Benjamin L Liebman, Amarnath Gupta, and Luke Sanford.  Augmenting Serialized Bureaucratic Data: The Case of Chinese Courts.  21st Century China Center Research, (11), 2022.
  * [35] William D Pearse, Charles C Davis, David W Inouye, Richard B Primack, and T Jonathan Davies.  A statistical estimator for determining the limits of contemporary and historic phenology.  Nature Ecology & Evolution, 1(12):1876–1882, 2017.
  * [36] David L Roberts and Andrew R Solow.  When did the dodo become extinct?  Nature, 426(6964):245–245, 2003.
  * [37] James D Nichols.  Capture-recapture models.  BioScience, 42(2):94–102, 1992.
  * [38] Anne Chao.  An overview of closed capture-recapture models.  Journal of Agricultural, Biological, and Environmental Statistics, 6(2):158–175, 2001.
  * [39] Ronald L Rivest et al.  Chaffing and winnowing: Confidentiality without encryption.  CryptoBytes (RSA laboratories), 4(1):12–17, 1998.
  * [40] Jeff Bezanson, Stefan Karpinski, Viral B Shah, and Alan Edelman.  Julia: A fast dynamic language for technical computing.  arXiv preprint arXiv:1209.5145, 2012.
  * [41] Simon Danisch and Julius Krumbiegel.  Makie.jl: Flexible high-performance data visualization for julia.  Journal of Open Source Software, 6(65):3349, 2021.


# Peer-to-Peer Federated Continual Learning for Naturalistic Driving Action
Recognition

Liangqi Yuan, Yunsheng Ma, Lu Su, Ziran Wang
Purdue University, West Lafayette, USA
{liangqiy, yunsheng, lusu<EMAIL_ADDRESS>

###### Abstract

Naturalistic driving action recognition (NDAR) has proven to be an effective
method for detecting driver distraction and reducing the risk of traffic
accidents. However, the intrusive design of in-cabin cameras raises concerns
about driver privacy. To address this issue, we propose a novel peer-to-peer
(P2P) federated learning (FL) framework with continual learning, namely FedPC,
which ensures privacy and enhances learning efficiency while reducing
communication, computational, and storage overheads. Our framework focuses on
addressing the clients’ objectives within a serverless FL framework, with the
goal of delivering personalized and accurate NDAR models. We demonstrate and
evaluate the performance of FedPC on two real-world NDAR datasets, including
the State Farm Distracted Driver Detection and Track 3 NDAR dataset in the
2023 AICity Challenge. The results of our experiments highlight the strong
competitiveness of FedPC compared to the conventional client-to-server (C2S)
FLs in terms of performance, knowledge dissemination rate, and compatibility
with new clients.

##  1 Introduction

Figure 1: Structures of two FL frameworks, (a) C2S FL and (b) P2P FL. Table 1: FedPC vs C2S FL. System |  C2S FL (FedAvg) |  FedPC (proposed)
---|---|---
Objective |  Clients: a personalized model for each client. Server: a single generalized model |  Clients: a personalized model for each client. Server: N/A
Knowledge Dissemination |  Server aggregation and transmission |  Continual learning from another client model
Communication Complexity |  Client: send $1$ model per iteration round Server: send $|C|$ models per iteration round |  Client: send $1$ model per iteration round Server: N/A
Dissemination Rate |  Slow, it needs to wait for the server to receive, aggregate, and transmit the models |  Quick, it only requires clients to transmit the model to each other
Generalizability |  Stronger in IID datasets |  Partial generalization with non-IID datasets
Compatibility with New Clients |  Poor, can be enhanced by personalization |  Poor, personalization process may be faster
Hardware Overhead |  High, it requires server communication, computing and storage resources |  Low
Hidden Concern |  Privacy breach, security, trust, SPoF, and aggregation fairness on the server |  Lack of incentives, security, and deadlocks on the clients

Naturalistic driving action recognition (NDAR) is a crucial technology for
ensuring road safety and reducing the risk of traffic accidents. By monitoring
and characterizing driver behavior through biological information, NDAR aims
to detect driver distractions, classify driver activities, and predict vehicle
trajectories. Driver distraction remains a major cause of automobile accidents
[40]. While driver monitoring applications are moving towards multimodal
options [16], computer vision (CV) remains the most popular methodology for
driver monitoring applications due to its maturity and high-performance system
designs. However, the intrusive nature of CV and its potential for privacy
breaches are major drawbacks [35]. Furthermore, CV techniques often suffer
from inefficiency in the learning process due to the large size of data
involved [24].

To address these challenges, federated learning (FL) offers a promising
solution by sharing model weights instead of user data, ensuring the privacy
of user information. The FL approach also reduces the need for communication
resources as the size of the model parameters is usually much smaller than the
user data. FL has been demonstrated to improve not only the learning
efficiency of the system but also the model’s generalization ability. It is
widely used in various applications and is considered a paradigm for worldwide
cooperation [7, 25].

Centralized FL, also known as server-to-client (C2S) FL, started with FedAvg
[21] and has evolved into a diverse range of approaches aimed at solving
various challenges, including heterogeneity [18], communication overhead [17],
differential privacy [37], personalization [34], fairness [19]. In C2S FL,
there exist two participants, namely client and server, with different
objectives [31]. The client seeks to obtain a personalized local model, while
the server seeks a generalized global model. It is a challenge to balance the
purpose between the client and the server. Decentralized FL, also known as
peer-to-peer (P2P) FL, is a novel approach for knowledge dissemination where
clients communicate directly with each other, bypassing the necessity for
centralized server distribution, aggregation, and management [14, 27]. Fig. 1
shows the illustration of C2S FL and P2P FL frameworks.

P2P FL effectively emphasizes the clients’ objectives due to the absence of
the central server objective and competing relationships [2]. This results in
a more resource-efficient and simpler communication process, reducing the
single-point of failure (SPoF) risk associated with the centralized server.
P2P FL utilizes network topology for client interconnection, making it a
highly customizable solution. The design of the communication protocol,
iteration order, and temporal variability are optional features that can be
tailored to the specific requirements of the application scenario, leading to
improved accuracy, robustness, and convergence [4]. P2P FL offers a flexible
framework for decentralized knowledge dissemination, allowing for custom
topologies, communications, and iteration strategies to be devised based on
the a priori information of the application scenario.

The way to propagate knowledge among clients and iteratively update models is
an open problem in P2P FL. Without the coordination and aggregation
capabilities of a central server, clients broadcast local models and store and
aggregate models from other clients, resulting in more communication,
computational, and storage overheads. Incremental learning, also known as
continual learning, has gained attention through the paradigm of sustainable
learning to accumulate prior knowledge and overcome catastrophic forgetting
[8]. Continual learning has gained prominence in P2P FL because it propagates
knowledge directly in the client without relying on average computation for
knowledge aggregation [3, 30, 29, 13]. Furthermore, continual learning aligns
with the real-world nature of infinite data streams generated by the client,
thereby further avoiding the impact of concept drift on the model.

In this paper, we introduce a novel P2P FL framework, FedPC, for the Internet
of Vehicles (IoV), aiming to address the challenges in multiple NDAR tasks.
The proposed FedPC employs the continual learning paradigm in combination with
a gossip protocol to propagate knowledge between clients and perform iterative
model updates. Tab. 1 presents a comparison of the proposed FedPC and C2S FL,
including objectives, knowledge dissemination methods, communication
complexity, etc. The objective of FedPC is to provide a solution that strikes
a balance between privacy protection, learning efficiency, and
generalizability to achieve accurate and effective NDAR. Experiments on two
datasets, State Farm Distracted Driver Detection (StateFarm) [33] and Track 3
NDAR dataset in 2023 AICity Challenge (AICity) [22, 26], demonstrate the
results of FedPC in terms of performance, convergence, and compatibility with
new clients. The contributions of this paper are:

  * •

We propose a P2P FL system that addresses clients’ objectives and incorporates
a continual learning paradigm. Our system aims to reduce communication,
computational, and storage overheads, improve the dissemination rate, and
resolve issues associated with the server once and for all. To the best of our
knowledge, this is one of the first papers that introduces a P2P FL system,
combined with a continual learning framework, into the IoV.

  * •

We emphasize the characteristics of vehicle connectivity in real-world
scenarios, including high dynamism, randomness, data heterogeneity, as well as
communication, computational, and storage resource constraints. Through
extensive simulation of application scenario experiments, we showcase the
potential feasibility of deploying the proposed FedPC in real-world IoV
environments.

  * •

We compare FedPC with two conventional C2S FL and ring P2P FL approaches using
three evaluation metrics on two real-world NDAR datasets. The results reveal
the proposed FedPC’s strong emphasis on clients’ objectives, exceptional
performance, efficient knowledge dissemination rate, comparable
generalizability, and rapid compatibility with new clients.

The presentation of this paper is as follows. Sec. 2 reviews related works of
P2P FL and FL for connected vehicles. The problem formulation and proposed
solution are described in Sec. 3. The datasets, implementations, and results
are demonstrated in Sec. 4. Sec. 5 discusses potential deployments of the
proposed FedPC in real-world application scenarios, followed by Sec. 6
summarizing the paper and expounding on future work.

##  2 Related Works

###  2.1 Peer-to-Peer Federated Learning

Network Topology. Communication network topologies are fundamental to P2P FLs,
as they determine the communication protocol and knowledge dissemination
process of the network. Some common network topologies include line, ring,
mesh, and star, each designed to address communication, computational,
convergence, and other challenges. Hybrid topologies offer highly customizable
structures that can adapt to various application fields. Shi et al. [32]
proposed a hybrid P2P FL and demonstrated the performance in convergence. Wang
et al. [36] proposed a dynamic hybrid P2P FL, Matcha, which aims to balance
convergence speed and communication complexity. Matcha improves the
convergence speed by giving higher communication frequency to key clients
while reducing communication delay by decreasing the communication frequency
of other clients.

Paradigm: Aggregation and Continual. Compared to C2S FL, P2P FL has no
centralized server for coordination and distribution, making the integration
of knowledge from all clients an open problem. Aggregating all model
parameters is challenging, as determining where the aggregation occurs raises
security, privacy, and fairness concerns. Chen et al. [6] proposed a
decentralized FL framework, in which each client broadcasts its local model to
all other clients, and each client performs local aggregation operations using
the models received from others. Roy et al. [6] proposed a FL framework,
BrainTorrent, where the current client requests models from other clients and
then performs the aggregation operation locally upon receiving them. However,
these aggregation-based approaches invariably require higher model
transmission frequency and model storage requirements per client. Some P2P FL
frameworks employ the continual paradigm to retain previous clients’ knowledge
while incrementally and continuously learning using the same model.
Feasibility studies and preliminary experiments on line and ring topologies
have been conducted [3, 30, 29, 13]. Nonetheless, for sequential topologies
like line and ring, the convergence of the system strongly heavily depends on
the clients’ iteration order. Also, the local convergence of the subsequent
client strongly relies on the performance of the prior model. The speed of
iteration, SPoF, privacy, incentives, and other factors are challenges.

###  2.2 Federated Learning for Connected Vehicles

FL for NDAR. FL has been one of the solutions for NDAR tasks due to its
protection of driver privacy, knowledge dissemination strategy, and
adaptability to application scenarios [5]. Various FL variants have been
proposed for adaptation to NDAR. Doshi et al. [9] proposed a FedGKT-based [11]
framework to transfer small model knowledge from in-vehicle edge devices to a
large server and integrate it into a large model through knowledge
distillation. Yuan et al. [39] proposed a FL framework, known as FedTOP, which
combines transfer, ordered, and personalized modules to address communication
overhead, security, and heterogeneity issues. Within the FedTOP framework, two
datasets with varying degrees of data heterogeneity are compared.

Vehicle Connection in P2P FL. P2P FL frameworks are becoming increasingly
important for enabling connected vehicles to learn from each other without
compromising data privacy. These frameworks serve a variety of purposes and
have been proposed in various forms. For example, Nguyen et al. [23] proposed
a ring P2P FL framework for autonomous driving vehicles. Yu et al. [38]
proposed a star topology framework, in which a vehicle acts as a client while
also assuming the responsibilities of a server. Lu et al. [20] relied on
roadside units (RSUs) as the corresponding relay station to broadcast the
vehicle request information to neighboring vehicles. The requesting vehicle
receives the models directly from the responding neighboring vehicles and
aggregates them locally.

Figure 2: Model iteration process in P2P FL networks for (a) ring and (b)
gossip communication protocols. Due to statistical heterogeneity and system
heterogeneity, client models in the parameter space are non-IID.

##  3 Methodology

###  3.1 Problem Formulation

In FL, data are isolated for each client, and the only parameters propagated
between clients are the model parameters. There exists a set with $C$ clients,
and for each client $c$ there exists an nested local model $\omega_{c}$ such
that

$Y_{c}=\omega_{c}(X_{c}),$ (1)

where $X_{c}$ and $Y_{c}$ are the isolated local data set and the label set,
respectively. For FedPC, there is no global objective, but only local
objective for each client

$\min_{\omega}\mathcal{L}(\omega;X_{c},Y_{c}),$ (2)

where $\mathcal{L}$ is a loss function.

We assume that the optimal client models $\omega^{\ast}$ obey a multivariate
distribution, which can be considered as a superposition of multiple
multivariate distributions due to the non-IID of the data and system
heterogeneity. For continual learning, the initial model parameters for the
current client will be the previous client model. Therefore, the optimization
process of the current client model can be expressed as

$\omega_{c}=\arg\min_{\omega}\mathcal{L}(\omega;X_{c},Y_{c},\omega_{c-1}).$
(3)

Eq. 3 can be considered as a Bayesian model, i.e., the probability
distribution of the posterior model is strongly based on the probability
distribution of the prior model. In addition, the posterior model is
determined by order of the models, the distance between the prior and the
posterior models, the merit of the training, and so on.

###  3.2 Communication Protocol

The communication protocol used in FedPC determines the order of model
iterations, which in turn affects the knowledge dissemination process, the
distance between prior and posterior models, and the system robustness. In
this paper, we propose using the gossip protocol for communication between
clients instead of the ring P2P FL for the following reasons. Firstly, the
introduction of randomness adds robustness to the system [1]. Secondly, ring
P2P FLs need to assume a certain priori knowledge, such as that each client
knows the information about previous and subsequent clients. Thirdly, vehicle-
to-vehicle (V2V) communication is defined by vehicular ad hoc networks
(VANETs) [15], e.g., dedicated short-range communications (DSRC) among on-
board units (OBU). VANET is highly dynamic and limited by transmission range,
so the stationary between the ring vehicle connections cannot be guaranteed.
Fourthly, there are SPoF concerns for unidirectional connected ring topology
networks.

Fig. 2 shows the ring P2P FL and the proposed FedPC with gossip protocol. Each
client in a ring P2P FL knows the information of the previous and subsequent
clients, and each client is propagated only once during each iteration. In
contrast, for the gossip protocol, each client is unsure of the information of
previous and subsequent clients, and each client may not be propagated or may
be propagated multiple times during each iteration.

###  3.3 Training Strategy

The order of client iterations will seriously affect the performance of the
client model and the convergence rate of the whole system. Each client model
will strongly depend on the performance of the previous client model. We
consider several training strategies to accelerate convergence, enhance
robustness, and improve accuracy.

Proximal Term Loss. Although the clients’ objectives are to obtain a
personalized model, we do not want the local model to be overfitted on the
client’s data for the training iteration of the system. Therefore, a loss
function is needed to penalize the distance of the current model from the
prior model. $\mathcal{L}$ consists of two parts, including a negative log-
likelihood (NLL) loss $\mathcal{L}_{nll}$ and a proximal term
$\mathcal{L}_{p}$ [18]. $\mathcal{L}_{nll}$ is used to calculate the
difference between the true and predicted values, while $\mathcal{L}_{p}$ is
used to penalize the distance between the current client model and the
previous client model. The overall loss function can be expressed as

$\begin{split}\mathcal{L}&=\mathcal{L}_{nll}+\mathcal{L}_{p},\\\
\mathcal{L}&=\mathcal{L}_{nll}+\frac{\mu}{2}\|\omega_{c}-\omega_{c-1}\|^{2},\end{split}$
(4)

where $\mu$ is the proximal term penalty factor, which we set to $1$ to be the
same as in other studies.

Transfer Learning. Due to the communication overhead caused by the
transmission of model parameters in FL, transfer learning reduces the
communication overhead while enhancing model generalization and avoiding
overfitting by freezing the low-level parameters of the model. Due to the lack
of a generalized NDAR model, we use ResNet34 [12] pre-trained on ImageNet as
the base model and freeze the parameters of the first three ResNet blocks.
Although there are significant differences between ImageNet and NDAR tasks,
the low-level layers of the CNN can be considered as a feature extractor
without losing generality. The original model size is 83 MB, but by
implementing the transfer learning paradigm, the model size is reduced to 52
MB, resulting in a 37% decrease in communication overhead.

Algorithm 1 Proposed peer-to-peer federated learning frame- work with
continual learning (FedPC)

0: Iteration rounds ($T$), client set ($C$), data set ($X_{c}$) and label set
($Y_{c}$) for each client ($c\in C$), local training epoch ($E$), initial
model ($\omega_{0}$), loss function ($\mathcal{L}$), learning rate
($\eta_{t}$)

0: Trained local models for each client ($\\{\omega_{c}|c\in C\\}$)

1: for $t=1$ to $T-1$ do

2: for $c\in C$ in gossip do

3: Receive the model parameters sent by the previous client
$\omega_{c}\leftarrow\omega_{c-1}$.

4: for $e=1$ to $E-1$ do

5: Backpropagate the loss function and update the local model
$\omega_{c}^{e+1}\leftarrow\arg\min_{\omega_{c}^{e}}\mathcal{L}(\omega_{c}^{e})$.

6: end for

7: Update the local model $\omega_{c}\leftarrow\omega_{c}^{E}$.

8: Client $c$ gossip $\omega_{c}$ to the next client $c+1$.

9: end for

10: end for

Decreasing Learning Rate. The learning rate is also one of the essential
hyperparameters in continual learning. Too large a learning rate will cause
catastrophic forgetting of the system, while too small a learning rate will
cause the model to fail to learn the client’s knowledge. Therefore, we
consider a learning rate $\eta_{t}$ decreasing strategy based on the
iteration. A higher learning rate is assigned at the initial stage of the
iteration to enable the edge model to slim down quickly and a lower learning
rate in subsequent iterations to avoid catastrophic forgetting.

We summarize the steps of FedPC in Algorithm 1.

(a) StateFarm |  |  |  |  |
---|---|---|---|---|---
(b) AICity |  |  |  |  |
Figure 3: Two NDAR datasets are used in the experiments, including (a)
StateFarm [33] and (b) AICity [22, 26] datasets.

##  4 Experiment

###  4.1 Experimental Setup

StateFarm Dataset [33]. As shown in Fig. 3 (a), the StateFarm dataset is a
popular dataset in NDAR tasks due to its clean data, realistic on-road driving
simulations, and diverse driving systems. In order to simulate a realistic
driving environment, data collection is performed on vehicles being dragged by
a truck traveling on the streets. It includes more than 100k image samples
from 26 drivers in 10 categories. In particular, it includes multiple vehicles
makes, interiors, and camera angles to emphasize the heterogeneity in real
driving.

AICity Dataset [22, 26]. As shown in Fig. 3 (b), the AICity dataset is a brand
new, dense, and high-resolution dataset. It includes 34 hours of NDAR video
footage from 35 drivers in 16 categories of distracted activity. It not only
has three camera angles, including dashboard, rearview, and right side window,
but also has different driver appearance blocks, including none, sunglasses,
and hat. Data collection is also conducted on different vehicles with some
minor camera adjustments. Unlike StateFarm, the AICity dataset does not
collect data in a real driving environment but in a stopped state on different
streets. In our experiment, each client’s dataset consists of video frames
captured from the right-side window camera angle of each driver.

(a)

(b)

Figure 4: Data distributions of (a) StateFarm and (b) AICity. The colors
denote different clients, and the scatter points represent different
activities. The data distributions are visualized by averaging the driver
activity images and reducing the dimensions through principal component
analysis (PCA).

Understanding of Data Distribution. NDAR application emphasizes the real and
natural data distributions, as opposed to artificially creating non-IID
settings as in [9]. Each client’s data distribution exhibits both statistical
and system heterogeneity. Statistical heterogeneity depends on factors such as
the driver’s physical characteristics, behaviors, and postures, while system
heterogeneity depends on characteristics such as the vehicle model, interior,
camera angle, and exterior environment. Fig. 4 illustrates the data
distribution of the StateFarm and AICity datasets. It can be seen that the
StateFarm clients’ data distribution is divided into three distinct clusters,
which is consistent with our expectation since the dataset was collected from
three different vehicles. Similarly, the AICity dataset is divided into two
clusters due to the use of two different vehicles. In addition to the system
heterogeneity introduced by the vehicles, the statistical heterogeneity of the
drivers presents a challenge. Within the same cluster, the StateFarm client’s
data distribution is more overlapping, while the AICity client’s data
distribution is more dispersed. The dispersion and non-IID characteristics of
the data distribution also lead to non-IID models in FL, which in turn creates
compatibility issues between clients and a single FL model.

Implementation. In addition to the training strategy described in Sec. 3.3, we
set the number of iteration rounds $T=5$, the local epoch $E=5$, the batch
size $128$, and the optimizer as Adam. The initial learning rate is $10^{-4}$,
and the decay of each iteration round is 0.5 times. In addition to the two
loss functions in Eq. 4, we set the weight decay to $10^{-5}$. We resize the
image size of both datasets to 224 by 224 to avoid overfitting and to reduce
storage and computational overhead.

We employ a double-splitting approach to divide the two aforementioned
datasets into test sets. Firstly, we partition the clients into training and
test clients using an 0.8 and 0.2 ratio. Secondly, we randomly split the
training and test datasets for each client with the 0.8 and 0.2 ratios. Note
that during the iterative training process, the test clients are not involved.
However, it is possible to execute one or more gradient descents outside of
the iterative process to personalize the model for the test clients. The
experiments are conducted on a NVIDIA A100 GPU using the PyTorch framework.

Baseline. We consider the proposed FedPC for comparison on four baselines,
including independent learning, FedAvg, FedProx, and ring P2P FL. Note that
the line topology can be considered as the ring P2P FL with a single
iteration, i.e., $T=1$. Owing to the potential confusion between FedPC and
independent learning, resulting from the clients’ objectives and absence of
aggregation operation, we also incorporate independent learning as one of the
baseline methods.

Evaluation Metrics. We consider three metrics to evaluate the proposed FedPC
system in terms of clients’ objectives, generalizability, and compatibility
with new clients.  (i) Performance of the current client model $\omega_{c}$ on
the local dataset $X_{c}$.  (ii) Performance of the current client model
$\omega_{c}$ on other clients’ datasets $\\{\dots,X_{c-1},X_{c+1},\dots\\}$,
i.e., the performance of the model $\omega_{c}$ without training on other
clients and testing directly. For FedAvg and FedProx, it is the accuracy of
the global model on all client test datasets.  (iii) Performance of the
current client model $\omega_{c}$ on new clients, and the performance after
single or multiple gradient descents, which can be considered as a meta-
learning approach [10].

(a)

(b)

Figure 5: Convergence of FedPC on two datasets, (a) StateFarm and (b) AICity. Two loss functions, NLL loss $\mathcal{L}_{nll}$ and proximal loss $\mathcal{L}_{p}$, are expressed in Eq. 4. $\eta_{t}$ is the decreasing learning rate with the number of iterations. |  Metric (i) Client Objective |  Metric (ii) Generalizability |  Metric (iii) New Client
---|---|---|---
StateFarm |  |  |
AICity |  |  |
Figure 6: Experimental results on two data sets and three evaluation metrics.
The evaluations are performed on the unseen test data set. The data points
represent the average of the clients’ results.

###  4.2 Results

Fig. 5 depicts the convergence of the proposed FedPC system during training on
both datasets. As explained in Sec. 3.3, the optimization process involves a
trade-off between two losses, namely NLL and proximal. Initially, the model
$\omega_{c}$ is exposed to a high learning rate and NLL loss, causing it to
diverge significantly from the previous client’s model $\omega_{c-1}$. As
training progresses and the learning rate decreases, the model gradually fine-
tunes its parameters to strike a balance between accuracy and generalization.
FedPC exhibits similar loss curves and convergence behavior on both datasets.

Subsequently, the proposed FedPC is thoroughly compared with four baselines on
three evaluation criteria, as shown in Fig. 6.

Metric (i) Client Objective. Metric (i) evaluates the accuracy of the current
client model on the current local dataset, which can be considered as
assessing the convergence during the training of an isolated client. The
discrepancy between independent learning, C2S FLs, and P2P FLs can be
attributed to the differences in their initial models, leading to significant
variances in the first few iterations. For both independent learning and C2S
FLs, the initial models of all clients are pre-trained on ImageNet in the
first iteration. On the contrary, for P2P FLs, only the initial model of the
first client is pre-trained on ImageNet in the first iteration, while the
initial models of all other clients are from their previous clients. As a
result, the P2P FL frameworks initiate the knowledge dissemination process
early on to expedite model convergence, without relying on aggregation as in
C2S FLs.

Metric (ii) Generalizability. Metric (ii) evaluates the accuracy of the
current client model on other client datasets, i.e., the assessment of the
generalization ability of the model. For P2P FLs, this metric represents the
average accuracy of a randomly selected client model on other clients, while
for C2S FLs, it corresponds to the accuracy of the global model. It can be
observed that P2P FLs exhibit comparable and notable generalizability using a
randomly selected client model, even without focusing a global objective or
performing aggregation. The differing results observed in the two datasets can
be attributed to their varying degrees of data heterogeneity. The
heterogeneity of the StateFarm dataset arises from the combination of multiple
large discrete distributions, which include different vehicle models, as shown
in Fig. 3. Consequently, a single aggregated global model cannot effectively
handle the non-IID dataset. In contrast, P2P FLs yield higher average accuracy
due to the ability of client models to achieve better accuracy on similar
clients. The system heterogeneity of the AICity dataset is smaller, and its
statistical heterogeneity is larger, which is reflected by a high variance
distribution. Therefore, P2P FLs are only compatible with nearby models,
leading to lower average accuracy.

Metric (iii) New Client. Metric (iii) evaluates the compatibility and
generalization of the system for new clients. It can be observed that all
frameworks exhibit limited compatibility with new clients, however, one or
several gradient-descent personalization processes can yield comparable
performance for new clients. The convergence rate of the models in the
personalization process also reflects the distance between each system’s
output model and the optimal model for the new clients. It can be seen that
the proposed FedPC has a slight advantages in terms of convergence speed.

FedPC vs C2S FL. From the three evaluations above, FedPC and C2S FL have their
own advantages. On the one hand, the FedPC system can execute the knowledge
dissemination and convergence process more rapidly without waiting for the
server to perform the aggregation operation. Simultaneously, FedPC reduces
server communication, computational, and storage overheads and eliminates
privacy, security, and fairness issues on the server side. On the other hand,
FedPC and C2S FL exhibit different generalization capabilities over two
datasets. The generalization properties of FedPC are not expected to surpass
those of C2S FL with aggregation operations, due to the fundamental
differences in the objectives of the two systems. For FedPC, the locally
trained model not only possesses the knowledge of other clients but also can
be directly deployed locally. In contrast, for C2S FL, the local model lacks
knowledge from other clients, and the global model does not perform well on
the local dataset.

##  5 Discussion

Although the experimental datasets used in this study were collected in the
real world, certain information is missing, and the proposed FedPC can only be
simulated through alternative methods. This section aims to discuss potential
deployments to FedPC in real-world application scenarios.

Pre-clustering. Pre-clustering clients in FedPC networks using a priori
information is one of the potential solutions for personalization,
accelerating iteration, and improving accuracy. The proposed FedPC may
encounter endless delays when the number of clients is infinite, and the
iteration rate of the whole system will be limited to the training rate of the
clients, which is the same concern in C2S FL frameworks. Hence, some works
have proposed clustered FL to reduce iteration complexity and initialize
personalization through clustering of similar models [28]. However, for FedPC,
data-driven or model parameter-driven clustering is not available since
information about all clients on the same device is not available at a
particular time. Thus, scenario information-driven FedPC clustering is a
viable potential solution in real-world application scenarios. Clustering can
be based on information related to vehicle type, vehicle make, driving
scenario, driving habits, etc. Furthermore, clustering can eliminate system
heterogeneity arising from different camera angles, resolutions, sampling
rates, and vehicle interiors. Therefore, clustering can be considered as a
pre-personalization process to further enhance the iteration rate, latency,
accuracy, and robustness of the FedPC framework.

Communication Protocol. The FedPC framework with different communication
protocols is designed to reduce the communication overhead for different
application scenarios. VANET-based model propagation has two properties,
highly dynamic and transmission range-limited. For highly dynamic vehicle
application scenarios, VANET-based model transmission is also highly dynamic.
Neighboring vehicle model transmission can significantly reduce communication
overhead. Although the proposed FedPC employs the gossip protocol to simulate
the randomness of vehicle connections, there are artificially random
connections for real-world scenarios. First, vehicles in the same driving
scenario are connected more frequently, e.g., vehicles in the same city, which
can also be considered as a driving scenario clustering. Second, active
vehicles are connected more frequently, e.g., taxis that are driven for
extended periods daily. Third, the same vehicle manufacturers can have higher
connection frequency, which eliminates system heterogeneity due to the
consistency of in-vehicle devices. Therefore, the FedPC framework in real
driving scenarios needs to consider vehicle connectivity heterogeneity to
adopt appropriate communication protocols.

Parallel Propagation of Multiple Models. In this paper, we investigate the
utilization of continual learning as a means of propagating knowledge.
However, in real-world application scenarios, it may be possible to
interconnect multiple vehicles and simultaneously propagate multiple models.
Therefore, the aggregation paradigm is also a viable option for a multi-peer-
to-peer protocol. In real-world application scenarios, a hybrid approach that
combines both continual and aggregation as a knowledge dissemination scheme
has the potential to more effectively leverage multiple models.

##  6 Conclusion

In this paper, we propose FedPC, a novel P2P FL approach for NDAR tasks that
combines continual learning with a gossip protocol to propagate knowledge
among clients. FedPC focuses on and satisfies each client’s objective,
enabling every client to have a personalized model. We evaluate the
performance of FedPC on two real-world NDAR datasets, demonstrating its rapid
knowledge dissemination, comparable generalizability, and swift compatibility
with new clients. Furthermore, its low overhead in terms of communication,
computation, and storage makes it well-suited for deployment in real vehicles.

Future work aims to further advance the deployment of FedPC in real-world
application scenarios, including pre-clustering, VANET-based communication,
incentive strategies, etc., to address potential issues such as data
heterogeneity, high-dynamic connectivity, communication overhead, packet loss,
latency, free-riding attacks, etc. One possible scenario involves the
connection and propagation of models between vehicles driving in the same
direction on a highway. Differences in vehicle speeds will lead to varying
connection frequencies, making vehicle connections more realistic in real-
world scenarios compared to the gossip protocol. A significant challenge in
real-world applications is the reluctance of users to participate in knowledge
dissemination due to concerns regarding safety, privacy, and communication
costs. The lack of motivation among clients emphasizes the urgent need to
address incentive strategies.

## References

  * [1] Lorenzo Alvisi, Jeroen Doumen, Rachid Guerraoui, Boris Koldehofe, Harry Li, Robbert Van Renesse, and Gilles Tredan.  How robust are gossip-based communication protocols?  ACM SIGOPS Oper. Syst. Rev., 41(5):14–18, 2007.
  * [2] Yacine Belal, Aurélien Bellet, Sonia Ben Mokhtar, and Vlad Nitu.  Pepper: Empowering user-centric recommender systems over gossip learning.  Proc. ACM Interact. Mob. Wearable Ubiquitous Technol., 6(3):1–27, 2022.
  * [3] Ken Chang, Niranjan Balachandar, Carson Lam, Darvin Yi, James Brown, Andrew Beers, Bruce Rosen, Daniel L Rubin, and Jayashree Kalpathy-Cramer.  Distributed deep learning networks among institutions for medical imaging.  J. Am. Med. Inform. Assoc., 25(8):945–954, 2018.
  * [4] Vishnu Pandi Chellapandi, Antesh Upadhyay, Abolfazl Hashemi, and Stanislaw H Zak.  On the convergence of decentralized federated learning under imperfect information sharing.  arXiv preprint arXiv:2303.10695, 2023.
  * [5] Vishnu Pandi Chellapandi, Liangqi Yuan, Stanislaw H Zak, and Ziran Wang.  A survey of federated learning for connected and automated vehicles.  arXiv preprint arXiv:2303.10677, 2023.
  * [6] Shuzhen Chen, Dongxiao Yu, Yifei Zou, Jiguo Yu, and Xiuzhen Cheng.  Decentralized wireless federated learning with differential privacy.  IEEE Trans. Industr. Inform., 18(9):6273–6282, 2022.
  * [7] Ittai Dayan, Holger R Roth, Aoxiao Zhong, Ahmed Harouni, Amilcare Gentili, Anas Z Abidin, Andrew Liu, Anthony Beardsworth Costa, Bradford J Wood, Chien-Sung Tsai, et al.  Federated learning for predicting clinical outcomes in patients with covid-19.  Nat. Med., 27(10):1735–1743, 2021.
  * [8] Matthias De Lange, Rahaf Aljundi, Marc Masana, Sarah Parisot, Xu Jia, Aleš Leonardis, Gregory Slabaugh, and Tinne Tuytelaars.  A continual learning survey: Defying forgetting in classification tasks.  IEEE Trans. Pattern Anal. Mach. Intell., 44(7):3366–3385, 2021\.
  * [9] Keval Doshi and Yasin Yilmaz.  Federated learning-based driver activity recognition for edge devices.  In IEEE Conf. Comput. Vis. Pattern Recog. Worksh., pages 3338–3346, 2022.
  * [10] Alireza Fallah, Aryan Mokhtari, and Asuman Ozdaglar.  Personalized federated learning: A meta-learning approach.  arXiv preprint arXiv:2002.07948, 2020.
  * [11] Chaoyang He, Murali Annavaram, and Salman Avestimehr.  Group knowledge transfer: Federated learning of large cnns at the edge.  Adv. Neural Inform. Process. Syst., 33:14068–14080, 2020.
  * [12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun.  Deep residual learning for image recognition.  In IEEE Conf. Comput. Vis. Pattern Recog., pages 770–778, 2016\.
  * [13] Yixing Huang, Christoph Bert, Stefan Fischer, Manuel Schmidt, Arnd Dörfler, Andreas Maier, Rainer Fietkau, and Florian Putz.  Continual learning for peer-to-peer federated learning: A study on automated brain metastasis identification.  arXiv preprint arXiv:2204.13591, 2022.
  * [14] Peter Kairouz, H Brendan McMahan, Brendan Avent, Aurélien Bellet, Mehdi Bennis, Arjun Nitin Bhagoji, Kallista Bonawitz, Zachary Charles, Graham Cormode, Rachel Cummings, et al.  Advances and open problems in federated learning.  Found. Trends Mach. Learn., 14(1–2):1–210, 2021.
  * [15] Hakima Khelifi, Senlin Luo, Boubakr Nour, Hassine Moungla, Yasir Faheem, Rasheed Hussain, and Adlen Ksentini.  Named data networking in vehicular ad hoc networks: State-of-the-art and challenges.  IEEE Commun. Surv. Tutor., 22(1):320–351, 2019.
  * [16] Arief Koesdwiady, Ridha Soua, Fakhreddine Karray, and Mohamed S Kamel.  Recent trends in driver safety monitoring systems: State of the art and challenges.  IEEE Trans. Veh. Technol., 66(6):4550–4563, 2016.
  * [17] Jakub Konečnỳ, H Brendan McMahan, Felix X Yu, Peter Richtárik, Ananda Theertha Suresh, and Dave Bacon.  Federated learning: Strategies for improving communication efficiency.  arXiv preprint arXiv:1610.05492, 2016.
  * [18] Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith.  Federated optimization in heterogeneous networks.  Proceedings of Machine learning and systems, 2:429–450, 2020.
  * [19] Tian Li, Maziar Sanjabi, Ahmad Beirami, and Virginia Smith.  Fair resource allocation in federated learning.  arXiv preprint arXiv:1905.10497, 2019.
  * [20] Yunlong Lu, Xiaohong Huang, Yueyue Dai, Sabita Maharjan, and Yan Zhang.  Federated learning for data privacy preservation in vehicular cyber-physical systems.  IEEE Netw., 34(3):50–56, 2020.
  * [21] Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas.  Communication-efficient learning of deep networks from decentralized data.  In Artificial intelligence and statistics, pages 1273–1282. PMLR, 2017.
  * [22] Milind Naphade, Shuo Wang, David C. Anastasiu, Zheng Tang, Ming-Ching Chang, Yue Yao, Liang Zheng, Mohammed Shaiqur Rahman, Meenakshi S. Arya, Anuj Sharma, Qi Feng, Vitaly Ablavsky, Stan Sclaroff, Pranamesh Chakraborty, Sanjita Prajapati, Alice Li, Shangru Li, Krishna Kunadharaju, Shenxin Jiang, and Rama Chellappa.  The 7th AI City Challenge.  In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, June 2023.
  * [23] Anh Nguyen, Tuong Do, Minh Tran, Binh X Nguyen, Chien Duong, Tu Phan, Erman Tjiputra, and Quang D Tran.  Deep federated learning for autonomous driving.  In 2022 IEEE Intelligent Vehicles Symposium (IV), pages 1824–1830. IEEE, 2022.
  * [24] Takayuki Nishio, Yusuke Koda, Jihong Park, Mehdi Bennis, and Klaus Doppler.  When wireless communications meet computer vision in beyond 5g.  IEEE Commun. Mag., 5(2):76–83, 2021.
  * [25] Sarthak Pati, Ujjwal Baid, Brandon Edwards, Micah Sheller, Shih-Han Wang, G Anthony Reina, Patrick Foley, Alexey Gruzdev, Deepthi Karkada, Christos Davatzikos, et al.  Federated learning enables big data for rare cancer boundary detection.  Nat. Commun., 13(1):7346, 2022.
  * [26] Mohammed Shaiqur Rahman, Jiyang Wang, Senem Velipasalar Gursoy, David Anastasiu, Shuo Wang, and Anuj Sharma.  Synthetic Distracted Driving (SynDD2) dataset for analyzing distracted behaviors and various gaze zones of a driver, 2022.  arXiv:2204.08096.
  * [27] Nicola Rieke, Jonny Hancox, Wenqi Li, Fausto Milletari, Holger R Roth, Shadi Albarqouni, Spyridon Bakas, Mathieu N Galtier, Bennett A Landman, Klaus Maier-Hein, et al.  The future of digital health with federated learning.  NPJ Digit. Med., 3(1):119, 2020.
  * [28] Felix Sattler, Klaus-Robert Müller, and Wojciech Samek.  Clustered federated learning: Model-agnostic distributed multitask optimization under privacy constraints.  IEEE Trans. Neural Netw. Learn. Syst., 32(8):3710–3722, 2020.
  * [29] Micah J Sheller, Brandon Edwards, G Anthony Reina, Jason Martin, Sarthak Pati, Aikaterini Kotrotsou, Mikhail Milchenko, Weilin Xu, Daniel Marcus, Rivka R Colen, et al.  Federated learning in medicine: facilitating multi-institutional collaborations without sharing patient data.  Sci. Rep., 10(1):1–12, 2020.
  * [30] Micah J Sheller, G Anthony Reina, Brandon Edwards, Jason Martin, and Spyridon Bakas.  Multi-institutional deep learning modeling without sharing patient data: A feasibility study on brain tumor segmentation.  In Brainlesion: Glioma, Multiple Sclerosis, Stroke and Traumatic Brain Injuries: 4th International Workshop, BrainLes 2018, Held in Conjunction with MICCAI 2018, Granada, Spain, September 16, 2018, Revised Selected Papers, Part I 4, pages 92–104. Springer, 2019.
  * [31] Tao Shen, Jie Zhang, Xinkang Jia, Fengda Zhang, Gang Huang, Pan Zhou, Kun Kuang, Fei Wu, and Chao Wu.  Federated mutual learning.  arXiv preprint arXiv:2006.16765, 2020.
  * [32] Yandong Shi, Yong Zhou, and Yuanming Shi.  Over-the-air decentralized federated learning.  In 2021 IEEE International Symposium on Information Theory (ISIT), pages 455–460. IEEE, 2021.
  * [33] State Farm.  State farm distracted driver detection, Apr 2016.
  * [34] Alysa Ziying Tan, Han Yu, Lizhen Cui, and Qiang Yang.  Towards personalized federated learning.  IEEE Trans. Neural Netw. Learn. Syst., 2022.
  * [35] Michael Tom Yeh et al.  Designing a moral compass for the future of computer vision using speculative analysis.  In IEEE Conf. Comput. Vis. Pattern Recog. Worksh., pages 64–73, 2017.
  * [36] Jianyu Wang, Anit Kumar Sahu, Gauri Joshi, and Soummya Kar.  Matcha: A matching-based link scheduling strategy to speed up distributed optimization.  IEEE Trans. Signal Process., 70:5208–5221, 2022.
  * [37] Kang Wei, Jun Li, Ming Ding, Chuan Ma, Howard H Yang, Farhad Farokhi, Shi Jin, Tony QS Quek, and H Vincent Poor.  Federated learning with differential privacy: Algorithms and performance analysis.  IEEE Trans. Inf. Forensics Secur., 15:3454–3469, 2020.
  * [38] Zhengxin Yu, Jia Hu, Geyong Min, Han Xu, and Jed Mills.  Proactive content caching for internet-of-vehicles based on peer-to-peer federated learning.  In 2020 IEEE 26th International Conference on Parallel and Distributed Systems (ICPADS), pages 601–608. IEEE, 2020.
  * [39] Liangqi Yuan, Lu Su, and Ziran Wang.  Federated transfer-ordered-personalized learning for driver monitoring application.  arXiv preprint arXiv:2301.04829, 2023.
  * [40] Fangda Zhang, Shashank Mehrotra, and Shannon C Roberts.  Driving distracted with friends: Effect of passengers and driver distraction on young drivers’ behavior.  Accid. Anal. Prev., 132:105246, 2019.