(5.37) $a_{2}^{\prime}>-\gamma,\hskip 5.0pt|a_{3}^{\prime}|<\gamma,\text{ and
}(a_{1}^{\prime}/a_{0}^{\prime})^{2}<\frac{85}{24}\cdot
a_{2}^{\prime}/a_{0}^{\prime}+\gamma.$

Recall the rotation operator $\operatorname{U}$ from (2).

Compare with Remark 5.3, we see from (5.37) that $q$ ‘almost solves’ the thin
obstacle problem up to an error of size $\gamma$.

###### Proof.

Let $\delta>0$ be a small constant to be chosen, depending on $\gamma.$

With Lemma 5.3, we have

$|b_{1}^{+}-a_{0}\cdot
b_{1}^{\mathbb{R}^{2}}[\frac{a_{1}}{a_{0}},\frac{a_{2}}{a_{0}},\frac{a_{3}}{a_{0}}]|<\omega(\varepsilon),\text{
and }|b_{1}^{-}-a_{0}\cdot
b_{1}^{\mathbb{R}^{2}}[-\frac{a_{1}}{a_{0}},\frac{a_{2}}{a_{0}},-\frac{a_{3}}{a_{0}}]|<\omega(\varepsilon).$

With our assumption on $|b_{1}^{+}-b_{1}^{-}|$ and $a_{0}\in[\frac{1}{2},2]$,
this implies

$|b_{1}^{\mathbb{R}^{2}}[\frac{a_{1}}{a_{0}},\frac{a_{2}}{a_{0}},\frac{a_{3}}{a_{0}}]-b_{1}^{\mathbb{R}^{2}}[-\frac{a_{1}}{a_{0}},\frac{a_{2}}{a_{0}},-\frac{a_{3}}{a_{0}}]|<4(\omega(\varepsilon)+\sigma).$

Similarly, we have

$|b_{2}^{\mathbb{R}^{2}}[\frac{a_{1}}{a_{0}},\frac{a_{2}}{a_{0}},\frac{a_{3}}{a_{0}}]+b_{2}^{\mathbb{R}^{2}}[-\frac{a_{1}}{a_{0}},\frac{a_{2}}{a_{0}},-\frac{a_{3}}{a_{0}}]|<4(\omega(\varepsilon)+\sigma).$

The change of sign in front of $b_{2}^{\mathbb{R}^{2}}$ is due to the odd
symmetry of $v_{-\frac{3}{2}}$ with respect to $\\{x_{1}=0\\}.$

We perform a change of basis (see (2.16) and (2.19))

$\displaystyle p_{ext}$
$\displaystyle=a_{0}u_{\frac{7}{2}}+\dots+b_{1}^{\pm}\varepsilon^{4}\chi_{\\{\pm
x_{1}>0\\}}v_{-\frac{1}{2}}+b_{2}^{\pm}\varepsilon^{5}\chi_{\\{\pm
x_{1}>0\\}}v_{-\frac{3}{2}}$
$\displaystyle=\tilde{a}_{0}u_{\frac{7}{2}}+\tilde{a}_{1}\varepsilon
w_{\frac{5}{2}}+\tilde{a}_{2}\varepsilon^{2}w_{\frac{3}{2}}+\tilde{a}_{3}\varepsilon^{3}w_{\frac{1}{2}}+\tilde{b}_{1}^{\pm}\varepsilon^{4}\chi_{\\{\pm
x_{1}>0\\}}w_{-\frac{1}{2}}+\tilde{b}_{2}^{\pm}\varepsilon^{5}\chi_{\\{\pm
x_{1}>0\\}}w_{-\frac{3}{2}}.$

With Corollary B.2, if $\varepsilon$ and $\sigma$ are small, depending on
$\delta$, then we find universally bounded $\tau$, $\alpha_{j}$ and
$\beta_{j}$ satisfying

(5.38) $|\alpha_{0}-\tilde{a}_{0}|\leq C\varepsilon^{2},\hskip
5.0pt\alpha_{2}\geq-\delta,\hskip 5.0pt|\alpha_{3}|<\delta,\text{ and
}\alpha_{1}^{2}\leq\frac{12}{5}\alpha_{2}+\delta,$

and

(5.39) $|p_{ext}-\operatorname{U}_{-\tau\varepsilon}(f)|\leq
C_{\rho_{0}}\delta\varepsilon^{5}\text{ in
}\\{r>\rho_{0}\\}\cap\\{x_{1}>C|\tau|\varepsilon\\},$

where $\rho_{0}>0$ is a small parameter to be chosen, and

$f=\alpha_{0}u_{\frac{7}{2}}+\alpha_{1}\varepsilon
w_{\frac{5}{2}}+\alpha_{2}\varepsilon^{2}w_{\frac{3}{2}}+\alpha_{3}\varepsilon^{3}w_{\frac{1}{2}}+\beta_{1}\varepsilon^{4}w_{-\frac{1}{2}}+\beta_{2}\varepsilon^{5}w_{-\frac{3}{2}}.$

If we take $q=\alpha_{0}u_{\frac{7}{2}}+\alpha_{1}\varepsilon
w_{\frac{5}{2}}+\alpha_{2}\varepsilon^{2}w_{\frac{3}{2}}+\alpha_{3}\varepsilon^{3}w_{\frac{1}{2}}$,
and suppose

$q_{ext}=q+\gamma_{1}\varepsilon^{4}w_{-\frac{1}{2}}+\gamma_{2}\varepsilon^{5}w_{-\frac{3}{2}},$

then $\overline{p}$ and $\operatorname{U}_{-\tau\varepsilon}(\bar{q})$ both
solve (5.5) in $\mathcal{C}^{+}_{\eta-C|\tau|\varepsilon}$. With (5.39) and

$\overline{p}-\operatorname{U}_{-\tau\varepsilon}(\bar{q})=(\overline{p}-p_{ext})+(p_{ext}-\operatorname{U}_{-\tau\varepsilon}(f))+(\operatorname{U}_{-\tau\varepsilon}(f-q_{ext}))+(\operatorname{U}_{-\tau\varepsilon}(q_{ext}-\bar{q})),$

we can apply the same argument as in Step 1 from the proof for Lemma 5.4 to
conclude

$|\gamma_{1}-\beta_{1}|\varepsilon^{4}+|\gamma_{2}-\beta_{2}|\varepsilon^{5}\leq
C_{\rho_{0}}\delta\varepsilon^{5}$

if $\rho_{0}$ is fixed small enough.

With (5.39), this implies

$|p_{ext}-\operatorname{U}_{-\tau\varepsilon}(q_{ext})|\leq
C_{\rho_{0}}\delta\varepsilon^{5}\text{ in
}\\{r>\rho_{0}\\}\cap\\{x_{1}>C|\tau|\varepsilon\\}.$

An application of the maximum principle leads to

$|\overline{p}-\operatorname{U}_{-\tau\varepsilon}(\bar{q})|\leq
C_{\rho_{0}}\delta\varepsilon^{5}\text{ in }\\{x_{1}>C|\tau|\varepsilon\\}.$

A similar argument gives
$|\overline{p}-\operatorname{U}_{-\tau\varepsilon}(\bar{q})|\leq
C_{\rho_{0}}\delta\varepsilon^{5}\text{ in }\\{x_{1}<-C|\tau|\varepsilon\\}.$
Together with the estimate in $\\{x_{1}>C|\tau|\varepsilon\\}$, we can apply
the maximum principle in $\mathcal{L}_{\eta}$ to get

$|\overline{p}-\operatorname{U}_{-\tau\varepsilon}(\bar{q})|<C_{\rho_{0}}\delta\varepsilon^{5}\text{
in }\mathbb{S}^{2}.$

Choosing $\delta$ small, depending on $\gamma$, we have (5.36). The constraint
(5.37) follows from (5.38). ∎

######  Remark 5.6.

For $q=a_{0}^{\prime}u_{\frac{7}{2}}+a_{1}^{\prime}\varepsilon
v_{\frac{5}{2}}+a_{2}^{\prime}\varepsilon^{2}v_{\frac{3}{2}}+a_{3}^{\prime}\varepsilon^{3}v_{\frac{1}{2}}$
as in the statement of Lemma 5.9, if we assume

$a_{2}^{\prime}\geq\frac{1}{24},$

then we can use the same argument as in Step 3 of the proof for Lemma 3.4 to
find $\tau$ and $\hat{a}_{j}$ with $|\tau|=O(\gamma),\text{ and
}|\hat{a}_{j}-a_{j}^{\prime}|=O(\gamma)$ such that

$\hat{q}=a_{0}^{\prime}u_{\frac{7}{2}}+\hat{a}_{1}\varepsilon
v_{\frac{5}{2}}+\hat{a}_{2}\varepsilon^{2}v_{\frac{3}{2}}$

satisfies

$\hat{q}|_{\\{x_{3}=0\\}}\geq 0,\hskip 5.0pt\Delta\hat{q}|_{\\{x_{3}=0\\}}\leq
0,$

and

$|q-\operatorname{U}_{\tau\varepsilon}(\hat{q})|\leq
C\gamma\varepsilon^{3}\text{ in }\\{r>\eta/2\\}\cap B_{1}.$

Moreover, if $\gamma$ and $\varepsilon$ are universally small, then we have
$\hat{a}_{2}\geq\frac{1}{24}-O(\gamma)\geq 0,$ and

$\displaystyle(\frac{\hat{a}_{1}}{a_{0}^{\prime}})^{2}-4\frac{\hat{a}_{2}}{a_{0}^{\prime}}(1-\frac{1}{5}\frac{\hat{a}_{2}\varepsilon^{2}}{a_{0}^{\prime}})$
$\displaystyle\leq(\frac{a^{\prime}_{1}}{a_{0}^{\prime}})^{2}-4\frac{a^{\prime}_{2}}{a_{0}^{\prime}}+O(\gamma+\varepsilon)$
$\displaystyle\leq\frac{-11}{24}\frac{a^{\prime}_{2}}{a_{0}^{\prime}}+O(\gamma+\varepsilon)$
$\displaystyle\leq-(\frac{1}{24})^{2}.$

Note that we used $a_{2}^{\prime}\geq\frac{1}{24}$ together with (5.37).

Consequently, if $\hat{a}_{1}\geq 0$, then small perturbations from $\hat{q}$
solve the thin obstacle problem outside a cone of $O(\varepsilon)$-opening
near $\\{r=0,x_{1}>0\\}$ (See Remark 5.3).

###  5.5. One-sided replacement

For profile of the form $\hat{q}$ as in Remark 5.6, that is,

$p=a_{0}u_{\frac{7}{2}}+a_{1}\varepsilon
v_{\frac{5}{2}}+a_{2}\varepsilon^{2}v_{\frac{3}{2}}$

with

(5.40) $a_{0}\in[\frac{1}{2},2],\hskip 5.0pta_{1}\geq 0,\hskip
5.0pta_{2}\geq\frac{1}{24},\text{ and
}(\frac{a_{1}}{a_{0}})^{2}-4\frac{a_{2}}{a_{0}}(1-\frac{1}{5}\frac{a_{2}\varepsilon^{2}}{a_{0}})\leq-(\frac{1}{24})^{2},$

we only need to replace it in a small spherical cap near $\\{r=0,x_{1}>0\\}.$

To this end, we solve in $\mathcal{C}_{\eta}^{+}$ from (5.2) the following

(5.41) $\begin{cases}(\Delta_{\mathbb{S}^{2}}+\lambda_{\frac{7}{2}})v_{p}\leq
0&\text{ in }\mathcal{C}_{\eta}^{+},\\\ v_{p}\geq 0&\text{ in
}\mathcal{C}_{\eta}^{+}\cap\\{x_{3}=0\\},\\\
(\Delta_{\mathbb{S}^{2}}+\lambda_{\frac{7}{2}})v_{p}=0&\text{ in
}\mathcal{C}_{\eta}^{+}\cap(\\{v_{p}>0\\}\cup\\{x_{3}\neq 0\\}),\\\
v_{p}=p&\text{ along }\partial\mathcal{C}_{\eta}^{+}.\end{cases}$

With this, we define the replacement of $p$ as:

######  Definition 5.4.

For $p$ satisfying (5.40), its replacement, $\tilde{p}$, is defined as

$\tilde{p}=\begin{cases}v_{p}&\text{ in }\mathcal{C}_{\eta}^{+},\\\ p&\text{
in }\mathbb{S}^{2}\backslash\mathcal{C}_{\eta}^{+}.\end{cases}$

Equivalently, the replacement $\tilde{p}$ is the minimizer of the energy

$v\mapsto\int_{\mathbb{S}^{2}}|\nabla_{\mathbb{S}^{2}}v|^{2}-\lambda_{\frac{7}{2}}v^{2}$

over $\\{v:v=p\text{ outside }\mathcal{C}_{\eta}^{+},\text{ and }v\geq 0\text{
on }\\{x_{3}=0\\}\\}.$

This replacement satisfies

(5.42)
$\begin{cases}(\Delta_{\mathbb{S}^{2}}+\lambda_{\frac{7}{2}})\tilde{p}=f_{p}dH^{1}|_{\partial\mathcal{C}_{\eta}^{+}}+g_{p}dH^{1}|_{\mathcal{C}_{\eta}^{+}\cap\\{x_{3}=0\\}}&\text{
in }\widehat{\mathbb{S}^{2}}\cup\mathcal{C}_{\eta}^{+},\\\ \tilde{p}=0&\text{
in }\widetilde{\mathbb{S}^{2}}\backslash\mathcal{C}_{\eta}^{+}.\end{cases}$

Similar to Subsection 4.1, we define some auxiliary functions.

The projection of $f_{p}$ into $\mathcal{H}_{\frac{7}{2}}$ (see (2.12)) is
denoted by $\varphi_{p}$.

The function $H_{p}:\mathbb{S}^{2}\to\mathbb{R}$ is the unique solution to

$\begin{cases}(\Delta_{\mathbb{S}^{2}}+\lambda_{\frac{7}{2}})H_{p}=f_{p}dH^{1}|_{\partial\mathcal{C}_{\eta}^{+}}-\varphi_{p}&\text{
on $\widehat{\mathbb{S}^{2}},$}\\\ H_{p}=0&\text{ on
$\widetilde{\mathbb{S}^{2}}$.}\end{cases}$

Corresponding to these, we define

$\Phi_{p}:=H_{1,p}(\frac{x}{|x|})|x|^{\frac{7}{2}}+\frac{1}{8}\varphi_{1,p}(\frac{x}{|x|})|x|^{\frac{7}{2}}\log(|x|),$

which satisfies

$\begin{cases}\Delta\Phi_{p}=f_{p}dH^{2}|_{\partial\mathcal{C}_{\eta}^{+}}&\text{
in $\widehat{\mathbb{R}^{3}}$,}\\\ \Phi_{p}=0&\text{ on
$\widetilde{\mathbb{R}^{3}}.$}\end{cases}$

Finally, let’s denote

$\kappa_{p}:=\|\Phi_{p}\|_{L^{\infty}(B_{1})}.$

With similar argument as in Subsection 4.1, we have the following properties:

######  Lemma 5.10.

For $p$ satisfying (5.40), we have

$\tilde{p}=0\text{ in
}(\mathcal{C}_{\eta}^{+}\backslash\mathcal{C}_{C\varepsilon}^{+})^{\prime},$

where $C$ is a universal constant.

######  Lemma 5.11.

Suppose that $p$ satisfies (5.40), and take
$q=\alpha_{0}u_{\frac{7}{2}}+\alpha_{1}v_{\frac{5}{2}}+\alpha_{2}v_{\frac{3}{2}}+\alpha_{3}v_{\frac{1}{2}}$
with $|\alpha_{j}|\leq 1$.

Then we can find a modulus of continuity, $\omega(\cdot)$, such that

$\|\widetilde{p+dq}-(\tilde{p}+dq)\|_{L^{\infty}(\mathbb{S}^{2})}\leq\omega(\varepsilon+d)\cdot
d.$

######  Corollary 5.2.

Under the same assumption as in Lemma 5.11, we have

$\kappa_{p+dq}\leq\kappa_{p}+\omega(\varepsilon+d)\cdot d.$

By directly computing the inner product of $f$ and $v_{\frac{1}{2}}$, we have

######  Lemma 5.12.

Suppose that $p$ satisfies (5.40). Then

$\|\varphi\|_{L^{\infty}(\mathbb{S}^{2})}\geq c\kappa$

for a universal $c>0$.

Note that $p\geq 0$ in $\mathcal{C}_{\eta}^{+}\cap\\{x_{3}=0\\}$, thus $p$ is
admissible in the minimization problem in Definition 5.4, we have

######  Lemma 5.13.

Suppose that $p$ satisfies (5.40), then $W_{\frac{7}{2}}(\tilde{p};1)\leq 0.$

This implies

######  Lemma 5.14.

Suppose that $p$ satisfies (5.40). Let $u$ be a solution to (1.1) in $B_{1}$,
then

$\|u-\tilde{p}\|_{L^{\infty}(B_{1/2})}+\|u-\tilde{p}\|_{H^{1}(B_{1/2})}\leq
C(\|u-\tilde{p}\|_{L^{1}(B_{1})}+\kappa)$

and

$W_{\frac{7}{2}}(u;\frac{1}{2})\leq
C(\|u-\tilde{p}\|^{2}_{L^{1}(B_{1})}+\kappa^{2}).$

Similar to Subsection 4.2, we have

######  Definition 5.5.

Suppose that the coefficients of $p$ satisfy (5.40).

For $d,\rho\in(0,1]$, we say that $u$ is a solution $d$-approximated by $p$ at
scale $\rho$ if $u$ solves the thin obstacle problem (1.1) in $B_{\rho}$, and

$|u-\tilde{p}|\leq d\rho^{\frac{7}{2}}\text{ in $B_{\rho}$.}$

In this case, we write

$u\in\mathcal{S}(p,d,\rho).$

We can localize the contact set of well-approximated solutions

######  Lemma 5.15.

Suppose that $u\in\mathcal{S}(p,d,1)$ with $d$ small, and that $p$ satisfies
(5.40).

We have

$\Delta u=0\text{ in }\widehat{B_{1}}\cap\\{r>Cd^{\frac{2}{7}}\\},$

and

$u=0\text{ in
}\widetilde{B_{\frac{7}{8}}}\cap\\{r>C(d+\varepsilon)^{\alpha}\\}$

for universal small $\alpha>0$ and big $C>0$.

With these preparations, we have the following dichotomy similar to the one in
Subsection 4.3.

######  Lemma 5.16.

Suppose that

$u\in\mathcal{S}(p,d,1)$

for some $p=a_{0}u_{\frac{7}{2}}+a_{1}\varepsilon
v_{\frac{5}{2}}+a_{2}\varepsilon^{2}v_{\frac{3}{2}}$ satisfying (5.40).

There is a universal small constant $\tilde{\varepsilon}>0$, such that if
$\varepsilon<\tilde{\varepsilon}$ and $d\leq\varepsilon^{3}$, then we have the
following dichotomy:

  1. (1)

either

$W_{\frac{7}{2}}(u;1)-W_{\frac{7}{2}}(u;\rho_{0})\geq c_{0}^{2}d^{2}$

and

$u\in\mathcal{S}(p,Cd,\rho_{0});$

  2. (2)

or

$u\in\mathcal{S}(p^{\prime},\frac{1}{2}d,\rho_{0})$

for some

$p^{\prime}=\operatorname{U}_{\tau\varepsilon}[a_{0}^{\prime}u_{\frac{7}{2}}+a_{1}^{\prime}\varepsilon
v_{\frac{5}{2}}+a_{2}^{\prime}\varepsilon^{2}v_{\frac{3}{2}}]$

with $\kappa_{p^{\prime}}<d,$ and

$|a_{0}^{\prime}-a_{0}|\leq Cd,\hskip
5.0pt|\tau|+|a_{1}^{\prime}-a_{1}|+|a_{2}^{\prime}-a_{2}|\leq
Cd/\varepsilon^{3}.$

The constants $c_{0}$, $\rho_{0}$ and $C$ are universal.

###### Proof.

For $c_{0}$ and $\rho_{0}$ to be chosen, suppose the lemma is false, we find a
sequence $(u_{n},p_{n},d_{n},\varepsilon_{n})$ satisfying the hypothesis of
the lemma with $d_{n},\varepsilon_{n}\to 0$, but neither of the two
alternatives happens.

This allows us to find

$q=p+d(\alpha_{0}u_{\frac{7}{2}}+\alpha_{1}w_{\frac{5}{2}}+\alpha_{2}w_{\frac{3}{2}}+\alpha_{3}w_{\frac{1}{2}})$

such that

(5.43) $\|u-\tilde{q}\|_{L^{1}(B_{2\rho_{0}})}\leq
Cd\rho_{0}^{\frac{13}{2}}[(c_{0}+\rho_{0})|\log\rho_{0}|+o(1)].$

With $a_{2}\geq\frac{1}{24}$ as in (5.40), there are $\tau$ and
$a_{j}^{\prime}$ satisfying

$a_{0}^{\prime}=a_{0}+d\alpha_{0},\hskip 5.0pt|\tau|\leq
Cd/\varepsilon^{3},\text{ and }|a_{j}^{\prime}-a_{j}|\leq
Cd/\varepsilon^{3}\text{ for $j=1,2$}$

such that

$\|q-\operatorname{U}_{-\tau\varepsilon}(a_{0}^{\prime}u_{\frac{7}{2}}+a_{1}^{\prime}\varepsilon
v_{\frac{5}{2}}+a_{2}^{\prime}\varepsilon^{2}v_{\frac{3}{2}})\|_{L^{\infty}(\mathbb{S}^{2}\backslash\mathcal{C}^{\pm}_{\eta/2})}\leq
C\tau^{2}\varepsilon^{4}\leq C\varepsilon d.$

Note that we used our assumption that $d\leq\varepsilon^{3}$ for the last
comparison. If we denote by
$p^{\prime}=a_{0}^{\prime}u_{\frac{7}{2}}+a_{1}^{\prime}\varepsilon
v_{\frac{5}{2}}+a_{2}^{\prime}\varepsilon^{2}v_{\frac{3}{2}}$, then the
maximum principle gives
$\|\tilde{q}-\tilde{p}^{\prime}\|_{L^{\infty}(\mathbb{S}^{2})}\leq
C\varepsilon d.$ Together with (5.43), we get

$\|u-\tilde{p}^{\prime}\|_{L^{1}(B_{2\rho_{0}})}\leq
Cd\rho_{0}^{\frac{13}{2}}[(c_{0}+\rho_{0})|\log\rho_{0}|+o(1)].$

From here the remaining of the argument is similar to the proof of Lemma 4.8.
∎

##  6\. Proof of main results

In this section, we prove our main results, Theorem 1.1, Theorem 1.2 and
Theorem 1.3.

We begin with some preparatory propositions.

######  Proposition 6.1.

For a solution $u$ to the thin obstacle problem (1.1) in
$B_{1}\subset\mathbb{R}^{3}$, suppose that its frequency at $0$ is
$\frac{7}{2}$, and that

$|u-u_{\frac{7}{2}}|\leq d\text{ in }B_{1}.$

There is a small universal $\tilde{d}>0$, such that if $d<\tilde{d},$ then up
to a normalization

  1. (1)

either

$|u-u_{\frac{7}{2}}|\leq O(|x|^{\frac{7}{2}}|\log|x||^{-c_{0}}),$

  2. (2)

or

$|u-p|\leq O(|x|^{\frac{7}{2}+c_{0}})$

for some $p\in\mathcal{F}_{1}\backslash\\{u_{\frac{7}{2}}\\}$.

Here $c_{0}>0$ is universal.

Recall the notion of normalization from Remark 1.1. The family of normalized
solutions, $\mathcal{F}_{1}$, is given in (1.7).

###### Proof.

The proof is based on iterations of the trichotomy in Lemma 5.1 and the
dichotomy in Lemma 5.16.

To begin with, let $\gamma$ denote a small universal constant to be chosen,
and let $\sigma_{\gamma}$ denote the constant from Lemma 5.9 corresponding to
this $\gamma$. Choose $\sigma$ such that $\sigma/\sigma_{\gamma}\ll 1$. This
choice of $\sigma$ fixes $\tilde{\delta}$, $c_{0}$ and $\rho_{0}$ as in the
statement of Lemma 5.1.

Step 1: Initiation.

For $u$ satisfying the conditions in the proposition, let

$u_{0}:=u_{(1/2)},\hskip 5.0ptp_{0}:=u_{\frac{7}{2}},\hskip
5.0ptd_{0}:=d,\text{ and }w_{0}=W_{\frac{7}{2}}(u_{0};1).$

Recall the notation for rescaling from (2.5), and the Weiss energy functional
from (2.6).

Let $\varepsilon_{p}$ be as in (5.1), then $\varepsilon_{p_{0}}=0.$ According
to definitions in Subsection 5.2, we have

$\kappa_{p_{0}}=0,$

and

$u_{0}\in\mathcal{S}(p_{0},d_{0},1).$

Consequently, if $\tilde{d}$ is small, then $d_{0}<\tilde{\delta}$ and
$\varepsilon_{p_{0}}<\tilde{\delta}$ as in Lemma 5.1. Moreover, by Lemma 5.7,
we have

(6.1) $w_{0}\leq Cd_{0}^{2}.$

Step 2: Induction.

Suppose for $k=0,\dots,n-1$, we have found $(u_{k},p_{k},d_{k})$ such that
$u_{k}\in\mathcal{S}(p_{k},d_{k},1)$, $\varepsilon_{p_{k}}<\tilde{\delta}$ and
$d_{k}<\tilde{\delta}$. We can apply the trichotomy in Lemma 5.1 to $u_{n-1}$.

If possibility (1) happens, we let

$p_{n}:=p_{n-1},\text{ and }d_{n}=Cd_{n-1}.$

If possibility (2) happens, we let

$p_{n}:=p^{\prime},\text{ and }d_{n}=\frac{1}{2}d_{n-1}.$

In both cases, we let

$u_{n}:=(u_{n-1})_{(\rho_{0})},\text{ and }w_{n}:=W_{\frac{7}{2}}(u_{n};1).$

We claim that until possibility (3) happens, Lemma 5.1 remains applicable. To
be precise, we have

(6.2) $\text{ Claim: Until $d_{n}\leq\varepsilon_{p_{n}}^{5}$, we have
}\kappa_{p_{k}}\leq d_{k},\hskip 5.0ptw_{k}\leq Cd_{k}^{6/5},\text{ and
}d_{k}<\tilde{\delta}\text{ for all $k\leq n$.}$

To see this claim, we first notice that all three comparisons are true when
$k=0$. It suffices to show that they stay true in the iteration.

Note that each time possibility (1) happens, $\kappa_{p_{k}}=\kappa_{p_{k-1}}$
and $d_{k}>d_{k-1}$. Each time possibility (2) happens, we have
$\kappa_{p_{k}}\leq\sigma d_{k-1}=2\sigma d_{k}.$ We see that if
$\sigma<\frac{1}{2}$, then the comparison between $\kappa_{p_{k}}$ and $d_{k}$
stays true.

With this, we can apply Lemma 5.7 to see that

$w_{k}\leq C(d_{k-1}^{2}+\kappa_{p_{k-1}}^{2}+\varepsilon_{p_{k-1}}^{6})\leq
C(d_{k-1}^{2}+\varepsilon_{p_{k-1}}^{6}).$

With $d_{k-1}\geq\varepsilon_{p_{k-1}}^{5}$, we have

$w_{k}\leq Cd_{k-1}^{6/5}\leq Cd_{k}^{6/5}.$

It remains to see the comparison between $d_{k}$ and $\tilde{\delta}$. Note
that $d_{k}$ decreases if possibility (2) happens, thus we only need to prove
the comparison when possibility (1) happens. In this case, using Lemma 2.1 and
our assumption that $0$ is a point with frequency $\frac{7}{2}$, we have

$w_{0}\geq w_{k-1}-w_{k}\geq c_{0}^{2}d_{k-1}^{2}.$

With (6.1), this implies

$d_{k}=Cd_{k-1}\leq Cd_{0}\leq C\tilde{d}.$

Consequently, $d_{k}$ stays below $\tilde{\delta}$ if $\tilde{d}$ is chosen
small.

In summary, the claim (6.2) holds.

From here we see that until $d_{n}\leq\varepsilon_{p_{n}}^{5}$, the double
sequence $(w_{k},d_{k})$ satisfies the conditions in Lemma 2.2 with
$\gamma=\frac{1}{5}$. In particular, if $\tilde{d}$ is chosen small, then
$\sum d_{k}$ is small.

Recall that the deviation in the coefficients of $p_{k}$ is comparable to
$\sum d_{k}$, and that $p_{0}=u_{\frac{7}{2}}$. If we denote

$p_{k}=a_{0}^{k}u_{\frac{7}{2}}+a_{1}^{k}v_{\frac{5}{2}}+a_{2}^{k}v_{\frac{3}{2}}+a_{3}^{k}v_{\frac{1}{2}},$

then $a_{0}^{k}$ stays in $[\frac{1}{2},2]$. By choosing $\tilde{d}$ smaller
if necessary, we ensure that $\varepsilon_{p_{k}}$, as defined in (5.1), stays
below $\tilde{\delta}$.

Therefore, until $d_{n}\leq\varepsilon_{p_{n}}^{5}$, the conditions in Lemma
5.1 are satisfied, and we can iterate this lemma to continue the sequence
$(u_{n},p_{n},d_{n})$.

In particular, if $d_{n}$ stays above $\varepsilon_{p_{n}}^{5}$ indefinitely,
we can apply the same argument in Section 5 of [SY2] to conclude

$|u-u_{\frac{7}{2}}|\leq O(|x|^{\frac{7}{2}}|\log|x||^{-c_{0}})$

up to a normalization.

We now analyze the case when $d_{n}$ drops below $\varepsilon_{p_{n}}^{5}.$

Step 3: Adjustment when $d_{n}\leq\varepsilon_{p_{n}}^{5}$.

Suppose this happens for the first time at step $n$ in the iteration, then
possibility (2) from Lemma 5.1 happens at this step. In particular, we have

$d_{n}=\frac{1}{2}d_{n-1},\hskip 5.0pt\kappa_{p_{n}}\leq\sigma d_{n-1}\leq
2\sigma d_{n},$

and

$\|u_{n}-\overline{p}_{n}\|_{L^{\infty}(B_{1})}\leq\frac{1}{4}d_{n-1}.$

As a result, we have

$\varepsilon_{p_{n-1}}^{5}\leq d_{n-1}\leq 2\varepsilon_{p_{n}}^{5}.$

Also note that in this case, the coefficients of $p_{n}$ deviates from those
of $p_{n-1}$ by $O(d_{n-1})$, the definition of $\varepsilon_{p}$ in (5.1)
gives

(6.3) $\varepsilon_{p_{n}}^{5}\leq\varepsilon_{p_{n-1}}^{5}+Cd_{n-1}^{7/5}\leq
d_{n-1}(1+Cd_{n-1}^{2/5})\leq 2d_{n-1}$

if $\tilde{d}$ is small.

If we denote by

$p_{n,ext}=p_{n}+b_{1}^{\pm,n}\varepsilon_{p_{n}}^{4}\chi_{\\{\pm
x_{1}>0\\}}v_{-\frac{1}{2}}+b_{2}^{\pm,n}\varepsilon_{p_{n}}^{5}\chi_{\\{\pm
x_{1}>0\\}}v_{-\frac{3}{2}},$

where the coefficients $b_{j}^{\pm}$ are from Remark 5.4, then Lemma 5.5 gives

$|b_{1}^{+,n}-b_{1}^{-,n}|\varepsilon_{p_{n}}^{4}+|b_{2}^{+,n}-b_{2}^{-,n}|\varepsilon_{p_{n}}^{5}\leq
C\kappa_{p_{n}}\leq C\sigma d_{n-1}\leq
C\sigma\varepsilon_{p_{n}}^{5}<\sigma_{\gamma}\varepsilon^{5}_{p_{n}}$

by our choice of $\sigma/\sigma_{\gamma}\ll 1$ before Step 1.

This allows us to apply Lemma 5.9, leading to

(6.4)
$q=a_{0}^{\prime}u_{\frac{7}{2}}+a_{1}^{\prime}\varepsilon_{p_{n}}v_{\frac{5}{2}}+a_{2}^{\prime}\varepsilon_{p_{n}}^{2}v_{\frac{3}{2}}+a_{3}^{\prime}\varepsilon_{p_{n}}^{3}v_{\frac{1}{2}}$

such that

(6.5)
$\|\overline{p}_{n}-\operatorname{U}_{\tau\varepsilon_{p_{n}}}(\bar{q})\|_{L^{\infty}(B_{1})}\leq\gamma\varepsilon_{p_{n}}^{5}.$

Depending on the size of $a_{2}^{\prime}$, we divide the discussion into two
cases.

Step 4: The case when $a_{2}^{\prime}\leq\frac{1}{16}$ each time the
adjustment in Step 3 is made.

In this case, we define $p_{n}^{\prime}=q$, then up to a rotation, we have

$\|u_{n}-\overline{p^{\prime}}_{n}\|_{L^{\infty}(B_{1})}\leq\frac{1}{4}d_{n-1}+\gamma\varepsilon_{p_{n}}^{5}\leq\frac{1}{4}d_{n-1}+2\gamma
d_{n-1}\leq\frac{1}{2}d_{n-1}$

if $\gamma$ is small. Note that we used (6.3) and (6.5).

In particular, with $d_{n}=\frac{1}{2}d_{n-1}$ we still have

$u_{n}\in\mathcal{S}(p_{n}^{\prime},d_{n},1).$

Meanwhile, in this case, Lemma 5.9 gives

$|a_{1}^{\prime}|^{2}\leq\frac{84}{25}|a_{2}^{\prime}|+\gamma\leq\frac{1}{4},\hskip
5.0pt|a_{2}^{\prime}|\leq\frac{1}{16},\text{ and }|a_{3}^{\prime}|\leq\gamma.$

By (6.4) and (5.1), we have

$\varepsilon_{p_{n}^{\prime}}\leq\frac{1}{2}\varepsilon_{p_{n}}.$

Consequently, if $a_{2}^{\prime}\leq\frac{1}{16}$ each time the adjustment
happens, after this adjustment, we have

$d_{n}=\frac{1}{2}d_{n-1}\geq\frac{1}{4}\varepsilon_{p_{n}}^{5}\geq
8\varepsilon_{p_{n}^{\prime}}^{5},$

and the induction in Step 2 can be continued, leading to

$|u-u_{\frac{7}{2}}|\leq O(|x|^{\frac{7}{2}}|\log|x||^{-c_{0}})$

with the argument in Section 5 of [SY2] .

Step 5: The case when $a_{2}^{\prime}\geq\frac{1}{16}$ at one time the
adjustment in Step 3 is made.

Suppose after the adjustment described in Step 3, we have

$q=a_{0}^{\prime}u_{\frac{7}{2}}+a_{1}^{\prime}\varepsilon_{p_{n}}v_{\frac{5}{2}}+a_{2}^{\prime}\varepsilon_{p_{n}}^{2}v_{\frac{3}{2}}+a_{3}^{\prime}\varepsilon_{p_{n}}^{3}v_{\frac{1}{2}}$

with $a_{2}^{\prime}\geq\frac{1}{16}$.

In this case, with the reasoning in Remark 5.6, we find a solution to the thin
obstacle problem $\hat{q}$ such that

(6.6) $|q-\operatorname{U}_{\tau\varepsilon_{p_{n}}}(\hat{q})|\leq
C\gamma\varepsilon_{p_{n}}^{3}\text{ in }\\{r>\eta/2\\}\cap B_{1}.$

With (6.5), (6.6), and $d_{n}\leq\varepsilon_{p_{n}}^{5}$, we have, up to a
rotation

$|u_{n}-\hat{q}|\leq C\gamma\varepsilon_{p_{n}}^{3}\text{ in }B_{1}.$

From here, we fix the parameter $\varepsilon$ by

$\varepsilon=\varepsilon_{p_{n}},$

and relabeling our sequence

$u_{0}:=u_{n},\hskip 5.0ptp_{0}:=\hat{q},\text{ and
}d_{0}:=C\gamma\varepsilon^{3}.$

Then

$u_{0}\in\mathcal{S}(p_{0},d_{0},1)$

where the class $\mathcal{S}$ is defined in Definition 5.5. Moreover, with
$p_{0}$ solving the thin obstacle problem, we can apply Lemma 5.14 to get

(6.7) $w_{0}:=W(u_{0};1)\leq Cd_{0}^{2}\leq C\gamma^{2}\varepsilon^{6}.$

If $\tilde{d}$ is chosen small enough, then $\varepsilon<\tilde{\varepsilon}$
from Lemma 5.16. Similar to Step 2, we apply Lemma 5.16 iteratively and obtain
a sequence $(u_{n},p_{n},d_{n})$ with

$u_{n}\in\mathcal{S}(p_{n},d_{n},1).$

Note that if alternative (1) in Lemma 5.16 happens, we apply (6.7) to get

$c_{0}^{2}d_{n}^{2}\leq w_{n-1}-w_{n}\leq w_{0}\leq
C\gamma^{2}\varepsilon^{6}.$

With a similar argument for comparison between $d$ and $\tilde{\delta}$ in
claim (6.2), this implies

$d_{n}\leq C\gamma\varepsilon^{3}\text{ for all }n.$

With a similar argument for comparison between $\kappa$ and $d$ in claim
(6.2), we have

$\kappa_{p_{n}}\leq d_{n}\text{ for all }n.$

Consequently, with Lemma 5.14, we have

$w_{n}=W_{\frac{7}{2}}(u_{n};1)\leq Cd_{n}^{2}.$

Therefore, the double sequence $(w_{n},d_{n})$ satisfies the condition in
Lemma 2.2 for $\gamma=1$, and we have

$\sum d_{n}\leq C(d_{0}^{2}+w_{0})^{1/2}\leq C\gamma\varepsilon^{3}.$

In particular, the deviation for coefficients of $p_{n}$ is of order
$C\gamma$. Consequently, if $\gamma$ is universally small, the conditions on
the coefficients from Lemma 5.16 are satisfied, and Lemma 5.16 can be applied
indefinitely. With the same argument in Section 5 of [SY2], we conclude

$|u-p|\leq O(|x|^{\frac{7}{2}+c_{0}})$

up to a normalization for some
$p\in\mathcal{F}_{1}\backslash\\{u_{\frac{7}{2}}\\}.$ ∎

With a similar argument, we can apply Lemma 3.4 and Lemma 4.9 to establish the
following:

######  Proposition 6.2.

For a solution $u$ to the thin obstacle problem (1.1) in
$B_{1}\subset\mathbb{R}^{3}$, suppose that its frequency at $0$ is
$\frac{7}{2}$, and that

$|u-p|\leq d\text{ in }B_{1}$

for some $p\in\mathcal{F}_{1}$ and
$|p-u_{\frac{7}{2}}|\geq\frac{1}{2}\tilde{d}$, where $\tilde{d}$ is the
universal constant from Proposition 6.1.

There is a small universal $\bar{d}>0$, such that if $d<\bar{d},$ then up to a
normalization

$|u-p^{\prime}|\leq O(|x|^{\frac{7}{2}+c_{0}})$

for some $p^{\prime}\in\mathcal{F}_{1}\backslash\\{u_{\frac{7}{2}}\\}$.

Here $c_{0}>0$ is universal.

With these two propositions in hand, we sketch the proofs for the main
results.

###### Proof of Theorem 1.1.

For a $\frac{7}{2}$-homogeneous solution $u$ as in Theorem 1.1, we see that if
$d<\min\\{\tilde{d},\bar{d}\\}$ with $\tilde{d}$ and $\bar{d}$ from
Proposition 6.1 and Proposition 6.2 respectively, then

$|u-p|=o(|x|^{\frac{7}{2}})\text{ as }x\to 0$

for some $p\in\mathcal{F}_{1}$.

From here the homogeneity of $u$ leads to $u=p.$ ∎

###### Proof of Theorem 1.2.

Suppose that $p\in\mathcal{F}_{1}$ is a blow-up profile of $u$ at $0$. Then up
to a rescaling we have

$|u-p|\leq\min\\{\tilde{d},\bar{d}\\}\text{ in }B_{1}$

for $\tilde{d}$ and $\bar{d}$ from Proposition 6.1 and Proposition 6.2, which
leads to

$|u-p^{\prime}|=o(|x|^{\frac{7}{2}})\text{ as }x\to 0$

for some $p^{\prime}\in\mathcal{F}_{1}$ up to a normalization.

However, with $p$ being a blow-up profile, this forces $p^{\prime}=p$. From
here we either apply Proposition 6.1 or Proposition 6.2 to get the desired
rate of convergence. ∎

With this rate of convergence, the stratification in Theorem 1.3 follows from
the Whitney extension lemma. See, for instance, [GP, CSV]. We sketch the proof
for the more precise Remark 1.3:

###### Proof of Remark 1.3.

Case 1: the solution blows up to $u_{\frac{7}{2}}$ at $0$.

With the rate of convergence in Theorem 1.2 and Lemma 5.8, we see that in a
ball of radius $r$, the free boundary $\partial_{\mathbb{R}^{n-1}}\Lambda(u)$
is trapped between two parallel lines with distance $r|\log(r)|^{-c_{0}}$.
This is the desired $C^{1,\log}$-regularity of the free boundary at a point
where $u_{\frac{7}{2}}$ is the blow-up profile.

Case 2: the solution blows up to
$p\in\mathcal{F}_{1}\backslash\\{u_{\frac{7}{2}}\\}$ at $0$.

Now suppose $p\in\mathcal{F}_{1}\backslash\\{u_{\frac{7}{2}}\\}$ is a blow-up
profile at $0$, we need to find $\rho>0$ such that
$\Lambda_{\frac{7}{2}}(u)\cap B_{\rho}=\\{0\\}.$ If the conditions
$p|_{\\{x_{3}=0\\}}\geq 0$ and $\Delta p|_{\\{x_{3}=0\\}}\leq 0$ are not
degenerate, the conclusion follows from a standard blow-up argument.

We give the proof when $p=p_{dc}$, the doubly critical profile from (4.4).

Suppose, on the contrary, that there is a sequence
$x_{k}\in\Lambda_{\frac{7}{2}}(u)\to 0.$ With the notation from (2.5), we
define

$u_{k}:=u_{(|x_{k}|)}.$

With the Hölder rate of convergence from Theorem 1.2 and Lemma 4.6, we have
that $x_{k}/|x_{k}|$ converges to the two rays of degeneracies $R^{\pm}$ from
(4.1) or $\\{r=0\\}$. On the other hand, for $p_{dc}$, points on
$R^{\pm}\cup\\{r=0\\}$ have frequencies in $\\{1,\frac{3}{2},2\\}$, all
bounded away from $\frac{7}{2}$. This implies that $x_{k}/|x_{k}|$ has
frequency bounded away from $\frac{7}{2}$, a contradiction. ∎

##  Appendix A Fourier expansion in spherical caps

In this appendix, we study the decay of a harmonic function in a slit domain
near the boundary of a spherical cap if some of its Fourier coefficients
vanish along a smaller cap.

Recall that we use $(x_{1},r,\theta)$ as the coordinate system for
$\mathbb{R}^{3}$, where $r\geq 0$ and $\theta\in(-\pi,\pi]$ are the polar
coordinates for the $(x_{2},x_{3})$-plane. For small $r_{0}>0$, the
$r_{0}$-spherical cap is defined as

$\mathcal{C}_{r_{0}}:=\\{r<r_{0},\hskip 5.0ptx_{1}>0\\}\cap\mathbb{S}^{2}.$

The main result of this appendix is

######  Lemma A.1.

For two small parameters $\eta,\varepsilon$ with $\varepsilon\ll\eta$, suppose
that $v$ is a bounded solution to

$\begin{cases}(\Delta_{\mathbb{S}^{2}}+\lambda_{\frac{7}{2}})v=0&\text{ in
}\widehat{\mathcal{C}_{\eta}\backslash\mathcal{C}_{\varepsilon}},\\\
v=0&\text{ on
}\partial\mathcal{C}_{\eta}\cup\widetilde{\mathcal{C}_{\eta}\backslash\mathcal{C}_{\varepsilon}}.\end{cases}$

If we have, for $n=0,1,\dots,m-1$,

$\int_{\partial\mathcal{C}_{\varepsilon}}v\cdot\cos((n+\frac{1}{2})\theta)=0,$

then

$\sup_{\mathcal{C}_{\eta}\backslash\mathcal{C}_{\eta/2}}|v|\leq
C^{m}\varepsilon^{m+\frac{1}{2}}\cdot\sup_{\partial\mathcal{C}_{\varepsilon}}|v|$

for a constant $C$ depending only on $\eta.$

Recall the notations for slit domains and homogeneous harmonic functions in
slit domains from (2.10) and (2.13).

###### Proof.

With the functions from (2.17), we define, for $n=0,1,\dots$,

$f_{n}(x_{1},r,\theta):=u_{-(n+\frac{1}{2})}\cdot\sum_{0\leq k\leq
k^{*}}a_{k}x_{1}^{n+4-2k}r^{2k}$

where $k^{*}$ satisfies $(n-2k^{*}+4)(n-2k^{*}+3)=0$, $a_{0}=1$, and

(A.1) $a_{k}(n-2k+4)(n-2k+3)=a_{k+1}(2n-2k-1)(2k+2).$

It is elementary to verify that $f_{n}$ is $\frac{7}{2}$-homogeneous and
harmonic in $\widehat{\mathbb{R}^{3}}$.

By the iterative relation (A.1), we can find a universal large constant $M$
such that

$|a_{k}|\leq M^{n}\text{ for }k=0,1,\dots,k^{*}.$

As a result, by taking $M$ larger if necessary, we have

$|f_{n}|\leq r^{-n-\frac{1}{2}}[1+r^{2}M^{n}]\text{ in }\mathcal{C}_{\eta}.$

On the other hand, we have $f_{n}(x_{1},r,0)\geq
r^{-n-\frac{1}{2}}[1-r^{2}M^{n}]$ in $\mathcal{C}_{\eta}$, which gives

$f_{n}(x_{1},\varepsilon,0)\geq\frac{1}{2}\varepsilon^{-n-\frac{1}{2}}$

if $\varepsilon$ is small and $n\leq 5.$ For $n\geq 6,$ the same comparison
follows directly from the fact that $a_{k}\geq 0$ for all $k$ if $n\geq 6.$

Consequently, the ratio $f_{n}(r,\theta)/f_{n}(\varepsilon,0)$ satisfies

$f_{n}(\varepsilon,\theta)/f_{n}(\varepsilon,0)=\cos((n+\frac{1}{2})\theta)$

and

$|f_{n}(r,\theta)/f_{n}(\varepsilon,0)|\leq\varepsilon^{n+\frac{1}{2}}r^{-n-\frac{1}{2}}M^{n}\text{
in }\mathcal{C}_{\eta}$

by choosing $M$ larger if necessary.

For each $n$, let $\varphi_{n}$ denote the solution to

$\begin{cases}(\Delta_{\mathbb{S}^{2}}+\lambda_{\frac{7}{2}})\varphi_{n}=0&\text{
in }\widehat{\mathcal{C}_{\eta}\backslash\mathcal{C}_{\varepsilon},}\\\
\varphi_{n}=\cos((n+\frac{1}{2})\theta)&\text{ along
$\partial\mathcal{C}_{\varepsilon}$,}\\\ \varphi_{n}=0&\text{ along
}\partial\mathcal{C}_{\eta}\cup\widetilde{\mathcal{C}_{\eta}\backslash\mathcal{C}_{\varepsilon}}.\end{cases}$

With the maximum principle, we have

$|\varphi_{n}-\frac{f_{n}(r,\theta)}{f_{n}(\varepsilon,0)}|\leq\varepsilon^{n+\frac{1}{2}}\eta^{-n-\frac{1}{2}}M^{n}\text{
in }\mathcal{C}_{\eta}\backslash\mathcal{C}_{\varepsilon},$

which implies

$|\varphi_{n}|\leq C\varepsilon^{n+\frac{1}{2}}r^{-n-\frac{1}{2}}M^{n}\text{
in }\mathcal{C}_{\eta}\backslash\mathcal{C}_{\varepsilon}.$

Now with $\\{\cos((n+\frac{1}{2})\theta)\\}$ being a basis for
$L^{2}(\partial\mathcal{C}_{\varepsilon})$, for $v$ as in the statement of the
lemma, we can write $v=\sum c_{n}\varphi_{n}$ where

$c_{n}=\frac{\int_{\partial\mathcal{C}_{\varepsilon}}v\cdot\cos((n+\frac{1}{2})\theta)}{\int_{\partial\mathcal{C}_{\varepsilon}}\cos^{2}((n+\frac{1}{2})\theta)}.$

For $r\geq\eta/2$, this implies

$|v(r,\theta)|\leq(\sum c_{n}^{2})^{\frac{1}{2}}(\sum_{c_{n}\neq
0}\varphi_{n}(r,\theta)^{2})^{\frac{1}{2}}\leq
C\sup_{\partial\mathcal{C}_{\varepsilon}}|v|\cdot(\sum_{c_{n}\neq
0}\varepsilon^{2n+1}M^{2n})^{1/2}$

for a constant $C$ depending on $\eta$.

With our assumption on $v$, we have $c_{n}=0$ for $n\leq m-1$. The conclusion
follows by observing

$\sum_{n\geq m}\varepsilon^{2n+1}M^{2n}\leq C\varepsilon^{2m+1}M^{2m}.$

∎

##  Appendix B The thin obstacle problem in $\mathbb{R}^{2}$

Our treatment of solutions near
$u_{\frac{7}{2}}=r^{\frac{7}{2}}\cos(\frac{7}{2}\theta)$ relies on a fine
analysis of the thin obstacle problem in tiny spherical caps around
$\mathbb{S}^{2}\cap\\{r=0\\}$. In the limit, this problem leads to the thin
obstacle problem in $\mathbb{R}^{2}$ with prescribed expansion at infinity.

In this section, we use $(r,\theta)$ to denote the polar coordinates of
$\mathbb{R}^{2}=\\{(x_{1},x_{2})\\}$. The notations for slit domains from
(2.9) and (2.10) carry over with straightforward modifications. We will also
take advantage of the functions from (1.6) and (2.17). Similar to the
functions in (2.16), in this appendix, we denote the derivatives of
$u_{\frac{7}{2}}$ by the following555The two bases
$\\{u_{\frac{7}{2}},u_{\frac{5}{2}},u_{\frac{3}{2}},u_{\frac{1}{2}}\\}$ and
$\\{u_{\frac{7}{2}},w_{\frac{5}{2}},w_{\frac{3}{2}},w_{\frac{1}{2}}\\}$ are
related by  $w_{\frac{5}{2}}=\frac{7}{2}u_{\frac{5}{2}},\hskip
5.0ptw_{\frac{3}{2}}=\frac{35}{4}u_{\frac{3}{2}},\text{ and
}w_{\frac{1}{2}}=\frac{105}{8}u_{\frac{1}{2}}.$ :

$w_{\frac{5}{2}}:=\frac{\partial}{\partial x_{1}}u_{\frac{7}{2}},\hskip
5.0ptw_{\frac{3}{2}}:=\frac{\partial}{\partial x_{1}}w_{\frac{5}{2}},\text{
and }w_{\frac{1}{2}}:=\frac{\partial}{\partial x_{1}}w_{\frac{3}{2}}.$

The following two derivatives are singular near $\\{r=0\\}$:

(B.1) $w_{-\frac{1}{2}}:=\frac{\partial}{\partial x_{1}}w_{\frac{1}{2}},\text{
and }w_{-\frac{3}{2}}:=\frac{\partial}{\partial x_{1}}w_{-\frac{1}{2}}.$

Let
$p=u_{\frac{7}{2}}+a_{1}u_{\frac{5}{2}}+a_{2}u_{\frac{3}{2}}+a_{3}u_{\frac{1}{2}}=u_{\frac{7}{2}}+\tilde{a}_{1}w_{\frac{5}{2}}+\tilde{a}_{2}w_{\frac{3}{2}}+\tilde{a}_{3}w_{\frac{1}{2}}$,
then $p$ solves the thin obstacle problem in $\mathbb{R}^{2}$ if and only if

(B.2) $a_{2}\geq 0,\hskip 5.0pta_{3}=0,\text{ and
}a_{1}^{2}\leq\frac{84}{25}a_{2};\text{ equivalently, }\tilde{a}_{2}\geq
0,\hskip 5.0pt\tilde{a}_{3}=0,\text{ and
}\tilde{a}_{1}^{2}\leq\frac{12}{5}\tilde{a}_{2}.$

For $\tau\in\mathbb{R}$, the translation operator $\operatorname{U}_{\tau}$ is
defined by its action on points, sets, and functions in the following manner:

$\operatorname{U}_{\tau}(x_{1},x_{2})=(x_{1}+\tau,x_{2}),\quad\operatorname{U}_{\tau}(E)=\\{x:\operatorname{U}_{-\tau}x\in
E\\},\quad\operatorname{U}_{\tau}(f)(x)=f(\operatorname{U}_{-\tau}x).$

In this appendix, for
$p=u_{\frac{7}{2}}+a_{1}u_{\frac{5}{2}}+a_{2}u_{\frac{3}{2}}+a_{3}u_{\frac{1}{2}}$,
we study solutions to the thin obstacle problem in $\mathbb{R}^{2}$ with data
$p$ at infinity:

(B.3) $\begin{cases}&u\text{ solves \eqref{IntroTOP} in }\mathbb{R}^{2},\\\
&\sup_{\mathbb{R}^{2}}|u-p|<+\infty.\end{cases}$

The starting point is the following proposition:

######  Proposition B.1.

For $|a_{j}|\leq 1$, there is a unique solution to (B.3).

For this solution, there is a universal constant $A>0$ such that

$\sup_{\mathbb{R}^{2}}|u-p|\leq A;\hskip 5.0pt\Delta u=0\text{ in
}\widehat{\\{r>A\\}};\text{ and }u=0\text{ in }\widetilde{\\{r>A\\}}.$

Moreover, we can find $b_{1},b_{2}$ satisfying $|b_{j}|\leq A$ such that

$|u-(p+b_{1}u_{-\frac{1}{2}}+b_{2}u_{-\frac{3}{2}})|\leq
A|x|^{-2}u_{-\frac{1}{2}}\text{ for all }x\in\mathbb{R}^{2}.$

Recall the harmonic functions with negative homogeneities from (2.17).

######  Remark B.1.

For simplicity, we will denote the coefficients $b_{j}$ by
$b_{j}^{\mathbb{R}^{2}}[a_{1},a_{2},a_{3}]$ or simply
$b_{j}[a_{1},a_{2},a_{3}]$ when there is no ambiguity.

###### Proof.

Step 1: Uniqueness.

Suppose that $u_{1}$ and $u_{2}$ are two solutions to (1.1) in
$\mathbb{R}^{2}$ with $\sup|u_{j}-p|<+\infty.$ With a similar argument as in
Lemma 3.1, we find $R>0$ such that

$\Delta u_{j}=0\text{ in }\widehat{\\{r>R\\}},\text{ and }u_{j}=0\text{ in
}\widetilde{\\{r>R\\}}.$

Let $w(x):=(u_{1}-u_{2})(R^{2}x/|x|^{2})$ be the Kelvin transform of
$(u_{1}-u_{2})$ with respect to $\partial B_{R}$. Then $w$ is a harmonic
function in the slit domain $\widehat{B_{R}}$, as defined in (2.11). Applying
Theorem 2.1, we have $|w|\leq Cu_{\frac{1}{2}}\text{ in }B_{R},$ which implies

$|u_{1}-u_{2}|\leq Cu_{-\frac{1}{2}}\text{ in }\mathbb{R}^{2}.$

From here we have $u_{1}=u_{2}$ bythe maximum principle.

Step 2: A barrier function.

Rewrite $p$ in the basis
$\\{u_{\frac{7}{2}},w_{\frac{5}{2}},w_{\frac{3}{2}},w_{\frac{1}{2}}\\}$ as
$p=u_{\frac{7}{2}}+\tilde{a}_{1}w_{\frac{5}{2}}+\tilde{a}_{2}w_{\frac{3}{2}}+\tilde{a}_{3}w_{\frac{1}{2}}$.

For $\tau>0$ to be chosen, if we let $(\alpha_{1},\alpha_{2})$ denote the
solution to

$\alpha_{1}+\tau=\tilde{a}_{1},\text{ and
}\alpha_{2}+\alpha_{1}\tau+\frac{1}{2}\tau^{2}=\tilde{a}_{2},$

and define

$q=u_{\frac{7}{2}}+\alpha_{1}w_{\frac{5}{2}}+\alpha_{2}w_{\frac{3}{2}},$

then Taylor’s Theorem gives

$\operatorname{U}_{-\tau}(q)-p\geq(\frac{1}{6}\tau^{3}-\frac{1}{2}\tilde{a}_{1}\tau^{2}+\tilde{a}_{2}\tau)u_{\frac{1}{2}}-C\tau^{4}u_{-\frac{1}{2}}.$

Choosing $\tau$ large universally, then

$\operatorname{U}_{-\tau}(q)-p\geq 0\text{ on }\\{r\geq A\\}$

for a universal large $A$.

By choosing $\tau$ larger, if necessary, it is elementary to verify that
$(\alpha_{1},\alpha_{2})$ satisfies condition (B.2), and consequently,
$Q:=\operatorname{U}_{-\tau}q$ solves the thin obstacle problem in
$\mathbb{R}^{2}.$

Step 3: Existence, universal boundedness, and localization of contact set.

For large $n\in\mathbb{N}$, let $u_{n}$ be the solution to the thin obstacle
problem (1.1) in $B_{n}$ with $u_{n}=p$ along $\partial B_{n}$.

By the maximum principle, we have

(B.4) $u_{n}\geq p\text{ in }B_{n},\text{ and }u_{n}\leq Q\text{ in }B_{n}$

if $n$ is large. Consequently, this family $\\{u_{n}\\}$ is locally uniformly
bounded. Therefore, we can extract a subsequence converging to some
$u_{\infty}$ locally uniformly on $\mathbb{R}^{2}$. This limit $u_{\infty}$
solves the thin obstacle problem in $\mathbb{R}^{2}$.

With (B.4), we have $u_{n}=0\text{ in }B_{n}\cap\\{x_{1}\leq-A,x_{2}=0\\}$ and
$u_{n}\geq 1\text{ in }B_{n}\cap\\{x_{1}\geq A,x_{2}=0\\}$ for a universal
$A>0$. Thus we have

$\Delta u_{\infty}=0\text{ in }\widehat{\\{r>A\\}};\text{ and
}u_{\infty}=0\text{ in }\widetilde{\\{r>A\\}}.$

Along $\\{r=A\\}$, we have $0\leq u_{\infty}-p\leq Q-p\leq C$. Thus the
maximum principle, applied in the domain$\\{r>A\\}$, gives

$|u_{\infty}-p|\leq C$

for a universal constant $C$. In particular, $u_{\infty}$ is the unique
solution to (B.3), according to Step 1.

Step 4: Finer expansion.

Let $w(x):=(u-p)(A^{2}x/|x|^{2})$ be the Kelvin transform of $(u-p)$ with
respect to $\partial B_{A}$. Results from the previous step implies that $w$
is a harmonic function in the slit domain $\widehat{B_{A}}$. An application of
Theorem 2.1 gives universally bounded $b_{1}$ and $b_{2}$ such that

$|w-(b_{1}u_{\frac{1}{2}}+b_{2}u_{\frac{3}{2}})|\leq
C|x|^{2}u_{\frac{1}{2}}\text{ in }B_{A}.$

Inverting the Kelvin transform, we have

$|u-(p+b_{1}u_{-\frac{1}{2}}+b_{2}u_{-\frac{3}{2}})|\leq
C|x|^{-2}u_{-\frac{1}{2}}\text{ in }\mathbb{R}^{2}.$

∎

For the solution from the previous proposition, we have precise information on
its first two Fourier coefficients along big circles:

######  Corollary B.1.

With the same assumptions and notations from Proposition B.1, we have

$\int_{\partial
B_{R}}[u-(p+b_{1}u_{-\frac{1}{2}}+b_{2}u_{-\frac{3}{2}})]\cdot\cos(\frac{1}{2}\theta)=0$

and

$\int_{\partial
B_{R}}[u-(p+b_{1}u_{-\frac{1}{2}}+b_{2}u_{-\frac{3}{2}})]\cdot\cos(\frac{3}{2}\theta)=0$

for all $R\geq A.$

###### Proof.

For simplicity, let’s denote

$p_{ext}:=p+b_{1}u_{-\frac{1}{2}}+b_{2}u_{-\frac{3}{2}}.$

With Proposition B.1, we have $\Delta(u-p_{ext})=0\text{ in
}\widehat{\\{r>A\\}},\text{ and }u-p_{ext}=0\text{ in }\widetilde{\\{r>A\\}}.$

For $R>A$, define
$v:=(r^{\frac{1}{2}}-Rr^{-\frac{1}{2}})\cos(\frac{1}{2}\theta)$. Then

$\Delta v=0\text{ in }\widehat{\mathbb{R}^{2}},\text{ and }v=0\text{ along
}\widetilde{\\{r>0\\}}.$

With these properties, we have, for $L>R$,

$0=\int_{B_{L}\backslash B_{R}}(u-p_{ext})\cdot\Delta v-\Delta(u-p_{ext})\cdot
v=\int_{\partial(B_{L}\backslash B_{R})}(u-p_{ext})_{\nu}\cdot
v-(u-p_{ext})\cdot v_{\nu}.$

Along $\partial B_{L}$, we have $|u-p_{ext}|=O(L^{-\frac{5}{2}})$,
$|(u-p_{ext})_{\nu}|=O(L^{-\frac{7}{2}})$, $|v|=O(L^{\frac{1}{2}})$ and
$|v_{\nu}|=O(L^{-\frac{1}{2}})$, thus

$\int_{\partial B_{L}}(u-p_{ext})_{\nu}\cdot v-(u-p_{ext})\cdot
v_{\nu}=O(L^{-2}).$

Along $\partial B_{R}$, we have $v=0$ and
$v_{\nu}=-R^{-\frac{1}{2}}\cos(\frac{1}{2}\theta).$ Combining all these we
have

$\int_{\partial
B_{R}}(u-p_{ext})\cdot\cos(\frac{1}{2}\theta)=O(R^{\frac{1}{2}}L^{-2}).$

Sending $L\to\infty$ gives the first conclusion. The second follows from a
similar argument. ∎

The following lemma is one of the main reasons for the restriction to 3d in
the main part of this work:

######  Lemma B.1.

Given functions

$p=u_{\frac{7}{2}}+a_{1}u_{\frac{5}{2}}+a_{2}u_{\frac{3}{2}}+a_{3}u_{\frac{1}{2}},\text{
and
}q=u_{\frac{7}{2}}-a_{1}u_{\frac{5}{2}}+a_{2}u_{\frac{3}{2}}-a_{3}u_{\frac{1}{2}}$

with $|a_{j}|\leq 1,$ suppose that $u$ and $v$ are solutions to (B.3) with $p$
and $q$ as data at infinity, respectively.

Assume $b_{1}[a_{1},a_{2},a_{3}]=b_{1}[-a_{1},a_{2},-a_{3}]$ and
$b_{2}[a_{1},a_{2},a_{3}]=-b_{2}[-a_{1},a_{2},-a_{3}]$, then we can find
universally bounded constants $\alpha_{1}$, $\alpha_{2}$ and $\tau$ such that

$u=\operatorname{U}_{\tau}(u_{\frac{7}{2}}+\alpha_{1}u_{\frac{5}{2}}+\alpha_{2}u_{\frac{3}{2}}),\text{
and
}v=\operatorname{U}_{-\tau}(u_{\frac{7}{2}}-\alpha_{1}u_{\frac{5}{2}}+\alpha_{2}u_{\frac{3}{2}}).$

Recall the definition of $b_{j}$’s from Remark B.1.

###### Proof.

Step 1: Two auxiliary polynomials.

For simplicity, let us define $b_{j}=b_{j}[a_{1},a_{2},a_{3}]$ for $j=1,2$,
and

$p_{ext}:=p+b_{1}u_{-\frac{1}{2}}+b_{2}u_{-\frac{3}{2}},\text{ and
}q_{ext}:=q+b_{1}u_{-\frac{1}{2}}-b_{2}u_{-\frac{3}{2}}.$

With Proposition B.1, we have

$|u-p_{ext}|+|v-q_{ext}|\leq A|x|^{-\frac{5}{2}}\text{ in $\mathbb{R}^{2}$,}$

which implies

(B.5) $|\nabla u-\nabla p_{ext}|+|\nabla v-\nabla q_{ext}|\leq
C|x|^{-\frac{7}{2}}\text{ for }|x|\geq 1.$

Since $u$ is an entire solution to the thin obstacle problem of order
$O(|x|^{\frac{7}{2}})$ at infinity, we see that
$(\partial_{x_{1}}u-i\partial_{x_{2}}u)^{2}$ is a polynomial of degree 5.
Meanwhile, a direct computation gives that

$(\partial_{x_{1}}p_{ext}-i\partial_{x_{2}}p_{ext})^{2}=\mathcal{P}(x_{1}+ix_{2})+\sum_{k=1}^{5}\mathcal{R}_{k}(x_{1}+ix_{2}),$

where $\mathcal{P}$ is a polynomial of degree $5$, and $\mathcal{R}_{k}$ is a
$(-k)$-homogeneous rational function for $k=1,2,\dots,5$.

With (B.5), it follows that

$(\partial_{x_{1}}u-i\partial_{x_{2}}u)^{2}=\mathcal{P}\text{ in
}\mathbb{R}^{2}.$

If we define

$P(t):=\operatorname{Re}(\partial_{x_{1}}u-i\partial_{x_{2}}u)^{2}(t,0)=[(\partial_{x_{1}}u)^{2}-(\partial_{x_{2}}u)^{2}](t,0)=\operatorname{Re}\mathcal{P}(t),$

then $P$ is a real polynomial of degree 5.

Similarly, corresponding to $v$ and $q_{ext}$, we have

$(\partial_{x_{1}}q_{ext}-i\partial_{x_{2}}q_{ext})^{2}=\mathcal{Q}(x_{1}+ix_{2})+\sum_{k=1}^{5}\mathcal{S}_{k}(x_{1}+ix_{2}),$

where $\mathcal{Q}$ is a polynomial of degree $5$, and $\mathcal{S}_{k}$ is a
$(-k)$-homogeneous rational function for $k=1,2,\dots,5$. Moreover, we have

$Q(t):=\operatorname{Re}(\partial_{x_{1}}v-i\partial_{x_{2}}v)^{2}(t,0)=[(\partial_{x_{1}}v)^{2}-(\partial_{x_{2}}v)^{2}](t,0)=\operatorname{Re}\mathcal{Q}(t),$

also a real polynomial of degree 5.

With $b_{1}[a_{1},a_{2},a_{3}]=b_{1}[-a_{1},a_{2},-a_{3}]$ and
$b_{2}[a_{1},a_{2},a_{3}]=-b_{2}[-a_{1},a_{2},-a_{3}]$, a direct computation
gives

(B.6) $P(t)=-Q(-t).$

Step 2: Half-space solutions.

With (B.6), we show that up to a translation, $u$ must be a half-space
solution. Since $u=0$ in $\widetilde{\\{r>A\\}}$ according to Proposition B.1,
it suffices to show that $\operatorname{spt}(\Delta u)$ has only one
component.

Suppose, on the contrary, that

$(-\infty,a]\cup[b,+\infty)\supset\operatorname{spt}(\Delta
u)\supset(-\infty,a]\cup[b,c]\text{ with }b>a,$

Note that the second component has to terminate in finite length since $\Delta
u=0$ in $\widehat{\\{r>A\\}}$.

On $(-\infty,a]\cup[b,c]$, we have $\partial_{x_{1}}u=0$. Thus
$P(t)=-(\partial_{x_{2}}u)^{2}\leq 0$ for $t\in(-\infty,a]\cup[b,c]$. On the
contrary, on $(a,b)$, $\partial_{x_{2}}u=0$ and
$P(t)=(\partial_{x_{1}}u)^{2}\geq 0$. Moreover, since $u(a)=u(b)=0$ and $u>0$
on $(a,b)$, we must have $\partial_{x_{1}}u(d)=0$ at some point $d\in(a,b)$.
Thus $P(d)=0$. Note that $d$ is a root of multiplicity at least 2. Together
with the roots $a,b,c$, this implies that $P$ cannot have other roots. See
Figure 4.

Figure 4. $P$ and $Q$ along the $x_{1}$-axis.

With the symmetry described in (B.6), if we let $b^{\prime}=-b$ and
$c^{\prime}=-c$, then $Q(b^{\prime})=Q(c^{\prime})=0$ while $Q>0$ on
$(b^{\prime},c^{\prime})$. This implies $v>0$ on $(b^{\prime},c^{\prime})$
while $v(b^{\prime})=v(c^{\prime})=0$. However, this implies that
$\partial_{x_{1}}v$ must vanish at some point on $(b^{\prime},c^{\prime}),$
and so does $Q$. This is a contradiction.

As a result, $\operatorname{spt}(\Delta u)$ must be a half line. A similar
result holds for $\operatorname{spt}(\Delta v).$ With (B.6), we see that if
$\operatorname{spt}(\Delta u)=(-\infty,a]$, then $\operatorname{spt}(\Delta
v)=(-\infty,-a].$

Step 4: Conclusion.

After the previous step, we can apply Theorem 2.1 to get

$\operatorname{U}_{-a}u=a_{0}^{\prime}u_{\frac{7}{2}}+\alpha_{1}u_{\frac{5}{2}}+\alpha_{2}u_{\frac{3}{2}}+a_{3}^{\prime}u_{\frac{1}{2}}.$

We must have $a_{3}^{\prime}=0$ by (B.2). With
$|u-(u_{\frac{7}{2}}+a_{1}u_{\frac{5}{2}}+a_{2}u_{\frac{3}{2}})|$ being
bounded in $\mathbb{R}^{2}$, we conclude $a_{0}^{\prime}=1.$ Therefore,

$\operatorname{U}_{-a}u=u_{\frac{7}{2}}+\alpha_{1}u_{\frac{5}{2}}+\alpha_{2}u_{\frac{3}{2}}.$

Similarly, we have

$\operatorname{U}_{a}v=u_{\frac{7}{2}}+\beta_{1}u_{\frac{5}{2}}+\beta_{2}u_{\frac{3}{2}}.$

From here, we use (B.6) to conclude $\alpha_{1}=\beta_{1}$ and
$\alpha_{2}=-\beta_{2}$. The conclusion follows. ∎

A perturbation of the previous lemma leads to the following corollary. Recall
notations from (B.1) and Remark B.1.

######  Corollary B.2.

Given
$p=u_{\frac{7}{2}}+a_{1}u_{\frac{5}{2}}+a_{2}u_{\frac{3}{2}}+a_{3}u_{\frac{1}{2}}=u_{\frac{7}{2}}+\tilde{a}_{1}w_{\frac{5}{2}}+\tilde{a}_{2}w_{\frac{3}{2}}+\tilde{a}_{3}w_{\frac{1}{2}}$
with $|a_{j}|\leq 1$, we set

$b_{j}^{+}:=b_{j}[a_{1},a_{2},a_{3}],\hskip
5.0ptb_{j}^{-}:=b_{j}[-a_{1},a_{2},-a_{3}]\text{ for }j=1,2,$

and

$p_{ext}=p+b_{1}^{+}u_{-\frac{1}{2}}+b_{2}^{+}u_{-\frac{3}{2}}=p+\tilde{b}_{1}^{+}w_{-\frac{1}{2}}+\tilde{b}_{2}^{+}w_{-\frac{3}{2}}.$

Then there is a universal modulus of continuity, $\omega$, such that

$\displaystyle|\tilde{a}_{1}-(\alpha_{1}+\tau)|+|\tilde{a}_{2}-(\alpha_{2}+\alpha_{1}\tau+\frac{1}{2}\tau^{2})|+|\tilde{a}_{3}-(\alpha_{2}\tau+\frac{1}{2}\alpha_{1}\tau^{2}+\frac{1}{6}\tau^{3})|$
$\displaystyle+|\tilde{b}_{1}^{+}-(\frac{1}{2}\alpha_{2}\tau^{2}+\frac{1}{6}\alpha_{1}\tau^{3}+\frac{1}{24}\tau^{4})|+|\tilde{b}_{2}^{+}-(\frac{1}{6}\alpha_{2}\tau^{3}+\frac{1}{24}\alpha_{1}\tau^{4}+\frac{1}{120}\tau^{5})|$
$\displaystyle\leq\omega(|b_{1}^{+}-b_{1}^{-}|+|b_{2}^{+}+b_{2}^{-}|)$

for universally bounded $\alpha_{j}$ and $\tau$ satisfying

(B.7) $\alpha_{2}\geq 0\text{ and }\alpha_{1}^{2}\leq\frac{12}{5}\alpha_{2}.$

###### Proof.

Suppose there is no such $\omega$, we find a sequence $(a_{j}^{n})$ such that
the corresponding $(b_{j}^{\pm,n})$ satisfy

(B.8) $|b_{1}^{+,n}-b_{1}^{-,n}|+|b_{2}^{+,n}+b_{2}^{-,n}|\to 0,$

but for any bounded $\alpha_{j}$ and $\tau$ satisfying (B.7), we have

(B.9)
$\displaystyle|\tilde{a}^{n}_{1}-(\alpha_{1}+\tau)|+|\tilde{a}^{n}_{2}-(\alpha_{2}+\alpha_{1}\tau+\frac{1}{2}\tau^{2})|+|\tilde{a}^{n}_{3}-(\alpha_{2}\tau+\frac{1}{2}\alpha_{1}\tau^{2}+\frac{1}{6}\tau^{3})|$
$\displaystyle+|\tilde{b}_{1}^{+,n}-(\frac{1}{2}\alpha_{2}\tau^{2}+\frac{1}{6}\alpha_{1}\tau^{3}+\frac{1}{24}\tau^{4})|+|\tilde{b}_{2}^{+,n}-(\frac{1}{6}\alpha_{2}\tau^{3}+\frac{1}{24}\alpha_{1}\tau^{4}+\frac{1}{120}\tau^{5})|$
$\displaystyle\geq\varepsilon>0$

Up to a subsequence, we have

$a_{j}^{n}\to a_{j}^{\infty}\text{ and }b_{j}^{\pm,n}\to b_{j}^{\pm,\infty}.$

If we take

$p_{n}^{+}=u_{\frac{7}{2}}+a^{n}_{1}u_{\frac{5}{2}}+a^{n}_{2}u_{\frac{3}{2}}+a^{n}_{3}u_{\frac{1}{2}}=u_{\frac{7}{2}}+\tilde{a}^{n}_{1}w_{\frac{5}{2}}+\tilde{a}^{n}_{2}w_{\frac{3}{2}}+\tilde{a}^{n}_{3}w_{\frac{1}{2}}$

and denote by $u^{+}_{n}$ the solution to (B.3) with data $p^{+}_{n}$ at
infinity, then by Proposition B.1, we have

$|u^{+}_{n}-p^{+}_{n}|\leq A\text{ in }\mathbb{R}^{2}.$

Up to a subsequence, we have $u^{+}_{n}$ locally uniformly converge to
$u^{+}_{\infty}$, a solution to the thin obstacle problem in $\mathbb{R}^{2}$.
Moreover, we have

$|u^{+}_{\infty}-[u_{\frac{7}{2}}+a^{\infty}_{1}u_{\frac{5}{2}}+a^{\infty}_{2}u_{\frac{3}{2}}+a^{\infty}_{3}u_{\frac{1}{2}}]|\leq
A\text{ in $\mathbb{R}^{2}$.}$

Thus $u^{+}_{\infty}$ is the solution to (B.3) with data
$p^{+}_{\infty}=u_{\frac{7}{2}}+a^{\infty}_{1}u_{\frac{5}{2}}+a^{\infty}_{2}u_{\frac{3}{2}}+a^{\infty}_{3}u_{\frac{1}{2}}$
at infinity.

With Corollary B.1, we see that $b_{j}^{+,\infty}:=b_{j}[a_{j}^{\infty}]=\lim
b_{j}^{+,n}.$ A similar argument applied to
$p_{n}^{-}=u_{\frac{7}{2}}-a^{n}_{1}u_{\frac{5}{2}}+a^{n}_{2}u_{\frac{3}{2}}-a^{n}_{3}u_{\frac{1}{2}}$
leads to
$b_{j}^{-,\infty}:=b_{j}[-a^{\infty},a_{2}^{\infty},-a_{3}^{\infty}]=\lim
b_{j}^{-,n}.$ With (B.8), we conclude

$b_{1}[a_{1}^{\infty},a_{2}^{\infty},a_{3}^{\infty}]=b_{1}[-a_{1}^{\infty},a_{2}^{\infty},-a_{3}^{\infty}]\text{
and
}b_{2}[a_{1}^{\infty},a_{2}^{\infty},a_{3}^{\infty}]=-b_{2}[-a_{1}^{\infty},a_{2}^{\infty},-a_{3}^{\infty}].$

Lemma B.1 gives

$u_{\infty}^{+}=\operatorname{U}_{\tau}(u_{\frac{7}{2}}+\alpha_{1}w_{\frac{5}{2}}+\alpha_{2}w_{\frac{3}{2}})$

for $\alpha_{j}$ satisfying (B.7).

Consequently, we have

$\displaystyle|\tilde{a}_{1}^{\infty}-(\alpha_{1}+\tau)|+|\tilde{a}^{\infty}_{2}-(\alpha_{2}+\alpha_{1}\tau+\frac{1}{2}\tau^{2})|+|\tilde{a}^{\infty}_{3}-(\alpha_{2}\tau+\frac{1}{2}\alpha_{1}\tau^{2}+\frac{1}{6}\tau^{3})|$
$\displaystyle+|\tilde{b}_{1}^{\infty,+}-(\frac{1}{2}\alpha_{2}\tau^{2}+\frac{1}{6}\alpha_{1}\tau^{3}+\frac{1}{24}\tau^{4})|+|\tilde{b}_{2}^{\infty,+}-(\frac{1}{6}\alpha_{2}\tau^{3}+\frac{1}{24}\alpha_{1}\tau^{4}+\frac{1}{120}\tau^{5})|=0.$

With convergence of $\tilde{a}_{j}^{n}\to\tilde{a}_{j}^{\infty}$ and
$\tilde{b}_{j}^{+,n}\to\tilde{b}_{j}^{+,\infty}$, this contradicts (B.9). ∎

## References

  * [Alm] Almgren, F. Dirichlet’s problem for multiple valued functions and the regularity of mass minimizing integral currents. Minimal submanifolds and geodesics (Proc. Japan-United States Sem., Tokyo, 1977), 1-6, North-Holland, Amsterdam-New York, 1979.
  * [AC] Athanasopoulos, I.; Caffarelli, L.A. Optimal regularity of lower dimensional obstacle problems. Zap. Nauchn. Sem. S.-Petersburg. Otdel. Mat. Inst. Steklov. 310 (2004), Kraev. Zadachi Mat. Fiz. i Smezh. Vopr. Teor. Funktzs. 35, 49-66.
  * [ACS] Athanasopoulos, I.; Caffarelli, L.A.; Salsa, S. The structure of the free boundary for lower dimensional obstacle problems. Amer. J. Math. 130 (2008), no. 2, 485-498.
  * [CSV] Colombo, M.; Spolaor, L.; Velichkov, B. Direct epiperimetric inequalities for the thin obstacle problem and applications. Comm. Pure Appl. Math. 73 (2020), no. 2, 384-420.
  * [D] De Silva, D. Free boundary regularity for a problem with right hand side. Interfaces Free Bound. 13 (2011), no. 2, 223-238.
  * [DS1] De Silva, D.; Savin, O. Boundary Harnack estimates in slip domains and applications to thin free boundary problems. Rev. Mat. Iberoam. 32 (2016), no. 3, 891-912.
  * [DS2] De Silva, D.; Savin, O. $C^{\infty}$ regularity of certain thin free boundary problems. Indiana Univ. Math. J. 64 (2015), no. 5, 1575-1608.
  * [DL] Duvaut, G.; Lions, J.-L. Inequalities in mechanics and physics. Grundlehren der Mathematischen Wissenschaften, 219. Springer-Verlag Berlin-New York, 1976\.
  * [FeR] Fernández-Real, X.; Ros-Oton, X. Free boundary regularity for almost every solution to the Signorini problem. Arch. Ration. Mech. Anal. to appear.
  * [FRS] Figalli, A.; Ros-Oton, X.; Serra, J. Generic regularity of free boundaries for the obstacle problem. Publ. Math. Inst. Hautes Études Sci. 132 (2020), 181-292.
  * [FoS1] Focardi, M.; Spadaro, E. On the measure and structure of the free boundary of the lower dimensional obstacle problem. Arch. Ration. Mech. Anal. 230 (2018), no. 1, 125-184.
  * [FoS2] Focardi, M.; Spadaro, E. Correction to : On the measure and structure of the free boundary of the lower dimensional obstacle problem. Arch. Ration. Mech. Anal. 230 (2018), no. 2, 783-784.
  * [GP] Garofalo, N.; Petrosyan, A. Some new monotonicity formulas and the singular set in the lower dimensional obstacle problem. Invent. Math. 177 (2009), no. 2, 415-461.
  * [KPS] Koch, H.; Petrosyan, A.; Shi, W. Higher regularity of the free boundary in the elliptic Signorini problem. Nonlinear Anal. 126 (2015), 3-44.
  * [PSU] Petrosyan, A.; Shahgholian, H.; Uraltseva, N. Regularity of free boundaries in obstacle-type problems. Graduate Studies in Mathematics, 136. American Mathematical Society, Providence, RI, 2012\.
  * [R] Richardson, D. Variational problems with thin obstacles. Thesis-The University of British Columbia 1978\.
  * [SY1] Savin, O.; Yu, H. On the fine regularity of the singular set in the nonlinear obstacle problem. Preprint: arXiv:2101.11759.
  * [SY2] Savin, O.; Yu, H. Contact points with integer frequencies in the thin obstacle problem. Preprint: arXiv:2103.04013.
  * [SY3] Savin, O.; Yu, H. Regularity of the singular set in the fully nonlinear obstacle problem. J. Euro. Math. Soc. to appear.
  * [SY4] Savin, O.; Yu, H. Free boundary regularity in the triple membrane problem. Preprint: arXiv:2002.10628.
  * [Sig] Signorini, A. Questioni di elasticità non linearizzata e semilinearizzata. Rend. Mat. e Appl. 18 (1959), 95-139.
  * [U] Uraltseva, N. On the regularity of solutions of variational inequalities. Uspekhi Mat. Nauk 42 (1987), no. 6, 151-174.
  * [W] Weiss, G.S. A homogeneity improvement approach to the obstacle problem. Invent. Math. 138 (1999), no. 1, 23-50.


# DEFER: Distributed Edge Inference for Deep Neural Networks

Arjun Parthasarathy  Crystal Springs Uplands School
Email<EMAIL_ADDRESS>Bhaskar Krishnamachari  University of
Southern California
Email<EMAIL_ADDRESS>
(November 2021)

###### Abstract

Modern machine learning tools such as deep neural networks (DNNs) are playing
a revolutionary role in many fields such as natural language processing,
computer vision, and the internet of things. Once they are trained, deep
learning models can be deployed on edge computers to perform classification
and prediction on real-time data for these applications. Particularly for
large models, the limited computational and memory resources on a single edge
device can become the throughput bottleneck for an inference pipeline. To
increase throughput and decrease per-device compute load, we present DEFER
(Distributed Edge inFERence), a framework for distributed edge inference,
which partitions deep neural networks into layers that can be spread across
multiple compute nodes. The architecture consists of a single “dispatcher”
node to distribute DNN partitions and inference data to respective compute
nodes. The compute nodes are connected in a series pattern where each node’s
computed result is relayed to the subsequent node. The result is then returned
to the Dispatcher. We quantify the throughput, energy consumption, network
payload, and overhead for our framework under realistic network conditions
using the CORE network emulator. We find that for the ResNet50 model, the
inference throughput of DEFER with 8 compute nodes is 53% higher and per node
energy consumption is 63% lower than single device inference. We further
reduce network communication demands and energy consumption using the ZFP
serialization and LZ4 compression algorithms. We have implemented DEFER in
Python using the TensorFlow and Keras ML libraries, and have released DEFER as
an open-source framework to benefit the research community.

##  I Introduction

Machine Learning today is happening more than ever in real-world environments,
and with the rise of the Internet of Things, or IoT, it is done with real-time
sensor data. Historically, inference in this case would be performed in the
cloud, by sending data collected from all IoT devices at the edge to the data
center. However, this is a high latency solution that also incurs significant
bandwidth costs, and is thus not suited for many IoT applications. Therefore,
researchers and practitioners have advocated performing inference at the edge,
close to the IoT data sources [1].

Particularly for large models, the limited computational and memory resources
on a single edge device can become the throughput bottleneck for an inference
pipeline. To address this problem, we propose a framework to sequentially
partition the model in question and distribute these smaller partitions across
multiple edge devices, such that each device sends its computed inference
result to a subsequent device.

Our framework, DEFER (Distributed Edge inFERence), handles this process of
partitioning the model, distributing across resource-constrained devices, and
performing distributed inference on the edge. We have implemented DEFER in
software and evaluate it empirically using a network emulator, to understand
its performance in terms of throughput, energy efficiency, and network
overhead and payload.

The following are the key contributions of this work:

  * •

We present a software architecture and implementation for running ML inference
on distributed nodes, where each node runs a portion of the given model.

  * •

We evaluate this implementation using the CORE network emulator with different
numbers of partitions/nodes using the traditional single node model as a
baseline.

  * •

Specifically, we evaluate the following metrics: throughput, energy
consumption, network overhead, and network payload.

  * •

We show through our experiments that DEFER with 8 compute nodes on ResNet50
has 53% higher throughput and 63% lower per-node energy consumption compared
to single device inference, and that communication demands are reduced with
the LZ4 and ZFP algorithms.

  * •

Our software implementation is open-sourced for the research community, and
available at https://github.com/ANRGUSC/DEFER.

Below, we present pertinent literature, DEFER’s architecture and
implementation, methods of experimentation, and the results and conclusions of
our research.

##  II Related Work

Prior work on distributed machine learning can be broadly classified into two
categories: distributed training and distributed inference. We briefly review
the literature, noting that our work is focused on distributed inference.

###  II-A Distributed Training

####  II-A1 Model Parallelism

Prior work includes many frameworks to optimize communication demands and
model partitioning [2, 3]. These frameworks introduce model parallelism for
simultaneous execution and optimization of model layers.

####  II-A2 Federated Learning

Federated Learning [4] deals with model training on restricted data over the
cloud, in privacy-preserving applications with sensitive data. Unlike
Distributed Training, it facilitates local data sharing rather than reducing
training time.

###  II-B Distributed Inference

####  II-B1 Hybrid Computation

Frameworks such as MCDNN [5] and DDNN [6] propose DNN size optimization to run
jointly on-device and on the cloud, with a small tradeoff in model accuracy.
Unlike these works, we do not alter the architecture of the original model to
be run in a different setting; rather we partition an existing model across
multiple edge devices without any cloud processing.

####  II-B2 Layer-Wise Fusing and Partitioning

Prior works [7, 8, 9, 10, 11, 12, 13] have considered partitioning the model
across 2 or more devices; they have proposed different architectures to
optimize both Dense and Convolutional layers, such as FTP (Fused-Tile
Partitioning), FDSP (Fully Decomposable Spatial Partition) and Network
Distillation. Unlike our architecture which preserves the exact configuration
and inference accuracy of the original model, these works approximate or
modify layers to reduce communication and computation demand, at the cost of
slightly reduced model accuracy. In principle, the techniques described in
these works are complementary as our framework could be extended to use the
modified/distilled models proposed by these works.

####  II-B3 Software Implementations

We also briefly review related works that are not published research papers
but have published software implementations.

  * •

“Train and Pruning with PyTorch” [14] \- Implements layer pruning for model
size reduction, as seen in the Layer-Wise Pruning and Partitioning section.
This method introduces a loss in model accuracy, which we avoid with our
framework.

  * •

“DistributedInference” [15] \- Distributes a copy of the model to each worker
node, and sends inference jobs to a free node, thereby computing multiple
inference jobs at once. This approach introduces complete inference
parallelization. Unlike ours, this project does not address system resource
limitations of individual edge devices.

  * •

“Distributed Inference Platform” [16] \- Also performs parallelized inference
on exact copies of the model, and takes advantage of existing edge inference
frameworks, such as Google EDGETPU and Nvidia TensorRT. This project does not
address system resource limitations of individual edge devices.

##  III DEFER Architecture and Implementation

Figure 1: Architecture of DEFER

DEFER is made up of a central Dispatcher Node, which creates and distributes
partitioned models, and multiple Compute Nodes, which run inference
calculations with their respective partition.

DEFER’s implementation can be split up into three steps, the Model
Partitioning Step, the Configuration Step, and the Distributed Inference Step.

###  III-A Model Partitioning Step

Partitioning the model involves splitting it layer-wise into multiple
sequential sub-networks, as illustrated in Figure 1. To implement model
partitioning in Python, we used the TensorFlow [17] and Keras [18] libraries.
We took advantage of the DAG (Directed Acyclic Graph) structure of Keras
Layers to create a graph traversal algorithm, which traverses the section of
the DAG that we want to partition and produces a new DAG with the desired
layers. Partitioning can be done with any layer graph configuration, not just
with sequential layers as shown in Figure 1. A new model of just the
partitioned layers is created, which can then be sent to the compute nodes.

###  III-B Configuration Step

To setup the partitions on the compute nodes, we first define our dispatcher
node run-time and our compute node run-time. The dispatcher node connects to
two TCP Sockets for each compute node. One TCP Socket is used to send a
serialized representation of the model’s architecture and the IP address of
the next node in the inference chain, while the other sends a serialized array
of the model’s weights. When receiving the model on the compute node end of
the socket, the model socket waits for the model’s weights to be received on
the other socket, upon which time it instantiates a full TensorFlow model with
the correct architecture and weights.

On a separate thread, each compute node opens a TCP socket connection to its
assigned next node, which will be used to send intermediate inference results
to the subsequent node in the inference chain. This results in each node
having an incoming socket data connection from the previous node and an
outgoing connection to the following node.

###  III-C Distributed Inference Step

The dispatcher, having distributed model partitions across compute nodes, now
begins to send data to the first compute node in the chain. Upon receiving
data on its incoming socket, the node performs the necessary de-serialization
and compression and runs that previous inference result through its model. The
result is then serialized and compressed and sent via the outgoing socket.
This process is repeated for each compute node.

By nature, the sockets compute inference calculations in a serial first-in
first-out manner, whereby prior inference data will be sent to the next node
earlier. This is done to maintain the order in which inference results are
returned to the Dispatcher Node. Since a compute node can take in new
inference data after it has finished a prior inference calculation rather than
waiting for the entire model to finish inference, the system will have higher
inference throughput.

We employ chunked data transfer (with a default size of $512kB$ per chunk)
across all of our socket connections, due to the high volume of information
required to construct a model and send intermediate inference results.

We present the pseudocode for our implementation in algorithms 1 and 2
describing the dispatcher node and compute nodes, respectively.

Algorithm 1 Dispatcher Node

// Using DAG traversal

$partitions\leftarrow\textsc{PARTITION-MODEL}($)

// Configuration Step

for $i\leftarrow 1\textbf{ to }partitions.\textsc{length}($) do

// Serialization and compression

$wSock\leftarrow\textsc{OPEN-SOCKET}(\text{weightsPort, nodes[i]})$

$mSock\leftarrow\textsc{OPEN-SOCKET}(\text{modelPort, nodes[i]})$

$wSock.\textsc{SEND}(partitions[i].weights)$

$mSock.\textsc{SEND}(partitions[i].architecture)$

// Tell node which node to connect to in the chain

$mSock.\textsc{SEND}(nodes[i+1])$

end for

// Distributed Inference Step

$nodeSock\leftarrow\textsc{OPEN-SOCKET}(\text{firstNodeIP})$

spawn THREAD-1

repeat

// Serialized and compressed

$toInference\leftarrow\textbf{pipe from }\text{MAIN-THREAD}$

$nodeSock.\textsc{SEND}(toInference)$

until SYSEXIT

spawn THREAD-2

$outServer.\textsc{LISTEN}($)

repeat

$output=outServer.\textsc{READ}($)

$\textbf{pipe }output\to\text{MAIN-THREAD}$

until SYSEXIT

Algorithm 2 Compute Node

spawn WEIGHTS-THREAD

$wServer.\textsc{LISTEN}($)

// Deserialization and decompression

$weights\leftarrow sockServer.\textsc{READ}($)

$\textbf{pipe }weights\to\text{MODEL-THREAD}$

spawn MODEL-THREAD

$mServer.\textsc{LISTEN}($)

$mConfig\leftarrow mServer.\textsc{READ}($)

$toDataNode\leftarrow mServer.\textsc{READ}($)

$weights\leftarrow\textbf{pipe from }\text{MODEL-THREAD}$

$model\leftarrow\textsc{MAKE-MODEL}(weights,mConfig)$

$toDataSock\leftarrow\textsc{OPEN-SOCKET}(toDataNode)$

// Separate threads for reading and sending data to avoid inference bottleneck

spawn THREAD-1

repeat

// Inference result from previous node

$data\leftarrow\textsc{READ-DATA}($)

$\textbf{pipe }data\to\text{THREAD-2}$

until SYSEXIT

spawn THREAD-2

repeat

// Compute inference with model and data

pipe from THREAD-1

$result\leftarrow\textsc{INFERENCE}(model,data)$

$toDataSock.\textsc{SEND}(result)$

until SYSEXIT

##  IV Evaluation Methodology

We used the VGG-16 and VGG-19 [19] and ResNet50 [20] models, all trained on
the ImageNet dataset, to evaluate our metrics. These models were chosen
because they are widely used in computer vision and contain enough layers to
be used with DEFER. The partitioning layers were selected based on what would
split the model up into a similar number of layers for each partition. For
each model, we varied the number of compute nodes between 4, 6, and 8. This
was done using the CORE Network Emulator (http://coreemu.github.io/core),
which allowed us to create network topologies simulating these different node
configurations and run the simulation locally in a close-to-zero latency
environment.

With a configuration of ResNet50 with 4 compute nodes, we used different
compression and serialization schemes for each of the three sockets, which
transfer the model architecture and weights during the configuration step and
inference data during the inference step, respectively. With these
combinations, we computed different metrics, namely inference throughput,
network-related energy consumption (the energy expended both
serializing/compressing data and sending the data over the network), overhead,
and network payload.

Serialization/Compression Algorithms: To serialize our data, we tested both
JSON serialization of NumPy arrays and ZFP [21]. We further tested both
serialization configurations with and without the use of the LZ4 compression
algorithm.

Inference Throughput: To measure inference throughput, we set a fixed time of
execution for DEFER, and recorded how many inference cycles could be done in
that fixed time. This gave us a measure of throughput in inference cycles per
second.

Energy Consumption: To measure energy consumption for each different
serialization algorithm, we calculated the amount of time it took the given
algorithms to run and multiplied that by the TDP (Thermal Design Power).
Additionally, we measured the energy consumption of sending the data over the
network, which is proportional to the network payload and varies between
communication medium. For our tests, we used metrics associated with an
Ethernet connection ($10pJ$ per bit [22]).

Overhead: To measure overhead, we recorded the amount of time spent formatting
data to be sent over the network.

Network Payload: To measure network payload, we used a network tool called
nload [23], which gave us the total amount of data sent over the TCP sockets.

##  V Results

Figure 2: Inference Throughput for different models and number of Compute
Nodes

According to Figure 2, DEFER outperforms single device inference in terms of
throughput, for various numbers of compute nodes used. It is apparent,
however, that there is a limit to an increase in throughput from utilizing
additional compute nodes, beyond which the total time of overhead will
outweigh the gains from parallelization. For example, increasing the number of
partitions decreases the resulting throughput of the VGG16 model, but due to
ResNet50’s size, each partition for that model is sufficiently large whereby
network overhead is comparatively trivial.

TABLE I: Energy Consumption, Overhead, and Network Payload for ResNet50 with 4 Compute Nodes Type | Serialization | Compression | Energy Consumption (J) | Overhead (s) | Network Payload (MB)
---|---|---|---|---|---
Architecture | JSON | LZ4 | 0.019 | 4.17e-4 | 0.02389
Architecture | JSON | Uncompressed | 0.0032 | 1.45e-5 | 0.13035
Weights | JSON | LZ4 | 4.4671 | 19.4702282 | 446.7
Weights | JSON | Uncompressed | 5.5166 | 8.326519966 | 551.66
Weights | ZFP | LZ4 | 3.0933 | 16.33518434 | 309.32
Weights | ZFP | Uncompressed | 5.1283 | 14.49310565 | 512.83
Data | JSON | LZ4 | 0.1294 | 0.4661076069 | 12.939
Data | JSON | Uncompressed | 0.1754 | 0.415356636 | 17.543
Data | ZFP | LZ4 | 0.1051 | 0.3867843151 | 10.513
Data | ZFP | Uncompressed | 0.1423 | 0.3257746696 | 14.233

Table I compares different serialization and compression configurations and
the metrics associated with each.

We see for the dispatcher to communicate the model architecture to the compute
nodes, JSON without compression is the best communication configuration,
because the JSON representation of the architecture is small enough such that
the computational trade-off from using compression outweighs the reduction in
network payload.

For the dispatcher to communicate the weights to the compute nodes, using ZFP
and LZ4 was the best configuration. For large NumPy arrays such as the model’s
weights array, the difference in the size of the serialized representations
from ZFP and JSON becomes more apparent. Furthermore, the almost 25% reduction
in network payload from using LZ4 suggests it outweighs the additional
computational cost.

For communicating data between nodes in the distributed inference step, ZFP
and LZ4 was also the best configuration. The use of NumPy arrays to transfer
the data warrants ZFP instead of JSON serialization, just like the weights
array.

TABLE II: Inference Throughput for Different Serialization and Compression Configurations Serialization | Compression | Inference Throughput (cycles/sec)
---|---|---
JSON | LZ4 | 0.477
JSON | Uncompressed | 0.493
ZFP | LZ4 | 0.673
ZFP | Uncompressed | 0.5

Table II shows that ZFP with LZ4 results in the highest inference throughput.
When running DEFER as a high-volume system, communication demands become
increasingly important, and using ZFP with LZ4 minimizes the amount of data
sent over the network and facilitates throughput, despite the additional
computational cost.

Figure 3 describes the average energy consumption per node for an inference
cycle. As the number of nodes increases, the per node consumption decreases
and falls below the amount for single device inference. This pattern coincides
with the corresponding increase in throughput for higher numbers of compute
nodes found in Figure 2. With 4 compute nodes, each partition is sufficiently
large such that computational requirements create large per-node energy
consumption. Figure 3 shows that at least 6 compute nodes are necessary for a
per-node energy consumption that is lower than single device inference.

Figure 3: Energy consumption per node for DEFER and Single Device Inference,
using ResNet50

##  VI Conclusions

We have presented DEFER, a framework for Distributed Inference on resource-
constrained edge devices, via an algorithm that performs DNN partitioning.
These partitions are sent to their respective compute nodes, and used to
perform inference. We have shown that DEFER with 8 Compute Nodes outperforms
Single Device Inference in terms of inference throughput by 53%, and has a 63%
lower average energy consumption across nodes. We further found that overhead
and energy consumption can be reduced with the use of the ZFP serialization
and LZ4 compression algorithms. DEFER is available to the research community
as an open-source framework at https://github.com/ANRGUSC/DEFER.

In future work on DEFER, we plan to explore how to optimize model partition
size and architecture based on the compute and memory constraints of the edge
device. In a situation without homogeneous compute nodes, heterogeneous model
partitions can be more effectively distributed for higher inference
throughput. Furthermore, we can introduce the concept of a virtual node, where
multiple partitions are dynamically loaded into and run on a single physical
compute node. Through this process, partitions may have multiple inputs and
outputs, and DEFER’s code will optimized to support this architecture.

## References

  * [1] J. Chen and X. Ran, “Deep learning with edge computing: A review,” Proceedings of the IEEE, vol. 107, no. 8, 2019.
  * [2] Dean et al., “Large scale distributed deep networks,” Advances in neural information processing systems, vol. 25, 2012.
  * [3] Y. Lin et al., “Deep gradient compression: Reducing the communication bandwidth for distributed training,” 2020.
  * [4] T. Li et al., “Federated learning: Challenges, methods, and future directions,” IEEE Signal Processing Magazine, vol. 37, no. 3, 2020.
  * [5] H. Shen, M. Philipose, S. Agarwal, and A. Wolman, “MCDNN: An execution framework for deep neural networks on resource-constrained devices,” 2015.
  * [6] S. Teerapittayanon, B. McDanel, and H.-T. Kung, “Distributed deep neural networks over the cloud, the edge and end devices,” in 2017 IEEE 37th International Conference on Distributed Computing Systems (ICDCS), IEEE, 2017\.
  * [7] Z. Zhao, K. M. Barijough, and A. Gerstlauer, “DeepThings: Distributed adaptive deep learning inference on resource-constrained iot edge clusters,” IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 37, no. 11, 2018.
  * [8] Y. Matsubara et al., “Distilled split deep neural networks for edge-assisted real-time systems,” in Proceedings of the 2019 Workshop on Hot Topics in Video Analytics and Intelligent Edges, 2019.
  * [9] A. Abdi, S. Rashidi, F. Fekri, and T. Krishna, “Restructuring, pruning, and adjustment of deep models for parallel distributed inference,” ArXiv, vol. abs/2008.08289, 2020.
  * [10] R. Hadidi et al., “LCP: A low-communication parallelization method for fast neural network inference in image recognition,” arXiv: Signal Processing, 2020.
  * [11] D. Hu and B. Krishnamachari, “Fast and accurate streaming CNN inference via communication compression on the edge,” in 2020 IEEE/ACM Fifth International Conference on Internet-of-Things Design and Implementation (IoTDI), 2020.
  * [12] S. Q. Zhang, J. Lin, and Q. Zhang, “Adaptive distributed convolutional neural network inference at the network edge with ADCNN,” in 49th International Conference on Parallel Processing, ACM ICPP ’20, 2020.
  * [13] B. Gunarathne, C. Prabhath, V. Perera, and K. Gunasekara, “Distributing deep learning inference on edge devices,” in Proceedings of the 16th International Conference on Emerging Networking EXperiments and Technologies, ACM CoNEXT ’20, 2020.
  * [14] Y. Hou, “Train and Pruning with PyTorch.” https://github.com/hou-yz/pytorch-pruning-2step, 2018.
  * [15] H. Duan, “DistributedInference.” https://github.com/kennymckormick/DistributedInference, 2020.
  * [16] M. El-Habr, “Distributed Inference Platform.” https://github.com/melhabr/distributed-inference, 2020.
  * [17] M. Abadi et al., “TensorFlow: Large-scale machine learning on heterogeneous systems,” 2015.  Software available from tensorflow.org.
  * [18] F. Chollet et al., “Keras.” https://keras.io, 2015.
  * [19] K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” 2014.
  * [20] K. He et al., “Deep residual learning for image recognition,” 2016.
  * [21] P. Lindstrom, “Fixed-rate compressed floating-point arrays,” IEEE Transactions on Visualization and Computer Graphics, vol. 20, 08 2014.
  * [22] W. Jiang, “Energy to transmit one bit.” http://large.stanford.edu/courses/2018/ph240/jiang1/, 2018.
  * [23] R. Driegel and H. Correia, “nload.” https://github.com/rolandriegel/nload, 2018.


# Electrocardiography Separation of Mother and Baby

Wei Wang

###### Abstract

Extraction of Electrocardiography (ECG or EKG) signals of mother and baby is a
challenging task, because one single device is used and it receives a mixture
of multiple heart beats. In this paper, we would like to design a filter to
separate the signals from each other.

##  1 Introduction

Electrocardiography (ECG or EKG) is a transthoracic interpretation of the
electrical activity of the heart over time captured and externally recorded by
skin electrodes [1]. Intrinsically the electrods add some noises to the final
data captured and also some external sources, usually from the human body, add
some other noises. Dealing with these sorts of noises is one of the challenges
of recording the correct ECG of a person heart beat.
As a regular task ECG is used to record heart beat of a person, but in some
especial cases it is utilized to record the heart beat of two persons, mother
and the baby in her abdomen. In these cases the ECG gives us a mixture of two
heart beats and the noises explained before. The important task will be to
distinguish the two different heart beats. To help this issue be solved,
several electrods are attached to the mother’s body. Some of them are closer
to her chest and some are closer to her abdomen. Since different electrodes
capture different data, obviously each captures the closest source to itself
as the strongest signal, utilizing all of them is a good solution for signal
separation.
Filter in signal processing is commonly used to refer to any device or system
that takes a mixture of frequency components from its input and process them
according to some rules to generate a corresponding set of frequencies at its
output [2]. Considering the situation we explained in the last paragraph, we
aim to extract the child signal using 8 electrodes attached to mother’s body,
three on her chest and five on her abdomen. Using filters is one of the
solutions to this problem. Obviously, the human’s heart beat is not constant
all the time. As the time goes on the heart beat changes for different
reasons. That means for filtering it, an online and adaptive filter is
required to follow the heart beat in time.
In this report we are to explain our approaches to extract child’s heart beat
from these eight electrodes. We tried two approaches that one of them was
successful and gives us quite good results, while the implementation of the
second one was failed because of some problems that will be explained later.
The remainder of the report is organized as follows. Section two describes our
approach in signal extraction. Section three is to present the results of the
approach with different parameter settings. Section four gives us some idea
about a filter. And finally the last section concludes everything in the
paper.

##  2 Our Approach

In Figure 1 we show three signals in the same diagram. Having the blue signal,
we would like to extract the red signal. That means we can consider the rest
as noise, both mother signal and real noises. In general a denoising filter
works as Figure 2. The error that is going to be minimized in this type of
filter is $error=s+\nu_{0}-y$ [3].

Figure 1: Red is child signal, Yellow mother signal and Blue is the mixture of
signals captured from the first electrode placed on mother’s chest Figure 2:
Denoising filter, picture from [3]

Our approach is using Least Mean Square aalgorithm in filtering, to denoise
the mixed signal and extract the child signal [4, 5]. Here we explain how we
implemented the LMS algorithm. We defined L as the delay time. So we consider
the last L input data in order to measure the current noise signal. We
assigned weights,W , to all these input data and made the output as the
weighted some of these L elements.We call it the total noise at time t. By
subtracting this noise from the mixed signal we end up with the child signal.
The following equations were used in our model implementation where CS is the
chest signal and AS is the abdomen signal.

$noise(t)=CS(t-L+1:t)\cdot W$ $child(t)=AS(t)-y(t)$

Now we update the weight array using the following equation where lr is the
learning rate set by default to 600

$W=W+2lr\cdot child(t)\cdot CS(t-L+1:t)^{T}$

We can apply this method on one chest signal and one abdomen signal to extract
the child signal. But it is not so accurate and differences between the
original signal and the measured one is very much. So we refined this approach
by some simple steps. We apply it to two signals from chest and two from
abdomen pairwise. Then we apply another filter on the output of these signals
and try to find the average of them by our filter. So this time the output is
not the differences between signals but the average that last time we
mentioned as noise. Using this method we got to better results that is shown
in the next section.
The other refinement that we did to this approach was to change the learning
rate in time. So we used an approximation of auto-correlation matrix of the
input signal. According to this matrix we can find a good approximation of
learning rate. The equations of choosing lr is as follows where R is the
correlation matrix, x is the input signal and M is the constant for
misadjustment. It is notable that in this case we need the last J+L input data
to measure the matrix. We call J as window size later.

$D(t)=\left[\begin{array}[]{cccc}x(t)&x(t-1)&...&x(t-L+1)\\\
x(t-1)&x(t-2)&...&x(t-L)\\\ ...\\\ x(t-J)&x(t-J-1)&...&x(t-J-L+1)\\\
\end{array}\right]$ $R=D^{T}\cdot D$ $lr=\frac{1}{3trace(R)}$

or

$lr=\frac{M}{trace(R)}$

If we choose the first learning rate, it converges very fast and usually it
has lots of overshootings. The second one converges slower if $M<1/3$. So we
can use the first learning rate at the begining of our run and the second one
later. Within this criteria we use the benefits of both of these approaches.
We tested our algorithm with different parameters that are shown in the next
section.

##  3 Experiment and Results

We tested our approach by a sequence of mixed signal with the length of
90,000. This sequence is used to store the data for 3 minutes that gives us
the frequency of 500Hz. We applied this sequence to our filter function. We
tested the results with the real child signal that is given by Professor
Jaeger, and is available on the course home page. Having the result and the
real target signal ,the equation for computing error is as follow that
considers the last 75,000 points.

$\mbox{diff}=\mbox{result}-\mbox{target}$
$\mbox{diff}={X_{1},X_{2},...,X_{n}}$ $\mbox{error}=\sqrt{\frac{\frac{\Sigma
X_{i}}{n}}{var(\mbox{target})}}$

The first test was with only one filter that was provided in the sample code
lr = 600. The error was 3.7117. The rest of experiments were done using three
filters but under different conditions. The first two filters were borrowed
from the sample with this accuracy and the second filter is implemented to
have changing learning rate. This means after a refinement by 3.7117 we try to
apply the other filter to average these two signals. Table 1 present the
results of applying several parameters on the second layer filter. We set the
threshold of changing learning rate equation to 15,000. Within the first
15,000 iterations it does not use M constant at all.

Delay Length(L) | Misadjustment(M) | Window Size (J) | Accuracy
---|---|---|---
1 | 10e-5 | 1 | 9.2580e16
1 | 10e-5 | 2 | 24.9195
1 | 10e-5 | 5 | 1.2631
1 | 10e-5 | 10 | 1.4084
1 | 10e-7 | 1 | 4.6396e5
1 | 10e-7 | 2 | 2.0496
1 | 10e-7 | 5 | 1.7636
1 | 10e-7 | 10 | 1.9344
2 | 10e-5 | 1 | 3.2803e24
2 | 10e-5 | 2 | 2.0559
2 | 10e-5 | 5 | 1.644
2 | 10e-5 | 10 | 1.5154
2 | 10e-7 | 1 | 9.6966e24
2 | 10e-7 | 2 | 1.3079
2 | 10e-7 | 5 | 1.6843
2 | 10e-7 | 10 | 2.0556
5 | 10e-5 | 1 | inf
5 | 10e-5 | 2 | 6.0334e106
5 | 10e-5 | 5 | 42.9274
5 | 10e-5 | 10 | 1.8316
5 | 10e-7 | 1 | inf
5 | 10e-7 | 2 | 2.0537e107
5 | 10e-7 | 5 | 64.3655
5 | 10e-7 | 10 | 2.0689
10 | 10e-5 | 1 | inf
10 | 10e-5 | 2 | inf
10 | 10e-5 | 5 | 2.1790e55
10 | 10e-5 | 10 | 6.9142e10
10 | 10e-7 | 1 | inf
10 | 10e-7 | 2 | inf
10 | 10e-7 | 5 | 4.6250e55
10 | 10e-7 | 10 | 7.6576e10
Table 1: Different parameters and their results

It can be seen in the table the best performance is achieved at L=1, M=10e5
and J=5. At that point the computed signal follows the child signal as in
Figure 3. We see that increasing L usually decreases the performance but J
acts vice versa. Although the best performance is achieved when M was 10e-5,
the general performance of M = 10e-7 is better.

Figure 3: Green is the computed signal and Red is the real child signal

##  4 An Unsuccessful Approach

The first idea that I had at the begining was using spectral analysis to
separate two different signals from each other, but after spending some time
on it, I could not finish. The idea was to use Discrete Fourier Transform(DFT)
to separate two different signals. Since mother and child do not have the same
beat rate, the frequency is different. DFT can transform signals from time
domain to frequency domain. Using this transformation, I could extract the
different frequencies and choose the child frequency that is greater than
mother beat frequency. Then I would choose the smaller frequency and do the
inverse fourier transform in order to go back to time domain. The other issue
was the change of frequency in time. Thus, I decided to choose the last two
seconds only and show the results with two seconds of delay. It is notable
that less that one second was not possible, because the frequncy of mother
goes less than one at some points in time. In Figure 4 the result of applying
DFT to the mixed signal is shown.
The problem that I could not solve and stoped me in this approach was the
noise. There are several noises in the frequency domain and it was not easy to
find the one that is the child frequency.

Figure 4: The mixed signal in frequency domain. It is shown that the mother
frequency is around 0.8 and for the child it is around 2.3

##  5 Conclusion

In this report we explained two filters for denoising an ECG signal in order
to extract the child’s heart beat from mother’s heart beat and other noises.
We showed the first and starightforward approach using adaptive filters. We
explained our results with different settings on the same input data. There
was another approach that was not successful but in theory it must work. It
can be a future work to do this filtering by spectral analysis. However the
delay is considerable.

## References

  * [1] Wikipedia cited from ECG- simplified. Aswini Kumar M.D.
  * [2] Boroujeny. F.: Adaptive Filters, Theory and Applications (John Wiley, 1999)
  * [3] Jaeger. H.: Advanced Machine Learning Lecture notes, 2009
  * [4] Hamraz, Seyed Hamid, and Seyed Shams Feyzabadi. ”General-Purpose learning machine using k-nearest neighbors algorithm.” RoboCup 2005: Robot Soccer World Cup IX. Springer Berlin Heidelberg, 2006. 529-536.
  * [5] Baumann, Peter, Shams Feyzabadi, and Constantin Jucovschi. ”Putting pixels in place: A storage layout language for scientific data.” Data Mining Workshops (ICDMW), 2010 IEEE International Conference on. IEEE, 2010.