# A practical algorithm to minimize the overall error in FEM computations

Jie Liu<EMAIL_ADDRESS>Henk M. Schuttelaars<EMAIL_ADDRESS>Matthias Möller<EMAIL_ADDRESS>Delft Institute of Applied Mathematics
Delft University of Technology
Mekelweg 4, 2628 CD Delft, The Netherlands

###### Abstract

Using the standard finite element method (FEM) to solve general partial
differential equations, the round-off error is found to be proportional to
$N^{\beta_{\rm R}}$, with $N$ the number of degrees of freedom (DoFs) and
$\beta_{\rm R}$ a coefficient. A method which uses a few cheap numerical
experiments is proposed to determine the coefficient of proportionality and
$\beta_{\rm R}$ in various space dimensions and FEM packages. Using the
coefficients obtained above, the strategy put forward in [1] for predicting
the highest achievable accuracy $E_{\rm min}$ and the associated optimal
number of DoFs $N_{\rm opt}$ for specific problems is extended to general
problems. This strategy allows predicting $E_{\rm min}$ accurately for general
problems, with the CPU time for obtaining the solution with the highest
accuracy $E_{\rm min}$ typically reduced by 60%–90%.

###### keywords:

Finite Element Method, Round-off Error, Highest achievable accuracy,
Efficiency.

undefined

##  1 Introduction

Many problems in scientific computing consist of solving boundary value
problems. In this paper, the use of the standard finite element method (FEM)
is considered. To get accurate solutions, various approaches, such as
$h$-refinement, $p$-refinement, or $hp$-refinement, are used. The
$h$-refinement is investigated in detail in this paper.

The $h$-refinement typically focuses on the reduction of the truncation error
$E_{\rm T}$ by decreasing the grid size, denoted by $h$, of the discretized
problem. However, the round-off error $E_{\rm R}$ increases with the
decreasing grid size and will exceed the truncation error when the grid size
is getting too small [2, 3]. The dependency of the truncation error $E_{\rm
T}$ and the round-off error $E_{\rm R}$ on the grid size results in the total
error $E_{h}=(E_{\rm T}+E_{\rm R})$ first decreasing and then increasing with
the decreasing grid size.

For the same grid size, the numerical accuracy might be different for
different problems [1]. To reach the accuracy required, obtained with an
element size denoted by $h_{\rm tol}$, the common method is to refine the mesh
sequentially from a low refinement level until the required accuracy is
satisfied. This process may take a large number of $h$-refinements. Since the
results for the grid size larger than $h_{\rm tol}$ are thrown away after the
required accuracy is satisfied, and the required accuracy may not be reached
due to various reasons such as differentiation [4], we call this method the
brute-force method, denoted by BF.

To know if the required accuracy can be reached, and if it can be reached in
an efficient way, estimates of the highest achievable numerical accuracy,
denoted by $E_{\rm min}$, and the associated optimal number of DoFs, denoted
by $N_{\rm opt}$, must be available. In [1], they were predicted using the
relations between the round-off error and the number of DoFs and the
truncation error and the number of DoFs. This approach was applied to one-
dimensional problems. It was assumed the behaviour of the round-off error,
represented by two coefficients, was known. This strategy allowed us to
predict the accuracy $E_{\rm min}$ using a few computations on coarse grids,
of which the CPU time taken is negligible. Furthermore, for obtaining the
solution with the highest accuracy by computing the result using the $N_{\rm
opt}$ predicted, the CPU time reduction is around 70%.

Since only a few specific 1D cases were considered to obtain the coefficients
of the round-off error, these coefficients may not apply to other 1D cases.
Their applicability may become even worse when using them directly for 2D
problems since the method of counting the number of DoFs and the magnitude of
the number of DoFs for 2D problems is different from that for 1D problems. In
view of the above, the aim of this paper is to investigate the coefficients of
the round-off error when solving generic 1D and 2D partial differential
equations, and extend the strategy to obtain $N_{\rm opt}$, as proposed in
[1], to generic 1D and 2D problems.

The paper is organized as follows. The model problem, finite element method,
and highest achievable accuracy are discussed in Section 2. A novel method to
obtain the coefficients of the round-off error is illustrated in Section 3.
The algorithm for determining the above coefficients and predicting the
accuracy $E_{\rm min}$ is put forward in Section 4, followed by a validation
of our method in Section 5. Conclusions are drawn in Section 6.

##  2 Model problem, finite element method, and highest achievable accuracy

###  2.1 Model problem

We consider the following second-order partial differential equation:

$-\nabla\cdot\left(D(\mathbf{x})\nabla
u\right)+r(\mathbf{x})u(\mathbf{x})=f(\mathbf{x}),\qquad\mathbf{x}\in\Omega=[0,\,1]\times[0,\,1],$
(1)

where $u$ denotes the unknown dependent variable, $f(\mathbf{x})$ the
prescribed right-hand side, $D(\mathbf{x})$ the diffusion matrix, and
$r(\mathbf{x})$ the coefficient function of the reactive term.
$f(\mathbf{x})$, $D(\mathbf{x})$, and $r(\mathbf{x})$ are continuous and
elements of the function space $L_{2}(\Omega)$.

The matrix $D(\mathbf{x})$ is considered to be symmetric and positive
definite. By choosing $D(\mathbf{x})=I$, the identity matrix, and
$r(\mathbf{x})=0$, Eq. (1) reduces to the Poisson equation; the diffusion
equation is found if $r(\mathbf{x})=0$ and $D(\mathbf{x})$ “arbitrary” with
the above constraints, and the Helmholtz equation is found for
$r(\mathbf{x})\neq$ 0 and $D(\mathbf{x})=I$. If not stated otherwise, at the
left and right boundaries, denoted by $\Gamma_{D}$, Dirichlet boundary
conditions are imposed: $u(\mathbf{x})=g(\mathbf{x})$. At the upper and bottom
boundaries, denoted by $\Gamma_{N}$, Neumann boundary conditions are
prescribed: $D(\mathbf{x})\nabla u\cdot\mathbf{n}=h(\mathbf{x})$, where
$\mathbf{n}$ denotes the outward pointing unit normal vector.

###  2.2 Finite element method

####  2.2.1 Weak form

To construct the finite element (FE) approximation of this equation, we first
derive the weak form and then discretize it using proper FE spaces. For
convenience, we introduce three inner products [5]:

$\displaystyle\langle\mathbf{f}_{1},\,\mathbf{f}_{2}\rangle$
$\displaystyle=\int_{\Omega}\mathbf{f}_{1}(\mathbf{x})\cdot\mathbf{f}_{2}(\mathbf{x})\,dA,$
(2a) $\displaystyle\langle f_{1},\,f_{2}\rangle$
$\displaystyle=\int_{\Omega}f_{1}(\mathbf{x})f_{2}(\mathbf{x})\,dA,\text{
and}$ (2b) $\displaystyle\langle f_{1},\,f_{2}\rangle_{\Gamma}$
$\displaystyle=\int_{\Gamma}f_{1}(\mathbf{x})f_{2}(\mathbf{x})ds,$ (2c)

where $\mathbf{f}_{1}(\mathbf{x})$ and $\mathbf{f}_{2}(\mathbf{x})$ denote
continuous two-dimensional vector-valued functions, and $f_{1}(\mathbf{x})$
and $f_{2}(\mathbf{x})$ denote continuous scalar functions. $\Gamma$ denotes
the boundary of $\Omega$. Moreover, the following function spaces are defined
[6]:

$\displaystyle V_{g}$ $\displaystyle=\\{t\;|\;t\in H^{1}(\Omega),\;t=g\text{
on }\Gamma_{D}\\},$ (3a) $\displaystyle V_{0}$ $\displaystyle=\\{t\;|\;t\in
H^{1}(\Omega),\;t=0\text{ on }\Gamma_{D}\\}.$ (3b)

##### Weak form derivation

Multiplying Eq. (1) by a test function $\eta\in V_{0}$ [6, 7] and integrating
it over $\Omega$ yield

$\langle\eta,\,-\nabla\cdot\left(D\nabla
u\right)+ru\rangle=\langle\eta,\,f\rangle.$ (4)

By applying Gauss’s theorem and substituting $\eta=0$ at $\Gamma_{D}$, we
obtain

$\langle{\nabla\eta},\,D\nabla
u\rangle+\langle\eta,\,ru\rangle=\langle\eta,\,f\rangle+\langle\eta,\,D\nabla
u\cdot\mathbf{n}\rangle_{{\Gamma_{N}}}.$ (5)

Substituting the natural boundary condition, i.e. $D\nabla u\cdot\mathbf{n}=h$
on $\Gamma_{N}$, we obtain

$\langle{\nabla\eta},\,D\nabla
u\rangle+\langle\eta,\,ru\rangle=\langle\eta,\,f\rangle+\langle\eta,\,h\rangle_{{\Gamma_{N}}}.$
(6)

As a result, the weak form of Eq. (1) reads

$\centering\boxed{\begin{aligned} &\text{Find $u\in V_{g}$ such that:}\\\
&\langle{\nabla\eta},\,D\nabla
u\rangle+\langle\eta,\,ru\rangle=\langle\eta,\,f\rangle+\langle\eta,\,h\rangle_{{\Gamma_{N}}}\qquad\forall\eta\in
V_{0}.\\\ \end{aligned}}\@add@centering$ (7)

The terms on the right-hand side of Eq. (7) consist of the weakly imposed body
force $f$ and the Neumann boundary conditions. The latter vanishes if no
Neumann boundary conditions are prescribed.

##### Weak form discretization

This section contains two parts: defining the FE space and constructing the
system of equations on the above FE space. The FE space for $V_{g}$ reads [6]

$\displaystyle V_{h,g}=\\{t\;|\;t\text{ is continuous on }\Omega,~{}t\in
T_{p}(K),K\in K_{h}\text{, and }t=g\text{ on }\Gamma_{D}\\},$ (8a) and that
for $V_{0}$ reads $\displaystyle V_{h,0}=\\{t\;|\;t\text{ is continuous on
}\Omega,~{}t\in T_{p}(K),K\in K_{h}\text{, and }t=0\text{ on }\Gamma_{D}\\},$
(8b)

where $T_{p}$ denotes functions built by the Lagrangian polynomials of degree
$p$, $K$ each individual mesh element, and $K_{h}$ the computational mesh for
$\Omega$.

Using the above FE space, the numerical solution is approximated by

$u_{h}=\sum_{i=1}^{m}u_{i}\varphi_{i},$ (9)

where $\varphi_{i}$ denotes the basis functions, $m$ is the number of basis
functions, and $u_{i}$ are solution values at the support points of the basis
functions, i.e. DoFs.

Consequently, with Eq. (8) and Eq. (9), the weak form Eq. (7) can be
discretized as

$\centering\boxed{\begin{aligned} &\text{Find $u_{h}\in V_{h,g}$ such
that:}\\\ &\langle{\nabla\eta},\,D\nabla
u_{h}\rangle+\langle\eta,\,ru_{h}\rangle=\langle\eta,\,f\rangle+\langle\eta,\,h\rangle_{{\Gamma_{N}}}\qquad\forall\eta\in
V_{h,0}.\end{aligned}}\@add@centering$ (10)

Choosing the test functions $\eta$ equal to $\varphi_{j}$, $j=1,2,\ldots,m$
and substituting them in Eq. (10), we obtain a system of linear equations of
size $m$. We denote it by

$AU=F,$ (11)

where $A$ is the $m\times m$ stiffness matrix, $F$ the right-hand side vector
of size $m$ and $U$ the solution vector of size $m$, equal to the number of
DoFs.

####  2.2.2 Numerical implementation

In all the numerical experiments, the IEEE-754 double precision [8] is used.
For the time being, we restrict ourselves to two publicly available FEM
packages: deal.ii@ [9] and FEniCS [10].

##### Domain discretization

Unless stated otherwise, we use built-in functions of the FEM packages for
generating and refining the computational mesh, and only $h$-regular
refinement is considered. The domain is discretized by different types of
elements in deal.ii@ and FEniCS: (regular) quadrilaterals are used by the
former, and triangles by the latter.

For deal.ii@, the coarsest computational mesh is shown in Fig.
LABEL:sketch_coarsest_computational_mesh_dealii. For each $h$-refinement, the
mesh is obtained by adding one extra vertex in the center of each element, see
Fig. LABEL:sketch_computational_mesh_dealii_R_1 for the computational mesh
when the refinement level, denoted by $R$, is 1. For FEniCS, for each
refinement level, the triangle mesh is obtained by further dividing each
element of the quadrilateral mesh in deal.ii@ into four equal triangles by two
diagonals, see Fig. LABEL:sketch_coarsest_computational_mesh_fenics for the
coarsest computational mesh and Fig.
LABEL:sketch_computational_mesh_fenics_R_1 for the computational mesh when
$R=1$. The grid size of a quadrilateral is defined by the side length, and
that of a triangle by the height, and hence the grid size using triangles is
half of that using quadrilaterals for the same refinement level.

(a)

(b)

Figure 1: Sketch of the original computational mesh.

(a)

(b)

Figure 2: Sketch of the computational mesh when $R=1$.

##### Assembling

In deal.ii@, the support points are Gauss-Lobatto points, while in FEniCS, the
support points are equidistant points, which indicates that the support points
of the two packages are different when $p\geq 3$. For the counting of the
number of support points on the computational mesh $K_{h}$, we refer to A.
$T_{p}$ reads $Q_{p}$ when using quadrilaterals (as done in deal.ii@) and
$P_{p}$ when using triangles (as done in FEniCS).

##### Solution method

To solve the system of equations, the UMFPACK solver [11], which implements
the multi-frontal LU factorization approach, is used. Using this solver
prevents iteration errors associated with iterative solvers. However, by using
this solver, there is an upper limit to the maximum size of the discretized
problems because of memory limitations, a problem typically encountered for 2D
problems. By now, using our hardware, the allowed maximum number of DoFs,
which is denoted by $N_{\rm max}$, reads approximately $5\times 10^{7}$ and
$2\times 10^{6}$ for deal.ii@ and FEniCS, respectively.

##### Error estimation

We investigate the numerical solution $u_{h}$ obtained with grid size $h$ and
its first and second derivatives, see Table 1. Note that for the 2D case, not
only the second derivatives $u_{xx}$ and $u_{yy}$ but also the mixed ones,
i.e. $u_{xy}$ and $u_{yx}$, come into play. The error, denoted by $E_{h}$, is
measured in terms of the $L_{2}$ norm of the difference between the
discretized variable and the reference variable. The reference variable equals
the exact expression of the variable, when the exact expression is available
or the discretized variable with grid size $h/2$, otherwise [12]. We use the
exact expression as the reference variable if not stated otherwise. The
solution $u$ is discussed first; next the derivatives are considered.

Table 1: Variables of which the error is investigated. Variable |  1D |  2D
---|---|---
Solution | $u$ | $u$
First derivative | $u_{x}$ | $\nabla u=\begin{bmatrix}u_{x}\\\ u_{y}\end{bmatrix}$
Second derivative | $u_{xx}$ | $\mathbf{H}u=\begin{bmatrix}u_{xx},u_{xy}\\\ u_{yx},u_{yy}\end{bmatrix}$

The error of $u_{h}$ reads

$E_{h}=\|u_{h}-\widehat{u}\|_{2},$ (12)

where $\|\cdot\|_{2}$ denotes the $L_{2}$ norm of a function, and
$\widehat{u}$ stands for the reference solution. The derivatives in 1D, i.e.
$u_{x}$ and $u_{xx}$, only involve one component, and hence we need to replace
$u$ in Eq. (12) by its derivatives for computing the error; since the
derivatives in 2D, i.e. $\nabla u$ and $\mathbf{H}u$, contain multiple
components, we first compute the error of each component according to Eq. (12)
and then obtain their $l_{2}$ norm, which denotes the 2-norm of a number
sequence. Note that the error of the second derivative of $u$ does not exist
when $p=1$.

####  2.2.3 Order of convergence

Using the error $E_{h}$ of the discretized variable, the correctness of the
implementation in Section 2.2.2 is validated by the order of convergence,
denoted by $q_{h}$ [13]. It is defined by

$q_{h}=\frac{\log\left(\frac{E_{h/2}}{E_{h}}\right)}{\log 2},$ (13)

where $E_{h/2}$ is the error of the discretized variable with grid size $h/2$.
According to our experiments and [7, P. 107], the asymptotic value of $q_{h}$,
denoted by $q$, reads $p+1$ for the solution and $p+1-k$ for the derivatives,
where $k$ denotes the order of the derivatives. The above $q$ will be used in
Section 2.3 below for developing the strategy for predicting the highest
achievable accuracy.

###  2.3 Highest achievable accuracy

####  2.3.1 Relation between the error and the number of DoFs

A conceptual sketch of the error $E_{h}$ as a function of the number of DoFs,
denoted by $N$, in a log-log plot is shown in Fig. 3, also see [3]. The reason
we use the number of DoFs as the $x$ axis, instead of using the grid size $h$,
is that the round-off error are independent of $p$ [1]. The error line in Fig.
3 can be divided into a decreasing phase and an increasing one.

Figure 3: Conceptual sketch of the various errors as a function of the number
of DoFs.

In the decreasing phase, the total error $E_{h}$ is dominated by the
truncation error $E_{\rm T}$. Based on whether reaching the asymptotic order
of convergence $q$ or not, this phase can be further divided into two phases.
When $q$ is not reached (Phase 1), the error path is typically not a straight
line, see the black circles. When $q$ is reached (Phase 2), which often takes
a few refinement steps, the error path is a straight line, indicated by the
green circles. In this phase, $E_{h}$ can be approximated by

$E_{h}\approx E_{\rm T}=\alpha_{\rm T}\cdot{N}^{-\beta_{\rm T}},$ (14)

where $\alpha_{\rm T}$ is the offset of this line, and $\beta_{\rm T}$ the
slope, obtained by

$\beta_{\rm
T}=-\frac{\log\left(\frac{E_{h/2}}{E_{h}}\right)}{\log\left(\frac{N_{h/2}}{N_{h}}\right)}.$

In this expression, $N_{h}$ and $N_{h/2}$ are the numbers of DoFs
corresponding to $E_{h}$ and $E_{h/2}$, respectively. Using Eq. (13), we find

$\beta_{\rm T}=\frac{\log 2}{\log\left(\frac{N_{h/2}}{N_{h}}\right)}\cdot q.$
(15)

Furthermore, $\frac{N_{h/2}}{N_{h}}$ is about 2 for 1D problems and 4 for 2D
problems. The proof for the latter can be found in B, and that for the former
follows in the similar manner. Therefore, we have $\beta_{\rm T}\approx q$ for
1D problems and $\beta_{\rm T}\approx q/2$ for 2D problems.

Denoting the number of DoFs and the error when $q$ is reached as $N_{c}$ and
$E_{\rm c}$, respectively, substituting them into Eq. (14), we have

$\alpha_{\rm T}={E_{\rm c}}\cdot{N_{\rm c}}^{\beta_{\rm T}}.$ (16)

In the increasing phase, the total error $E_{h}$ is dominated by the round-off
error $E_{\rm R}$. As suggested in [1, 2], the error in this phase tends to
increase constantly, see the orange circles in Fig. 3. Denoting the offset by
$\alpha_{\rm R}$ and the slope by $\beta_{\rm R}$, one finds that

$E_{h}\approx E_{\rm R}=\alpha_{\rm R}\cdot{N}^{\beta_{\rm R}},$ (17)

with the coefficients $\alpha_{\rm R}$ and $\beta_{\rm R}$ to be determined in
Section 3. At the turning point of the decreasing phase and the increasing
phase, denoted by the black square, the minimum error $E_{\rm min}$ is
obtained. The behaviour of $E_{h}$ as a function of the number of DoFs is
summarized in Table 2, and depicted in Fig. 3.

Table 2: Description of the evolution of $E_{h}$. | Decreasing phase | Increasing phase
---|---|---
| Phase 1 | Phase 2
Size of $N$ | $N<N_{\rm c}$ | $N_{\rm c}\leqslant N<N_{\rm opt}$ | $N_{\rm opt}\leqslant N$
Phenomenon |  Decreasing but not converging with slope $\beta_{\rm T}$ |  Decreasing and converging with slope $\beta_{\rm T}$ and offset $\alpha_{\rm T}$ |  Increasing and converging with slope $\beta_{\rm R}$ and offset $\alpha_{\rm R}$
Dominant error | Truncation error | Round-off error
Formula | - | $E_{h}\approx E_{\rm T}=\alpha_{\rm T}{N}^{-\beta_{\rm T}}$ | $E_{h}\approx E_{\rm R}=\alpha_{\rm R}{N}^{\beta_{\rm R}}$

####  2.3.2 Obtaining the highest achievable accuracy

There are two methods for obtaining the highest achievable accuracy. One is
the brute-force method, denoted by BF. This method uses a sequential number of
numerical experiments until the error starts to increase (indicated by the
black and green circles, black square, and first orange circle in Fig. 3),
which is time-consuming and impractical.

The other is the method suggested in [1], which is denoted by PRED+. In this
method, first, when the asymptotic order of convergence $q$ is reached,
$N_{\rm opt}$ and $E_{\rm min}$ are predicted as follows: $\displaystyle
N_{\rm opt}$ $\displaystyle=\left(\frac{\alpha_{\rm T}\cdot\beta_{\rm
T}}{\alpha_{\rm R}\cdot\beta_{\rm R}}\right)^{\frac{1}{\beta_{\rm
T}+\beta_{\rm R}}},$ (18a) $\displaystyle E_{\rm min}$
$\displaystyle=\alpha_{\rm T}\cdot{N_{\rm opt}}^{-{\beta_{\rm T}}}+\alpha_{\rm
R}\cdot{N_{\rm opt}}^{{\beta_{\rm R}}},$ (18b)

Next, the solution with the highest achievable accuracy is obtained by
computing the result using the $N_{\rm opt}$ predicted. Since a number of
$h$-refinements are circumvented using the PRED+ method, the CPU time required
for obtaining the discretized variable with the accuracy $E_{\rm min}$,
denoted by $T$, using the PRED+ method is expected to be much less than that
using the BF method.

##  3 Novel method for determining $\alpha_{\rm R}$ and $\beta_{\rm R}$ of the
round-off error

###  3.1 Strategy

In [1], $\alpha_{\rm R}$ and $\beta_{\rm R}$ are fitted from the orange
circles illustrated in Fig. 3. It showed that for many specific 1D problems,
using the standard FEM in deal.ii@, when the $L_{2}$ norm of the solution,
i.e. $\|u\|_{2}$, is of order 1, the offset $\alpha_{\rm R}$ is about $2\times
10^{-17}$ for $u$ and increases slightly with the increasing order of
derivative; the slope $\beta_{\rm R}$ is constant, equals 2, and is
independent of the variable. Furthermore, for different model problems,
$\alpha_{\rm R}$ is linearly proportional to $\|u\|_{2}$. Using the above
information, the coefficients $\alpha_{\rm R}$ and $\beta_{\rm R}$ were
estimated for general 1D problems when solving them using the standard FEM in
<EMAIL_ADDRESS>Using the above coefficients $\alpha_{\rm R}$ and $\beta_{\rm R}$ in
the PRED+ method, the accuracy $E_{\min}$ predicted is very close to that
obtained using the BF method.

However, $\alpha_{\rm R}$ and $\beta_{\rm R}$ might be different for higher
space dimensions, different types and packages of FEM. Even though fewer
problem cases can be chosen to obtain the orange circles, the CPU time
required is still very large since the numbers of DoFs corresponding to the
orange circles are larger than $N_{\rm opt}$.

Fortunately, the round-off error can also be obtained with a few cheap
experiments when the solution of a problem can be exactly represented in the
FE space under consideration (indicated by the blue circles in Fig. 4) [1].
Therefore, using the same settings as for the problem at hand, i.e. $\Omega$,
$D(\mathbf{x})$, $r(\mathbf{x})$, and type of boundary conditions, we propose
to first obtain $\alpha_{\rm R}$ and $\beta_{\rm R}$ for a problem with a
manufactured solution $u_{\rm M}$ that can be exactly represented in the
current FE space. $\alpha_{\rm R}$ and $\beta_{\rm R}$ for $u_{\rm M}$ are
denoted by $\alpha_{\rm R,M}$ and $\beta_{\rm R,M}$, respectively.

Figure 4: Illustration of using the MS+ method for obtaining $\alpha_{\rm R}$
and $\beta_{\rm R}$.

Next, since $\|u_{\rm M}\|_{2}$ does not have to equal $\|u_{\rm O}\|_{2}$,
where $u_{\rm O}$ denotes the original solution, we have to adjust
$\alpha_{\rm R,M}$ according to the linear relation between $\alpha_{\rm R}$
and $\|u\|_{2}$. $\alpha_{\rm R}$ adjusted from $\alpha_{\rm R,M}$, denoted by
$\alpha_{\rm R,M+}$, reads

$\alpha_{\rm R,M+}=\alpha_{\rm R,M}\cdot\frac{\|u_{\rm O}\|_{2}}{\|u_{\rm
M}\|_{2}}.$ (19)

We call this method the method of manufactured solutions assisted by
$\|u\|_{2}$, denoted by MS+ [14], and the method that uses the orange circles
the method of original solutions, denoted by OS. Using the OS method, the
resulting $\alpha_{\rm R}$ and $\beta_{\rm R}$ are denoted by $\alpha_{\rm
R,O}$ and $\beta_{\rm R,O}$, respectively. In Section 3.2 below, we will test
the MS+ method by comparing $\alpha_{\rm R,M+}$ and $\beta_{\rm R,M}$ with
$\alpha_{\rm R,O}$ and $\beta_{\rm R,O}$.

###  3.2 Results

In this section, we investigate the accuracy of approximating $\alpha_{\rm
R,O}$ and $\beta_{\rm R,O}$ by $\alpha_{\rm R,M+}$ and $\beta_{\rm R,M}$,
respectively, by comparing their values. All problems will be solved using the
deal.ii@ software, and the element degree ranges from 1 to 5. In Section
3.2.1, 1D problems are considered, followed by 2D problems in Section 3.2.2.

####  3.2.1 1D problems

For the 1D case, we investigate problems with $u=e^{-(x-0.5)^{2}}$, which
cannot be reproduced exactly in the FE space $V_{g}$. Appropriate Dirichlet
boundary conditions are imposed on both ends. The manufactured solution
$u_{\rm M}$ is chosen to be $(x-0.5)^{2}$. $\|u_{\rm O}\|_{2}\approx 0.92$ is
about 8.4 times $\|u_{\rm M}\|_{2}\approx 0.11$, and hence $\alpha_{\rm
R,M+}=8.4\cdot\alpha_{\rm R,M}$ using Eq. (19).

##### Poisson problems

We first investigate results obtained using an equidistant mesh and then
consider the influence of distorted meshes.

Using an equidistant mesh, the dependency of the round-off error for $u_{\rm
M}$ is shown in Fig. 5. From this figure, it follows that as expected for
$p>1$, the only error source is the round-off error. For all variables $u$,
$u_{x}$ and $u_{xx}$, the round-off error line is a straight line in the log-
log plot, with slope $\beta_{\rm R,M}=2$, while the offset $\alpha_{\rm R,M}$
depends on the variable under consideration, see Fig. 5 and columns 3 and 4 in
the second row of Table 3 for their specific values. Using this information,
the values of $\alpha_{\rm R,M+}$ obtained are shown in column 5 in the second
row of Table 3.

Using the OS method, the dependency of the error is shown in Fig. 6. As can be
seen, the truncation error tends to converge at the analytical order for
different $p$ before reaching the round-off error. Analyzing the round-off
error line, it follows that $\beta_{\rm R,O}=2$, and $\alpha_{\rm R,O}$
increases when increasing the order of the derivative, see Fig. 6 and columns
6 and 7 in the second row of Table 3 for the specific values.

(a)

(b)

(c)

Figure 5: Error evolution for the 1D Poisson problem with $u=(x-0.5)^{2}$ and
Mesh Type 1.

(a)

(b)

(c)

Figure 6: Error evolution for the 1D Poisson problem with $u=e^{-(x-0.5)^{2}}$ and Mesh Type 1. Table 3: The coefficients $\alpha_{\rm R}$ and $\beta_{\rm R}$ obtained using the method of MS+ and OS for the 1D Poisson problem with $u=e^{-(x-0.5)^{2}}$. Mesh type | Variable | MS+ | OS
---|---|---|---
$\alpha_{\rm R,M}$ | $\beta_{\rm R,M}$ | $\alpha_{\rm R,M+}$ | $\alpha_{\rm R,O}$ | $\beta_{\rm R,O}$
1 |  $u$ $u_{x}$ $u_{xx}$ |  1.0e-18 5.0e-18 1.0e-16 |  2.0 2.0 2.0 |  8.4e-18 4.2e-17 8.4e-16 |  2.0e-17 1.0e-16 5.0e-16 |  2.0 2.0 2.0
2 |  $u$ $u_{x}$ $u_{xx}$ |  1.0e-18 5.0e-18 2.0e-16 |  8.4e-18 4.2e-17 1.7e-15 |  2.0e-17 1.0e-16 5.0e-15
3 |  $u$ $u_{x}$ $u_{xx}$ |  2.0e-17 1.0e-16 2.0e-15
4 |  $u$ $u_{x}$ $u_{xx}$ |  1.0e-18 5.0e-18 1.0e-16 |  1.8 1.8 2.0 |  8.4e-18 4.2e-17 8.4e-16 |  2.0e-18 5.0e-18 1.0e-15

Finally, the round-off error line represented by $\alpha_{\rm R,M+}$ and
$\beta_{\rm R,M}$ is compared to that represented by $\alpha_{\rm R,O}$ and
$\beta_{\rm R,O}$ in Fig. LABEL:manufacturing_alpha_R_beta_R_0_pois_Type_1. In
this figure, the solid lines correspond to the round-off error using the OS
method, while the dashed lines correspond to the round-off error using the MS+
method; the results for the principle variable $u$ and derivatives $u_{x}$ and
$u_{xx}$ are color-coded black, blue, and red, respectively (same below). As
can be seen, the two types of lines are very close for all $N$ considered,
indicating that $\alpha_{\rm R,M+}$ and $\beta_{\rm R,M}$ are good estimates
for $\alpha_{\rm R,O}$ and $\beta_{\rm R,O}$, which also follows from
comparing their values in Table 3, second row.

(a)

(b)

(c)

(d)

Figure 7: Comparison of the round-off error line represented by $\alpha_{\rm
R,M+}$ and $\beta_{\rm R,M}$ to that represented by $\alpha_{\rm R,O}$ and
$\beta_{\rm R,O}$ for the 1D Poisson problem with $u=e^{-(x-0.5)^{2}}$.

Next, we consider the influence of mesh distortion on $E_{\rm R}$. Denoting
the coordinate of a vertex on the equidistant mesh by $x_{0}$ and that on a
distorted mesh by $x_{1}$, the distortion degree of a vertex is defined as

$f_{h}=\frac{h_{\rm d}}{h_{\rm 0}},$

where $h_{\rm d}=x_{1}-x_{0}$ denotes the distorted distance of a vertex, and
$h_{\rm 0}$ the grid size of the equidistant mesh, which is a constant.
Obviously, $h_{\rm d}$ is positive if a vertex is moved to the right and
negative if a vertex is moved to the left. Three kinds of distorted meshes are
considered, which are denoted by Mesh Type 2–4, respectively. For Mesh Type 2,
$x_{0}$ is distorted randomly with $\mid f_{h}\mid=0.4$. For Mesh Type 3 and
Type 4, vertices are symmetric about $x=0.5$, and when $x_{0}<0.5$, $x_{0}$ is
distorted according to $x_{1}=0.5x_{0}$ for Mesh Type 3 and according to
$x_{1}=\frac{x_{0}}{1.5-x_{0}}$ for Mesh Type 4. The resulting vertex
distribution for the refinement level $R=4$ can be found in Fig.
LABEL:mesh_type_2–Fig. LABEL:mesh_type_4, respectively. In these figures, the
vertex distribution on the equidistant mesh and parameter $f_{h}$ are also
shown for comparison.

(a)

(b)

(c)

Figure 8: Vertex distribution for the distorted meshes.

For Mesh Type 2–4, the resulting coefficients that determine the round-off
error $E_{\rm R}$ are shown in Table 3, lines 4–6. The round-off error line
represented by $\alpha_{\rm R,M+}$ and $\beta_{\rm R,M}$ is compared to that
represented by $\alpha_{\rm R,O}$ and $\beta_{\rm R,O}$ in Figs.
LABEL:manufacturing_alpha_R_beta_R_0_pois_Type_2–LABEL:manufacturing_alpha_R_beta_R_0_pois_Type_4,
respectively. It turns out that $\alpha_{\rm R,M+}$ and $\beta_{\rm R,M}$ also
give a good estimate of $\alpha_{\rm R,O}$ and $\beta_{\rm R,O}$ for non-
equidistant grids.

##### Diffusion problems

For diffusion problems, we consider both $D=1+x$ and $D=e^{-(x-0.5)^{2}}$.
Only Mesh Type 1 is studied.

Table 4: The coefficients $\alpha_{\rm R}$ and $\beta_{\rm R}$ obtained using the method of MS+ and OS for the 1D diffusion problem with $u=e^{-(x-0.5)^{2}}$. $D$ | Variable | MS+ | OS
---|---|---|---
$\alpha_{\rm R,M}$ | $\beta_{\rm R,M}$ | $\alpha_{\rm R,M+}$ | $\alpha_{\rm R,O}$ | $\beta_{\rm R,O}$
$1+x$ |  $u$ $u_{x}$ $u_{xx}$ |  1.0e-18 5.0e-18 1.0e-16 |  1.8 1.8 2.0 |  8.4e-18 4.2e-17 8.4e-16 |  2e-18 2e-18 5e-16 |  2.0 2.0 2.0
$e^{-(x-0.5)^{2}}$ |  $u$ $u_{x}$ $u_{xx}$ |  2.0e-18 1.0e-17 1.0e-16 |  1.5 1.5 2.0 |  1.7e-17 8.4e-17 8.4e-16 |  2e-17 1e-16 5e-16 |  1.5 1.5 2.0

For both scenarios, the order of convergence of the truncation error is as
expected; the resulting $\alpha_{\rm R,M}$, $\beta_{\rm R,M}$, $\alpha_{\rm
R,M+}$, $\alpha_{\rm R,O}$, and $\beta_{\rm R,O}$ can be found in columns 3–6
of Table 4. The round-off error lines obtained using $\alpha_{\rm R,M+}$ and
$\beta_{\rm R,M}$ on the one hand and $\alpha_{\rm R,O}$ and $\beta_{\rm R,O}$
on the other hand are compared in Fig. 9. As can be seen, the former gives a
good approximation of the latter.

(a)

(b)

Figure 9: Comparison of the round-off error line represented by $\alpha_{\rm
R,M+}$ and $\beta_{\rm R,M}$ to that represented by $\alpha_{\rm R,O}$ and
$\beta_{\rm R,O}$ for the 1D diffusion problem with $u=e^{-(x-0.5)^{2}}$.

##### Helmholtz problems

For the Helmholtz problem, we consider $r=1$, $r=1+x$ and
$r=e^{-(x-0.5)^{2}}$. Only the uniform mesh is used. For all the scenarios,
the resulting $\alpha_{\rm R,M}$ and $\beta_{\rm R,M}$, $\alpha_{\rm R,M+}$,
$\alpha_{\rm R,O}$, and $\beta_{\rm R,O}$ can be found in columns 3–7 of Table
5. The round-off error lines represented by $\alpha_{\rm R,M+}$ and
$\beta_{\rm R,M}$ are compared to that represented by $\alpha_{\rm R,O}$ and
$\beta_{\rm R,O}$ in Fig. 10. As can be seen, the two types of lines fit well.
Therefore, the MS+ method is also suitable for predicting the dependency of
the round-off error on the number of DoFs for general Helmholtz problems.

Table 5: The coefficients $\alpha_{\rm R}$ and $\beta_{\rm R}$ obtained using the method of MS+ and OS for the 1D Helmholtz problem with $u=e^{-(x-0.5)^{2}}$. $r$ | Variable | MS+ | OS
---|---|---|---
$\alpha_{\rm R,M}$ | $\beta_{\rm R,M}$ | $\alpha_{\rm R,M+}$ | $\alpha_{\rm R,O}$ | $\beta_{\rm R,O}$
1 |  $u$ $u_{x}$ $u_{xx}$ |  1.0e-18 5.0e-18 1.0e-16 |  2.0 2.0 2.0 |  8.4e-18 4.2e-17 8.4e-16 |  2e-17 1e-16 5e-16 |  2.0 2.0 2.0
$1+x$ |  $u$ $u_{x}$ $u_{xx}$ |  5.0e-19 2.0e-18 1.0e-16 |  4.2e-18 1.7e-17 8.4e-16 |  1e-17 2e-17 5e-16
$e^{-(x-0.5)^{2}}$ |  $u$ $u_{x}$ $u_{xx}$

(a)

(b)

(c)

Figure 10: Comparison of the round-off error line represented by $\alpha_{\rm
R,M+}$ and $\beta_{\rm R,M}$ to that represented by $\alpha_{\rm R,O}$ and
$\beta_{\rm R,O}$ for the 1D Helmholtz problem with $u=e^{-(x-0.5)^{2}}$.

####  3.2.2 2D problems

To assess the applicability of the MS+ method for 2D problems, we consider 2D
Poisson and diffusion problems, with the solution given by
$u=e^{-[(x-0.5)^{2}+(y-0.5)^{2}]}$. The manufactured solution reads $u_{\rm
M}=(x-0.5)^{2}+(x-0.5)(y-0.5)+(y-0.5)^{2}$. $\|u_{\rm O}\|_{2}\approx 0.86$ is
about 4.1 times $\|u_{\rm M}\|_{2}\approx 0.21$.

The diffusion matrix $D$ considered in the diffusion problem is given in the
first column of Table 6, third row. For all the scenarios, the resulting
coefficients that determine the round-off error $E_{\rm R}$ are shown in Table
6. As can be seen, $\alpha_{\rm R,M+}$ and $\beta_{\rm R,M}$ again approximate
$\alpha_{\rm R,O}$ and $\beta_{\rm R,O}$ very well.

Table 6: The coefficients $\alpha_{\rm R}$ and $\beta_{\rm R}$ obtained using the method of MS+ and OS for 2D problems with $u=e^{-[(x-0.5)^{2}+(y-0.5)^{2}]}$. $D$ | Variable | MS+ | OS
---|---|---|---
$\alpha_{\rm R,M}$ | $\beta_{\rm R,M}$ | $\alpha_{\rm R,M+}$ | $\alpha_{\rm R,O}$ | $\beta_{\rm R,O}$
$\big{(}\begin{smallmatrix}1&0\\\ 0&1\end{smallmatrix}\big{)}$ |  $u$ $\nabla u$ $\mathbf{H}u$ |  1e-17 2e-17 5e-16 |  1.00 1.00 1.00 |  4.1e-17 8.2e-17 2.1e-15 |  5e-17 2e-16 2e-15 |  1.00 1.00 1.00
$\big{(}\begin{smallmatrix}1+x+y&xy\\\ xy&1+x+y\end{smallmatrix}\big{)}$ |  $u$ $\nabla u$ $\mathbf{H}u$ |  1e-17 2e-17 2e-16 |  0.75 0.75 1.00 |  4.1e-17 8.2e-17 8.2e-16 |  2e-17 1e-16 2e-15 |  0.75 0.75 1.00

(a)

(b)

Figure 11: Comparison of the round-off error line represented by $\alpha_{\rm
R,M+}$ and $\beta_{\rm R,M}$ to that represented by $\alpha_{\rm R,O}$ and
$\beta_{\rm R,O}$ for the 2D problems with $u=e^{-[(x-0.5)^{2}+(y-0.5)^{2}]}$.

##  4 Algorithm

In this section, we extend the a posteriori algorithm introduced in [1] to
two-dimensional problems. To keep this paper self-contained, we repeat the
basic algorithmic steps. The reader already familiar with our earlier work may
want to skip this section, recalling that the essential modification of our
algorithm is the use of a manufactured solution approach to derive
$\alpha_{\rm R}$ and $\beta_{\rm R}$, cf. line 1 of algorithm 2.

In the algorithm, we define the following coefficients and use them in the
steps given below.

  * –

a minimal number of $h$-refinements before carrying out ‘PREDICTION’, denoted
by $R_{\rm min}$, with the following default values for 1D problems:

$\displaystyle R_{\rm min}$ $\displaystyle=\begin{cases*}9-p&for $p<6$,\\\
4&otherwise.\end{cases*}$ (20)

Smaller values are chosen for 2D problems. We choose this parameter mainly
because the error might increase, or decrease faster than the asymptotic order
of convergence for coarse refinements, especially for lower-order elements.

  * –

the allowed maximum $N$ : $10^{8}$, denoted by $N_{\rm max}$.

  * –

a stopping criterion $c_{s}=0.1$ for seeking the $L_{2}$ norm of the dependent
variable, denoted by $\|u\|_{2}$. When the difference of two adjacent
$\|u_{h}\|_{2}$, evaluated by
$\mid\frac{\|u_{h}\|_{2}-\|u_{2h}\|_{2}}{\|u_{2h}\|}\mid$, is smaller than
$c_{s}$, the iteration is stopped. We choose this parameter because the
analytical solution does not exist for most practical problems.

  * –

a relaxation coefficient $c_{r}$ for seeking the asymptotic order of
convergence, with the following default values:

$\displaystyle c_{r}$ $\displaystyle=\begin{cases*}0.9&for $p<4$,\\\ 0.7&for 4
$\leqslant$ $p<10$,\\\ 0.5&otherwise.\end{cases*}$ (21)

The procedure of the algorithm consists of six steps, which are explained
below:

##### Step-1

‘INPUT’. In this step, the items shown in the Table 7 has to be provided by
the user.

Table 7: Custom input of the algorithm. Type |  Item
---|---
Problem |  • the problem to be solved
|  • variables of which the highest accuracy is of interest
FEM |  • an ordered array of element degrees $\\{p_{\min},\ldots,p_{\rm max}\\}$

##### Step-2

‘NORMALIZATION’. The function of this step is to find $\|u\|_{2}$, in which
the element degree $p=2$. The specific procedure can be found in Algorithm 1.

1 while  _$N <N_{\rm max}$_ do

2 if  _$\left|\frac{\|u_{h}\|_{2}-\|u_{2h}\|_{2}}{\|u_{2h}\|_{2}}\right|
<c_{s}$_ then

3 $\|u\|_{2}$ $\leftarrow$ $\|u_{h}\|_{2}$;

4 break;

5

6 else

7 $h$ $\leftarrow$ $h/2$;

8 calculate $\|u_{h}\|_{2}$;

9

10 end if

11

12 end while

Algorithm 1 NORMALIZATION

##### Step-3

‘PARAMETERIZATION’. In this step, we determine $\alpha_{\rm R,M+}$ and
$\beta_{\rm R,M}$. Let us remind the reader that this is the main modification
of our algorithm introduced in [1] to make it work in 2D. The procedure is
summarized in Algorithm 2 below.

1 Obtaining $\alpha_{\rm R,M}$, $\beta_{\rm R,M}$, $\|u_{\rm M}\|_{2}$, and
$\|u_{\rm O}\|_{2}$;

2 Calculating $\alpha_{\rm R,M+}$;

Algorithm 2 PARAMETERIZATION

##### Step-4

‘PREDICTION’. This step finds $E_{\rm min}$ for each variable and $p$ of
interest. The procedure for carrying out this step can be found in Algorithm
3.

1 while  _$N <N_{\rm max}$ and ${E_{h}}>E_{\rm R}$_ do

2 $q_{h}$ $\leftarrow$ $\log_{2}\left({{E_{2h}}}/{{E_{h}}}\right)$;

3 if  _ $q_{h}\geqslant\beta_{\rm T}\times c_{r}$ _ then

4 $N_{\rm c}\leftarrow N$;

5 $E_{\rm c}\leftarrow{E_{h}}$;

6 $\alpha_{\rm T}$ $\leftarrow$ ${E_{\rm c}}/{N_{\rm c}}^{-\beta_{\rm T}}$;

7 $N_{\rm opt}\leftarrow\left(\frac{\alpha_{\rm T}\cdot\beta_{\rm
T}}{\alpha_{\rm R}\cdot\beta_{\rm R}}\right)^{\frac{1}{\beta_{\rm
R}+\beta_{\rm T}}}$;

8 $E_{\rm min}\leftarrow\alpha_{\rm T}\cdot{N_{\rm opt}}^{-{\beta_{\rm
T}}}+\alpha_{\rm R}\cdot{N_{\rm opt}}^{{\beta_{\rm R}}}$;

9

10 else

11 $h$ $\leftarrow$ $h/2$;

12 calculate ${E_{h}}$;

13

14 end if

15

16 end while

Algorithm 3 PREDICTION

##### Step-5

‘POSTPROCESS’. In this step, $E_{\rm min}^{\rm PRED+}$ is obtained by
computing the result using $N_{\rm opt}$.

##### Step-6

‘OUTPUT’. In this step, we output $N_{\rm opt}^{\rm PRED}$, $E_{\rm min}^{\rm
PRED+}$, and $T^{\rm PRED+}$ obtained in Step-4 and Step-5.

##  5 Validation

In this section, we evaluate the accuracy and efficiency of the PRED+ method.
Denoting $N_{\rm opt}$, $E_{\rm min}$, and $T$ of the BF method by $N_{\rm
opt}^{\rm BF}$, $E_{\rm min}^{\rm BF}$, and $T^{\rm BF}$, respectively, and
that of the PRED+ method by $N_{\rm opt}^{\rm PRED+}$, $E_{\rm min}^{\rm
PRED+}$, and $T^{\rm PRED+}$, respectively, the accuracy is validated by
comparing $N_{\rm opt}^{\rm PRED+}$ and $E_{\rm min}^{\rm PRED+}$ with $N_{\rm
opt}^{\rm BF}$ and $E_{\rm min}^{\rm BF}$, respectively, and the efficiency by
comparing $T^{\rm PRED+}$ with $T^{\rm BF}$. For the latter, to better
understand the difference between $T^{\rm PRED+}$ and $T^{\rm BF}$, the number
denoting the reduction of the CPU time in percentage

$\text{pct}=\frac{T^{\rm BF}-T^{\rm PRED+}}{T^{\rm BF}}\cdot 100$ (22)

is introduced.

We investigate the 2D Poisson problem with $u=e^{-[(x-0.5)^{2}+(y-0.5)^{2}]}$
introduced in Section 3.2.2. Both deal.ii@ and FEniCS are used, and the
element degree ranges from 1 to 5.

Using the BF method, $N_{\rm opt}^{\rm BF}$, $E_{\rm min}^{\rm BF}$, and
$T^{\rm BF}$ are shown in Fig. 12–14, respectively, and indicated by the solid
dots connected by the solid line. In Fig. 12, for some scenarios, the solution
that corresponds to $N_{\rm opt}^{\rm BF}$ DoFs cannot be obtained explicitly
because the required number of DoFs is larger than $N_{\rm max}$, of which the
value is shown by the purple dashed line. Using deal.ii@, it concerns $p=1$
for $u$, $p=1$ and 2 for $\nabla u$, and $p=2$ for $\mathbf{H}u$; using
FEniCS, these are $p=1,~{}2$ for $u$, $p=1,~{}2$ and 3 for $\nabla u$, and
$p=2,~{}3$ for $\mathbf{H}u$. Consequently, there is not corresponding data
for $E_{\rm min}^{\rm BF}$, $T^{\rm BF}$, and pct in Fig. 13–15.

From the available data, it is found that $N_{\rm opt}^{\rm BF}$, $E_{\rm
min}^{\rm BF}$, and $T^{\rm BF}$ basically decrease for higher $p$ and
increases for higher-order derivatives. Therefore, the overall highest
accuracy is controlled by the highest accuracy of the highest-order derivative
when the variables required involve derivatives; obtaining a high accuracy may
be impossible using lower element degrees, while this is achievable using
higher element degrees, for which the CPU time can be reduced.

Using the PRED+ method, $N_{\rm opt}^{\rm PRED+}$, $E_{\rm min}^{\rm PRED+}$,
and $T^{\rm PRED+}$ can be found in Fig. 12–14, respectively. They are
indicated by the open circles connected by the dotted line. We are able to
predict $N_{\rm opt}$ for all the scenarios. For the scenarios with $N_{\rm
opt}^{\rm PRED+}$ larger than $N_{\rm max}$, the optimal solution cannot be
obtained. As a result, there is no corresponding data for $E_{\rm min}^{\rm
PRED+}$ and $T^{\rm PRED+}$.

From the comparison for $N_{\rm opt}$, $E_{\rm min}$, and $T$ using the BF
method and the PRED+ method, $N_{\rm opt}^{\rm PRED+}$ and $E_{\rm min}^{\rm
PRED+}$ are very close to $N_{\rm opt}^{\rm BF}$ and $E_{\rm min}^{\rm BF}$,
respectively. However, the runtime $T^{\rm PRED+}$ is much less than $T^{\rm
BF}$, see Fig. 14. The CPU time reduction by the PRED+ method is about 60% to
90%, see Fig. 15. In summary, using the PRED+ method, we are able to determine
if the accuracy required can be satisfied efficiently, and the CPU time for
computing the result with the highest accuracy is reduced a lot.

(a)

(b)

Figure 12: Comparison of $N_{\rm opt}^{\rm PRED+}$ and $N_{\rm opt}^{\rm BF}$
for the 2D Poisson problem with $u=e^{-[(x-0.5)^{2}+(y-0.5)^{2}]}$.

(a)

(b)

Figure 13: Comparison of $E_{\rm min}^{\rm PRED+}$ and $E_{\rm min}^{\rm BF}$
for the 2D Poisson problem with $u=e^{-[(x-0.5)^{2}+(y-0.5)^{2}]}$.

(a)

(b)

Figure 14: Comparison of $T^{\rm PRED+}$ and $T^{\rm BF}$ for the 2D Poisson
problem with $u=e^{-[(x-0.5)^{2}+(y-0.5)^{2}]}$.

(a)

(b)

Figure 15: CPU time reduction by the PRED+ method for obtaining different
variables with the highest accuracy for the 2D Poisson problem with
$u=e^{-[(x-0.5)^{2}+(y-0.5)^{2}]}$.

##  6 Conclusion

In this paper, we investigated the dependence of the round-off error on the
number of DoFs when solving different 1D and 2D second-order boundary value
problems using the standard FEM. According to our findings, the round-off
error increases according to a power-law function of the number of DoFs, and
hence can be represented using two coefficients. A manufactured solution
approach is proposed to determine the expression of the round-off error
efficiently and accurately. Using the expression obtained above, we extended
our strategy in [1] for predicting and obtaining the highest achievable
accuracy for 1D problems using deal.ii@ to 2D cases, and considered FEniCS as
well. Using our strategy, the highest achievable accuracy obtained is very
close to that obtained using sequential $h$-refinements, and the CPU time
required can be reduced by 60%$\sim$90%.

##  Appendix A Counting of the number of support points

We first introduce the properties of the support points and then illustrate
the counting of the number of support points.

###  A.1 Properties of support points

The support points are on various geometric properties, such as vertices,
lines, and quads. On one element, the number of geometric properties is shown
in rows 2–3 of Table 8. On the whole domain with the refinement level $R$, the
number of geometric properties is shown in rows 4–5 of the same table.

Table 8: Number of geometric properties related to counting the number of support points. | Mesh element | Number of vertices | Number of faces | Number of quads
---|---|---|---|---
On a element | Quadrilateral | 4 | 4 | 1
Triangle | 3 | 3 | 1
On the whole domain | Quadrilateral | $(2^{R}+1)^{2}$ | $2\cdot(2^{R}+1)\cdot 2^{R}$ | $(2^{R})^{2}$
Triangle | $(2^{R}+1)^{2}+(2^{R})^{2}$ | $2\cdot(2^{R}+1)\cdot 2^{R}+4\cdot(2^{R})^{2}$ | $4\cdot(2^{R})^{2}$

The number of support points on each geometric property is summarized in Table
9. For example, when $p=2$, the location of support points can be found in
Fig. 16. Using the numbers in Table 8 and Table 9, we are able to count the
number of support points over the whole domain.

Table 9: Number of support points on each geometric property of interest. FEM package | One vertex | One face | One quad
---|---|---|---
deal.ii@ | 1 | $p-1$ | $(p-1)^{2}$
FEniCS | 1 | $p-1$ | $\frac{(p-1)(p-2)}{2}$

(a)

(b)

Figure 16: Location of support points (degrees of freedom) on an element when
the element degree $p=2$.

###  A.2 Counting of the number of support points

We show the number of support points on an element first and next the number
of support points over the whole domain. On one element, the number of support
points reads

$\displaystyle m_{c}$ $\displaystyle=4+4\cdot(p-1)+(p-1)^{2}$
$\displaystyle=(p+1)^{2}$ (23a) using quadrilaterals and $\displaystyle
m_{c}=3+3\cdot(p-1)+\frac{(p-1)(p-2)}{2}$ (23b) using triangles [15].

On the whole domain, the number of support points reads

$\displaystyle m$ $\displaystyle=\underbrace{(2^{R}+1)^{2}}_{\rm
On~{}vertices}+\underbrace{2\cdot(2^{R}+1)\cdot 2^{R}\cdot(p-1)}_{\rm
On~{}faces}+\underbrace{(2^{R})^{2}\cdot(p-1)^{2}}_{\rm On~{}quads}$
$\displaystyle=(2^{R}\cdot p+1)^{2}$ (24a) using quadrilaterals and
$\displaystyle m=\underbrace{\left[(2^{R}+1)^{2}+(2^{R})^{2}\right]}_{\rm
On~{}vertices}+\underbrace{\left[2^{R}\cdot(2^{R}+1)\cdot
2+4\cdot(2^{R})^{2}\right]\cdot(p-1)}_{\rm
On~{}faces}+\underbrace{4\cdot(2^{R})^{2}\cdot\frac{(p-2)(p-1)}{2}}_{\rm
On~{}quads}$ (24b) using triangles.

##  Appendix B Determination of $\beta_{\rm T}$

This section is based on A. Since the refinement level $R$ is relatively large
when the analytical order of convergence is found, only keeping the terms
containing $(2^{R})^{2}$, we have

$\displaystyle m\approx(2^{R}\cdot p)^{2}$ (25a) for Eq.(24a), and
$\displaystyle m$
$\displaystyle\approx\underbrace{\left[2\cdot(2^{R})^{2}\right]}_{\rm
On~{}vertices}+\underbrace{\left[6\cdot(2^{R})^{2}\right]\cdot(p-1)}_{\rm
On~{}faces}+\underbrace{2\cdot(2^{R})^{2}\cdot(p^{2}-3\cdot p+2)}_{\rm
On~{}quads}$ $\displaystyle=2\cdot(2^{R})^{2}\cdot p^{2}$ (25b) for Eq. (24b).

From Eq. (25), we have $\frac{N_{h/2}}{N_{h}}\approx 4$.

## References

  * [1] Jie Liu, Matthias Möller, and Henk M Schuttelaars.  Balancing truncation and round-off errors in FEM: One-dimensional analysis.  Journal of Computational and Applied Mathematics, 386:113219, 2021\.
  * [2] Ivo Babuska and Gustaf Söderlind.  On roundoff error growth in elliptic problems.  ACM Transactions on Mathematical Software, 44(3):1–22, 2018.
  * [3] John Charles Butcher.  Numerical methods for ordinary differential equations.  John Wiley & Sons, 2016.
  * [4] Xiaoyan Wei, Mohit Kumar, and Henk M Schuttelaars.  Three-dimensional salt dynamics in well-mixed estuaries: Influence of estuarine convergence, coriolis, and bathymetry.  Journal of Physical Oceanography, 47(7):1843–1871, 2017.
  * [5] Seymour Lipschutz and Marc Lipson.  Linear Algebra: Schaum’s Outlines.  McGraw-Hill, 2009.
  * [6] Zhangxin Chen.  Finite element methods and their applications.  Springer Science & Business Media, 2005.
  * [7] Mark S Gockenbach.  Understanding and implementing the finite element method, volume 97.  Siam, 2006.
  * [8] Dan Zuras, Mike Cowlishaw, Alex Aiken, Matthew Applegate, David Bailey, Steve Bass, Dileep Bhandarkar, Mahesh Bhat, David Bindel, Sylvie Boldo, et al.  IEEE standard for floating-point arithmetic.  IEEE Std 754-2008, pages 1–70, 2008.
  * [9] Wolfgang Bangerth, Ralf Hartmann, and Guido Kanschat.  deal.II—a general-purpose object-oriented finite element library.  ACM Transactions on Mathematical Software (TOMS), 33(4):24, 2007\.
  * [10] Martin Alnæs, Jan Blechta, Johan Hake, August Johansson, Benjamin Kehlet, Anders Logg, Chris Richardson, Johannes Ring, Marie E Rognes, and Garth N Wells.  The FEniCS project version 1.5.  Archive of Numerical Software, 3(100), 2015.
  * [11] Timothy A Davis.  Algorithm 832: UMFPACK V4.3 – an unsymmetric-pattern multifrontal method.  ACM Transactions on Mathematical Software (TOMS), 30(2):196–199, 2004.
  * [12] Olof Runborg.  Verifying Numerical Convergence Rates.  KTH Computer Science and Communication, 2012.
  * [13] A Bradji and E Holzbecher.  On the convergence order of comsol solutions.  In European COMSOL Conference. Citeseer, 2007.
  * [14] Kambiz Salari and Patrick Knupp.  Code verification by the method of manufactured solutions.  Technical report, Sandia National Labs., Albuquerque, NM (US); Sandia National Labs …, 2000.
  * [15] Douglas N Arnold and Anders Logg.  Periodic table of the finite elements.  SIAM News, 47(9):212, 2014.


# Hybrid Intelligence for
Digital Humanities

Victor de Boer  Lise Stork  Vrije Universiteit Amsterdam, the Netherlands.
{v.de.boer<EMAIL_ADDRESS>
###### Abstract

In this paper, we explore the synergies between Digital Humanities (DH) as a
discipline and Hybrid Intelligence (HI) as a research paradigm. In DH
research, the use of digital methods and specifically that of Artificial
Intelligence is subject to a set of requirements and constraints. We argue
that these are well-supported by the capabilities and goals of HI. Our
contribution includes the identification of five such DH requirements:
Successful AI systems need to be able to 1) collaborate with the (human)
scholar; 2) support data criticism; 3) support tool criticism; 4) be aware of
and cater to various perspectives and 5) support distant and close reading. We
take the CARE principles of Hybrid Intelligence (collaborative, adaptive,
responsible and explainable) as theoretical framework and map these to the DH
requirements. In this mapping, we include example research projects. We
finally address how insights from DH can be applied to HI and discuss open
challenges for the combination of the two disciplines.

###### keywords:

Hybrid IntelligenceDigital HumanitiesCultural Heritage

and

##  1 Introduction

Digital tools and methods have permeated all fields of science, including the
humanities. This has given rise to the area of scholarly activity known as
Digital Humanities (DH)[26]. With more museum, archive and library collections
made available in digital form, either through digitization or as ‘digital
born’, questions arise on how digital tools of exploration, analysis,
annotation and visualisation can be incorporated in the humanities workflows
and methodologies. Here, it has been recognized that the use of such tools can
make this research more effective and efficient and open up new possibilities
for analysing data or telling stories. At the same time, these tools and
interdisciplinary methods will need to be carefully matched to the values of
the humanities research process with respect to transparency and reproducible
methods [4].

More recently, Artificial Intelligence (AI) tools and methods have become more
available also to stakeholders in the field of humanities. Researchers from
both AI and humanities have been identifying potential challenges and
opportunities for AI in Digital Humanities. These opportunities include the
possibility to analyse heritage and other humanities data at scale [22], open
up new ways of modelling humanities knowledge, analysing data and recognizing
patterns, but also disseminating results [41]. Challenges identified in
literature include issues around bias in data and/or AI algorithms [5, 36] as
well as challenges and ethics of categorization [29], or the lack of
polyvocality in representation [19]. Concerns have also been expressed around
the issue of diversity, equity and inclusion (DEI) in the larger field of AI
itself [12]. Such investigations call for more human-centric approaches to AI
to be developed that match Digital Humanities requirements. We argue here that
the recently introduced research paradigm of Hybrid Intelligence [1] aligns
well with these requirements.

In this paper, we explore the synergies between DH as a discipline and HI as a
research paradigm. We identify that in Digital Humanities research, the use of
digital methods and specifically that of AI is subject to a set of
requirements and constraints that are well-supported by the capabilities and
goals of Hybrid Intelligence. We take the CARE principles of Hybrid
Intelligence (collaborative, adaptive, responsible and explainable) as
theoretical framework and map these to the DH needs of tool and data
criticism, transparency and ethical considerations. We also address how
insights from DH can be applied to challenges identified in the context of
Hybrid Intelligence, specifically where it concerns developing responsible and
transparent systems. Through a description of example DH projects, we further
illustrate this synergy. We finally identify open challenges and opportunities
for the combination of the two disciplines.

##  2 Challenges for the use of AI in Digital Humanities

###  2.1 Understanding Digital Humanities

Digital humanities (DH) represents a scholarly realm where computing or
digital technologies intersect with the various disciplines within the
humanities. This field encompasses the methodical utilization of digital
resources in humanities research, coupled with the examination of their
practical applications[17]. DH is characterized by innovative approaches to
scholarly endeavors, involving collaborative, transdisciplinary, and
computationally oriented practices in research, teaching, and publishing[10].
By introducing digital tools and methodologies into humanities studies, DH
acknowledges the shift away from the printed word as the primary medium for
knowledge production and dissemination. DH researchers employ a diverse set of
methodologies and tools to analyze, interpret, and present data. Textual
analysis stands as a cornerstone, leveraging computational techniques such as
natural language processing (NLP) and sentiment analysis to dissect literary
works, historical documents, and cultural texts. Additionally, DH embraces
network analysis, utilizing graph theory to map relationships among entities,
uncovering hidden connections within datasets, and shedding light on complex
societal structures. Visualization tools play a pivotal role, translating
intricate data into visual representations that aid in comprehending patterns,
and relationships within information.

###  2.2 AI in DH

Within Digital Humanities, there has been quite a lot of interest in the
application of Artificial Intelligence technologies for annotation, analysis
and dissemination of DH research. Various types of AI solutions are being
applied to specific DH challenges. Knowledge Representation approaches have
been used to capture and model data, information and knowledge from various
domains. Especially Semantic Web principles and practices have been embraced
by the galleries, archive, libraries and museum (GLAM) community, to connect
heterogeneous and distributed collections[27, 14]. By using standard data
models, interoperability is increased and standard ways of reasoning can be
applied. At the same time, representation of heritage data as knowledge graphs
also allows for other downstream analyses such as through machine learning or
visualisation. Machine Learning has been used to analyse large humanities
datasets, with a recent focus on exploring deep learning approaches.
Challenges for the use of AI in DH also include the limited extent to which
current Machine Learning solutions can be used for multimodal or sparse
datasets (e.g. [33, 44]). Critical views on the role of Machine Learning in DH
have been part of scholarly debate, focusing on bias, transparency and the way
that usage of ML could influence the methodological rigour of humanities
research [3]. The humanities focuses on artifacts produced by human agents,
and the majority of these artifacts have historically been natural language
texts. Natural Language Processing (NLP) therefore takes an important role in
DH. Most NLP pipelines now contain at least some Machine Learning, either
using pre-trained (large) language models (LLMs) or using models specified for
the data and task at hand [46]. For other modalities, specific approaches
exist. For example, for visual artifacts Computer Vision is used for analysis,
information extraction, as well as reconstruction and restoration. While
traditionally, more feature extraction-based pipelines were used, with the
recent success of (deep) neural networks for this task, such approaches are
now applied to humanities datasets, leading to novel insights, but also
exposing challenges around its usage [48].

###  2.3 Requirements and challenges

As argued above, since its early beginnings, DH has not only concerned itself
with the application of digital methods to enhance humanities research, but
also has focused on a critical reflection of data, tools, and workflows.
Especially in the usage of AI tools and methods, the way that such tools
collaborate with (human) scholars has been questioned. Collecting and
categorizing these elements allows us to define five challenges for successful
integration of AI tools in DH. We list them below in short form and expand on
the challenges and their mapping to HI capabilities in Section 4.

Embedding in scholarly practice.

AI should be embedded in the DH research methodology, through collaboration
between human and artificial agents.

Data or source criticism.

Humanities data have specific charateristics that makes them different from
other domain data. Moreover, a critical stance to data is a key component in
the humanities and successful AI needs to support this.

Tool criticism.

Similarly, a critical attitude towards methods and tools used is necessary. A
successful AI systems supports critical inquiry into itself.

Polyvocality and diversity.

The humanities recognizes that multiple perspectives are present and the
diversity of (citizen) scientists, data and voices is key.

Distant vs Close reading.

In the digital humanities there is ongoing debate about the relation between
distant reading (shallow analysis at scale) versus close reading (deep inquiry
of text). This presents excellent opportunities for hybrid solutions.

##  3 Hybrid Intelligence and the CARE principles

Hybrid Intelligence as a field concerns itself with the investigation and
design of human-AI ecosystems. As such, it builds on AI research, but focuses
on interaction with users. [1] recognizes four research challenges,
abbreviated as the CARE principles. These principles can be formulated as
capabilities for AI systems that are effective in HI scenarios:

Collaborative.

AIs systems will need to be designed and constructed in such a way that they
are able to cooperate in synergy with human actors in a variety of tasks. This
collaboration should ultimately take into account the strengths and
limitations of both the human and artificial agents.

Adaptive

HI systems function in dynamic environments with diverse human-agent teams,
necessitating adaptability to changing contexts, variable team structures,
preferences, and roles.

Responsible

Mitigating risks requires integrating ethical and legal considerations into
the design and operation of HI systems. Values like transparency,
accountability, privacy, and fairness must be intrinsic to the design process
and performance.

Explainable

For mutual understanding between intelligent agents and humans, explanations
are vital for shared awareness, goals, and collaborative strategies. This
requires the use of methods and algorithms that are not only transparent, but
can interact with users to explain their reasoning.

##  4 Mapping CARE principles to DH requirements

In this section, we take the requirements and challenges as identified in
Section 2 and explore how the CARE principles introduced in Section 3 can be
applied to these challenges. Each time we present a description of the
challenge; which of the HI principles are most suited to be mapped to this
case and open challenges.

###  4.1 Embedding in the Scholarly Practice

In order to build good AI tools for DH that users can and will effectively
adopt in their daily practice, creators of such tools need to understand the
strengths and weaknesses of humans and AI alike. This requires them to adapt
to scholars’ preferences in working with and gaining understanding of
historical material, and their goals, cultural biases, and social norms.
Common roles that scholars take in such collaborative efforts are that of the
reader or analyst, that of the annotator in crowd or niche-sourcing [16]
endeavors, or that of the curator of enriched material. In their workflow,
humanities scholars tend to prefer close over distant reading of source
material (see Section 4.5), and tend to avoid systematic keyword searches.
Moreover, they often work exploratory; in search of interesting pieces of
information that contribute to the point they aim to make, and might need to
consult sources of hundreds of years old [47]. AI systems can tailor to such
needs, but creators of such tools also require understanding of how humanities
scholars perceive the output of AI systems. Errors, for instance, can create
skepticism towards the capabilities of tools. For example, whereas error rates
of 60-95% for a handwriting recognition system can greatly improve
searchability of archival content, Schomaker et al. mention that “Scholars […]
are disappointed by the OCR quality of machine-printed text, which may be far
above 95” [43]. Moreover, humanities researchers tend to be more skeptical
towards sophisticated tools, and prefer easy of use and transparency [23].

In an effort for natural dialogue between AI and humanities scholars, DH has
started using eXplainable AI (XAI) techniques to generate insights or
explanations of humanities datasets [18, 15]. Examples may take the form of
narratives, i.e., [6, 13] in which data are organized according to important
historical events and actors, mimicking how humans understand phenomena.
Moreover, interpretable rules can be used to explain associations. Wilcke et
al. [49], for instance, mine explainable associations from archaeological
materials as novel insights for archaeologists. Such XAI tools remain limited
in the humanities [18], but have the potential to increase interpretability of
collections, as well as generate trust in human-machine collaboration.
HI mapping Collaborative, Adaptive, Explainable
Open challenges Which cognitive biases do scholars have in understanding
humanities datasets and working with AI systems? What are natural ways of
interacting with digitized material via AI systems?

###  4.2 Data or Source Criticism

Data or source criticism deals with the critical evaluation of sources in the
context of historical studies. This includes assessing the quality,
completeness, bias, and representativeness of the data, as well as considering
the ethical implications of data collection and use. These concern not only
texts, but also other modalities such as maps, photographs and drawings [30].
For humanities scholars it is obvious that historical inequalities lead to
datasets that are incomplete, biased, hide certain perspectives (see Section
4.4) such as indigenous people’s voices or certain social groups [40, 19, 2],
or use language that is inappropriate in today’s society [9, 37].

With use of ML, especially generative AI models, data criticism becomes even
more important. Humanities datasets have typically not been created as ML
benchmarks, but for the purpose of knowledge communication, preservation,
correspondence, or other. Moreover, they are highly heterogeneous, and their
structure changes over time [2]. How can AI systems act responsibly, when
built on top of untrustworthy sources? Other than building responsible
datasets, AI systems should be capable of explaining the sources on which they
base their reasoning in a transparent way.

Knowledge representation can help organize data, providing insights on
knowledge gaps. Datasheets [2], for instance, describe datasets in a
structured way, so that these can be fit more easily to the information needs
of data re-users. Moreover, adhering to principles of FAIR data management
[51] will not only increase the reusability of digital data and methods, but
also ensure that they can be subjected to the same rigorous criticism of tools
and data as is common in humanities research [31]. However, when applying
standard data models and reasoning for the interpretation of historical
sources, there is the risk of simplification or reinterpretation of such
sources in the current scientific paradigm, as socio-cultural data is
inherently vague and ambiguous [29].
HI mapping Responsible, Explainable
Open challenges. What is the best way to measure whether AI systems act
responsibly with respect to the data that they use? Moreover, how can AI
systems explain to humanities scholars the provenance of data used for
explanations or insights?

###  4.3 Tool Criticism

Related to data criticism is tool criticism. Defined in [20] as ”[…] the
critical inquiry of knowledge technologies considered or used for various
purposes […]”. As such, tool criticism is at the heart of the DH research
methodology. It calls for critical reflection on how tools came to be, how the
tool functions and the way in which digital tools are used in the digital
history methodology[31]. As an example, when using NLP tools, an uncritical
with respect to the tools capabilities recognizing spelling variations or
dealing with diacritical characters could lead to incorrect conclusions.
Specifically for AI technology, the danger exists that these tools are more
opaque: black-box models have a hard time explaining why certain results are
produced, risking perpetuating existing biases [40] and large language models
do not always allow for tracing query results back to original sources. In
order to support a critical view on the use of tools in a hybrid setting, AI
systems need to be transparent about their inner workings, what data they are
trained on, what their limitations are and how small changes in settings
influence results. This requires that notions of data provenance are
integrated in such tools[32, 38]. The capabilities of responsible maps well
onto this requirement as systems that collaborate with humans need to be
developed in responsible ways (responsible in design). They also need to be
aware of and behave in a responsible manner, specifically in being
transparent. This also makes it clear why explainable systems are needed: When
systems are able to communicate about their inner workings, they allow for the
required critical inquiry by the humanities scholar. A special mention must be
given to Generative AI, that produces novel output based on patterns learned
from data. Use of this relatively new form of AI is starting to be explored in
the DH context. Examples include using Generative Adversarial Networks to
analyse visual styles [39] or generate images of medieval manuscripts
depicting steam trains[11]. Retrieval Augmented Generation (RAG) combines an
information retrieval component with text generation based on large language
models[21]. When responses or ’alternative’ texts, images or other sources can
be generated convincingly, it becomes even more important that such methods
are transparent.
HI mapping. Responsible, Explainable
Open challenges. One of the main challenges here is how state-of-the-art ML
can be made ’criticisable’. Here the field of explainable AI (XAI) can provide
opportunities, but for successful integration, more research is needed into
how DH scholars can interact with systems in order to retrieve suitable
explanations. At the same time, standards for describing and sharing tool
descriptions are needed, building on [31].

###  4.4 Polyvocality and Diversity

In the humanities, the concept of positionality is often used to indicate that
the research process itself as well as the researcher are not neutral, but
bring their own perspective and biases[8]. Polyvocality is essential in
digital humanities as it promotes a diverse and inclusive approach to the
study of cultural artifacts and human experiences in the digital realm[42,
19]. By incorporating a variety of voices and perspectives, polyvocality helps
mitigate biases, avoid stereotypes, and reflect the complexity of the real
world. It enhances interdisciplinary collaboration, engages communities, and
contributes to more comprehensive representations of cultural heritage[24].
Where platforms facilitate public engagement, polyvocality becomes crucial for
fostering a more inclusive dialogue about culture, history, and society.
Overall, embracing multiple voices in digital humanities enriches research,
analysis, and understanding, leading to a more nuanced exploration of the
complexities inherent in human narratives and cultural phenomena. This can
refer not only to diversity in the collection, but also of the persons
involved in the research activities, including experts and lay persons. This
need for polyvocality connects well with the goals of responsible AI,
specifically where it concerns fairness towards various representations and
the way in which systems deal with bias. In DH practice, this has for example
the implication that methods used for annotating datasets (be they automatic,
through crowdsourcing or hybrid solutions) will need to be able to capture,
represent and present such diverse perspectives[19]. This requires that user-
facing methods are aware of and can deal with diverse end-users. This
diversity can be in the expertise dimension, but also in the cultural or age
dimension. Collaborative AI is needed, specifically AI that is able to
collaborate with a variety of users. In that sense it will have to be adaptive
to be able to deal with multiple perspectives, various cultural contexts and
be able to keep ’disagreement’ between experts, laypersons and algorithms
intact.
HI mapping Collaborative, Adaptive, Responsible
Open challenges Diversity of users will be a key challenge for successful HI
tools that support or even promote polyvocality. Many AI systems and
interfaces are designed for specific end-users, be they domain experts or
laypersons. They often are accessible only to a limited number of people, and
might require considerable resources. Systems that cater to diverse users will
be needed to make sure all relevant voices can be heard.

###  4.5 Distant and Close Reading

Taken from literary studies, Distant reading and close reading represent two
contrasting approaches to humanities research. Close reading involves
meticulous examination and interpretation of individual texts, focusing on
details like language, imagery, and structure to uncover deeper meanings and
themes. Conversely, distant reading employs methods to analyze large corpora
of texts, aiming to identify broader patterns, trends, and relationships
across works. It emphasizes more quantitative analysis, data visualization,
and the exploration of phenomena at scale[35]. While traditional humanities
research often includes much close reading, with the rise of computational
methods, in DH, more interest for distant reading has emerged for a variety of
modalities[28]. Recognizing this complementarity paves the way to use
collaborative AI to the fullest effect: HI systems will need to collaborate
with human scholars and be flexible enough to switch between supporting
distant reading, but also supporting close reading. They will need to be
adaptive in the sense that the results of close reading will be needed to be
taken into account for further processing. Pattern recognition using Machine
Learning can significantly enhance this distant reading and connecting large
numbers of sources through knowledge graphs allows for querying and analysis
of large interconnected corpora. Human experts can then engage more deeply
with smaller amounts of objects of study. For example, the CLARIAH media suite
specifically is designed to support both this distant reading (using AI to
connect audiovisual content) and close reading (providing easy access and
annotation tools for individual videos)[34]. Where now, these activities are
disparate, [7] recognize that further exploitation of the complementarity
between computational methods and humans is a worthwile research direction.
Such deeper collaboration between humans and machines fits the research agenda
and capabilities of HI well.
HI mapping. Collaborative, Adaptive
Open challenges. To support the seamless transition between distant and close
reading, AI systems need to maintain connections between aggregations and the
original sources. LLMs for example, often only store the statistical
aggregations and cannot trace back query answers to specific texts. Knowledge
Graphs that connect various data sources now often only include metadata, and
not the actual documents, images or videos. Integral solutions are needed that
actually contain such multimodal data (e.g. [50]).

##  5 Discussion

In the preceding section, we have outlined how the capabilities of HI match
with the requirements of Digital Humanities. HI can make deep collaborations
between AI systems and with human scholars possible. It can be truly
successful if such systems are designed taking into account the diversity of
the users and methodological concerns that they have concerning tools and
data. This calls for systems that deal well with provenance and transparency
and are responsible by design.

While we argue here that DH as a field can benefit from the Hybrid
Intelligence initiative, we also recognize that the humanities provide HI not
just as a playing ground for interesting and difficult challenges regarding
human-AI collaboration, but also that for fundamental AI/HI challenges, the
field can learn much from the humanities. Questions such as how to deal with
multiple perspectives, how to conceive of and deal with social bias and
(algorithmic) fairness should not be answered solely by AI experts, but can be
addressed more deeply by taking into account the decades of experience that
exists in the humanities addressing such issues. With the increased impact of
AI in society and the volume of current public debate about its ethics, AI in
general, and HI in specific, is in need of humanists “are ideal “domain
experts” for the current juncture” [25].

As Hybrid Intelligence is a current research initiative, many of the mappings
identified above are future research directions. However, we here end our
paper with two specific overarching challenges towards HI for DH. First of
all, a danger in Digital Humanities is that of one-shot solutions. Tools and
methods are often designed for a single (research) project, and lack in
reusability across collections or subfields. There should be a focus on
reusable, Open Source, tools, datasets and methods that are well described
(see Tool and Data criticism) and usable for a variety of end-users. This
usability also requires careful development of user-interfaces that are well-
integrated in the humanities task at hand. This can include web-portals,,
dialogue systems or interactive notebooks [45].

Secondly, although we here have been mostly focusing on how HI systems should
be designed, of course the human scholars will need to play their part. In
order to have truly effective Hybrid teams, the human actors will also need to
be able to be critical and cooperative with their computational team mates.
This requires not only an open mind, but an increased level of AI literacy.
Including digital methods in the humanities curricula will be crucial to
ensure that the next generation of humanities scholars is ready to play their
part in the Hybrid Intelligent team.

Acknowledgements. This research was supported by the Hybrid Intelligence
Center, funded through the Netherlands Organisation for Scientific Research
(NWO), https://hybrid-intelligence-centre.nl grant number 024.004.022 and by
the Pressing Matter project (http://pressingmatter.nl), funded by NWO through
the Netherlands National Research Agenda (NWA.1292.19.419).

## References

  * [1] Akata, Z., Balliet, D., De Rijke, M., Dignum, F., Dignum, V., Eiben, G., Fokkens, A., et al.: A research agenda for hybrid intelligence: augmenting human intellect with collaborative, adaptive, responsible, and explainable artificial intelligence. Computer 53(8), 18–28 (2020)
  * [2] Alkemade, H., Claeyssens, S., Colavizza, G., Freire, N., Lehmann, J., Neudeker, C., Osti, G., van Strien, D., et al.: Datasheets for digital cultural heritage datasets. JOURNAL OF OPEN HUMANITIES DATA 9(17), 1–11 (2023)
  * [3] Bassett, C., Berry, D.M., Fazi, B., Pay, J., Roberts, B.: Critical digital humanities and machine-learning. In: ADHO 2017-Montréal (2017)
  * [4] Berry, D.M.: Introduction: Understanding the digital humanities. In: Understanding digital humanities, pp. 1–20. Springer (2012)
  * [5] Berry, D.M.: Ai, ethics, and digital humanities. The Bloomsbury Handbook to the Digital Humanities p. 445 (2022)
  * [6] Blin, I.: Building narrative structures from knowledge graphs. In: European Semantic Web Conference. pp. 234–251. Springer (2022)
  * [7] Bonfiglioli, R., Nanni, F.: From close to distant and back: How to read with the help of machines. In: Gadducci, F., Tavosanis, M. (eds.) History and Philosophy of Computing. pp. 87–100. Springer International Publishing, Cham (2016)
  * [8] Bourke, B.: Positionality: Reflecting on the research process. The qualitative report 19(33), 1–9 (2014)
  * [9] Brate, R., Nesterov, A., Vogelmann, V., Van Ossenbruggen, J., Hollink, L., Van Erp, M.: Capturing contentiousness: constructing the contentious terms in context corpus. In: Proceedings of the 11th on Knowledge Capture Conference. pp. 17–24 (2021)
  * [10] Burdick, A., Drucker, J., Lunenfeld, P., Presner, T., Schnapp, J.: Digital_Humanities. Mit Press (2016)
  * [11] Caers, B.: Artificial intelligence meets the middle ages: Making or faking history? https://www.leidenmedievalistsblog.nl/articles/artificial-intelligence-meets-the-middle-ages-making-or-faking-history retrieved 7-2-2024 (2024)
  * [12] Chun, J., Elkins, K.: The crisis of artificial intelligence: A new digital humanities curriculum for human-centred ai. International Journal of Humanities and Arts Computing 17(2), 147–167 (2023)
  * [13] de Boer, V., Oomen, J., Inel, O., Aroyo, L., van Staveren, E., Helmich, W., de Beurs, D.: DIVE into the event-based browsing of linked historical media. Web Semantics: Science, Services and Agents on the WWW 35, 152–158 (2015)
  * [14] de Boer, V., Wielemaker, J., van Gent, J., Oosterbroek, M., Hildebrand, M., Isaac, A., van Ossenbruggen, J., Schreiber, G.: Amsterdam museum linked open data. Semantic Web 4(3), 237–243 (2013)
  * [15] Díaz-Rodríguez, N., Pisoni, G.: Accessible cultural heritage through explainable artificial intelligence. In: Adjunct Publication of the 28th ACM Conference on User Modeling, Adaptation and Personalization. pp. 317–324 (2020)
  * [16] Dijkshoorn, C., Leyssen, M.H., Nottamkandath, A., Oosterman, J., Traub, M.C., Aroyo, L., Bozzon, A., Fokkink, W., Houben, G.J., Hovelmann, H., et al.: Personalized nichesourcing: Acquisition of qualitative annotations from niche communities. In: UMAP Workshops (2013)
  * [17] Drucker, J.: The digital humanities coursebook: an introduction to digital methods for research and scholarship. Routledge (2021)
  * [18] El-Hajj, H., Eberle, O., Merklein, A., Siebold, A., Shlomi, N., Büttner, J., Martinetz, J., Müller, K.R., Montavon, G., Valleriani, M.: Explainability and transparency in the realm of digital humanities: toward a historian xai. International Journal of Digital Humanities 5(2), 299–331 (2023)
  * [19] van Erp, M., de Boer, V.: A polyvocal and contextualised semantic web. In: The Semantic Web: 18th International Conference, ESWC 2021, Virtual Event, June 6–10, 2021, Proceedings 18. pp. 506–512. Springer (2021)
  * [20] van Es, K., Wieringa, M., Schäfer, M.T.: Tool criticism: From digital methods to digital methodology. In: Proceedings of the 2nd International Conference on Web Studies. p. 24–27. WS.2 2018, Association for Computing Machinery, New York, NY, USA (2018). 10.1145/3240431.3240436, https://doi.org/10.1145/3240431.3240436
  * [21] Garcia, G.G., Weilbach, C.: If the sources could talk: Evaluating large language models for research assistance in history. arXiv preprint arXiv:2310.10808 (2023)
  * [22] Gefen, A., Saint-Raymond, L., Venturini, T.: AI for Digital Humanities and Computational Social Sciences, pp. 191–202. Springer International Publishing, Cham (2021). 10.1007/978-3-030-69128-8_12
  * [23] Gibbs, F., Owens, T.: Building better digital humanities tools: Toward broader audiences and user-centered designs. Digital Humanities Quarterly 6(2) (2012)
  * [24] Golding, V., Modest, W.: Museums and communities: Curators, collections and collaboration. A&C Black (2013)
  * [25] Goodlad, L.M.E., Baker, S.: Now the humanities can disrupt “ai”. https://www.publicbooks.org/now-the-humanities-can-disrupt-ai/ (2023)
  * [26] Haigh, T.: We have never been digital. Communications of the ACM 57(9), 24–28 (2014)
  * [27] Hyvönen, E., Mäkelä, E., Kauppinen, T., Alm, O., Kurki, J., Ruotsalo, T., Seppälä, K., Takala, J., Puputti, K., Kuittinen, H., et al.: Culturesampo: A national publication system of cultural heritage on the semantic web 2.0. In: European Semantic Web Conference. pp. 851–856. Springer (2009)
  * [28] Jänicke, S., Franzini, G., Cheema, M.F., Scheuermann, G.: On close and distant reading in digital humanities: A survey and future challenges. EuroVis (STARs) 2015, 83–103 (2015)
  * [29] Jansen, L.: Ontologies for the digital humanities: Learning from the life sciences? In: JOWO (2019), {http://ceur-ws.org/Vol-2518/paper-WODHSA5.pdf}
  * [30] Kitamoto, A., Nishimura, Y.: Data criticism: a methodology for the quantitative evaluation of non-textual historical sources with case studies on silk road maps and photographs. In: Third Annual Conference of the Japanese Association for Digital Humanities (JADH2013). pp. 11–12 (9 2013)
  * [31] Koolen, M., Van Gorp, J., Van Ossenbruggen, J.: Toward a model for digital tool criticism: Reflection as integrative practice. Digital Scholarship in the Humanities 34(2), 368–385 (2019)
  * [32] Küster, M.W., Ludwig, C., Al-Hajj, Y., Selig, T.: Textgrid provenance tools for digital humanities ecosystems. In: 5th IEEE International Conference on Digital Ecosystems and Technologies (IEEE DEST 2011). pp. 317–323 (2011). 10.1109/DEST.2011.5936615
  * [33] Lallensack, J.N., Romilio, A., Falkingham, P.L.: A machine learning approach for the discrimination of theropod and ornithischian dinosaur tracks. Journal of the Royal Society Interface 19(196), 20220588 (2022)
  * [34] Martinez-Ortiz, C., Ordelman, R., Koolen, M., Noordegraaf, J., Melgar, L., Aroyo, L., Blom, J., van Gorp, J., Baaren, E., Beelen, K., et al.: From tools to “recipes”: Building a media suite within the dutch digital humanities infrastructure clariah. DH Benelux pp. 78–81 (2017)
  * [35] Moretti, F.: Distant reading. Verso Books (2013)
  * [36] Münster, S., Maiwald, F., di Lenardo, I., Henriksson, J., Isaac, A., Graf, M.M., Beck, C., Oomen, J.: Artificial intelligence for digital heritage innovation: Setting up a r&d agenda for europe. Heritage 7(2), 794–816 (2024). 10.3390/heritage7020038, https://www.mdpi.com/2571-9408/7/2/38
  * [37] Nesterov, A., Hollink, L., van Ossenbruggen, J.: How contentious terms about people and cultures are used in linked open data. arXiv preprint arXiv:2311.10757 (2023)
  * [38] Ockeloen, N., Fokkens, A., Ter Braake, S., Vossen, P., De Boer, V., Schreiber, G., Legêne, S.: Biographynet: Managing provenance at multiple levels and from different perspectives. In: LISC@ ISWC. pp. 59–71. Citeseer (2013)
  * [39] Offert, F., Bell, P.: Generative digital humanities. In: CHR. pp. 202–212 (2020)
  * [40] Ortolja-Baird, A., Nyhan, J.: Encoding the haunting of an object catalogue: on the potential of digital technologies to perpetuate or subvert the silence and bias of the early-modern archive. Digital Scholarship in the Humanities 37(3), 844–867 (2022)
  * [41] Pavlidis, G.: Ai trends in digital humanities research. Trends Comput Sci Inf Technol 7(2), 026–034 (2022)
  * [42] Schofield, T., Foster-Smith, D., Bozoglu, G., Whitehead, C.: Co-producing collections: Re-imagining a polyvocal past with cultural probes. Open Library of Humanities (2018)
  * [43] Schomaker, L.: Design considerations for a large-scale image-based text search engine in historical manuscript collections. it-Information Technology 58(2), 80–88 (2016)
  * [44] Stork, L., Weber, A., van den Herik, J., Plaat, A., Verbeek, F., Wolstencroft, K.: Large-scale zero-shot learning in the wild: Classifying zoological illustrations. Ecological informatics 62, 101222 (2021)
  * [45] Viola, L., Takats, S.: Meet kiara: compuationally enabled digital literacy software. DHBenelux 2023 (2023), https://2023.dhbenelux.org/wp-content/uploads/2023/05/DHB2023\\_paper\\_8651.pdf
  * [46] Vossen, P., Agerri, R., Aldabe, I., Cybulska, A., van Erp, M., Fokkens, A., Laparra, E., Minard, A.L., Palmero Aprosio, A., Rigau, G., Rospocher, M., Segers, R.: Newsreader: Using knowledge resources in a cross-lingual reading machine to generate more knowledge from massive streams of news. Knowledge-Based Systems 110, 60–85 (2016). https://doi.org/10.1016/j.knosys.2016.07.013, https://www.sciencedirect.com/science/article/pii/S0950705116302271
  * [47] Warwick, C., Terras, M., Nyhan, J.: Digital humanities in practice. Facet Publishing (2012)
  * [48] Wevers, M., Smits, T.: The visual digital turn: Using neural networks to study historical images. Digital Scholarship in the Humanities 35(1), 194–207 (2020)
  * [49] Wilcke, W., de Boer, V., de Kleijn, M., van Harmelen, F., Scholten, H.J.: User-centric pattern mining on knowledge graphs: An archaeological case study. Journal of Web Semantics 59, 100486 (2019)
  * [50] Wilcke, X., Bloem, P., De Boer, V.: The knowledge graph as the default data model for learning on heterogeneous knowledge. Data Science 1(1-2), 39–57 (2017)
  * [51] Wilkinson, M.D., Dumontier, M., Aalbersberg, I.J., Appleton, G., Axton, M., Baak, A., Blomberg, N., Boiten, J.W., da Silva Santos, L.B., Bourne, P.E., et al.: The fair guiding principles for scientific data management and stewardship. Scientific data 3(1), 1–9 (2016)