# Krylov Complexity and Dynamical Phase Transition in the quenched LMG model

Pedro H. S. Bento  QPequi Group, Institute of Physics, Federal University of
Goiás, 74.690-900, Goiânia, Brazil  Adolfo del Campo Department of Physics and
Materials Science, University of Luxembourg, L-1511 Luxembourg, G. D.
Luxembourg  Donostia International Physics Center, E-20018 San Sebastián,
Spain  Lucas C. Céleri QPequi Group, Institute of Physics, Federal University
of Goiás, 74.690-900, Goiânia, Brazil

###### Abstract

Investigating the time evolution of complexity in quantum systems entails
evaluating the spreading of the system’s state across a defined basis in its
corresponding Hilbert space. Recently, the Krylov basis has been identified as
the one that minimizes this spreading. In this study, we develop a numerical
exploration of the Krylov complexity in quantum states following a quench in
the Lipkin-Meshkov-Glick model. Our results reveal that the long-term averaged
Krylov complexity acts as an order parameter when the quench originates from a
zero magnetic field. It effectively discriminates between the two dynamic
phases induced by the quench, sharing a critical point with the conventional
order parameter. Additionally, we examine the inverse participation ratio and
Shannon entropy in both the Krylov basis and the energy basis. A matching
dynamic behavior is observed in both bases when the initial state possesses a
specific symmetry. This behavior is analytically elucidated by establishing
the equivalence between the Krylov basis and the pre-quench energy eigenbasis.

##  I Introduction

Quantifying the complexity of physical phenomena has been a long-standing area
of interest [1]. Various measures, such as the entropy generated during the
time evolution of a quantum state [2], algorithmic randomness [3], and quantum
Kolmogorov complexity [4], have been employed to characterize complexity.
While many existing complexity measures can capture certain features, some
fail in encompassing other aspects or even exhibit ambiguity due to the
specific basis choices involved in their definition.

There is a widely accepted notion that chaotic systems exhibit greater
complexity compared to integrable ones, attributed in part to phenomena such
as the butterfly effect [5, 6]. In the realm of quantum systems, this effect
is typically characterized by the exponential growth of the noncommutativity
of local operators over time, as quantified by out-of-time order correlators.
However, this exponential increase is not consistently observed in chaotic
systems and may even manifest in nonchaotic ones [7, 8, 9], rendering this
feature elusive.

A novel measure of complexity has recently been proposed, relying on the
spread of operators across a specifically ordered basis known as the Krylov
basis [10]. This basis provides the visualization of dynamics as a single
particle moving in a semi-infinite chain, with hopping terms corresponding to
Lanczos coefficients obtained during the computation of the Krylov basis [11].
A large body of literature has followed, addressing fundamental properties of
this measure [12, 13, 14, 15, 16, 17, 18, 19, 20], its generalizations for
other kinds of evolution [21, 22, 23, 24, 25, 26], and applications, e.g., to
characterize phases of matter [27, 28] and for quantum control [29, 30]. The
Krylov complexity involves a choice of inner product between operators,
raising questions about the optimal inner product for minimizing complexity.
This challenge was addressed with the extension of the Krylov complexity for
quantum state evolution presented in Ref. [31]. It was shown that the Krylov
basis minimizes the proposed complexity definition. As a result, the Krylov
complexity of quantum states, also known as the spread complexity, emerges as
an unambiguous measure, eliminating the need for an inner product choice. It
has been explored in the SYK model [10, 13], the XXZ model [15], the Su-
Schrieffer-Heeger model [28], evolutions governed by dynamical symmetry groups
associated with specific Lie algebrass [16, 18, 23], and random matrix models
[18, 31], among others. Additionally, it has been applied to analyze the
transition from integrability to a chaotic regime [20, 32].

The exploration of dynamics following a global quench in quantum many-body
systems is widely used to probe a system in nonequilibrium statistical
mechanics [33]. Global quenches induce rapid departures from equilibrium,
along with coherence in the energy spectrum, producing intriguing effects,
such as dynamical phase transitions that delve into the criticality of quantum
many-body system dynamics [34, 35]. Dynamical quantum phase transitions
(DQPTs) arise in quenched many-body systems and manifest as cusps in the
Loschmidt echo or survival probability, i.e., non-analytic behavior in the
time domain for certain initial states. This paper contributes to their study
by investigating the evolution of Krylov complexity in quantum states
following a quench in the paradigmatic Lipkin-Meshkov-Glick (LMG) model [36].
The LMG model, known to exhibit dynamical phase transitions depending on the
quench [37], reveals that the long-time averaged Krylov complexity serves as
an order parameter for the dynamical phase transition when the quench starts
at null magnetic field. It exhibits distinct behavior over time in both
dynamical phases induced by the quench, and remarkably mirrors the
oscillations and revivals seen in one of the components of the total
magnetization, a conventional dynamical order parameter in spin systems.

In order to understand this fact, we conduct a numerical study of the inverse
participation ratio (IPR) and the Shannon entropy in both the Krylov basis and
the pre-quench energy basis over time. Remarkably, these two quantities
display identical behavior in both bases. Finally, by deriving the Krylov
basis for the case of a quench starting at null magnetic field, we
analytically demonstrate its equivalence to the pre-quench energy basis. This
analytical result explains the identical temporal behavior of IPR and Shannon
entropy in these two bases and also why Krylov complexity is an order
parameter for the considered model.

The paper is structured as follows: Section II provides a review of key
concepts related to dynamical phase transitions while Section III introduces
the theory of Krylov complexity of quantum states. The goal of these two
sections is twofold: setting the notation of the paper and make it self-
contained. Section IV offers an overview of the dynamical phase transition in
the LMG model and Section V presents our results. We present our conclusions
in Sec. VI.

##  II Dynamical Quantum Phase Transition

Let us consider a quantum many-body system described by a Hamiltonian $H(h)$,
which depends on an externally controlled parameter $h$. At the initial time,
the system is prepared in the ground state
$|\psi(0)\rangle\equiv|\psi_{0}\rangle$ of the Hamiltonian $H(h_{0})\equiv
H_{0}$. After a sudden change, quench, during which the value of $h$ changes
from $h_{0}$ to $h_{f}$, the system is left to evolve under $H(h_{f})\equiv
H_{f}$. In this context, the central quantity in the theory of dynamical
quantum phase transition is the return probability amplitude

$\displaystyle\mathcal{G}(t)=\langle\psi_{0}|\psi_{t}\rangle=\langle\psi_{0}|e^{-iH_{f}t}|\psi_{0}\rangle,$
(1)

also know as the survial amplitude [38, 39, 40, 41] and the Loschmidt
amplitude [42]. The characterization of the DQPT relies on a formal analogy
between $\mathcal{G}(t)$ and a special case of the boundary partition function
$Z_{B}=\langle\psi_{1}|e^{-RH}|\psi_{2}\rangle$, with $R$ being the distance
between the boundaries $|\psi_{1}\rangle$ and $|\psi_{2}\rangle$ [43].
Therefore, formally, $\mathcal{G}(t)$ is the boundary partition function with
$R=it$ and $|\psi_{1}\rangle=|\psi_{2}\rangle=|\psi_{0}\rangle$. The
corresponding probability

$\displaystyle\mathcal{L}(t)=|\mathcal{G}(t)|^{2}.$ (2)

is called return probability, survival probability, or Loschmidt echo.

The DQPT is then defined in terms of the Fisher, or Lee-Yang zeros [44, 45] of
this partition function. Consider the return amplitude with complex time $t\to
z=t+i\tau$. A transition occurs every time the zeros of $\mathcal{G}(z)$
crosses the real-time axis of the complex plane, and these crossings indicate
the critical times of the dynamics. This analogy with the equilibrium quantum
phase transition leads us to another important quantity in the dynamical case,
a quantity that can be understood as the dynamical version of the free energy,
the rate function

$\displaystyle r(t)=-\frac{1}{N}\log\left[\mathcal{L}(t)\right],$ (3)

with $N$ being the size of the system. At the critical times, $\mathcal{L}(t)$
is zero and the rate function becomes nonanalytic. It is important to observe
that this behaviour only emerges in the thermodynamic limit where
$N\rightarrow\infty$ and the Fisher zeros accumulate in a line or in a
continuous region [34].

The above-described phenomenon was termed DPT-II to differentiate it from
another related phenomenon, known as DPT-I. DPT-II was initially investigated
in the transverse field Ising model [42], and since then, it has been explored
in various quantum many-body systems. These encompass short to long-range
interacting quantum spin chains [46, 47, 37, 48, 49], two-dimensional spin
systems [50, 51], nonintegrable systems [52], and optical systems [53], to
name a few examples. For an in-depth review of DPT-II, covering both
theoretical studies and experimental realizations, see Ref. [34].

In the transverse field Ising model, the condition for the Fisher zeros to
cross the real-time axis in the complex plane is that the quench crosses the
critical point of the equilibrium quantum phase transition (QPT). Such a
connection was thought to be a general feature of quantum many-body systems
presenting a DQPT. However, several exceptions appeared later on, highlighting
the nonexistence of a one-to-one correspondence between dynamical and
equilibrium QPTs [34].

While DPT-II is investigated through the lens of the return probability, DPT-I
is featured by the Landau order parameter of the system. This order parameter,
a quantity whose derivative undergoes nonanalytic changes at a critical point
of the quench parameter, serves to distinguish dynamical phases. Typically,
the order parameter involves the time average of some physical quantity, such
as the magnetization in spin chains. It is noteworthy that this dynamical
critical point might not align with the critical point of the equilibrium QPT.
DPT-I has been examined in various systems and we point the reader to Refs.
[35, 54] for comprehensive reviews on both its theoretical and experimental
aspects.

Connections between DPT-I and DPT-II were also explored. As an example, in
Ref. [55], a link is established between microscopic probabilities and the
order parameter in the XXZ model when the initial state exhibits broken
symmetry. In the transverse field Ising model with power-law decaying
interaction, Ref. [48] demonstrates that DPT-II occurs only when crossing the
dynamical critical point of DPT-I. The study also reveals that the
$\mathbb{Z}_{2}$ type symmetry, explicitly broken in the initial state, is
restored in a long-time limit and at the critical times of DPT-II.

More recently, a connection between DPT-I and DPT-II and the excited-state
quantum phase transition (ESQPT) in quantum many-body systems with infinite-
range interactions has been established [56]. The authors in Ref. [56] define
a generalized microcanonical ensemble by introducing three noncommuting
charges, which considers the presence of dynamical order parameters. In the
thermodynamic limit, these order parameters are non-zero if the energy $E$ is
less than the ESQPT critical energy $E_{c}$, but they always become zero if
$E>E_{c}$. Concerning DPT-II, it was demonstrated that non-analyticities in
the rate function $r(t)$ only occur if the energy of the system after the
quench is greater than $E_{c}$, being prohibited if $E<E_{c}$. The same
theoretical framework was applied to a finite-range interacting system in Ref.
[57].

The main focus of the present study is to investigate the complexity of the
dynamics associated with DPT-I in the paradigmatic Lipkin-Meshkov-Glick (LMG)
model [36].

##  III Krylov Complexity of Quantum States

Now we introduce a notion of complexity of the quantum dynamics based on how
deep $|\psi_{t}\rangle$ spreads over the system Hilbert space. For this
reason, this quantity is also referred as spread complexity [31, 28].

Let us start by writing the evolved state in the form

$\displaystyle|\psi_{t}\rangle=\sum_{n=0}^{\infty}\frac{(it)^{n}}{n!}H^{n}|\psi_{0}\rangle.$
(4)

The successive applications of $H$ to the initial state generates the set of
quantum states

$\displaystyle\\{|\psi_{0}\rangle,H|\psi_{0}\rangle,H^{2}|\psi_{0}\rangle,\cdots\\}=\\{H^{n}|\psi_{0}\rangle\\}_{n\geq
0},$ (5)

which describes the spreading of the initial state over the Hilbert space
during time evolution. The subspace spanned by
$H^{n}|\psi_{0}\rangle\\}_{n\geq 0}$ is known as the Krylov space. The measure
of complexity that we consider in this work was introduced in Ref. [31] and it
is given by

$\displaystyle
C_{\mathcal{B}}(t)=\sum_{n}c_{n}|\langle\psi_{t}|B_{n}\rangle|^{2}$ (6)

where $\mathcal{B}$ represents a basis in the Hilbert space, whose elements
are denoted as ${|B_{n}\rangle}_{n}$. Intuitively, we expect that complex
dynamics lead to larger spreads over this basis. A basis independent
complexity measure can be obtained from $C_{\mathcal{B}}(t)$ by performing a
special minimization process, resulting in

$\displaystyle C(t)=\min_{\mathcal{B}}C_{\mathcal{B}}(t).$ (7)

Of course, it is always possible to construct a basis at the initial time such
that $|\psi_{0}\rangle=|B_{0}\rangle$ has a non-zero overlap only with one
state of the basis, thereby minimizing complexity. Instead, we consider a
functional minimization of (6) which takes into account the spread of the
state. For this purpose, it is natural to look at the set
$\\{H^{n}|\psi_{0}\rangle\\}_{n\geq 0}$ spanning the Krylov space, since it
includes only the portion of the Hilbert space actually visited by the system
over time evolution.

The Krylov complexity, a precedent of the spread complexity, was first
introduced in Ref. [10] in the context of operator evolution, i.e., in the
Heisenberg picture. Based on this concept, an universal hypothesis for the
maximum growth of local operators in quantum many-body systems was presented.
Later, Balasubramanian and collaborators [31] extended the idea to the
evolution of quantum states, in the Schrödinger picture, and proved that the
basis which minimizes (6) for $c_{n}=n$ is the so-called Krylov basis. The
Krylov basis is generated performing Gram-Schmidt orthogonalization on the set
$\\{H^{n}|\psi_{0}\rangle\\}_{n\geq 0}$. We denote the Krylov basis as
$\mathcal{K}$ and its elements as $\\{|K_{n}\rangle\\}_{n}$.

Alternatively, the Krylov basis can be generated using the Lanczos algorithm
[11, 58], which is a well known recursive method used to generate orthogonal
basis. Starting with the initial state as the first Krylov state
$|K_{0}\rangle=|\psi_{0}\rangle$, the next state is obtained as
$|K_{1}\rangle=\frac{1}{b_{1}}H|K_{0}\rangle$ with $b_{1}=\langle
K_{1}|K_{1}\rangle^{1/2}$ being the normalization constant. The subsequent
states $\\{|K_{n}\rangle\\}_{n\geq 2}$ are generated via the following
recursion method

$\displaystyle|A_{n}\rangle=H|K_{n-1}\rangle-a_{n}|K_{n-1}\rangle-
b_{n-1}|K_{n-2}\rangle$ (8)
$\displaystyle|K_{n}\rangle=b_{n}^{-1}|A_{n}\rangle.$ (9)

The constants $a_{n}$ and $b_{n}$, with $b_{0}=0$, are called Lanczos
coefficients and they are defined as

$\displaystyle a_{n}=\langle K_{n}|H|K_{n}\rangle,\ \ \ \ b_{n}=\langle
K_{n}|K_{n}\rangle^{1/2}.$ (10)

Isolating the first term in the right hand side of Eq. (8),

$\displaystyle
H|K_{n-1}\rangle=a_{n}|K_{n-1}\rangle+b_{n}|K_{n}\rangle+b_{n-1}|K_{n-2}\rangle,$
(11)

we observe that the hamiltonian is tridiagonal in the Krylov basis
$\\{|K_{n}\rangle\\}_{n}$.

The authors of Ref. [31] proved that the Krylov basis minimizes Eq. (6) in a
very specific way. Formally, let

$\displaystyle
S_{\mathcal{B}}=\left(C_{\mathcal{B}}^{(0)},C_{\mathcal{B}}^{(1)},C_{\mathcal{B}}^{(2)},\cdots\right)$
(12)

be the sequence of derivatives of $C_{\mathcal{B}}(t)$ calculated at $t=0$,
that is

$\displaystyle C^{(m)}_{\mathcal{B}}\equiv
C_{\mathcal{B}}^{(m)}(0)=\frac{d^{m}}{dt^{m}}C_{\mathcal{B}}(t)\Bigr{|}_{t=0},\
\ \ \ m=0,1,2,\cdots$ (13)

We say that $S_{\mathcal{B}_{1}}<S_{\mathcal{B}_{2}}$ if there is some $k$
such that $C^{(m)}_{\mathcal{B}_{1}}=C^{(m)}_{\mathcal{B}_{2}}$ for $m<k$ and
$C^{(m)}_{\mathcal{B}_{1}}<C^{(m)}_{\mathcal{B}_{2}}$ for $m=k$. Thus, for any
basis $\mathcal{B}$, $S_{\mathcal{K}}\leq S_{\mathcal{B}}$ with the equality
corresponding to the case $\mathcal{B}=\mathcal{K}$ [31]. This is the
minimization that we referred above as a functional minimization.

The Lanczos coefficients determine the matrix representation of the generator
of evolution in Krylov space. Their specific role in quantum dynamics is still
subject to investigation. The operator growth problem can be seen as a hopping
single-particle in an one-dimensional semi-infinite chain with the Lanczos
coefficients representing the hopping terms and the complexity in this case is
the expectation value of the _lattice index_ $n$ of the hopping particle; see,
e.g., Ref. [12]. This interpretation is inspired by the fact that in the
Krylov basis, the Hamiltonian has a tridiagonal form similar to the one of a
tight-binding model, which describes the hopping of electrons in solids.

##  IV DPT-I in the LMG model

Let us consider a spin chain described by the Hamiltonian

$\displaystyle H(h)=-\frac{J}{N}S_{z}^{2}-hS_{x},$ (14)

where $S_{\alpha}=\sum_{i=1}^{N}\sigma^{\alpha}_{i}/2$ ($\alpha=x,y,z$) are
collective spin operators, with $\sigma^{\alpha}_{i}$ denoting the $\alpha$
Pauli matrix acting on the $i$-th site of a chain of $N=2j$ sites and total
angular momentum $j$. This Hamiltonian is a particular case of the well-known
Lipkin-Meshkov-Glick model [36]. The constant $J$ denotes the ferromagnetic
coupling between the spins in the $z$ direction while $h$ represents the
strength of magnetic field applied along the $x$-axis. This Hamiltonian
describes an ensemble of $N$ spin-$1/2$ systems subject to all-to-all pairwise
interactions in the presence of a magnetic field.

Considering a quench $h_{0}=0\rightarrow h_{f}>0$, we show in Fig. 1(a) the
bifurcation diagram of Hamiltonian (14) for the time-averaged magnetization
(order parameter for this model)

$\displaystyle\overline{S_{z}}=\lim_{T\to\infty}\frac{1}{T}\int_{0}^{T}\langle\psi(t)|S_{z}|\psi(t)\rangle
dt,$ (15)

as a function of the quench parameter $h$, which characterizes DPT-I in this
model. The initial state was taken to be the collective spin aligning with the
$-z$ direction, the south pole of the Bloch sphere representation. This state
corresponds to one of the two-fold degenerate ground states of $H_{0}$ [59],
denoted as $|\downarrow\rangle_{z}$. Throughout this paper, we use $J=1$. The
order parameter $\overline{S_{z}}$ delineates two distinct dynamical phases: a
dynamical ferromagnetic phase for $h<1/2$, where magnetization oscillates
around a finite value depending on the initial state, leading to
$\overline{S_{z}}\neq 0$, and a dynamical paramagnetic phase for $h\geq 1/2$,
where magnetization oscillates around zero, yielding $\overline{S_{z}}=0$. The
critical point separating these phases is at $h_{c}=1/2$.

Figure 1: Magnetization as an order parameter. Panel (a) shows the time-
averaged magnetization $\overline{S_{z}}$ as a function of quench
$h_{0}=0\rightarrow h_{f}=h$. The initial state is
$|\psi_{0}\rangle=|\downarrow\rangle_{z}$. In the thermodynamic limit,
$\overline{S_{z}}$ signals the dynamical phase transition at the critical
point $h=1/2$, thus identifying two dynamical critical phases. Panels (b) and
(c) show the magnetization $S_{z}(t)$ as a function of time for a quench in
the ferromagnetic phase ($h=0.3$) and a quench crossing the critical point to
the paramagnetic phase ($h_{f}=0.8$), respectively. In both phases, the
thermodynamic limit prevents the magnetization from revivals.

The DPT-I in this model has been extensively studied [48, 37, 60]. The
dynamical critical point, denoted as $h_{c}$, can be determined analytically
for the Hamiltonian (14), resulting in $h_{c}=(h_{0}+J)/2$ [61]. As the system
size increases, the behavior of $\overline{S_{z}}$ converges towards the mean-
field solution, highlighting the exact nature of the mean-field solution for
the LMG model in the thermodynamic limit [59].

An essential aspect of DPT-I in this context is the symmetry of the initial
state. This critical phenomenon is only observed when the initial state of the
dynamics exhibits broken symmetry [48]. The LMG model feature spin-flip
symmetry [62], represented by the operator $S=e^{i\pi(S_{x}-j)}$. This
symmetry dictates that $H$ does not couple standard eigenbasis
$|j,m_{z}\rangle$ states (eigenvectors of $S^{2}$ and $S_{z}$) with even and
odd $m_{z}$. Under these conditions, a quench within the same dynamical phase
produce oscillations in the system around a broken-symmetry effective state,
while a quench crossing the dynamical critical point produces oscillations
around a symmetric effective state. These oscillations are characterized by
long-lived steady states and they are usually linked to prethermalization
[63].

Figures 1(b) and 1(c) illustrate instances of magnetization behavior over
time, depicting a quench within the same phase and crossing the dynamical
critical point, respectively. It is evident that the observed revivals in
these figures arise from finite-size effects within the system. As the system
size $N$ increases, these revivals disappear. In the following section, we
demonstrate that the time-averaged Krylov complexity can also serve as an
order parameter for this system.

##  V Results

We start by discussing the behaviour of the spread complexity and its long-
time average. In order to understand why Krylov complexity can be taken as an
order parameter for the DPT-I in the LMG model, we proceed with the analysis
of two other quantities, the inverse participation ratio and the Shannon
entropy, considering two distinct basis, the energy and the Krylov basis.

###  V.1 Krylov Complexity of quantum states in the LMG model

Figure 2: Krylov complexity as an order parameter. Panel (a) shows the
normalized time-averaged Krylov complexity $\overline{C}$ as a function of $h$
considering $h_{0}=0$ and initial state
$|\psi_{0}\rangle=|\downarrow\rangle_{z}$. $\overline{C}$ exhibits exactly the
same transition as $\overline{S_{z}}$ at the critical point $h_{c}=1/2$.
Panels (b) and (c) show the Krylov complexity $C_{\mathcal{K}}(t)$ as a
function of time for a quenches in the ferromagnetic phase ($h_{f}=0.3$) and
across the critical point, to the paramagnetic phase ($h_{f}=0.8$). In both
phases, the thermodynamic limit also prevents the complexity from revivals.

We turn to the spread complexity given in Eq. (6). We argue that the long-time
average of the Krylov complexity

$\displaystyle\overline{C}=\lim_{T\to\infty}\frac{1}{T}\int_{0}^{T}C_{\mathcal{K}}(t)dt$
(16)

behaves as a dynamical order parameter in the DPT-I of this model.

Using the same setup described in the last section, Fig. 2(a) shows the
normalized time-averaged complexity as function of the quench intensity $h$.
Remarkably, $\overline{C}$ exhibits the same qualitative behaviour as the
dynamical order parameter $\overline{S_{z}}$, with the only difference being
the numerical values assumed in both dynamical phases.

Similar to the magnetization $S_{z}(t)$, the Krylov complexity exhibits
distinct behavior in each dynamical phase over time. This characteristic is
depicted in panels (b) and (c) of Fig. 2. Extensive numerical calculations
suggest that, in the thermodynamic limit, and for $h_{0}=0$, the complexity
oscillates around a finite value, consistently remaining below unity for a
quench within the ferromagnetic phase. Conversely, it oscillates around the
unit value for a quench into the paramagnetic phase, thus crossing the
critical point $h_{c}=1/2$. Based on these findings, we can argue that we use
the time-averaged Krylov complexity to indicate a DPT-I.

We additionally examined how the time-averaged complexity varies concerning
the ground-state manifold. The LMG model possesses a two-fold degenerate
ground state, representing the north and south poles in the Bloch sphere
representation of the collective spin variables $S_{\alpha},\ (\alpha=x,y,z)$.
Interestingly, both of these initial ground states lead to the same pattern in
the behavior of the Krylov complexity over time. Consequently, the long-time
average $\overline{C}$ as a function of $h$ exhibits a qualitative similarity
to $\overline{S_{z}}$.

Given that DPT-I is associated with a dynamic symmetry break, it is reasonable
to anticipate that the sensitivity of the Krylov basis extends to the symmetry
of the model. Therefore, a deeper relationship between the Krylov basis and
the energy one should exist. This aspect will be investigated in the
concluding part of this section.

###  V.2 Inverse Participation Ratio

In order to analyze the relation between the energy basis and the Krylov
basis, we first consider the inverse participation ratio (IPR) in each one of
these bases. The IPR is given by

$\displaystyle IPR(t)=\sum_{k}|\langle
k|\psi(t)\rangle|^{4}=\sum_{k}p_{k}^{2}(t),$ (17)

for some basis whose elements we generically denote as $\\{|k\rangle\\}$. As
its name suggests, the IPR measures how many states of the chosen basis
effectively participate in the course of the time evolution of the system.

Considering the same protocol as before, we compute the IPR for two distinct
bases: the pre-quench energy eigenbasis (the eigenvectors of $H_{0}$) and the
Krylov basis. Two instances of the results are shown in Fig. 3. Interestingly,
the IPR computed in both bases are identical. However, this coincidence only
happens when we start with $h_{0}=0$, when the initial energy spectra is
doubly degenerate. Extensive numerical analysis shows that they are different
otherwise. Another property of IPR that we observed numerically is the
independence with respect to which ground-state is taken as initial state,
thus giving the same result also for the second ground-state
$|\psi_{0}\rangle=|\uparrow\rangle_{z}$.

Figure 3: Inverse Participation Ratio. Panel (a) shows IPR for a quench
$h=0.3$, while panel (b) shows the same quantity, but for a quench crossing
the critical point ($h=0.8$). We take $N=200$ in both panels. Exactly the same
behaviour is observed if the initial state is taken as the second ground-
state, $|\uparrow\rangle_{z}$.

The reason for this match will be analytically explored latter in this
article. However, before presenting this analysis, let us consider another
interesting quantity, the Shannon entropy.

###  V.3 $\mathcal{K}$-Entropy - Shannon entropy in the Krylov basis

Considering a probability distribution $p_{n}$, the Shannon entropy

$\displaystyle\mathcal{E}(t)=-\sum_{n}p_{n}(t)\log(p_{n}(t))$ (18)

is a measure of the uncertainty of the system —or the classical information
contained in the system. We are here interested in the entropy associated with
both bases discussed in the previous section: the Krylov basis, for which
$p_{n}(t)=|\langle K_{n}|\psi(t)\rangle|^{2}$ and the initial energy basis,
whose probabilities are $p_{n}(t)=|\langle E^{0}_{n}|\psi(t)\rangle|^{2}$. The
Shannon entropy in the Krylov basis was introduce in Ref. [12] and is known
also as the $\mathcal{K}$-entropy. It is a measure of complexity of the
dynamics. The authors of Ref. [31] argued that the complexity defined as the
exponential of this quantity measures the minimum Hilbert space dimension
required to store the probability distribution $p_{n}(t)$.

By comparing the Shannon entropy in both basis we again observe a perfect
match. Also, such feature only occurs when we start at $h_{0}=0$. An example
is shown in Fig. 4 for the same parameters used in Fig. 3.

Figure 4: Shannon entropy. Panel (a) shows the results for the quench $h=0.3$,
while panel (b) considers the case $h=0.8$. In both cases the initial state is
$|\psi_{0}\rangle=|\downarrow\rangle_{z}$ and $N=200$ as in the previous
calculations. Similar results are obtained considering the second ground-state
of the LMG model for $h_{0}=0$, which we denote by $|\uparrow\rangle$.

We note that the probabilities $p_{n}(t)=|\langle
E^{0}_{n}|\psi(t)\rangle|^{2}$ are the populations of the density matrix in
the energy eigenbasis and, thus, the entropy associated with such distribution
is the diagonal entropy, proposed as the thermodynamic entropy for closed
quantum systems [64]. Since $p_{n}(t)=|\langle K_{n}|\psi(t)\rangle|^{2}$ can
be seen as the probability density associated to site $n$ in the semi-infinite
Krylov lattice, naturally the corresponding Shannon entropy
$\mathcal{E}_{\mathcal{K}}(t)$ can be interpreted as the uncertainty in the
spreading of the initial state through the Krylov subspace.

The numerical results described above indicates a deeper match, beyond average
spread. The goal of the next subsection is to investigate why this happens.

###  V.4 Derivation of the Krylov basis

Figure 5: Lanczos coefficients. Comparison between the numerical (dots) and
analytical (yellow lines) coefficients for $N=200$ and
$|\psi_{0}\rangle=|\downarrow\rangle_{z}$. They feature perfect agreement
showing that $b_{m_{z}}=c_{+}(m_{z})$ and attesting that the Krylov states are
the usual angular momentum states $|j,m_{z}\rangle$ if the initial state is
equal to any one of the ground-states.

Let us consider quenches starting from $h_{0}=0$. In this case, it is possible
to derive analytical results involving the Krylov basis. The eigenstates of
the pre-quench Hamiltonian

$\displaystyle H_{0}=-\frac{1}{2j}S_{z}^{2},$ (19)

are the usual angular momentum basis $|j,m_{z}\rangle$, with the index
$m_{z}\in\\{-j,-j+1,\cdots,j-1,j\\}$ specifying the $2j+1$ spin projections.
Of course, the ground-states denoted by $|\uparrow\rangle_{z}$ and
$|\downarrow\rangle_{z}$ mentioned previously are examples of these
eigenstates. Then, the quench is performed in the magnetic field $h$ such that
the post-quench Hamiltonian can be written in terms of ladder operators

$\displaystyle
H_{f}=-\frac{1}{2j}S_{z}^{2}-\frac{h_{f}}{2}\left(S_{+}+S_{-}\right).$ (20)

Now we observe that the set of operators $\\{S_{z},S_{+},S_{-}\\}$ are the
operators defining the well-known $SU(2)$ algebra, thus the following
commutation relations hold

$\displaystyle[S_{z},S_{\pm}]=\pm S_{\pm},\ \ \ \ [S_{+},S_{-}]=2S_{z}.$ (21)

The action of the Hamiltonian given in Eq. (20) on one of the basis states
$|j,m_{z}\rangle$ is

$\displaystyle
H_{f}|j,m_{z}\rangle=c_{0}|j,m_{z}\rangle+c_{+}|j,m_{z}+1\rangle+c_{-}|j,m_{z}-1\rangle$
(22)

where $c_{0}=-m_{z}^{2}/2j$, $c_{+}=-\frac{h}{2}\sqrt{j(j+1)-m_{z}(m_{z}+1)}$
and $c_{-}=-\frac{h}{2}\sqrt{j(j+1)-m_{z}(m_{z}-1)}$. Comparing Eqs. (22) with
Eq. (11), we immediately see that the states satisfying the Lanczos algorithm
for $|\psi_{0}\rangle=|j,m_{z}\rangle$ are precisely the set
$\\{|j,m_{z}\rangle\\}$ up to a factor $\pm 1$, that is

$\displaystyle|K_{i}\rangle=\pm|j,m_{z}\rangle.$ (23)

Therefore, we conclude that the Krylov states are proportional to the pre-
quench energy eigenstates. This explains why both the IPR and the Shannon
entropy are the same in both bases.

The action of $H_{f}$ on the state $|j,m_{z}\rangle$, Eq. (22), provides us an
analytical expression for the Lanczos coefficients, which correspond to the
constant $c_{-}$. For convenience, we relabel the index $m_{z}$ as
$m_{z}\rightarrow-j+m_{z}$ such that now $m_{z}$ runs through the set
$\\{0,1,\cdots,2j\\}$. With this change, the constant $c_{-}$ becomes

$\displaystyle c_{-}(m_{z})=\frac{h_{f}}{2}\sqrt{m_{z}(2j-m_{z}+1)},$ (24)

where we absorbed the minus sign in the state $|j,m_{z}\rangle$. Figure 5
shows the perfect agreement between the Lanczsos coefficients calculated
numerically using the Hamiltonian (14) and the Lanczos algorithm (9) and the
analytical expression for $c_{-}$, proving that $c_{-}(m_{z})=b_{m_{z}}$.

Since $|K_{m_{z}}\rangle=\pm|j,m_{z}\rangle$, the Krylov basis must share the
same symmetries as the pre-quench energy basis. This fact turns the Krylov
basis sensitive to the break or restoration of the spin-flip symmetry if a
quench is performed in the LMG model, which explains the ability of the Krylov
complexity to characterize DPT-I. Moreover, note that we can write the
expression of the Krylov complexity in the form

$\displaystyle
C_{\mathcal{K}}(t)=\sum_{m_{z}=0}^{2j}m_{z}|\langle\psi_{t}|K_{m_{z}}\rangle|^{2}.$
(25)

Considering now the expression of $S_{z}(t)$,

$\displaystyle S_{z}(t)=\langle\psi_{t}|\hat{S}_{z}|\psi_{t}\rangle.$ (26)

and employing the completeness of the angular momentum basis,
$\sum_{m_{z}=0}^{2j}|j,-j+m_{z}\rangle\langle j,-j+m_{z}|=\mathbb{I}$, we can
readily show that

$\displaystyle C_{\mathcal{K}}(t)=S_{z}(t)+j,$ (27)

thus confirming that

$\displaystyle\overline{C}=\overline{S_{z}}+j.$ (28)

The above discussion proves that the Krylov complexity must have the same time
behaviour as the magnetization. We thus conclude that its time average is an
order parameter for this model.

Finally, we note that when $|\psi_{0}\rangle=|j,m_{z}\rangle$ for any $m_{z}$,
$\dim{(\mathcal{K})}=\dim{(\mathcal{H})}$, i.e., the dimension of the Krylov
subspace is equal to the dimension of the Hilbert space.These initial states
explore the whole Hilbert space, showing some kind of ergodicity. We emphasize
that this is not an feature of all quantum systems.

##  VI Conclusion

Understanding the complex nature of the temporal evolution of many-body
quantum systems holds fundamental significance across various research fields.
This study contributes to this area by examining the Krylov complexity (spread
complexity) and its connection to the dynamical phase transition within the
LMG model. In essence, we show that the time-averaged Krylov complexity serves
as an order parameter in this context. This conclusion stems from a numerical
investigation encompassing not only the Krylov complexity but also the inverse
participation ratio and Shannon entropy within the Krylov basis. These
analysis suggest a deep relation between the Krylov basis and the energy
eigenbasis. Subsequently, an analytical study establishes that the time-
averaged Krylov complexity effectively signals the dynamical phase transition
in this model by means of the equivalence between the Krylov and the energy
bases.

It is important to note that a thorough numerical investigation reveals that
this connection is valid exclusively in instances where the symmetry of the
model is broken. Our analytical analysis further substantiates this
conclusion. This prompts questions about the how Krylov complexity behaves
under general changes of symmetry. Addressing this question will certain
deepen our comprehension of the dynamics inherent in many-body systems.

Our findings also provide insights into the thermodynamics of critical systems
of this nature. While the thermodynamics of equilibrium phase transitions is
well-established, the same cannot be said for its dynamic counterpart. Our
results indicate that, in the case of the LMG model, the $\mathcal{K}$-entropy
serves as the quantum thermodynamic entropy. This assertion is grounded in the
definition of diagonal entropy [64] and the gauge theory of quantum
thermodynamics outlined in Ref.[65]. Furthermore, this observation aligns with
earlier investigations into the thermodynamics of dynamical quantum phase
transitions, where a thermodynamic entropy in quantum phase space not only
signals the transition but also, on average, exhibits a monotonic increase
over time [66]. Consequently, our results suggest a profound connection
between dynamical critical behavior and the process of thermalization.

An intriguing observation emerges when considering the interconnectedness of
symmetry and thermalization in thermodynamics, suggesting a profound link
between the inquiries addressed in the preceding paragraphs.

Whether the time-averaged Krylov complexity can function as an order parameter
for DPT-I in systems beyond the LMG model remains an open question.
Additionally, delving into the broader applicability of the connection between
Krylov and energy bases is crucial. Addressing these questions promises to
provide valuable insights into the underlying nature of this dynamic critical
behavior.

###### Acknowledgements.

This work was supported by the National Institute for the Science and
Technology of Quantum Information (INCT-IQ), Grant No. 465469/2014-0, by the
National Council for Scientific and Technological Development (CNPq), Grants
No 308065/2022-0, and by Coordination of Superior Level Staff Improvement
(CAPES).

## References

  * Zurek [2018] W. Zurek,  _Complexity, Entropy And The Physics Of Information_ (CRC Press, 2018).
  * Lloyd and Pagels [1988] S. Lloyd and H. Pagels, Complexity as thermodynamic depth, Annals of Physics 188, 186 (1988).
  * Zurek [1989] W. H. Zurek, Algorithmic randomness and physical entropy, Phys. Rev. A 40, 4731 (1989).
  * Berthiaume  _et al._ [2001] A. Berthiaume, W. van Dam, and S. Laplante, Quantum kolmogorov complexity, Journal of Computer and System Sciences 63, 201 (2001).
  * Lorenz [1993] E. N. Lorenz,  _The Essence of Chaos_ (University of Washington Press, Seattle, Washington, 1993).
  * Maldacena  _et al._ [2016] J. Maldacena, S. H. Shenker, and D. Stanford, A bound on chaos, Journal of High Energy Physics 2016, 10.1007/jhep08(2016)106 (2016).
  * Fine  _et al._ [2014] B. V. Fine, T. A. Elsayed, C. M. Kropf, and A. S. de Wijn, Absence of exponential sensitivity to small perturbations in nonintegrable systems of spins 1/2, Phys. Rev. E 89, 012923 (2014).
  * Rozenbaum  _et al._ [2020] E. B. Rozenbaum, L. A. Bunimovich, and V. Galitski, Early-time exponential instabilities in nonchaotic quantum systems, Phys. Rev. Lett. 125, 014101 (2020).
  * Hashimoto  _et al._ [2020] K. Hashimoto, K.-B. Huh, K.-Y. Kim, and R. Watanabe, Exponential growth of out-of-time-order correlator without chaos: inverted harmonic oscillator, Journal of High Energy Physics 2020, 68 (2020).
  * Parker  _et al._ [2019] D. E. Parker, X. Cao, A. Avdoshkin, T. Scaffidi, and E. Altman, A universal operator growth hypothesis, Phys. Rev. X 9, 041017 (2019).
  * Lanczos [1950] C. Lanczos, An iteration method for the solution of the eigenvalue problem of linear differential and integral operators, J. of Research of the Nation Bureau of Standards 45, 255 (1950).
  * Barbón  _et al._ [2019] J. L. F. Barbón, E. Rabinovici, R. Shir, and R. Sinha, On the evolution of operator complexity beyond scrambling, Journal of High Energy Physics 2019, 264 (2019).
  * Rabinovici  _et al._ [2021] E. Rabinovici, A. Sánchez-Garrido, R. Shir, and J. Sonner, Operator complexity: a journey to the edge of Krylov space, J. High Energ. Phys. 2021 (6), 62.
  * Dymarsky and Smolkin [2021] A. Dymarsky and M. Smolkin, Krylov complexity in conformal field theory, Phys. Rev. D 104, L081702 (2021).
  * Rabinovici  _et al._ [2022a] E. Rabinovici, A. Sánchez-Garrido, R. Shir, and J. Sonner, Krylov localization and suppression of complexity, Journal of High Energy Physics 2022, 10.1007/jhep03(2022)211 (2022a).
  * Caputa  _et al._ [2022] P. Caputa, J. M. Magan, and D. Patramanis, Geometry of krylov complexity, Phys. Rev. Res. 4, 013041 (2022).
  * Rabinovici  _et al._ [2022b] E. Rabinovici, A. Sánchez-Garrido, R. Shir, and J. Sonner, Krylov complexity from integrability to chaos, Journal of High Energy Physics 2022, 10.1007/jhep07(2022)151 (2022b).
  * Hörnedal  _et al._ [2022] N. Hörnedal, N. Carabba, A. S. Matsoukas-Roubeas, and A. del Campo, Ultimate speed limits to the growth of operator complexity, Communications Physics 5, 207 (2022).
  * Mück and Yang [2022] W. Mück and Y. Yang, Krylov complexity and orthogonal polynomials, Nuclear Physics B 984, 115948 (2022).
  * Hashimoto  _et al._ [2023] K. Hashimoto, K. Murata, N. Tanahashi, and R. Watanabe, Krylov complexity and chaos in quantum mechanics (2023), arXiv:2305.16669 [hep-th] .
  * Bhattacharya  _et al._ [2022] A. Bhattacharya, P. Nandy, P. P. Nath, and H. Sahu, Operator growth and krylov construction in dissipative open quantum systems, Journal of High Energy Physics 2022, 10.1007/jhep12(2022)081 (2022).
  * Liu  _et al._ [2023] C. Liu, H. Tang, and H. Zhai, Krylov complexity in open quantum systems, Phys. Rev. Res. 5, 033085 (2023).
  * Hörnedal  _et al._ [2023] N. Hörnedal, N. Carabba, K. Takahashi, and A. del Campo, Geometric operator quantum speed limit, wegner hamiltonian flow and operator growth, Quantum 7, 1055 (2023).
  * Bhattacharjee  _et al._ [2023a] B. Bhattacharjee, X. Cao, P. Nandy, and T. Pathak, Operator growth in open quantum systems: lessons from the dissipative syk, Journal of High Energy Physics 2023, 10.1007/jhep03(2023)054 (2023a).
  * Bhattacharya  _et al._ [2023] A. Bhattacharya, P. Nandy, P. P. Nath, and H. Sahu, On krylov complexity in open systems: an approach via bi-lanczos algorithm (2023), arXiv:2303.04175 [quant-ph] .
  * Bhattacharjee  _et al._ [2023b] B. Bhattacharjee, P. Nandy, and T. Pathak, Operator dynamics in lindbladian syk: a krylov complexity perspective (2023b), arXiv:2311.00753 [quant-ph] .
  * Ballar Trigueros and Lin [2022] F. Ballar Trigueros and C.-J. Lin, Krylov complexity of many-body localization: Operator localization in krylov basis, SciPost Physics 13, 10.21468/scipostphys.13.2.037 (2022).
  * Caputa and Liu [2022] P. Caputa and S. Liu, Quantum complexity and topological phases of matter, Physical Review B 106, 10.1103/physrevb.106.195125 (2022).
  * Takahashi and del Campo [2023] K. Takahashi and A. del Campo, Shortcuts to adiabaticity in krylov space (2023), arXiv:2302.05460 [quant-ph] .
  * Bhattacharjee [2023] B. Bhattacharjee, A lanczos approach to the adiabatic gauge potential (2023), arXiv:2302.07228 [quant-ph] .
  * Balasubramanian  _et al._ [2022] V. Balasubramanian, P. Caputa, J. M. Magan, and Q. Wu, Quantum chaos and the complexity of spread of states, Phys. Rev. D 106, 046007 (2022).
  * Scialchi  _et al._ [2023] G. F. Scialchi, A. J. Roncaglia, and D. A. Wisniacki, Integrability to chaos transition through krylov approach for state evolution (2023), arXiv:2309.13427 [quant-ph] .
  * Eisert  _et al._ [2015] J. Eisert, M. Friesdorf, and C. Gogolin, Quantum many-body systems out of equilibrium, Nature Physics 11, 124–130 (2015).
  * [34] M. Heyl, Dynamical quantum phase transitions: a review, Rep. Prog. Phys. 81, 054001 (2018).
  * Marino  _et al._ [2022] J. Marino, M. Eckstein, M. S. Foster, and A. M. Rey, Dynamical phase transitions in the collisionless pre-thermal states of isolated quantum systems: theory and experiments, Reports on Progress in Physics 85, 116001 (2022).
  * Lipkin  _et al._ [1965] H. Lipkin, N. Meshkov, and A. Glick, Validity of many-body approximation methods for a solvable model: (i). exact solutions and perturbation theory, Nuclear Physics 62, 188 (1965).
  * Žunkovič  _et al._ [2016] B. Žunkovič, A. Silva, and M. Fabrizio, Dynamical phase transitions and loschmidt echo in the infinite-range xy model, Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences 374, 20150160 (2016).
  * Muga  _et al._ [2007] G. Muga, R. Mayato, and I. Egusquiza,  _Time in Quantum Mechanics_, Lecture Notes in Physics (Springer Berlin Heidelberg, 2007).
  * Muga  _et al._ [2012] G. Muga, A. Ruschhaupt, and A. Campo,  _Time in Quantum Mechanics - Vol. 2_ , Lecture Notes in Physics (Springer Berlin Heidelberg, 2012).
  * del Campo [2011] A. del Campo, Long-time behavior of many-particle quantum decay, Phys. Rev. A 84, 012113 (2011).
  * del Campo [2016] A. del Campo, Exact quantum decay of an interacting many-particle system: the calogero–sutherland model, New Journal of Physics 18, 015014 (2016).
  * Heyl  _et al._ [2013] M. Heyl, A. Polkovnikov, and S. Kehrein, Dynamical quantum phase transitions in the transverse-field ising model, Phys. Rev. Lett. 110, 135704 (2013).
  * LeClair  _et al._ [1995] A. LeClair, G. Mussardo, H. Saleur, and S. Skorik, Boundary energy and boundary states in integrable quantum field theories, Nuclear Physics B 453, 581–618 (1995).
  * Yang and Lee [1952] C. N. Yang and T. D. Lee, Statistical theory of equations of state and phase transitions. i. theory of condensation, Phys. Rev. 87, 404 (1952).
  * Lee and Yang [1952] T. D. Lee and C. N. Yang, Statistical theory of equations of state and phase transitions. ii. lattice gas and ising model, Phys. Rev. 87, 410 (1952).
  * Andraschko and Sirker [2014] F. Andraschko and J. Sirker, Dynamical quantum phase transitions and the loschmidt echo: A transfer matrix approach, Phys. Rev. B 89, 125120 (2014).
  * Campbell [2016] S. Campbell, Criticality revealed through quench dynamics in the lipkin-meshkov-glick model, Phys. Rev. B 94, 184403 (2016).
  * Žunkovič  _et al._ [2018] B. Žunkovič, M. Heyl, M. Knap, and A. Silva, Dynamical quantum phase transitions in spin chains with long-range interactions: Merging different concepts of nonequilibrium criticality, Phys. Rev. Lett. 120, 130601 (2018).
  * Halimeh  _et al._ [2021] J. C. Halimeh, M. Van Damme, L. Guo, J. Lang, and P. Hauke, Dynamical phase transitions in quantum spin models with antiferromagnetic long-range interactions, Phys. Rev. B 104, 115133 (2021).
  * Hashizume  _et al._ [2022] T. Hashizume, I. P. McCulloch, and J. C. Halimeh, Dynamical phase transitions in the two-dimensional transverse-field ising model, Phys. Rev. Res. 4, 013250 (2022).
  * Schmitt and Kehrein [2015] M. Schmitt and S. Kehrein, Dynamical quantum phase transitions in the kitaev honeycomb model, Phys. Rev. B 92, 075114 (2015).
  * Karrasch and Schuricht [2013] C. Karrasch and D. Schuricht, Dynamical phase transitions after quenches in nonintegrable models, Phys. Rev. B 87, 195104 (2013).
  * Puebla [2020] R. Puebla, Finite-component dynamical quantum phase transitions, Phys. Rev. B 102, 220302 (2020).
  * Defenu  _et al._ [2023] N. Defenu, A. Lerose, and S. Pappalardi, Out-of-equilibrium dynamics of quantum many-body systems with long-range interactions (2023), arXiv:2307.04802 [cond-mat.quant-gas] .
  * Heyl [2014] M. Heyl, Dynamical quantum phase transitions in systems with broken-symmetry phases, Phys. Rev. Lett. 113, 205701 (2014).
  * [56] Á. L. Corps and A. Relaño, Dynamical and excited-state quantum phase transitions in collective systems. Phys. Rev. B 106, 024311 (2022).
  * [57] Á. L. Corps and A. Relaño, Theory of dynamical phase transitions in quantum systems with symmetry-breaking eigenstates. Phys. Rev. Lett. 130, 100402 (2023).
  * V. Viswanath [1994] G. M. V. Viswanath,  _The Recursion Method: Application to Many-Body Dynamics_ (Springer-Verlag, 1994).
  * Dusuel and Vidal [2005] S. Dusuel and J. Vidal, Continuous unitary transformations and finite-size scaling exponents in the lipkin-meshkov-glick model, Phys. Rev. B 71, 224420 (2005).
  * Lerose  _et al._ [2019] A. Lerose, B. Žunkovič, J. Marino, A. Gambassi, and A. Silva, Impact of nonequilibrium fluctuations on prethermal dynamical phase transitions in long-range interacting spin chains, Phys. Rev. B 99, 045128 (2019).
  * Sciolla and Biroli [2013] B. Sciolla and G. Biroli, Quantum quenches, dynamical transitions, and off-equilibrium quantum criticality, Phys. Rev. B 88, 201110 (2013).
  * Ribeiro  _et al._ [2008] P. Ribeiro, J. Vidal, and R. Mosseri, Exact spectrum of the lipkin-meshkov-glick model in the thermodynamic limit and finite-size corrections, Phys. Rev. E 78, 021106 (2008).
  * Mori  _et al._ [2018] T. Mori, T. N. Ikeda, E. Kaminishi, and M. Ueda, Thermalization and prethermalization in isolated quantum systems: a theoretical overview, Journal of Physics B: Atomic, Molecular and Optical Physics 51, 112001 (2018).
  * Polkovnikov [2011] A. Polkovnikov, Microscopic diagonal entropy and its connection to basic thermodynamic relations, Annals of Physics 326, 486–499 (2011).
  * Céleri and Rudnicki [2021] L. C. Céleri and L. u. Rudnicki, Gauge invariant quantum thermodynamics: consequences for the first law, arXiv:2104.10153 (2021).
  * Goes  _et al._ [2020] B. O. Goes, G. T. Landi, E. Solano, M. Sanz, and L. C. Céleri, Wehrl entropy production rate across a dynamical quantum phase transition, Phys. Rev. Res. 2, 033419 (2020).


# Addressing Training Bias in Machine Learning Visualization Recommendation
Systems by Identifying Trends in Training Data

Improving VizML Through a Statistical Analysis of the Plotly Community Feed

Allen Tu<EMAIL_ADDRESS>University of Maryland, College ParkCollege ParkMDUSA ,
Priyanka Mehta<EMAIL_ADDRESS>University of Maryland, College ParkCollege
ParkMDUSA ,  Alexander Wu<EMAIL_ADDRESS>University of Maryland, College
ParkCollege ParkMDUSA ,  Nandhini Krishnan<EMAIL_ADDRESS>University of
Maryland, College ParkCollege ParkMDUSA and  Amar Mujumdar<EMAIL_ADDRESS>University of Maryland, College ParkCollege ParkMDUSA

## Abstract

Machine learning is a promising approach to visualization recommendation due
to its high scalability and representational power. Researchers can create a
neural network to predict visualizations from input data by training it over a
corpus of datasets and visualization examples. However, these machine learning
models can reflect trends in their training data that may negatively affect
their performance. Our research project aims to address training bias in
machine learning visualization recommendation systems by identifying trends in
the training data through statistical analysis.

##  1\. Introduction

Our project focuses on VizML (10.1145/3290605.3300358, 1), a machine learning
recommendation system that is trained over 2.3 million dataset-visualization
pairs from the open-source Plotly Community Feed. VizML is adept at providing
interpretable measures of feature importance, and its models can easily be
integrated into existing visualization systems due to their learned
understanding of design choices. VizML recommendations are quantifiably
similar to visualizations created by human analysts, and its performance
exceeds that of other visualization recommendation systems.

However, VizML’s creators acknowledge that it suffers from significant
training bias. In other words, VizML models reflect trends in the Plotly
Community Feed that heavily influence its performance. The authors do not
elaborate any further, and we did not find any existing discussions about
trends in the Plotly Community Feed. Furthermore, bias in machine learning
recommendation systems seems to be an underexplored topic as a whole.

The sheer size of VizML models poses several challenges for offsetting their
bias. Since we are limited in both time and computing power, we are not able
to experiment by training multiple full VizML models. We cannot create a
similar dataset for testing, and it is difficult to adapt other open-source
datasets to the required input format. Additionally, the creators of VizML do
not explain their findings about training bias, so we do not have any prior
knowledge of the trends that we are searching for. Thus, performing a
statistical analysis of the Plotly Community Feed is our optimal approach.

In this paper, we perform a statistical analysis to identify trends in the
training data. Then, we evaluate the significance of these trends and connect
them to the performance of the model. Finally, we develop methods to address
our findings and improve the model. Although our results are specific to
VizML, our process is generalizable and can be used to improve any machine
learning visualization recommendation model.

Our insight is that we can address training bias in machine learning
visualization recommendation systems by identifying trends in the training
data through statistical analysis. In our findings, we identified several
trends in the Plotly Community Feed that influence recommendations by the
VizML model. Some of these trends are conscious design decisions that improve
the readability of visualizations, while others demonstrate how Plotly users
tend to create charts based on convenience rather than effectiveness. We can
use our findings to improve the model by counteracting detrimental trends and
improving in areas of deficiency.

The next section of our paper will focus largely on related work. We discuss
machine learning visualization recommendation systems, the VizML model, and
the current state of research on its training bias. Then, we detail our
overall approach and how we collected and processed our data. Our findings are
centered around our statistical analysis of the Plotly Community Feed. We
identify significant trends in the data and connect them to the performance of
the model. In our conclusion, we summarize our results and explore avenues for
addressing the training bias.

##  2\. Related Work

Visualizing data is often the first step of analysis; however, visualization
tools can be difficult and tedious to use because they require the user to
manually specify options via code or menus. Recent computer science research
has led to sophisticated systems that automatically suggest tailored
visualizations based on the selected data and the user’s needs. These
recommenders can make creating visualizations more accessible to people
without an analytical background as well as assist analysts in producing them
more efficiently.

Current visualization recommenders, such as VisC
(10.1007/978-3-319-07233-3_58, 2) and Voyager 2 (2016-voyager, 3), rely on
large sets of predefined questions and rules. While these systems are
effective to an extent, they are costly to create in terms of labor because
they require domain experts to manually write constraints. Additionally, this
process hinders the system’s ability to identify trends, incorporate
contextual information, and adapt to user behavior (10.1145/3092931.3092937,
4).

A machine learning approach solves many of these limitations. Instead of
relying on a set of manually specified constraints, a machine learning model
generates predictions based on training data, so improvements can be made
relatively easily by retraining the model or fine-tuning its design. These
neural networks are also much more effective at capturing complex
relationships and can be trained on vast amounts of high-dimensional data.

###  2.1. VizML

Figure 1. “Diagram of data processing and analysis flow in VizML, starting
from (1) the original Plotly Community Feed API endpoints, proceeding to (2)
the deduplicated dataset-visualization pairs, (3a) features describing each
individual column, pair of columns, and dataset, (3b) design choices extracted
from visualizations, (4) task-specific models trained on these features, and
(5) potential recommended design choices” (10.1145/3290605.3300358, 1).

VizML (10.1145/3290605.3300358, 1), a more recent project, learns the
relationships between datasets and the visualizations analysts create from
them by training on 2.3 million dataset-visualization pairs from the Plotly
Community Feed. VizML models are adept at providing interpretable measures of
feature importance and can easily be integrated into existing visualization
systems. They are also trained on an extremely large and diverse corpus that
was created based on real visual analysis by analysts on their own datasets,
so their representational ability far exceeds that of older recommenders like
Draco-Learn (Draco, 5) and DeepEye (DeepEye, 6).

However, it is not without limitations. VizML’s creators acknowledge that the
model suffers from significant training bias. In other words, VizML models
reflect trends in the Plotly Community Feed that may significantly affect its
performance. The authors do not elaborate any further, and we did not find any
existing discussions about trends in the Plotly Community Feed. Furthermore,
bias in machine learning recommendation systems seems to be an underexplored
topic as a whole. Our research project aims to provide insights into VizML’s
training bias through a statistical analysis of the training data.

##  3\. Approach

The goal of our project is to address training bias in the VizML model. We
begin by collecting and processing training data from the Plotly Community
Feed. Then, we conduct a statistical analysis of the dataset-visualization
pairs by evaluating the frequency of each chart type. We discover and
interpret trends in the training data and connect them to the training bias of
the VizML model. Finally, we explore methods for addressing VizML’s training
bias based on our findings, avenues for further statistical analysis, and
possible expansions for the VizML model in our conclusion. These steps are
generalizable and can be used to improve any machine learning visualization
recommendation system.

Our insight is that we can address training bias in machine learning
visualization recommendation systems by identifying trends in the training
data. In our statistical analysis, we identified several trends in the Plotly
Community Feed that influence recommendations by the VizML model. Some of
these trends are conscious design decisions that improve the readability of
visualizations, while others demonstrate how Plotly users tend to create
charts based on convenience rather than effectiveness. We can use our findings
to improve the model by counteracting detrimental trends and improving in
areas of deficiency.

###  3.1. Data Collection

The VizML model is trained on the Plotly Community Feed dataset, which
consists of over 2.3 million dataset-visualization pairs. Analyzing the entire
corpus was unrealistic given our available time and computing power, so we
acquired a 1,000 example subset of the training data from the VizML GitHub
repository. Then, we loaded the data into a Pandas DataFrame inside of a
Jupyter Notebook for exploration and statistical analysis.

Figure 2. Pandas DataFrame of the processed dataset.

We found that the dataset is organized into four columns. fid, the example’s
unique identifier, and layout, the formatting specifier of the chart, are not
relevant to our analysis, so we discarded them from the DataFrame entirely.
The remaining two columns are chart_data, which specifies the user-created
chart, and table_data, which contains the user-submitted data that the chart
was created from. We convert each entry in these columns from the JSON format
into lists and dictionaries that are easily interpreted by most Python
packages and libraries.

Figure 3. Scatter plot in chart_data. ‘Temperature’ and ‘RH’ are plotted
across a single predictor variable. Regression lines for each response
variable are drawn over the data points.

Each row in chart_data is a list of chart objects represented by dictionaries.
The entries in the dictionary specify the properties of the chart object. All
dictionaries are required to include the name of the object, the type of
chart, and the xsrc and ysrc of the predictor and response variables,
respectively, in the corresponding table_data entry. The user can also specify
optional fields. For example, they can fix the color of the object to
turquoise, or they can update mode to add an automatically calculated
regression line to a ‘scatter’ type object.

###  3.2. Statistical Analysis

The vast majority of the chart_type objects across our entire 1,000 example
dataset only have the four required fields: name, type, xsrc, and ysrc. name
is not useful for our purposes because VizML generates them based on the
column labels in the data. VizML also relies on the user to select the data
query, so it is difficult to measure the impact of xsrc and ysrc on model bias
through only a statistical analysis of the training data. The remaining field
is type, which most significantly influences the VizML model because it
specifies the type of chart that is created from the input data query.

By analyzing the trends in the type field, we will be able to draw insights
regarding the types of visualizations that the VizML model is likely to
recommend. Our statistical analysis focuses on the overall frequency and
complexity of charts typical of our subset of the Plotly Community Feed. We
determined the frequency of each of the 15 chart types in our dataset and
identified trends in the preferences of Plotly users. For each of the three
most common chart types, we evaluated trends in their complexity by measuring
the number of response variables or categories visualized by each of their
corresponding examples.

##  4\. Findings

###  4.1. Frequency of Chart Types

First, we calculate the frequency of each type of chart in our dataset. Each
row in chart_data maps to exactly one chart type. It is worth noting that line
charts are initialized with the line field instead of the type field, and they
are distinct from scatter plots with a line overlaid on the point
distribution. Charts initialized without a type field default to scatter
plots.

Figure 4. Frequency of each chart type in the dataset. Scatter, line, and bar
plots account for 39.6%, 31.0%, and 17.9% of the examples, respectively. The
remaining twelve less common chart types account for 11.4% of the examples.

We find that scatter plots, line plots, and bar plots are by far the most
common chart types in the Plotly Community Feed. We expected this because
these chart types are simple and effective at visualizing trends in data, and
they are often the first visualizations that analysts reach for in their
initial exploration of the data. VizML is almost guaranteed to recommend one
of these three chart types for every selected data query.

It is unlikely for the model to ever recommend any of the other twelve chart
types, which account for only 11.4% of the dataset all together. For example,
the fourth most common chart type is the heatmap, which has a relative
frequency of 0.031. The scatter plot has a relative frequency of 0.396, so it
is almost 13 times more likely for a Plotly user to create a scatter plot than
a heatmap. Since many of these chart types fill somewhat niche roles, this is
also expected.

However, a notably underrepresented chart type is the histogram. It is a
ubiquitous, effective chart type that is commonly used by analysts to
visualize datasets typical of the Plotly Community Feed. Most analysts would
likely expect its relative frequency to be much higher than 0.006; in fact, we
expected it to be the fourth most common chart type.

A possible explanation is that a histogram can be relatively difficult to set
up in Plotly. If the user is not satisfied with the automatically generated
bins, they have to specify them manually. This process requires some deeper
knowledge of the data, and additional coding is needed to manually specify
bins over a wide range. Thus, Plotly users may find it more convenient to
choose a scatter or line plot instead, even if they believe a histogram may be
more effective at visualizing their data.

###  4.2. Analysis of Scatter Plots

Figure 5. Frequency of the number of response variables across all scatter
plots in the dataset. One and two response variables account for 37.1% and
27.0% of the examples, respectively. We discarded the extreme outliers 61 and
216 response variables for readability.

Figure 6. Boxplot of the number of response variables across all scatter plots
in the dataset. The quartiles of the distribution are 1, 2, and 4 response
variables.

Next, we examined the number of objects in each chart to gauge their
complexity. Each object in a scatter plot represents a different response
variable. We found that 64.1% scatter plots in the Plotly Community Feed have
one or two response variables, but it is normal for them to have up to four.
It is unlikely for scatter plots to have five or more response variables,
although an extreme outlier that was omitted from the visualizations has 216.

The preference clearly leans towards simple scatter plots with less response
variables. Plotly users are unlikely to select more than four response
variables even if more data is available. A possible explanation is that a
scatter plot can become unreadable if the density of datapoints is too high,
so using too many response variables damages the effectiveness of the
visualization. Additionally, the plotly.scatter method creates single response
variable scatter plots by default, so users may prefer creating these simple
scatter plots out of convenience.

###  4.3. Analysis of Line Plots

Figure 7. Frequency of the number of lines across all line plots in the
dataset. 3, 4, 7, and 8 lines account for 18.1%, 37.2%, 18.8%, and 25.9% of
the examples, respectively. We discarded the extreme outlier 50 lines for
readability.

Figure 8. Boxplot of the number of lines across all line plots in the dataset.
The quartiles of the distribution are 4, 4, and 8 lines.

Each object in a line plot represents a single line. We found that most line
plots in the Plotly Community Feed have four to eight lines, but an extreme
outlier that was omitted from the visualization has 50. Our analysis indicates
it is unlikely for Plotly users to create a line plot with only one or two
lines; in fact, none were present in our 1,000 example subset.

In a previous segment of our analysis, we found that many scatter plots with
only one or two response variables use the mode field to overlay a regression
line. A possible explanation is that Plotly users prefer simpler, less
cluttered graphs. If a scatter plot has too many response variables, the
visual density of the data points and regression lines may make it difficult
to read. To solve this problem, the user can omit the data points entirely by
creating a line plot instead. Our analysis provides statistical evidence that
supports the theory that Plotly users prefer scatter plots for visualizing one
or two lines and line plots for visualizing three or more lines.

###  4.4. Analysis of Bar Plots

Figure 9. Frequency of the number of categories across all bar plots in the
dataset. 1 category accounts for 42.5% of the examples, while 2, 16, 18, and
24 categories account for 8.1%, 9.7%, 7.3%, and 9.7% of the examples,
respectively.

Figure 10. Boxplot of the number of categories across all barplots in the
dataset. The quartiles of the distribution are 1, 2, and 16 categories.

Each object in a bar plot represents a single category, or bar. 105, or 42.5%,
of the bar plots only have one category. We found this to be abnormal because
a primary purpose of a bar plot is to visually compare different categories.
The representational capacity of a single bar is limited because there is no
other data to compare it to. One category bar graphs essentially represent
only a single number or proportion, and most analysts would agree that it is
more effective to use another format to represent it. Thus, the high relative
frequency of single category bar graphs is a significant indicator of
potential bias in the Plotly Community Feed.

Interestingly, our distribution also indicates that it is just as common for
Plotly users to visualize two categories as it is for them to visualize 16 to
20 categories. Upon further statistical analysis, we determined that Plotly
users tend to create bar plots that either visualize a single category or
every available category in their table. A possible explanation is that these
are the two most convenient approaches when using the plotly.bar method. The
user can select one xsrc and ysrc pair to create a single bar, or they can
select their entire dataset and quickly create a bar for every category.

A more powerful visualization often lies in the middle ground. For example, it
may be more effective to show only the three most significant categories with
over 250 counts each without the other 17 categories with less than 10 counts
each. We found that bar plots with two to seven categories are more likely to
have selected only a subset of the available categories in their table. This
requires some preliminary knowledge of the dataset as well as additional
coding, which may explain why these examples are relatively less frequent.
Therefore, our statistical analysis suggests that users who picked one or all
of the categories may have done so out of convenience rather than
effectiveness.

##  5\. Conclusion

We found that the Plotly Community Feed heavily prefers a small subset of the
available chart types. Data queries with one to two response variables are
nearly always used to create scatter plots, while those with three to seven
response variables are sometimes used in line plots. Categorical data queries
are almost exclusively used to create bar plots. Since it uses the Plotly
Community Feed as training data, VizML strongly reflects these trends.
Recommendations made by the model given any data query are almost guaranteed
to be scatter, line, or bar plots; it is unlikely for the remaining twelve
chart types to be recommended at all.

VizML’s significant bias toward charts typical of its training data is not
necessarily negative. It recommends scatter, line, and bar plots because they
are the essential charts that the vast majority of Plotly users would only
create. Some preferences, such as choosing between line and scatter plots
based on the number of response variables, are practical design choices that
can increase the effectiveness of generated charts. Recommendations by VizML
are quantifiably similar to visualizations created by human analysts, and the
model’s performance exceeds that of other visualization recommendation
systems.

Figure 11. “Consensus-Adjusted Recommendation Score of three ML-based, two
rule-based, and two human predictors when predicting consensus visualization
type. Error bars show 95% bootstrapped confidence intervals, with 105
bootstraps. The mean minimum achievable score is the lower dashed line, while
the highest achieved CARS is the upper dotted line” (10.1145/3290605.3300358,
1).

However, accurately predicting human behavior is not always positive either.
For example, the histogram is a common and effective chart type, but it is
severely underrepresented in our dataset. Since histograms are relatively
difficult to set up in Plotly, users may choose to use a scatter or line plot
instead, even if they believe a histogram would be more effective. Similarly,
we found that 42.5% of bar plots in the dataset visualize a single category,
limiting their representational power. Further analysis also revealed that
users tend to create bar plots with either one or every category – the two
approaches that are the fastest to perform in Plotly.

Our insight is that some trends in the Plotly Community Feed are the result of
convenience rather than effectiveness. Scatter, line, and bar plots are
heavily preferred because they are common charts that are easy and simple to
create. Histograms can require more setup than line plots, so they are
neglected almost completely. Users tend to choose one or all of the categories
when creating a bar plot because determining which categories are significant
requires an intermediary step of analysis.

The goal of a visualization recommendation system is to recommend a high
quality visualization from a given data query, but the VizML model is
influenced by how easy or convenient it is to make certain visualizations in
Plotly. The user does not save any time because the recommendation process is
automatic, and the generated visualization may have been of higher quality if
there were more training examples that required more effort to manually
specify. Therefore, VizML’s training bias can be detrimental because human
behavior is influenced by factors beyond optimizing performance. Addressing
these weaknesses in the VizML model may lower its score on consensus-adjusted
evaluators; however, the resulting visualizations recommended by the model
will ultimately be of higher quality.

###  5.1. Avenues for Further Analysis

10,000 and 100,000 example subsets of the Plotly Community Feed, as well as
the entire 2.3 million example dataset, are available on the VizML GitHub
repository. Evaluating these larger datasets could reveal trends beyond the
ones we discovered in our 1,000 example subset. The scope of our statistical
analysis can also be extended to include layout and table_data, as well as the
remaining fields in chart_data. Some of the relationships in these areas only
affect a small demographic of charts, but they may have implications that
relate to our findings.

Due to our limited time and computing resources, we were not able to perform
experiments using the VizML model itself. A promising expansion is to
exaggerate different characteristics in the training data. Training VizML
using these variations could provide insight into how to affect biases in the
model. For example, experimenting with the proportion of chart types may
address the underrepresentation of histograms. Another experiment could
measure the performance of VizML on datasets that are not typical of the
Plotly Community Feed to identify areas for improvement.

###  5.2. Improving VizML

Our statistical analysis concluded that the Plotly Community Feed contains a
large number of examples that may have been influenced by convenience rather
than effectiveness. For example, the proportion of bar plots that visualize a
single category is abnormally high. We can identify and clean examples with
potentially unwanted characteristics like these, reducing their frequency in
the training data and their influence on the VizML model. They can easily be
replaced with better unused examples from the Plotly Community Feed.

Some chart types such as histograms are underrepresented by the training data
and will not be recommended by VizML. We can increase their relative frequency
by adding unused examples with these chart types from the Plotly Community
Feed. Since the training data is no longer a random sample of the population,
experimentation is necessary for finding the appropriate number of additional
examples. The new model will recommend these previously underrepresented chart
types, so the training bias is in part addressed. If VizML is configured to
recommend multiple visualizations, this will also help diversify the chart
types in the output.

Many chart types, like heatmaps and contour plots, fill niche purposes and are
ill-suited for a general use recommender like VizML. Fortunately, their
combined effect on the model’s performance is negligible due their low
relative frequency. A possible avenue for expansion is to train a VizML model
to specifically recommend these more complex visualizations. Approximately 7%
of our 1,000 example subset use these chart types, so a sizable training
dataset could be built by selecting all useful examples from a larger subset.

## References

  * (1) Kevin Hu et al.  “VizML: A Machine Learning Approach to Visualization Recommendation”  In _Proceedings of the 2019 CHI Conference on Human Factors in Computing Systems_ , CHI ’19  Glasgow, Scotland Uk: Association for Computing Machinery, 2019, pp. 1–12  DOI: 10.1145/3290605.3300358
  * (2) Taissa Abdalla Filgueiras Sousa and Simone Diniz Junqueira Barbosa  “Recommender System to Support Chart Constructions with Statistical Data”  In _Human-Computer Interaction. Theories, Methods, and Tools_ Cham: Springer International Publishing, 2014, pp. 631–642
  * (3) Kanit Wongsuphasawat et al.  “Voyager: Exploratory Analysis via Faceted Browsing of Visualization Recommendations”  In _IEEE Trans. Visualization & Comp. Graphics (Proc. InfoVis)_, 2016  URL: http://idl.cs.washington.edu/papers/voyager
  * (4) Manasi Vartak et al.  “Towards Visualization Recommendation Systems”  In _SIGMOD Rec._ 45.4 New York, NY, USA: Association for Computing Machinery, 2017, pp. 34–39  DOI: 10.1145/3092931.3092937
  * (5) Dominik Moritz et al.  “Formalizing Visualization Design Knowledge as Constraints: Actionable and Extensible Models in Draco”, 2018  DOI: 10.31219/osf.io/3eg9c
  * (6) Yuyu Luo, Xuedi Qin, Nan Tang and Guoliang Li  “DeepEye: Towards Automatic Data Visualization”, 2018, pp. 101–112  DOI: 10.1109/ICDE.2018.00019