organization=Center of Gravitational Physics and Department of Physics,
addressline=The University of Texas at Austin, city=Austin, state=TX,
postcode=78712, country=USA

# Calculating Quasi-Normal Modes of Schwarzschild Black Holes with Physics
Informed Neural Networks

Nirmal Patel, Aycin Aykutalp, Pablo Laguna

###### Abstract

Machine learning, particularly neural networks, has rapidly permeated most
activities and work where data has a story to tell. Recently, deep learning
has started to be used for solving differential equations with input from
physics, also known as Physics-Informed Neural Networks (PINNs). We present a
study showing the efficacy of PINNs for solving the Zerilli and the Regge-
Wheeler equations in the time domain to calculate the quasi-normal oscillation
modes of a Schwarzschild black hole. We compare the extracted modes with those
obtained with finite difference methods. Although the PINN results are
competitive, with a few percent differences in the quasi-normal modes
estimates relative to those computed with finite difference methods, the real
power of PINNs will emerge when applied to large dimensionality problems.

###### keywords:

Scientific Machine Learning , Physics Informed Neural Networks (PINNs),
Numerical Relativity

††journal: Journal of Computational Physics

##  1 Introduction

Deep learning has grown exponentially in the last couple of decades, with an
astonishing range of applications in computer vision, natural language
processing, autonomous vehicles, and many more. Deep learning has also made
its way into the scientific fields that deal with complex dynamic systems
involving various input variables using automatic differentiation [1]. As
Raissi et al. [2] have pointed out, feeding physics to the neural network
improves its accuracy while making it data-efficient. They coined the term
“Physics Informed Neural Networks”. There is strong evidence that PINNs could
potentially provide a new insight to tackle the _curse of dimensionality_ , as
introduced by Bellman [3], which is still a hindrance for current numerical
methods.

PINNs have been recently utilized in gravitational physics problems. They have
been used to solve Riemann problems applied to relativistic hydrodynamics [4],
to compute the quasi-normal modes (QNMs) of black holes in de Rham-Gabadadze-
Tolley massive gravity, but in this case, the computation was carried out in
the frequency domain [5].

In this work, we present a study showing the efficacy of PINNs for solving the
Zerilli and the Regge-Wheeler equations in the time domain to compute the QNMs
of a Schwarzschild black hole (BH). We compare the extracted modes with those
obtained with finite difference (FD) methods. We also show the accuracy of
PINNs for this problem in terms of its scaling with the number of nodes and
layers. We found that the PINNs results are competitive, with a few percent
differences in the QNMs relative to those with FD methods.

The paper is organized as follows. In Sec. 2, we present a brief description
of neural networks. The description is extended to PINNs in Sec. 3. In Sec. 4,
we briefly summarize the equations governing the perturbation of a
Schwarzschild BH and its QNMs. In Sec. 5, we describe the FD methodology and
PINN architecture used to solve the Zerilli and Regge-Wheeler equations.
Results are given in Sec. 6, with conclusions in Sec. 7.

##  2 Neural Networks: Fundamentals and Application in PINNs

Neural networks are computational frameworks inspired by the biological neural
networks of our brains [6]. At their core, they consist of layers of nodes or
neurons interconnected in a way that allows for complex data processing and
pattern recognition. This makes them particularly suited for tasks ranging
from simple classification to complex physics problems.

Neural networks consist of an input layer, multiple hidden layers, and an
output layer. Each layer contains neurons that process incoming data. Early
neural networks used simple units called Threshold Logic Units (TLUs, [7]).
Modern networks use more advanced artificial neurons, which apply continuous,
differentiable activation functions, allowing for more complex and nuanced
data modeling.

Learning in a neural network is a systematic process involving several
interconnected steps. These steps enable the network to adjust its internal
parameters (weights and biases) based on the data it processes, thereby
improving its performance in tasks such as classification or regression.

  * •

Initialization: Before learning begins, the neural network’s weights and
biases are initialized. This can be done randomly or using specific
initialization techniques like Xavier or He initialization. Initialization is
crucial as it affects the convergence speed and the ability of the network to
reach an optimal solution [8].

  * •

Forward Propagation Data flows from the input through the hidden layers to the
output, with each neuron computing a weighted sum of its inputs followed by an
activation function [9].

    * –

_Input Layer_ : The learning process begins with input data being fed into the
network. Each neuron in the input layer represents a feature of the input
data.

    * –

_Hidden Layers_ : The data then passes through one or more hidden layers. In
each layer, the neurons perform a weighted sum of their inputs, followed by an
activation function. The activation function introduces non-linearity,
allowing the network to learn complex patterns.

    * –

_Output Layer_ : The final layer produces the network’s output. The nature of
this output depends on the task (e.g., a single value for regression,
probability scores for classification).

  * •

Loss Calculation: A loss function quantifies the error between the network’s
predictions and actual data, crucial for guiding the learning process. Once
the network produces an output, the loss function calculates the error. This
error is the difference between the network’s prediction and the actual target
values. Common loss functions include Mean Squared Error (MSE) for regression
tasks and Cross-Entropy for classification tasks.

  * •

Backpropagation: Backpropagation is the process through which the network
learns [10]. The goal is to minimize the loss by adjusting the weights and
biases. The network computes the gradient of the loss function, propagating
this information back through the network to inform how weights should be
adjusted. It involves computing the gradient of the loss function with respect
to each weight and bias in the network. This computation uses the chain rule
of calculus, a method known as the gradient descent. The gradients indicate
how much and in which direction the weights and biases should be adjusted to
reduce the loss.

  * •

Weight Update: Using the gradients calculated during backpropagation, the
weights and biases are updated [11]. This step is crucial for the learning
process. The magnitude of the update is determined by the learning rate, a
hyperparameter that dictates how big a step should be taken towards the
minimum of the loss function. Optimizers like SGD (Stochastic Gradient
Descent), Adam, or RMSprop are used to perform this update. They differ in how
they use the gradient information to adjust the weights (e.g., some use
momentum, others adjust learning rates adaptively).

The output from forward propagation is used to calculate how far off the
predictions are from the actual values. The loss guides how the model should
adjust its parameters. It’s the starting point for backpropagation,
determining the direction for the gradient descent. The gradients from
backpropagation are used directly to update the weights in a direction that
minimizes the loss. Updated weights affect the next round of forward
propagation, leading to different outputs and a reduced loss. The entire
process (forward propagation, loss calculation, backpropagation, weight
update) is repeated for a number of iterations or epochs over the training
dataset. With each iteration, the network’s predictions become more accurate,
and the loss decrease. The learning continues until the loss converges to a
minimum value, a pre-defined number of epochs is reached, or another stopping
criterion is met. This cyclic process enables the neural network to learn from
data, gradually improving its predictions through successive iterations.

In the context of PINNs, neural networks are tailored to solve physics
problems, particularly involving differential equations. PINNs integrate
physical laws into the learning process, improving the network’s ability to
generalize and learn from limited data. This integration is achieved by
constructing a loss function that not only minimizes the difference between
predicted and actual outputs but also ensures compliance with the physical
laws governing the system. For instance, when applied to an initial-boundary
value problem, PINNs aim to construct an approximate solution to a given
partial differential equation (partial differential equation (PDE)),
respecting initial and boundary conditions. This is accomplished by minimizing
a loss function that includes the residuals of the PDE and these conditions.
The network uses layers (denoted as L dense layers) to approximate the
solution, with each layer involving weight matrices, bias vectors, and
activation functions.

##  3 Physics Informed Neural Networks

When applied to an initial-boundary value problem, the PINN method aims at
constructing an approximate solution to a PDE, given initial and boundary
conditions, by minimizing a loss function that involves the residuals of the
PDE and the initial and boundary conditions.

Specifically, we consider the following hyperbolic PDE for the function
$\Phi(x,t)$

$A\frac{\partial^{2}\Phi}{\partial t^{2}}+2B\frac{\partial^{2}\Phi}{\partial
t\partial x}+C\frac{\partial^{2}\Phi}{\partial x^{2}}+\mathbb{D}[\Phi]=0,$ (1)

in a domain $X=[x_{min},x_{max}]\times[t_{min},t_{max}]$. Here, $\mathbb{D}$
is a first-order differential operator, and the coefficients, in general,
depend on $x$ and satisfy $B^{2}-AC>0$. The values of $\Phi(x,t_{min})$ and
$\frac{\partial\Phi}{\partial t}(x,t_{min})$ are provided as initial
conditions. For boundary conditions, we impose $\mathbb{L}[\Phi]=0$ at left
boundary $(x_{min},t)$ and $\mathbb{R}[\Phi]=0$ at right boundary
$(x_{max},t)$, where $\mathbb{L}$ and $\mathbb{R}$ are first order
differential operators.

The PINN approximated solution using $L$ dense layers will be

$\Phi_{\boldsymbol{\theta}}(X)=\mathbf{W}^{L}\sigma^{L}(...\mathbf{W}^{1}\sigma^{1}(\mathbf{W}^{0}X+\mathbf{b}^{0})+\mathbf{b}^{1}...)+\mathbf{b}^{L},$
(2)

where $\boldsymbol{\theta}$ is the trainable parameter vector,
$\mathbf{W}^{i}$ are weight matrices, $\mathbf{b}^{i}$ are bias vectors, and
$\sigma^{i}$ are activation functions.

The PDE residual of the PINN approximate is

$r_{\boldsymbol{\theta}}=A\frac{\partial^{2}\Phi_{\boldsymbol{\theta}}}{\partial
t^{2}}+2B\frac{\partial^{2}\Phi_{\boldsymbol{\theta}}}{\partial t\partial
x}+C\frac{\partial^{2}\Phi_{\boldsymbol{\theta}}}{\partial
x^{2}}+\mathbb{D}[\Phi_{\boldsymbol{\theta}}].$ (3)

Thus, the corresponding loss function is

$\mathcal{L}_{r}(\boldsymbol{\theta})=\sum_{n_{r}}\frac{\begin{Vmatrix}r_{\boldsymbol{\theta}}(x,t),\end{Vmatrix}_{2}^{2}}{|N_{r}|},$
(4)

where the sum is over $N_{r}$ discrete points in the interior of the domain
$X$, and $\begin{Vmatrix}\,.\,\end{Vmatrix}_{2}$ donates L2 norm.

The accuracy of PINN can be increased by adding derivatives of
$r_{\boldsymbol{\theta}}$. Such PINN is known as “Gradient-enhanced PINN”
[12]. The loss functions involving the derivatives of residuals are

$\mathcal{L}_{r_{x}}(\boldsymbol{\theta})=\sum_{n_{r}}\frac{\begin{Vmatrix}\frac{\partial
r_{\boldsymbol{\theta}}}{\partial x}(x,t)\end{Vmatrix}_{2}^{2}}{|N_{r}|},$ (5)

and

$\mathcal{L}_{r_{t}}(\boldsymbol{\theta})=\sum_{n_{r}}\frac{\begin{Vmatrix}\frac{\partial
r_{\boldsymbol{\theta}}}{\partial t}(x,t)\end{Vmatrix}_{2}^{2}}{|N_{r}|}.$ (6)

The loss function for the initial conditions are

$\mathcal{L}_{ic}(\boldsymbol{\theta})=\sum_{n_{i}}\frac{\begin{Vmatrix}\Phi_{\boldsymbol{\theta}}(x,t_{min})-\Phi(x,t_{min})\end{Vmatrix}_{2}^{2}}{|N_{i}|},$
(7)

and

$\mathcal{L}_{iv}(\boldsymbol{\theta})=\sum_{n_{i}}\frac{\begin{Vmatrix}\frac{\partial\Phi_{\boldsymbol{\theta}}}{\partial
t}(x,t_{min})-\frac{\partial\Phi}{\partial
t}(x,t_{min})\end{Vmatrix}_{2}^{2}}{|N_{i}|}\,,$ (8)

where the sums are over $N_{i}$ discrete points $(x,t_{min})\in X$. And, at
the left and right boundaries, the loss terms read

$\mathcal{L}_{bl}(\boldsymbol{\theta})=\sum_{n_{b}}\frac{\begin{Vmatrix}\mathbb{L}[\Phi_{\boldsymbol{\theta}}]\end{Vmatrix}_{2}^{2}}{|N_{b}|},$
(9)

and

$\mathcal{L}_{br}(\boldsymbol{\theta})=\sum_{n_{b}}\frac{\begin{Vmatrix}\mathbb{R}[\Phi_{\boldsymbol{\theta}}]\end{Vmatrix}_{2}^{2}}{|N_{b}|},$
(10)

where the sums are over $N_{b}$ points $(x_{min},t)\in X$ for the sum in Eq.
(9) and $N_{b}$ points $(x_{max},t)\in X$ for the sum in Eq. (10).

Finally, the vector of loss functions will be

$\begin{split}\boldsymbol{\mathcal{L}}(\boldsymbol{\theta})=&[\mathcal{L}_{r}(\boldsymbol{\theta}),\mathcal{L}_{r_{x}}(\boldsymbol{\theta}),\mathcal{L}_{r_{t}}(\boldsymbol{\theta}),\mathcal{L}_{ic}(\boldsymbol{\theta}),\\\
&\mathcal{L}_{iv}(\boldsymbol{\theta}),\mathcal{L}_{bl}(\boldsymbol{\theta}),\mathcal{L}_{br}(\boldsymbol{\theta})]\,.\end{split}$
(11)

Thus, given the weight vector

$\boldsymbol{\lambda}=[\lambda_{r},\lambda_{r_{x}},\lambda_{r_{t}},\lambda_{ic},\lambda_{iv},\lambda_{bl},\lambda_{br}]\,,$
(12)

the loss function to be minimized would be

$\mathcal{L}(\boldsymbol{\theta})=\boldsymbol{\lambda}\cdot\boldsymbol{\mathcal{L}}(\boldsymbol{\theta}).$
(13)

The weight parameters are chosen so that the components of the loss function
vector (11) have comparable values to minimize bias.

The motivation for using PINNs to solve PDEs is because of their potential
advantage for problems with large computational complexity. For a PDE with
$d_{i}$ dimensional input and single dimensional output, the complexity of a
PINN with $L$ homogeneous dense hidden layers with $n$ nodes, $N_{d}$ data
points, and $N_{it}$ iterations will be
$\mathcal{O}(N_{d}N_{it}(n(d_{in}+1)+n^{2}(L-1)))$ [13].

##  4 Gravitational Perturbations of Schwarzschild Black Holes

When a BH is slightly perturbed, the gravitational radiation it emits as it
settles down (ring-down) has characteristic frequencies and decay times
independent of the process that gave rise to the gravitational waves (GWs).
The emission is in the form of QNMs. The modes are a family of exponentially
damped sinusoidals with frequencies and decaying times directly related to the
“hairs” of the BH, namely its mass, spin, and charge [14].

We will focus only on a non-spinning and uncharged BH, also called
Schwarzschild BH, in which the only hair in the BH is its mass $M$. To study
the perturbations of a Schwarzschild BH, one starts with the background space-
time metric

$\displaystyle ds^{2}$ $\displaystyle=$ $\displaystyle
g^{0}_{\mu\nu}dx^{\mu}dx^{\nu}=-\left(1-\frac{2\,M}{r}\right)dt^{2}$
$\displaystyle+$
$\displaystyle\left(1-\frac{2\,M}{r}\right)^{-1}dt^{2}+r^{2}\,d\Omega^{2}\,,$

where $d\Omega^{2}=d\theta^{2}+\sin^{2}{\theta}\,d\varphi^{2}$. One then adds
a perturbation of the form $g_{\mu\nu}=g^{0}_{\mu\nu}+h_{\mu\nu}$, and the
Einstein equations reduce to a set of linear partial differential equations
for $h_{\mu\nu}$. After decomposing $h_{\mu\nu}$ in tensor spherical harmonics
and with a clever combination of components of $h_{\mu\nu}$, one arrives at a
single master equation for a scalar quantity $\Phi$ decomposed as [15]

$\Phi(t,r,\theta,\varphi)=\frac{1}{r}\sum_{\ell m}\Phi_{\ell m}(t,r)\,Y_{\ell
m}(\theta,\varphi)\,.$ (15)

Since we only consider a spherically symmetric background, the perturbation
will not depend on $\varphi$, and $m$ can be ignored. The master equation for
each $\Phi_{\ell}$ reads

$-\frac{\partial^{2}}{\partial t^{2}}\Phi_{\ell}+\frac{\partial^{2}}{\partial
x^{2}}\Phi_{\ell}+V_{\ell}(r)\Phi_{\ell}=0,$ (16)

where $x$ is the “tortoise” radial coordinate defined within $r\in(2M,\infty)$
by

$x=r+2\,M\ln\left(\frac{r}{2M}-1\right)\,;$ (17)

thus, $x\in(-\infty,\infty)$. For simplicity, we will drop the $\ell$ label in
$\Phi$.

If the interest is with “axial” or odd-parity perturbations, namely those that
transform under a parity operation as $(-1)^{\ell+1}$, the potential $V(r)$ is
given by

$V(r)=\left(1-\frac{2M}{r}\right)\left[\frac{2(n+1)}{r^{2}}+\frac{2(1-s^{2})M}{r^{3}}\right]\,,$
(18)

with $2\,n=(\ell-1)(\ell+2)$ and $s=0,1$, and 2 for scalar, electromagnetic,
and gravitational perturbations, respectively. For our case, we set $s=2$. The
master equation, in this case, is known as the Regge-Wheeler equation.

If, on the other hand, one is interested in “polar” or even-parity
perturbations that transform under a parity operation as $(-1)^{\ell}$, the
potential $V$ is given by

$\displaystyle V(r)$ $\displaystyle=$
$\displaystyle\left(1-\frac{2M}{r}\right)\frac{1}{r^{3}(nr+3M)^{2}}$
$\displaystyle[2\,n^{2}(n+1)r^{3}+6\,n^{2}M\,r^{2}+18\,n\,M^{2}r+18M^{3}]$

For this case, the master equation is called the Zerilli equation.

The potentials have a barrier around $x\sim 1$. They also vanish as one
approaches the BH horizon, $r\rightarrow 2\,M$ or $x\rightarrow-\infty$, and
far away from the hole, i.e., when $r$ and $x\rightarrow\infty$. A
transformation connects the Zerilli and Regge-Wheeler equations [14].
Therefore, both equations yield the same QNMs. The Zerilli equation was
originally solved in the frequency domain to compute QNMs [14]. Table 1 shows
the frequencies $\omega$ and decay times $\tau$ for the most dominant $\ell$
modes in which $\Phi\propto e^{-t/\tau}\,\sin{(\omega\,t)}$.

$\ell$ | $\omega\,M$ | $\tau/M$
---|---|---
2 | 0.37367 | 11.241
3 | 0.59944 | 10.787
4 | 0.80918 | 10.620
Table 1: QNM parameters of a Schwarzschild BH in which $\Phi_{\ell}\propto
e^{-t/\tau}\,\sin{(\omega\,t)}$

We will solve both the Zerilli and Regge-Wheeler in the time domain with both
PINNs and for comparison with FD methods. As in the frequency domain case, we
require that the perturbations are outgoing into the BH horizon and outgoing
at infinity [14]. Since the potential vanishes at the horizon and spatial
infinity, the master equation Eq. (15) reduces to a wave equation, and we
impose the following boundary conditions:

$\left(\frac{\partial}{\partial t}-\frac{\partial}{\partial x}\right)\Phi=0,$
(20)

as $x\rightarrow-\infty$, i.e. into the BH, and

$\left(\frac{\partial}{\partial t}+\frac{\partial}{\partial x}\right)\Phi=0.$
(21)

as $x\rightarrow\infty$. We choose as initial conditions

$\displaystyle\Phi(x)$ $\displaystyle=$ $\displaystyle
A\exp{\left[-\frac{(x-x_{0})^{2}}{\sigma^{2}}\right]}$ (22)
$\displaystyle\frac{\partial\Phi}{\partial t}(x)$ $\displaystyle=$
$\displaystyle 2\frac{(x-x_{0})^{2}}{\sigma^{2}}\Phi(x)\,.$ (23)

That is, we initially have a Gaussian outgoing pulse with amplitude $A$, width
$\sigma$, and centered at $x_{0}$. We set $A=1$, $x_{0}=4\,M$, and
$\sigma=5\,M$. All quantities are reported in units of $M$.

##  5 Computational Methodology

For solutions obtained with FD methods, we use a uniform mesh with
$N_{x}=1,000$ grid points in a domain $x/M\in[-50,150]$, i.e., grid-spacing
$\Delta x=0.2\,M$. Spatial differentiation is approximated with 2nd-order FD
operators. We use a method of lines with time updates via a 4th-order Runge-
Kutta method with a Courant factor of $0.5$. The time-step is then $\Delta
t=0.5\,\Delta X=0.1\,M$. We evolve for a time span $t/M\in[0,50]$. Thus, we
take $N_{t}=500$ steps, which translates into $N_{F}=N_{x}N_{t}=5\times
10^{5}$ space-time grid points.

For the PINNs solutions, we use $N_{i}=800$, $N_{b}=400$, and $N_{r}=32,000$,
which translates into $N_{P}=2N_{b}+N_{i}+N_{r}=33,600$ space-time points
where the residuals are evaluated. The input nodes are $x$ and $t$, with
$\Phi_{\boldsymbol{\theta}}$ the output node. To prevent PINN from adapting a
blowing-up solution, we enforce a bound by applying the output transformation
$\Phi_{\boldsymbol{\theta}}=A\tanh(\Phi_{\boldsymbol{\theta}})$ as a
constraint. The network has four hidden layers with widths [80, 40, 20, 10].
The number of trainable parameters are $dim(\boldsymbol{\theta})=2\cdot
80+80+80\cdot 40+40+40\cdot 20+20+20\cdot 10+10+10\cdot 1+1=4,521$. We use a
Glorot uniform initializer and $\tanh{}$ activation throughout the network.
The PINN is trained using the ADAM optimizer (10,000 iterations) followed by
the L-BFGS optimizer (15,000 iterations). For the weight vector
$\boldsymbol{\lambda}$ given in Eq. 12, we use [100, 100, 100, 1, 100, 1, 1].
The weight $\lambda_{iv}=100$ is because of the phase problem that will be
discussed in the next section. Lastly, we use DeepXDE’s residual points re-
sampling feature to get a fresh batch of training points after every 100
iterations [16].

##  6 Results

We used three metrics for analyzing errors and deviations between PINNs and FD
results: Root-Mean-Squared-Deviation (RMSd):

$\textnormal{RMSD}=\sqrt{\frac{\sum_{N_{F}}(\Phi-\Phi_{\boldsymbol{\theta}})^{2}}{N_{F}}},$
(24)

Mean-Absolute-Deviation (MAD):

$\textnormal{MAD}=\frac{1}{N_{F}}\sum_{N_{F}}|\Phi-\Phi_{\boldsymbol{\theta}}|,$
(25)

and Relative $L^{2}$ (RL2) norm:

$\textnormal{RL2}=\sqrt{\frac{\sum_{N_{F}}(\Phi-\Phi_{\boldsymbol{\theta}})^{2}}{\sum_{N_{F}}\Phi^{2}}},$
(26)

where the functions are evaluated at the $N_{F}$ space-time grid points used
to construct the FD solution. The values of these metrics are shown in Table
2. It is evident from the values of RMSD and MAD that the PINN method produces
results close to those from FD methods. The Relative $L^{2}$ error is high
because most data points are zero. The formula of Relative $L^{2}$ error is

| Zerilli | Regge-Wheeler
---|---|---
RMSD | $\ 0.0370\ $ | $\ 0.0333\ $
MAD | $\ 0.0182\ $ | $\ 0.0187\ $
RL2 | $\ 0.2806\ $ | $\ 0.2359\ $
Table 2: RMSD, MAD, and RL2 deviations between the FD and PINN solutions.

It is evident from Table 2 that PINN results are very close to those from FD,
with low RMSD and MAD. The reason why the RL2 values seem high is because a
significant fraction of the data points in the computational domain are zero
and do not contribute to the denominator.

Figure 1 shows four snapshots of $\Phi(x,t)$ at times
$t/M=10,20,30,\textnormal{ and }40$ for the case of a Regge-Wheeler potential.
In red is the solution from FD and in blue that from PINN. In Figure 2, we
show the absolute value difference between the FD and PINN solutions at the
corresponding times. The most significant differences are observed at the
leading edge of the pulse. For the case of the Zerilli potential, Fig. 3 shows
snapshots in the evolution and Fig. 4 the differences between FD and PINN.
Here again, the most prominent differences are observed at the leading edge.

Figure 1:  Snapshots of the solutions for the Regge-Wheeler Potential. Figure
2: Absolute difference between the FD and PINN solutions (Regge-Wheeler
Potential). Figure 3: Snapshots of the solutions for the Zerilli Potential.
Figure 4: Absolute difference between the FD and PINN solutions (Zerilli
Potential).

The main reason for the differences is because PINNs for linear PDEs suffer
from a phase problem. Since in Eq. (16) the potential is localized around
$x=1$, to a good approximation, in most of the computational domain, we are
solving the wave equation. If $\Phi(x,t)$ is a solution, so $\Phi(x,t+\alpha)$
with $\alpha$ a constant. Thus, PINN may approach a solution with some
associated phase instead of the true solution. To avoid this pitfall, we set
the weight of initial velocity loss to 100, forcing PINN to minimize the phase
$\alpha$.

In Figure 5, we show the evolution of the total loss function and of each of
its components as a function of iterations.

Figure 5: Evolution of loss function and each of its components as a function
of iterations.

To calculate the QNMs, we sampled the solution $\Phi(x,t)$ of Eq. 16 for both
the Regge-Wheeler and Zerilli potentials at $x_{q}=10\,M$. As mentioned
before, at late times after the initial burst passes, the solution will behave
as $\Phi(x_{q},t)\propto e^{-t/\tau}\cos{(\omega t)}$. Figure 6 shows
$\Phi(x_{q},t)$ for $\ell=2$ from PINNs, FDs, and the solution using the
values for $\omega$ and $\tau$ from Table 1. The left panel is for the Regge-
Wheeler potential, and the right panel is for Zerilli.

Figure 6: Curve Fittings for both Regge-Wheeler and Zerilli Potential.

We followed two approaches to calculate $\omega$ and $\tau$ from the PINN and
FD solutions. In method 1, a Fourier transformation was applied to $\Phi$ to
find the frequency $\omega$. For the decay time, $\tau$ was found by fitting a
straight line passing through the local maxima of the log plots in Fig. 6. In
method 2, we applied a direct curve fit $e^{-t/\tau}\cos{(\omega t)}$ to the
data. The results from both fits are given in Table 3.

| $\boldsymbol{\tau/M}$ | $\boldsymbol{\omega\,M}$
---|---|---
| Regge-Wheeler
FD1 | $10.488\,(6.70)$ | $0.370\,(0.90)$
FD2 | $11.489\,(2.21)$ | $0.387\,(3.68)$
PINN1 | $10.474\,(6.82)$ | $0.373\,(0.11)$
PINN2 | $10.636\,(5.39)$ | $0.383\,(2.51)$
| Zerilli
FD1 | $10.804\,(3.89)$ | $0.370\,(0.90)$
FD2 | $11.073\,(1.49)$ | $0.378\,(1.26)$
PINN1 | $10.089\,(10.25)$ | $0.375\,(0.29)$
PINN2 | $9.620\,(14.42)$ | $0.376\,(0.52)$
Table 3: QNM parameters $\omega$ and $\tau$ for $\ell=2$. In parenthesis are
the percentage error. The subindices denote the method used. For reference,
the values from the literature are $\tau=11.241\,M$ and $\omega=0.374/M$ for
the $\ell=2$ mode.

##  7 Conclusions and Future Directions

The surge in popularity of neural networks in data science has also triggered
applications in which input from physics is used to accelerate discovery and
make more accurate predictions. In the present study, we have applied PINNs to
solve the Zerilli and the Regge-Wheeler equations in the time domain to
compute the QNMs of a Schwarzschild BH. At the core of the problem is the
construction of a loss function with terms capturing the physics of the
problem, e.g., residuals of the equations, boundary conditions, and initial
data. To estimate the accuracy and efficiency of PINNs for this problem, we
compare the extracted QNMs with those obtained with FD methods. The results
show that the PINN approach is competitive but not more accurate than FD
methods. At the same time, our results show that PINNs solve the equations
under consideration with only a fraction of collocation points than FD. This
supports the view that as the dimensionality of the problem increases, PINNs
become more efficient as a tool to explore parameter space and guide where to
carry out higher accuracy simulations with other methods.

Apart from using a gradient-enhanced PINN, here are some improvements to
mitigate errors that we will consider in future work:

  * •

_Residual-based adaptive sampling:_ Wu et al. [17] experimented with different
non-adaptive and residual-based adaptive for PINN and developed structures of
two adaptive samplings: residual-based adaptive distribution (RAD) and
residual-based adaptive refinement with distribution (RAR-D). RAD analyzes the
current PINN performance and creates a new batch of training points according
to the distribution of residual. On the other hand, RAR-D analyzes the current
PINN performance and appends $m$ residual points with the highest residuals to
the training domain. Compared to RAD, RAR-D utilizes less computing resources.

  * •

_Learning rate annealing:_ In some cases, PINN fails because of having stiff
loss gradients that hinder the progress of the gradient descent method because
of it falling in a limit cycle or becoming unstable [18]. Wang et al. [18]
proposed a learning rate annealing method that updates the weights of the loss
terms at each iteration of the gradient descent, allowing the gradient to be
more gentle and relaxing the interactions between competing loss terms.

  * •

_Improved fully-connected neural architecture:_ The accuracy of the PINN can
be improved by feeding it the prior knowledge about the physical system, for
example, symmetry, conservation laws, etc. However, many physical systems are
poorly understood, obstructing the suggested exploitation. However, extending
the architecture of the PINN to include general symmetry can improve its
accuracy. Wang et al. [18] suggested one such extension: introducing two
transformer networks that account for the multiplicative interaction between
input dimensions and augment the hidden states with residual connections. This
extension provides about a ten-fold improvement compared to traditional PINN
[18].

  * •

_Incorporating causality:_ In some cases, particularly with chaotic cases,
PINN tends to approach incorrect solutions because of it being inconsiderate
of causality. Wang et al. [19] proposed an algorithm to incorporate the
temporal causality in PINN. The algorithm gives weights to the residual loss
terms at different times and updates them concerning them at times before that
particular time. For weight updates, it uses exponential decay, so the
residual loss term at any particular time will only be considered if the
residual loss terms before that time are minimized enough. This idea can be
extended to spatial causality, so any residual point is only affected by the
points inside the lower half of the light cone.

  * •

_Multi-scale Fourier feature embeddings:_ Wave equations exhibit high
frequencies, and PINNs usually fail to capture the high-frequency nature of
the solutions. Wang et al. [20] examined the high-frequency and multi-scale
problems through the lens of Neural Tangent Kernel (NTK). After analyzing the
spectral bias, they presented spatio-temporal multi-scale Fourier feature
architecture. The architecture allows the network to learn frequencies
determined by problem-dependent input parameter $\sigma$.

##  8 Acknowledgments

This work is supported by NSF grants PHY-2114582 and PHY-2207780.

## References

  * [1] A. G. Baydin, B. A. Pearlmutter, A. A. Radul, J. M. Siskind, Automatic differentiation in machine learning: A survey, J. Mach. Learn. Res. 18 (1) (2017) 5595–5637.
  * [2] M. Raissi, P. Perdikaris, G. Karniadakis, Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations, Journal of Computational Physics 378 (2019) 686–707.  doi:https://doi.org/10.1016/j.jcp.2018.10.045.
URL https://www.sciencedirect.com/science/article/pii/S0021999118307125

  * [3] R. Bellman, Dynamic programming, Science 153 (3731) (1966) 34–37.  arXiv:https://www.science.org/doi/pdf/10.1126/science.153.3731.34, doi:10.1126/science.153.3731.34.
URL https://www.science.org/doi/abs/10.1126/science.153.3731.34

  * [4] A. Ferrer-Sánchez, J. D. Martín-Guerrero, R. R. de Austri, A. Torres-Forné, J. A. Font, Gradient-annihilated pinns for solving riemann problems: Application to relativistic hydrodynamics (2023).  arXiv:2305.08448.
  * [5] M. A. Haddou, Quasi-normal modes of near-extremal black holes in drgt massive gravity using physics-informed neural networks (pinns) (2023).  arXiv:2303.02395.
  * [6] W. S. McCulloch, W. Pitts, A logical calculus of ideas immanent in nervous activity, Bulletin of Mathematical Biophysics 5 (1943) 115–133.
  * [7] F. Rosenblatt, The perceptron: A probabilistic model for information storage and organization in the brain, Psychological Review 65 (6) (1958) 386–408.  doi:10.1037/h0042519.
URL https://doi.org/10.1037/h0042519

  * [8] X. Glorot, Y. Bengio, Understanding the difficulty of training deep feedforward neural networks, in: Y. W. Teh, M. Titterington (Eds.), Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, Vol. 9 of Proceedings of Machine Learning Research, PMLR, Chia Laguna Resort, Sardinia, Italy, 2010, pp. 249–256.
URL https://proceedings.mlr.press/v9/glorot10a.html

  * [9] I. Goodfellow, Y. Bengio, A. Courville, Deep Learning, MIT Press, 2016, http://www.deeplearningbook.org.
  * [10] D. E. Rumelhart, G. E. Hinton, R. J. Williams, Learning representations by back-propagating errors, Nature 323 (1986) 533–536.  doi:10.1038/323533a0.
  * [11] D. P. Kingma, J. Ba, Adam: A method for stochastic optimization (2017).  arXiv:1412.6980.
  * [12] J. Yu, L. Lu, X. Meng, G. E. Karniadakis, Gradient-enhanced physics-informed neural networks for forward and inverse pde problems, Computer Methods in Applied Mechanics and Engineering 393 (2022) 114823.  doi:https://doi.org/10.1016/j.cma.2022.114823.
URL https://www.sciencedirect.com/science/article/pii/S0045782522001438

  * [13] P. J. Freire, S. Srivallapanondh, A. Napoli, J. E. Prilepsky, S. K. Turitsyn, Computational complexity evaluation of neural network applications in signal processing (2022).  arXiv:2206.12191.
  * [14] C. Subrahmanyan, D. S., The quasi-normal modes of the schwarzschild black hole, Proc. R. Soc. Lond. 344 (1639) (1975) 441–452.  doi:10.1098/rspa.1975.0112.
  * [15] K. D. Kokkotas, B. G. Schmidt, Quasi-Normal modes of stars and black holes, Living Reviews in Relativity 2 (1) (1999) 2.
  * [16] L. Lu, X. Meng, Z. Mao, G. E. Karniadakis, DeepXDE: A deep learning library for solving differential equations, SIAM Review 63 (1) (2021) 208–228.  doi:10.1137/19M1274067.
  * [17] C. Wu, M. Zhu, Q. Tan, Y. Kartha, L. Lu, A comprehensive study of non-adaptive and residual-based adaptive sampling for physics-informed neural networks, Computer Methods in Applied Mechanics and Engineering 403 (2023) 115671.  doi:https://doi.org/10.1016/j.cma.2022.115671.
URL https://www.sciencedirect.com/science/article/pii/S0045782522006260

  * [18] S. Wang, Y. Teng, P. Perdikaris, Understanding and mitigating gradient flow pathologies in physics-informed neural networks, SIAM Journal on Scientific Computing 43 (5) (2021) A3055–A3081.  arXiv:https://doi.org/10.1137/20M1318043, doi:10.1137/20M1318043.
URL https://doi.org/10.1137/20M1318043

  * [19] S. Wang, S. Sankaran, P. Perdikaris, Respecting causality is all you need for training physics-informed neural networks, arXiv.org (Mar 2022).
URL https://arxiv.org/abs/2203.07404

  * [20] S. Wang, H. Wang, P. Perdikaris, On the eigenvector bias of fourier feature networks: From regression to solving multi-scale pdes with physics-informed neural networks, Computer Methods in Applied Mechanics and Engineering 384 (2021) 113938.  doi:https://doi.org/10.1016/j.cma.2021.113938.
URL https://www.sciencedirect.com/science/article/pii/S0045782521002759


# Self-Sovereign Identity for IoT environments:
A Perspective

Geovane Fedrecheski1, Jan M. Rabaey4, Laisa C. P. Costa1,
Pablo C. Calcina Ccori1, William T. Pereira1, Marcelo K. Zuffo1
{geovane, laisa<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>This research was partially
funded by CAPES.  1Interdisciplinary Center on Interactive Technologies,
Polytechnic School,
University of Sao Paulo, Brazil
4Berkeley Wireless Research Center, Electrical Engineering and Computer
Science Department,
University California, Berkeley, US

###### Abstract

This paper analyses the concept of Self-Sovereign Identity (SSI), an emerging
approach for establishing digital identity, in the context of the Internet of
Things (IoT). We contrast existing approaches for identity on the Internet,
such as cloud-based accounts and digital certificates, with SSI standards such
as Decentralized Identifiers (DIDs) and Verifiable Credentials (VCs). To the
best of our knowledge, this is the first thorough comparison of these
approaches. The benefits and challenges of using DIDs and VCs to identify and
authenticate IoT devices and their respective users are discussed. In the end,
we establish that SSI, with its owner-centric, privacy-aware and
decentrailized approach, provides a viable and attractive option for secure
identification of IoT devices and users.

##  I Introduction

The Internet was developed as a research project to interconnect computers
[1]. Protocols like TCP/IP, developed as open standards, allowed computers to
connect in a global scale. However, even after the world-changing impacts the
Internet had on society over the last decades, it has no pervasive, privacy-
preserving, and easy to use mechanism to manage digital identities.

Where human activity is involved, a common abstraction is to use accounts,
i.e. digital records, often containing personally identifiable information
(PII), that are protected by a password and saved on a webserver. Although
this method has been working for several decades, it has many security
drawbacks, such as the use of weak passwords [2] and the potential for privacy
violation. Furthermore, the manual approach of password-protected accounts
makes it unsuitable to machine-to-machine interactions, a common scenario in
the IoT.

More automated solutions can be achieved by using Public Key Certificates
(PKCs) that bind names to public keys [3]. Widespread use of PKC, however, is
limited to organizations, due to the complexity of current methods. For
instance, while websites usually prove their identities to web browsers using
certificates, users do not use certificates in the same way, i.e. to prove
their identity to the website. Moreover, existing standards were not designed
for privacy, as evidenced by the use of real names in known certificate
formats such as PGP [4] and X.509 [5]. To aggravate the situation, the
assignment of unique names often require centralized architectures, which is
inadequate for distributed IoT applications.

A recent development towards online identification of users, organizations,
and devices has been referred to as “Self-Sovereign Identity” (SSI). The basic
premise of SSI is that subjects should own and control their own identity,
instead of having it stored and managed by a third party. This approach brings
several benefits, including enhanced privacy, control, and decentralization.
Two new standards are being proposed to realize SSI, namely, Decentralized
Identifiers (DIDs) and Verifiable Credentials (VCs) [6, 7]. While DIDs focus
on cryptographic identification, VCs provide a means for privacy-aware and
authenticated attribute disclosure.

In this paper we analyze existing approaches to identity in the Internet, such
as X.509, PGP [4], and SSI. We present a detailed comparison focusing on the
data models used to represent identity across different standards. Finally, we
discuss what are the benefits of using SSI in the Internet of Things, and
identify challenges that must be overcome.

##  II Self-Sovereign Identity

Self-Sovereign Identity is an approach in which subjects are in full control
of their own digital identities [8]. SSI is analogous to offline identifiers,
which are carried by the owner (within a physical wallet), but contrasts with
current digital identity solutions, which are either based on accounts or
digital certificates, and have privacy and centralization issues.

While initially proposed by members [8] of online communities, a formal
definition of SSI was released recently [9]. Considering an identity to be
composed of an identifier associated with a set of name-value attributes, the
full self-sovereign identity of an individual is the collection of all
identities (i.e. identifiers and attributes) that span a range of
decentralized domains, such that the individual is in full control of these
identities [9]. As digital privacy concerns have been growing in recent years,
interest in SSI has intensified. This led to the definition of a set of
technical specifications to implement SSI, which we describe below.

###  II-A Decentralized Identifiers

Digital identifiers so far have been either centralized or non-resolvable. For
example, Uniform Resource Locators (URLs), which can be used to resolve HTML
documents, usually depend on domains names assigned by ICANN111Internet
Corporation for Assigned Names and Numbers - https://www.icann.org/, a
centralized authority. On the other hand, unique, user-generated identifiers
such as UUIDs cannot be used to resolve associated metadata.

To address this, a new specification for Decentralized Identifiers (DIDs) is
being developed with the support of the W3C [6]. The DID has the following
syntax: did:btcr:abcdefgh12345678. The did prefix is mandatory, and colons are
used to separate a method definition and a method-specific id. A method is a
specific set of rules for working with DIDs (the example above uses the
Bitcoin method), and the format of the id depends on that method. An open
directory of different DID methods is available for public access and open for
new submissions222https://w3c-ccg.github.io/did-method-registry/.

Each DID is associated with a DID Document (DDo) that contains the DID itself
along with public keys, service endpoints, and other metadata. The public key
is used to authenticate and encrypt messages, while the endpoint provides a
way to message the entity that controls that DID. To control a specific DID, a
subject just have to own a private key associated with public keys in the DDo.

A common storage mechanism for DDos are Blockchains, from which they can be
resolved using the referred DID. On the other hand, in some cases individuals
may not want to publish their DIDs, e.g. to avoid identity correlation. In
this case, the special peer DID method can be used. Thus, DIDs are unique
identifiers that can be resolved to DID Documents, and they allow the
establishment of an end-to-end secure channel. What DIDs do not provide,
however, is a means for entities to prove claims (attributes) about
themselves.

###  II-B Verifiable Credentials

Verifiable Credentials (VCs) is a W3C recommendation for portable and provable
claims about a subject. For instance, a person may claim to have the name
Alice, and a device may claim to be of type Camera. The relationship among
DIDs and VCs is shown in Figure 1. All VCs refer to the DID of the subject to
which they have been assigned (e.g. an IoT device). VCs also contain the DID
of its issuer along with a cryptographic proof. This allows a subject to
present a VC to a verifier, which can then resolve the DDo of the issuer (and
therefore its public key) from a public ledger, e.g. a Blockchain, and check
the authenticity of the VC. Figure 2 shows a use case where a user issues a VC
to a device.

A major incentive for SSI is privacy, therefore VCs are expected to be private
and stored in a personal wallet, to be shared only when necessary. To further
improve privacy, the VC specification supports zero-knowledge proofs, i.e. a
cryptographic technique “where an entity can prove to another entity that they
know a certain value without disclosing the actual value” [7].

Figure 1: A DID is the link between a DDo and a set of VCs, much like a
primary key can link different tables in a database. This allows a subject
associated with a DID to prove its identity.  Figure 2: An owner-centric
scenario using SSI. Each subject generates its own DDo, while the VC is issued
by the device owner.

###  II-C Decentralization, privacy, and layered authentication

Public key cryptography can be used to derive a shared secret over an insecure
channel [10]. However, a known problem is how to trust the origin of the
public key. To solve this, a signed certificate that binds a name to a public
key was proposed [3]. Two common standards for digital certificates are X.509
[5, 11] and Pretty Good Privacy (PGP) [4]. Although they differ in details,
both follow the original definition in which names are tied to public keys and
signed by a third party [3].

A crucial challenge faced by certificate-based solutions was ensuring the
uniqueness of the names. The most common solution to this was to rely on
centralized architectures. For example, the name on the subject field in X.509
must be enforced by a global authority, and the PGP id uses the name of a
person plus her email address, which ultimately depends on DNS, which is
centralized as well.

More recently, the emergence of Blockchain technology allows decentralized
consensus for choosing unique names. One problem, however, is that solutions
based on certificates put sensitive information in the identifier, which
compromises the privacy of certificate holders, and therefore might not be
suitable for storage in public, immutable ledgers.

An approach to solve this is to limit the exposure of PII on the ledger by
only writing anonymous information to it, e.g., public keys. In particular,
this approach enables public key storage and lookup, which can be used to
create a confidential and non-repudiable channel. Higher-level abstractions
can then be used to implement authentication, since the attributes necessary
to authenticate users are usually application-specific.

This is the solution that results from combining the DID and VC
specifications. Containing only pseudonymous information, such as public keys
and service endpoints, DID Documents can be used to establish a
cryptographically secure channel between two entities. After the confidential
channel is created, the entities can exchange VCs, according to the levels of
trust necessary to each application. In other words, while DIDs are lower-
level and pseudonymous, VCs are application-specific and can be used to
authenticate attributes such as name or device type. Finally, it is worth
noting that as each DID is usually a high-entropy random string, name
collisions actually stop being a concern.

##  III Data models for digital identity

This section provides analysis and comparisons of existing data models for
digital identity. We start by discussing the limitations of password-based
accounts, and then proceed to compare data models based on public key
cryptography.

###  III-A Accounts

The most basic method to identify subjects in computer systems is the account:
a digital record, usually composed of at least a user name and a password,
that identifies a user. Accounts are commonly stored in a server controlled by
the service provider. For example, popular IoT vendors require that a device
owner have a cloud-based account, so that she can use this virtual identity to
configure her devices.

While accounts have been used for decades in a variety of systems, they are
among the most primitive solutions for digital identities. Among the problems
related to account-based authentication are privacy and the use of passwords.
With respect to privacy, issues arise because the user is forced to store
plaintext PII in a third-party system. Regarding passwords, the literature
indicates common problems such as password reuse and difficulty to enforce
strong passwords, and points that the most widespread solution is the use of
“recommendations” [2], which depends on human factors and are difficult to
enforce.

TABLE I: Comparison of standardized data models for digital identity. | PGP | X.509 | Self-Sovereign Identity
---|---|---|---
| PGP Key |  | Public Key Certificate
---
(PKC)
| Attribute Certificate
---
(AC)
| DID Document
---
(DDo)
| Verifiable Credential
---
(VC)
Goal |  | Prove control of public
---
keys and identifier
(plus optional attributes)
Publish public keys
| Prove control of public
---
keys and identifier
(plus optional attributes)
Publish public keys
| Prove possession of
---
attributes
| Prove control of identifier
---
Publish public keys and
service endpoints
| Prove possession of
---
attributes
Identifier | Name and Email | Qualified Name | Same as PKC | Method-specific DID | Same as DDo
| Uniqueness
---
of identifier
| Global
---
authority (DNS)
Global authority (CA) | Same as PKC |  | Ledger consensus /
---
Random number gen.
Same as DDo
Public Key(s) | 1 primary, N subkeys | 1 | n/a (points to PKC) | N | n/a (points to DDo)
Attribute(s) | Attributes field | Extensions field | Attributes field | - | subjectCredential field
Endorsement | Signature of many peers | Signature of a CA | Signature of a CA |  | Self-signed (optional)
---
Indirect through VC
Signature of an Issuer
| Service
---
endpoints
- | - | n/a | Yes | n/a
| Semantic
---
schemas
- | - | - | Yes | Yes

###  III-B Models based on public key cryptography

Pretty Good Privacy (PGP) [4] was created to allow individuals to prove a
binding between a public key and an identifier, the latter being composed by a
real name and an email address. This binding, along with optional attributes
and signatures, is stored in a document called a PGP Key. Conceived as a
distributed solution, individuals in the PGP scheme can sign the keys of other
individuals, so as to give an endorsement that they are who they say they are,
i.e. they are not impersonating someone or using a fake id. This scheme of
peer signatures is often referred to as the Web of Trust.

X.509 Certificates, created by the X.500 working group, defines a format for
Public Key Certificates (PKC) that binds public keys to qualified names [5].
PKCs are widely used in the Internet to authenticate domain names and protect
communications. Although technically nothing prevents peer-to-peer signature
of X.509 certificates, the vast majority of its usage is under centralized
architectures, in which a trusted authority signs the certificate to make it
trustworthy. Finally, in certain cases it is useful to have a separate
document that, instead of having public key, contains only a name associated
with signed attributes. To meet this demand, X.509 proposed a new standard
called Attribute Certificate (AC), which contains no public key, but links to
a PKC through its subject field [11].

Finally, as previously mentioned, Self-Sovereign Identity is a novel approach
that uses Decentralized Identifiers [6] and Verifiable Credentials [7] to
prove possession of identifiers and attributes, respectively.

###  III-C High-level comparison

The following paragraphs compares models used by the PGP, X.509, and SSI
standards, according to Table I.

#### Goal

Both PGP Keys and PKCs are used to publish and prove control of public keys
that are tied to identifiers. Also, in these approaches, attributes can be
provided either in the same document as the public keys (PGP Key and PKC), or,
in the case of X.509, in a separate document (AC). On the other hand,
documents in the SSI paradigm have decoupled goals: DDos are be used to prove
control of an identifier and to provide a means for establishing a secure
communication; and VCs are used to prove possession of attributes.

#### Identifier (and uniqueness)

While PGP and X.509 use names and other identifiers that depend on centralized
entities, in SSI the identifiers are completely decentralized and can be auto-
generated, for example by using strong random number generators. Not only this
enables easy global uniqueness, but the pseudonymous characteristic of DIDs
also enhances privacy, when compared to previous approaches based on real
names or email addresses. Pseudonymous identifiers are also more suited for
IoT, since devices do not have names or email addresses by default.

#### Public Key(s)

PKCs are limited to only one public key, while PGP Keys and DDos can have
many. PGP still differs from DDos as the former uses a primary key that is
tied to an identifier and allows more subkeys to be included, while the latter
support multiple public keys without assumptions other than the key type,
which usually encodes its purpose, e.g. sign or encrypt.

#### Attribute(s)

Both PGP Keys and X.509 certificates support arbitrary attributes, either via
PKC extensions or dedicated ACs. In self-sovereign identity, a DDo does not
support attributes in order to stay anonymous. Instead, all PII is handled
only by VCs, which are private by default.

#### Endorsement(s)

PGP Keys can be signed by one or more peers, but X.509 certificates and VCs
can only be signed by a single issuer. DDos are not signed by external
entities, and may be self-signed. When a DDo is written to a ledger, however,
the transaction will be signed, which can be used to attest the validity of
the DDo. Another way of proving endorsement over a DID is to check the
signature of a VC associated with that DID. If the VC is signed by a trusted
issuer, the DID can be trusted. Furthermore, with respect to who can sign the
endorsements, technically it can be anyone, but there are philosophical
differences. X.509, for example, was devised to work within a centralized
architecture, where only trusted authorities can sign certificates. On the
other end of the spectrum, PGP expects peer-to-peer signatures, which
ultimately creates a Web of Trust. Finally, VCs does not make strong
assumptions on the network structure, although decentralized approaches,
especially the ones based on Blockchain, may be favorable.

#### Service endpoints

a novelty introduced by DDos is the association of a built-in mechanism to
reach the owner of a public key. This facilitates the establishment of secure
interactions between peers, from web to IoT environments.

#### Semantic schemas

only SSI-based data models allow extensibility through semantic annotations
over JSON documents. The main reason for this is that these technologies only
became popular after X.509 and PGP were developed.

###  III-D Public key distribution

TABLE II: Comparison of data models for key distribution. | Raw Pub Key | PKC | DDo
---|---|---|---
| Associates key material
---
to metadata
| X | X
Privacy: no PII disclosed | X |  | X
| Key rotation does not
---
requires re-signing
n/a |  | X
Serialization formats |  | Binary
---
Base64
| DER
---
PEM
| JSON-LD
---
JWT
Semantic schemas |  |  | X
| Decentralized: user
---
generates the artifact
X |  | X
| Decentralized: user
---
carries the artifact
X | X | X
Service endpoint |  |  | X
TABLE III: Comparison of data models for attributes. | PKC | AC | VC
---|---|---|---
| Signed attributes
---
about a subject
X | X | X
| Key rotation does not
---
requires re-signing
| X | X
| Identifier differs from
---
key material
X | X | X
| Attributes decoupled
---
from key material
| X | X
Selective disclosure |  |  | X
Zero-knowledge proofs |  |  | X
Delegation |  | X |
Revocation | X | X | X
Serialization formats |  | DER
---
PEM
| DER
---
PEM
| JSON-LD
---
JWT
Semantic schemas |  |  | X
| Decentralized: user
---
carries the artifact
X | X | X
| Decentralized: Verifier
---
decoupled from Issuer
|  | X

An important aspect in the design of systems based on asymmetric encryption is
the data model used to support key distribution. In the following, we compare
three approaches, as shown in Table II: Raw Public Key, Public Key
Certificates, and DID Document.

#### Raw public key

this is the simplest approach, and consists in having a public key shared as a
raw array of bytes, often encoded in some ascii-compatible format, such as
base64. Although this approach is decentralized and discloses no personal
information, it does not allow associated metadata.

#### Public Key Certificate

as previously discussed, PKCs bind a name and other attributes to a public
key, which allows subjects prove their identity. Created before privacy was a
major concern, X.509 PKCs always carry PII in the main identifier, and may
carry PII in other attributes. Finally, other drawbacks of PKCs include the
imposition of specialized serialization formats (DER and PEM), tight coupling
of keys and data (which makes key rotation more difficult), and a centralized
architecture, i.e. the artifact is not self-generated.

#### DID Document

DDos associate public keys to pseudonymous metadata, while also allowing key
rotation without re-signing any associated metadata. The latter is possible
because all signed metadata actually only lives in associated VCs. An
important difference to highlight is that DDos are not signed by third
parties, thus they cannot authenticate the origin of a public key. If this is
necessary, DDos can be composed with VCs to increase security. DDos supports
JSON-based serialization formats, which are available in most programming
languages and platforms, and can benefit from publicly available semantic
schemas. As each user auto-generates their own DIDs and DDos, the management
of the identifier is decentralized. Finally, service endpoints in DDos provide
a novel way for peers to securely establish secure channels.

###  III-E Attribute distribution

Four out of the five previously described formats can be used to prove control
over attributes: PGP Keys, Public Key Certificates, Attribute Certificates,
and Verifiable Credentials. Since PGP Keys are less widely used, we only
compare the latter, as shown in Table III.

#### Public Key Certificates

the encoding of attributes in PKCs leverages the X.509 PKC extension field.
Although the reuse of an existing format may seen advantageous in terms of
compatibility, the whole certificate must be re-signed when a key is rotated,
or when selective disclosure of attributes is necessary. An important drawback
not mentioned so far is that it is impossible to disclose only a subset of the
attributes in a PKC, without contacting the issuer for a new signature.

#### Attribute Certificates

differing from PKCs, ACs contain a name and a list of attributes, but no
public key, which simplifies key rotation. Finally, while ACs support
delegation, in general they have the same drawbacks as PKCs.

#### Verifiable Credentials

similar to an AC, a VC does not contain public keys, as it focus on binding
identifiers to attributes. Among the novelties in the VC standard is the
support for selective disclosure without contacting the issuer, which is
realized using zero-knowledge cryptography. VCs also leverage JSON, a
serialization format that is both human readable and lightweight to parse. VCs
and can be further specialized into two formats: JSON Linked Data (JSON-
LD)333https://json-ld.org/, a format to serialize linked data; and JSON Web
Token (JWT), a widely used format to express security
claims444https://jwt.io/.

##  IV Benefits and Challenges of SSI for IoT

As the IoT continues to evolve, new paradigms that allow spontaneous machine-
to-machine interactions started to appear [12, 13]. Necessarily decentralized,
the future IoT will require users to be the root of trust of their devices,
leading to an owner-centric IoT. As privacy concerns raise in importance,
solutions that minimize personal data sharing become paramount. Full
realization of these and other features will require novel, open, and secure
standards for identity in the IoT. The next paragraphs discuss aspects of
self-sovereign identity that are likely to improve decentralized IoT security,
while also pointing the factors that will require innovation to bring SSI to
IoT, such as support constrained devices.

###  IV-A Benefits

The benefits of SSI for IoT, such as privacy and decentralization, are
discussed below.

#### Owner-Centric

The user can be the root of trust of her devices. Once a user is the owner and
controller of her identity, it is straightforward to create a network of
devices that belong to her, for example by provisioning an “owner=Alice”
credential to each device. One interesting consequence of this is that no
third party is needed to enforce security and administration of devices, as
the user herself will be able to do it. Note that in this approach devices can
have their own identity as well, and may only use the owner attribute to
facilitate the creation of trust relationships, i.e. devices that share the
same owner can automatically trust each other.

#### Privacy-preserving

Personal information is protected. By having the identity of owners and things
stored locally, sensitive data that would otherwise be stored in a service
provider will now live closer to the owner (usually in a digital wallet).
While the user can choose to backup his data for various reasons, she will be
able to do so in an encrypted way, as only she will possess the decryption
keys. Users and devices will also get to choose with whom they share their
credentials, and even be able to do so employing selective disclosure and
zero-knowledge proofs techniques, further improving privacy.

#### Decentralized

No single-point of failure. While identity providers may have been a
convenient way to authenticate users and devices so far, it is not clear what
happens when a provider stops providing, e.g. when it goes out of business. In
the self-sovereign approach, the user decides when her identity starts or
stops being valid, and she will have similar controls over her devices.
Finally, data breaches, information sharing without user consent, and other
issues are minimized when identities are not stored in a high-value data silo
that acts as a honeypot for hackers.

#### End-to-end security

Communications between two endpoints are secure. By exchanging DID Documents
and applying asymmetric cryptography, IoT devices can mutually authenticate,
derive short-lived symmetric keys, send encrypted messages, and enforce non-
repudiation. This approach can also be implemented in a transport-agnostic
way, enabling secure communication even among different protocols.

#### Layered authentication

Separates cryptographic and application-specific authentication. In the
former, two devices prove to each other that they are in possession of
specific public keys, while in the latter the devices prove different
attributes about themselves. This approach allows endpoints to always be
cryptographically protected, and leaves higher-level trust requirements to be
handled at the application layer.

#### Standardized and open approach

Fosters interoperability and robustness. Since both DIDs and VCs are being
developed as open W3C specifications, companies and researchers are free to
build solutions that are interoperable and rely on well-tested data models.

#### JSON-based encoding

Using JSON enables more applications to handle data extracted from DID
Documents and credentials, even if not originally designed to work with SSI.

###  IV-B Challenges

We now discuss some challenges to apply SSI in IoT environments.

#### Constrained devices

Fully adopting SSI means that devices need to be able to run asymmetric
cryptography and cope with communication overhead of transmitting metadata,
such as DID Documents and Verifiable Credentials.

#### Asymmetric Cryptography

SSI demands execution of encryption algorithms based on asymmetric keys, which
can be challenging in devices with limited processing and energy resources.
While authors points that constrained processors such as the 32-bits Cortex M0
are well equipped to execute Elliptic Curve Cryptography (ECC) [14], the
number of operations still must be controlled to avoid battery draining. A
common tactic is to use long lived session keys that are less frequently
updated, e.g. once a day.

#### Communication overhead

Depending on the communication protocol, the size of DDos and VCs may impose a
barrier. For example, low energy protocols such as LoRA and BLE have maximum
packet sizes of 222 and 244 bytes, respectively, while DDos and VCs easily
achieve 500 bytes or more. Therefore, strategies such as compression,
fragmentation, and infrequent document transmission, will be necessary. In
extreme cases, SSI may not be possible at all, which will require proxy
approaches [15].

#### DID Resolution

Higlhy constrained devices may not be able to connect to the Internet to
download DID Documents at all. A possible solution is to create a local cache
of known DIDs, either managed by the device itself or by its gateway. On the
other hand, if both devices use peer DIDs, they can simply exchange their DIDs
directly, which shifts the problem to securely delivering the DIDs in the
first place.

#### Software availability

The SSI ecosystem is new and there is limited software available for embedded
devices. Given the foundational importance of secure cryptographic algorithms
and protocols, applications based on SSI should rely on existing libraries
that encapsulate complexity and are well tested, which reduces the chances for
vulnerabilities. Although reference implementations exist [16], they are
focused on cloud and mobile use cases. To fully incorporate SSI into IoT,
portable and lightweight libraries tailored for constrained devices must be
created and made widely available.

##  V Conclusion and perspective

As the primary motivation for the development of the Internet was to remotely
connect computers, the problem of secure identification of users and devices
was left aside. While identity solutions such as accounts and certificates
were eventually developed, they feature critical issues such as weak
passwords, lack of privacy, and centralization. As it is common for systems to
mature over time, as good (and bad) practices are learned, we argue that the
Self-Sovereign Identity approach represents an important step forward in the
area of digital identity. Particularly in the context of the IoT, this paper
showed how SSI can (1) empower owners to have full control over both their
identities and their devices, (2) improve privacy by decoupling pseudonymous
and sensitive identity records, and (3) allow decentralized identity
management by reducing the dependency on third parties. As for the next steps,
the realization of SSI in the IoT will demand implementations that are
optimized for constrained devices, both for cryptographic operations and low-
power communication. Furthermore, wide adoption of SSI will depend on the
availability of open software libraries to manipulate DIDs and VCs in IoT
devices. To conclude we argue that, if adopted, SSI may significantly benefit
security and privacy of IoT applications, and potentially enable new use
cases, such as those that involve cross-owner decentralized interactions.

## References

  * [1] B. M. Leiner, V. G. Cerf, D. D. Clark, R. E. Kahn, L. Kleinrock, D. C. Lynch, J. Postel, L. G. Roberts, and S. Wolff, “A brief history of the internet,” _ACM SIGCOMM Computer Communication Review_ , vol. 39, no. 5, pp. 22–31, 2009\.
  * [2] V. Taneski, M. Heričko, and B. Brumen, “Systematic overview of password security problems,” _Acta Polytechnica Hungarica_ , vol. 16, no. 3, 2019\.
  * [3] L. M. Kohnfelder, “Towards a practical public-key cryptosystem.” Ph.D. dissertation, Massachusetts Institute of Technology, 1978.
  * [4] J. Callas, L. Donnerhacke, H. Finney, D. Shaw, and R. Thayer, “Openpgp message format,” Internet Requests for Comments, RFC Editor, RFC 4880, November 2007, http://www.rfc-editor.org/rfc/rfc4880.txt. [Online]. Available: http://www.rfc-editor.org/rfc/rfc4880.txt
  * [5] D. Cooper, S. Santesson, S. Farrell, S. Boeyen, R. Housley, and W. Polk, “Internet x.509 public key infrastructure certificate and certificate revocation list (crl) profile,” Internet Requests for Comments, RFC Editor, RFC 5280, May 2008, http://www.rfc-editor.org/rfc/rfc5280.txt. [Online]. Available: http://www.rfc-editor.org/rfc/rfc5280.txt
  * [6] M. Sporny, D. Longley, C. Allen, M. Sabadello, and D. Reed, “Decentralized identifiers (DIDs) v1.0,” W3C, W3C Working Draft, Dec. 2019, https://www.w3.org/TR/2019/WD-did-core-20191209/.
  * [7] M. Sporny, G. Noble, D. Burnett, B. Zundel, and D. Longley, “Verifiable credentials data model 1.0,” W3C, W3C Recommendation, Nov. 2019, https://www.w3.org/TR/2019/REC-vc-data-model-20191119/.
  * [8] C. Allen, “The path for self-sovereign identity,” http://www.lifewithalacrity.com/2016/04/the-path-to-self-soverereign-identity.html, accessed: 2020-02-13.
  * [9] M. S. Ferdous, F. Chowdhury, and M. O. Alassafi, “In search of self-sovereign identity leveraging blockchain technology,” _IEEE Access_ , vol. 7, pp. 103 059–103 079, 2019.
  * [10] W. Diffie and M. Hellman, “New directions in cryptography,” _IEEE transactions on Information Theory_ , vol. 22, no. 6, pp. 644–654, 1976.
  * [11] S. Farrell, R. Housley, and S. Turner, “An internet attribute certificate profile for authorization,” Internet Requests for Comments, RFC Editor, RFC 5755, January 2010.
  * [12] J. M. Rabaey, “The swarm at the edge of the cloud-a new perspective on wireless,” in _VLSI Circuits (VLSIC), 2011 Symposium on_. IEEE, 2011, pp. 6–8.
  * [13] L. C. Costa, J. Rabaey, A. Wolisz, M. Rosan, and M. K. Zuffo, “Swarm os control plane: an architecture proposal for heterogeneous and organic networks,” _IEEE Transactions on Consumer Electronics_ , vol. 61, no. 4, pp. 454–462, 2015.
  * [14] Y. Kortesniemi, D. Lagutin, T. Elo, and N. Fotiou, “Improving the privacy of iot with decentralised identifiers (dids),” _Journal of Computer Networks and Communications_ , vol. 2019, 2019.
  * [15] D. Lagutin, Y. Kortesniemi, N. Fotiou, and V. A. Siris, “Enabling decentralised identifiers and verifiable credentials for constrained internet-of-things devices using oauth-based delegation,” in _Workshop on Decentralized IoT Systems and Security (DISS)_ , 2019.
  * [16] H. Foundation, “Hyperledger aries,” accessed: 2020-02-15. [Online]. Available: https://www.hyperledger.org/projects/aries