# Incommensurability-Induced Enhancement of Superconductivity in One
Dimensional Systems

Ricardo Oliveira  Centro de Física das Universidades do Minho e Porto, LaPMET,
Departamento de Física e Astronomia, Faculdade de Ciências, Universidade do
Porto, 4169-007 Porto, Portugal  Miguel Gonçalves  CeFEMA, LaPMET, Instituto
Superior Técnico, Universidade de Lisboa, Av. Rovisco Pais, 1049-001 Lisboa,
Portugal  Pedro Ribeiro  CeFEMA, LaPMET, Instituto Superior Técnico,
Universidade de Lisboa, Av. Rovisco Pais, 1049-001 Lisboa, Portugal  Beijing
Computational Science Research Center, Beijing 100193, China  Eduardo V.
Castro  Centro de Física das Universidades do Minho e Porto, LaPMET,
Departamento de Física e Astronomia, Faculdade de Ciências, Universidade do
Porto, 4169-007 Porto, Portugal  Beijing Computational Science Research
Center, Beijing 100193, China  Bruno Amorim  Centro de Física das
Universidades do Minho e Porto, LaPMET, University of Minho, Campus of
Gualtar, 4710-057, Braga, Portugal

###### Abstract

We show that incommensurability can enhance superconductivity in one
dimensional quasiperiodic systems with s-wave pairing. As a parent model, we
use a generalized Aubry-André model that includes quasiperiodic modulations
both in the potential and in the hoppings. In the absence of interactions, the
model contains extended, critical and localized phases for incommensurate
modulations. Our results reveal that in a substantial region inside the parent
critical phase, there is a significant increase of the superconducting
critical temperature compared to the extended phase and the uniform limit
without quasiperiodic modulations. We also analyse the results for
commensurate modulations with period close to the selected incommensurate one.
We find that while in the commensurate case, the scaling of the critical
temperature with interaction strength follows the exponentially small weak-
coupling BCS prediction for a large enough system size, it scales
algebraically in the incommensurate case within the critical and localized
parent phases. These qualitatively distinct behaviors lead to a significant
incommensurability-induced enhancement of the critical temperature in the weak
and intermediate coupling regimes, accompanied by an increase in the
superconducting order parameter at zero temperature.

##  I Introduction

The quantum phases of quasiperiodic quantum matter have attracted a great deal
of interest in recent years due to cold atom experiments on Bose glasses and
many-body localization (MBL) on the one hand Roati  _et al._ (2008); Schreiber
_et al._ (2015); Bordia  _et al._ (2016, 2017); Lüschen  _et al._ (2017); An
_et al._ (2021); Kohlert  _et al._ (2019), and the remarkable phenomena
observed in moire systems Balents  _et al._ (2020); Uri  _et al._ (2023), that
are generically quasiperiodic, on the other.

Quasiperiodicity is responsible for a plethora of interesting physics, with
the paradigmatic example being the dramatic change in the localization
properties of the wave function with Iyer  _et al._ (2013); Khemani  _et al._
(2017); Lee  _et al._ (2017); Mondaini and Rigol (2015); Modak and Mukerjee
(2015); Žnidarič and Ljubotina (2018); Xu  _et al._ (2019); Doggen and Mirlin
(2019); Vu  _et al._ (2022) and without Aubry and André (1980); Sokoloff
(1980); Kohmoto  _et al._ (1983); Thouless (1983); Kohmoto and Banavar (1986);
Tang and Kohmoto (1986); Sinai (1987); Han  _et al._ (1994); Chang  _et al._
(1997); Takada  _et al._ (2004); Liu  _et al._ (2014); Wang  _et al._ (2016);
Zeng  _et al._ (2016); Devakul and Huse (2017); Liu  _et al._ (2017); Yahyavi
_et al._ (2019) interactions. In one dimension, quasiperiodic patterns can
change the nature of electronic wave functions from plane-wave-like extended
into exponentially localized. At the delocalized-localized critical point, the
wave functions are very exotic, exhibiting multifractal properties Evers and
Mirlin (2008). The Aubry-André-Harper (AAH) model Aubry and André (1980) is a
stalwart model where the non-trivial localization properties mentioned above
can be observed and studied. The on-site potential’s single-frequency
quasiperiodic modulation results in a spectrum-wide quantum criticality
(SWQC), such that all the single-particle eigenstates undergo a delocalized-
localized transition at a finite value of the potential strength. This finite
critical value is determined by the model’s self-duality, resulting in a
transition quite distinct from typical Anderson localization that occurs at
any finite value of uncorrelated disorder Abrahams  _et al._ (1979); Vollhardt
and Wölfle (1980); MacKinnon and Kramer (1981); Kramer and MacKinnon (1993).
Significant effort has been devoted to comprehending the physics of single-
particle localization in 1D quasiperiodic systems described by the Aubry-André
model and generalizations that contain mobility edges and/or critical phases,
where the eigenstates are multifractal at non-fine-tuned extended regions of
the phase diagram Biddle and Das Sarma (2010); Bodyfelt  _et al._ (2014); Liu
_et al._ (2014); Ganeshan  _et al._ (2015); Wang  _et al._ (2016); Liu  _et
al._ (2017); Yahyavi  _et al._ (2019); Deng  _et al._ (2019); Wang  _et al._
(2020); Liu  _et al._ (2022). In the interacting case, however, the bulk of
previous research has centered on highly excited states in the middle of the
many-body spectrum, in the context of many-body localization Iyer  _et al._
(2013); Khemani  _et al._ (2017); Lee  _et al._ (2017); Mondaini and Rigol
(2015); Modak and Mukerjee (2015); Žnidarič and Ljubotina (2018); Xu  _et al._
(2019); Doggen and Mirlin (2019); Vu  _et al._ (2022). The interplay between
order and quasiperiodicity has also been explored Vidal  _et al._ (1999);
Schuster  _et al._ (2002); Naldesi  _et al._ (2016); Vu and Das Sarma (2021);
Chandran and Laumann (2017); Crowley  _et al._ (2022), but the study of
superconductivity in quasiperiodic systems is still in its infancy Fan  _et
al._ (2021); Zhang and Foster (2022).

In the case of moire systems, incommensurability effects are often neglected
in theoretical studies of their quantum phases of matter. However, these
effects can be of crucial importance, as recently experimentally observed in
incommensurate twisted trilayer graphene Uri  _et al._ (2023). For electronic
densities sufficiently away from charge neutrality, a quasiperiodic-induced
high density of weakly dispersive states, with observable transport
signatures, was detected. Remarkably, superconducting phases were found to
arise precisely in this regime and their nature is still unknown. This work
opened the way for the study of quasiperiodic phenomena in moire materials
experimentally, which in turn begs for a better theoretical understanding of
the interplay between quasiperiodicity and interactions. Specifically, it is
important to understand the nature of superconducting phases in the presence
of strong quasiperiodic effects.

Motivated by the aforementioned theoretical gaps, in this work we focus on the
study of the interplay between superconductivity and quasiperiodicity in a
generalization of the AAH model, that also includes an off-diagonal
quasiperiodic modulation of the hoppings Han  _et al._ (1994); Liu  _et al._
(2014). The latter mimicks more closely the tunneling quasiperiodicity
existing in moire systems. Besides extended and localized phases, this model
also includes a critical phase, where the wave function is delocalized in both
real and momentum-space. Single-particle eigenstates with similar features
were also theoretically predicted to arise in flatband regimes of moiré
systems Fu  _et al._ (2020); Gonçalves  _et al._ (2021); Chou  _et al._
(2020). A natural question that arises is what types of superconducting states
can emerge from the non-interacting multifractal parent state, once
interactions come into play.

Recently, it was found that the 1D AAH model exhibits an enhancement of the
critical temperature due to the multifractal structure of the non-interacting
wave functions at the delocalization-localization transition. This suggests an
intriguing relation between incommensurability and superconductivity Fan  _et
al._ (2021), resembling the multifractality-induced increase of the critical
temperature for disordered systems Feigel’man  _et al._ (2007); Zhao  _et al._
(2019). Additionally, in systems with SWQC, a mean-field BdG approach has
shown that the multifractality of single-particle wave functions can enhance
matrix elements, leading to a pairing amplitude that is maximized near the
metal-insulator transition, while still retaining phase coherence, therefore
allowing for the existence of a superconductor dome near the critical point of
the system Zhang and Foster (2022).

In the present work, we employ a self-consistent Bogoliubov-de Gennes (BdG)
approach De Gennes and Pincus (1999); Scalapino  _et al._ (1993) to study
s-wave superconductivity in the aforementioned generalized AAH model. We found
a significant increase in the superconducting critical temperature in a
substantial region of the critical phase, compared to the extended phase. By
comparing the results for commensurate and incommensurate systems, we also
found that even though in the former case the critical temperature has a BCS
scaling with the interaction strength for a large enough system size, in the
latter it scales algebraically, leading to a very significant enhancement of
the critical temperature at small interaction strength.

We also discovered that while for commensurate systems, the critical
temperature follows exponentially small weak-coupling BCS scaling with the
interaction strength for sufficiently large system sizes, in incommensurate
systems it scales algebraically both in the critical and localized parent
phases. This qualitative difference leads to a substantial increase in the
critical temperature in incommensurate systems at small interaction strengths,
highlighting the significant impact of quasiperiodicity on the superconducting
properties of the system.

##  II Model and Methods

### Model and BdG Hamiltonian

We will study superconductivity on the generalized 1D AAH model, which is
described by the following Hamiltonian Han  _et al._ (1994); Liu  _et al._
(2014)

$\displaystyle\hat{H}_{0}$
$\displaystyle=\sum_{\sigma,m}\left[-t+V_{2}\cos\left(2\pi
Q\left[m+1\right]\right)\right]c_{m+1,\sigma}^{\dagger}c_{m,\sigma}+\text{H.c.}$
$\displaystyle\quad-\sum_{\sigma,m}\left[V_{1}\cos\left(2\pi
Qm\right)+\mu\right]c_{m,\sigma}^{\dagger}c_{m,\sigma}.$ (1)

where the first term contains uniform and modulated nearest-neighbor hoppings,
while the second term contains a modulated potential. We consider a chain with
$N$ sites ($m\in\left\\{0,1,\ldots N-1\right\\}$) and we adopt closed boundary
conditions. As in the original AAH model, $V_{1}$ is the amplitude and $2\pi
Q$ is frequency of the on-site potential. Additionally, this generalized model
includes an off-diagonal modulation of the hopping parameters with amplitude
$V_{2}$ and the same frequency $2\pi Q$. From this point on, we will take
$t=1$, i.e., all energies will be in units of $t$.

The model can also be seen as the reduction of a 2D Quantum Hall system with
isotropic next-nearest-neighbor hoppings to a one-dimensional 1D chain. Its
incommensurate nature emerges when either the on-site or the off-diagonal
modulations are made quasiperiodic by choosing
$Q\in\mathbb{R\setminus\mathbb{Q}}$, i.e., setting the frequency equal to an
irrational number. In this work, we take $\frac{\sqrt{5}-1}{2}$ for our
studies of the incommensurate case. Given that our aim is to construct a
finite system with periodic boundary conditions, we can use rational
approximants of $Q$ by resorting to the Fibonacci numbers. In terms of
Fibonacci rational approximants, $Q$ can be written asymptotically as

$Q=\lim_{n\rightarrow\infty}\frac{F_{n-1}}{F_{n}},$ (2)

where the Fibonacci sequence $\left\\{F_{n}\right\\}$ is defined recursively
via the relation $F_{n}=F_{n-1}+F_{n-2}$ with $F_{0}=F_{1}=1$. To compare
incommensurate and commensurate systems, we built systems with similar sizes
but with different choices of rational approximants. Specifically, if we fix
the system size at $N=F_{n}$, we can examine systems with lower order rational
approximants, $i<n$, where the modulation frequency is given by
$Q_{i}=F_{i-1}/F_{i}$ and the system size is chosen to be
$N_{i}=N_{\text{cell}}F_{i}\approx N$ for a fair comparison between the
commensurate and incommensurate cases. Here, $N_{\text{cell}}$ denotes the
number of unit cells contained within the system of size $N_{i}$. By
increasing the value of $N_{\text{cell}}$ while keeping $N$ fixed, we can
approach the periodic/commensurate limit.

The localization phase diagram for the model in Eq. 1 in the plane
$\left(V_{1},V_{2}\right)$ for the incommensurate system was first studied by
Han  _et al._ (1994). For any energy, the eigenstates are extended for
$\left\\{V_{1}<2t\>\land\>V_{2}<t\right\\}$, localized for
$\left\\{V_{1}>2\max\left(t,V_{2}\right)\right\\}$, and critical for
$\left\\{V_{2}>\frac{1}{2}\max\left(2t,V_{1}\right)\right\\}$. Furthermore,
the eigenstates are critical along the AAH transition line
$\overline{AB}=\left\\{V_{1}=2t\>\land\>V_{2}<t\right\\}$ and bicritical along
the lines $\overline{BC}=\left\\{V_{2}=t\>\land\>V_{1}<2t\right\\}$ and
$\overline{BD}=\left\\{V_{2}=V_{1}/2\>\land\>V_{1}\geq t\right\\}$.

In the calculations that follow, we adjust the chemical potential $\mu$ for
each point $\left(V_{1},V_{2}\right)$ in the phase diagram in order to ensure
that the free system is always at half-filling. This is particularly important
for points in the diagram whose spectrum is not symmetric and other choices of
chemical potential could result in the suppression of superconductivity simply
due to gaps in the free spectrum.

To study the effects of the incommensurate nature of the generalized AAH model
on superconductivity, we include a simple interaction term in our Hamiltonian.
Specifically, the total Hamiltonian will include an attractive on-site Hubbard
term

$\hat{H}=\hat{H}_{0}-g\sum_{m}c_{m\uparrow}^{\dagger}c_{m\downarrow}^{\dagger}c_{m\downarrow}c_{m\uparrow},$
(3)

which is defined by a single interaction parameter $g$. Within a mean-field
approximation, we can define the on-site gap parameter as
$\Delta_{m}\equiv-g\left\langle c_{m\downarrow}c_{m\uparrow}\right\rangle$ and
write the Bogoliubov-de Gennes (BdG) Hamiltonian as

$\hat{H}_{\text{BdG}}=\frac{1}{2}\Psi^{\dagger}\begin{pmatrix}\boldsymbol{h}&-\boldsymbol{\Delta}&0&0\\\
-\boldsymbol{\Delta}^{\dagger}&-\boldsymbol{h}^{*}&0&0\\\
0&0&\boldsymbol{h}&\boldsymbol{\Delta}\\\
0&0&\boldsymbol{\Delta}^{\dagger}&-\boldsymbol{h}^{*}\end{pmatrix}\Psi,$ (4)

where
$\Psi\equiv\begin{pmatrix}\boldsymbol{c}_{\downarrow}&\boldsymbol{c}_{\uparrow}^{\dagger}&\boldsymbol{c}_{\uparrow}&\boldsymbol{c}_{\downarrow}^{\dagger}\end{pmatrix}^{T},$
such that the operators $\boldsymbol{c}_{\sigma}$ and
$\boldsymbol{c}_{\sigma}^{\dagger}$ are column vectors with $N$ entries, for a
lattice with $N$ total sites, and we defined the matrices
$\left(\boldsymbol{h}\right)_{i,j}=H_{0;i,j}$ and
$\left(\boldsymbol{\Delta}\right)_{i,j}=\Delta_{i}\delta_{i,j}$. In this
basis, it is evident that the BdG Hamiltonian is block-diagonalizable for a
system without spin-orbit coupling or spin-flip terms. The BdG canonical
transformation amounts to introducing an unitary transformation that
diagonalizes the first block in $H_{\text{BdG}}$:

$\begin{pmatrix}\boldsymbol{c}_{\downarrow}\\\
\boldsymbol{c}_{\uparrow}^{\dagger}\end{pmatrix}=\begin{pmatrix}\boldsymbol{U}&-\boldsymbol{V}^{*}\\\
\boldsymbol{V}&\boldsymbol{U}^{*}\end{pmatrix}\begin{pmatrix}\boldsymbol{\gamma}\\\
\boldsymbol{\gamma}^{\dagger}\end{pmatrix}.$

having the eigenvectors of $H_{\text{BdG}}$ as columns and arranged such that
all negative eigenvalues are in the
$\begin{pmatrix}\boldsymbol{U}&\boldsymbol{V}\end{pmatrix}^{T}$ columns and
the positive eigenvalues are in the
$\begin{pmatrix}-\boldsymbol{V}^{*}&\boldsymbol{U}^{*}\end{pmatrix}^{T}$
columns. The gap parameters are then determined self-consistently by using

$\Delta_{i}=-g\sum_{\mu}^{\left\\{E_{\mu}<0\right\\}}U_{i,\mu}V_{i,\mu}^{*}\tanh\left(\frac{E_{\mu}}{2k_{B}T}\right).$
(5)

Our mean-field approach involves diagonalizing the BdG Hamiltonian (4)
successively, while subject to the self-consistent equation (5), until
convergence is attained. We use the relative error between two consecutive
iterations of the mean-field parameters vector, which in this case is the gap
parameters vector $\Delta_{i}$, as our convergence criterion. The relative
error is defined at the expense of the norm of these vectors as

$\epsilon=\frac{\left\|\Delta^{M+1}-\Delta^{M}\right\|}{\left\|\Delta^{M+1}\right\|},$
(6)

for two consecutive iterations $M$ and $M+1$. We chose to terminate our
algorithm when $\epsilon<10^{-4}$, which can take up to $50$ iterations to
reach convergence in the localized phase.

Although the BdG method is an excellent approach for analysing superconducting
properties of one dimensional systems for temperatures below the
superconducting critical temperature, it is not very efficient for computing
the critical temperature itself. This is due to the large number of iterations
required to obtain convergence near the temperature-driven transition.
Instead, within the same mean-field approximation, a more appropriate method
for this task is the linear gap equation. Following the approach in Ref. Fan
_et al._ (2021), the critical temperature can be computed from the linear gap
equation in the Anderson approximation, valid in the weak- coupling limit,
which can be written as

$\Delta^{\lambda}=g\sum_{\lambda^{\prime}}M_{\lambda,\lambda^{\prime}}\frac{\tanh\left[\frac{E_{\lambda^{\prime}}}{2k_{B}T}\right]}{2E_{\lambda^{\prime}}}\Delta^{\lambda^{\prime}},$
(7)

where
$M_{\lambda,\lambda^{\prime}}\equiv\sum_{i}\left|\phi_{i}^{\lambda}\right|^{2}\left|\phi_{i}^{\lambda^{\prime}}\right|^{2}$
is computed from the eigenstates $\phi_{i}^{\lambda}$ with eigenvalue
$E_{\lambda}$ of $\hat{H}_{0}$. This is an eigenvalue problem for the gap
parameters $\left\\{\Delta^{\lambda}\right\\}$ in the eigenbasis of
$\hat{H}_{0}$, and $T_{c}$ can be computed from the greater eigenvalue of the
gap equation matrix.

### Inverse participation ratio analysis of localization properties

A useful quantity to study the localization properties of the eigenstates of a
quasiperiodic system is the inverse participation ratio (IPR), which
quantifies the fraction of the total probability density that is concentrated
on a subset of lattice sites. For the free system, the IPR for a normalized
eigenstate $\phi^{\lambda}$ corresponding to the $E_{\lambda}$ eigenvalue can
be defined as

$\text{IPR}\left(E_{\lambda}\right)=\sum_{m=0}^{N}\left|\phi_{m}^{\lambda}\right|^{4}.$
(8)

It is a well known result that for extended eigenstates, the IPR scales as
$N^{-1}$ in the thermodynamic limit ($n\rightarrow\infty$), while for the
localized states it tends to a finite value even in this limit. However, for
critical multifractal states, the IPR scales as $N^{-\alpha}$ with
$\alpha\in\left]0,1\right[$ depending on the critical properties of the
eigenstates.

A suitable quantity to study the localization phase diagram of the BdG
Hamiltonian is the mean inverse participation ratio (MIPR) of the BdG
wavefunctions,

$\text{MIPR}=\frac{1}{2F_{n}}\sum_{\lambda=0}^{2F_{n}-1}\sum_{m=0}^{F_{n}-1}\left[U_{m,\lambda}^{4}+V_{m,\lambda}^{4}\right].$
(9)

The slope of the MIPR varies rapidly near the transition lines between the
extended, critical, or localized phases. Therefore, we can expect a jump in
this quantity in the thermodynamic limit, which will allow us to compute the
localization diagram for this system.

Figure 1: (a)
$\alpha_{n}^{BdG}\equiv-\log\left[\text{MIPR}\right]/\log\left[F_{n}\right]$
for the BdG eigenstates in the $\left(V_{1},V_{2}\right)$ parameter space at
zero temperature, with $g=1$ for a system of size $N=F_{n}=610$.
$\alpha_{n}^{\textrm{BdG}}$ converges to $1$ for extended states, $0$ for
localized states and to non-integer in-between values for critical states as
$n\rightarrow\infty$. The transition lines $\overline{AB}$, $\overline{BC}$
and $\overline{BD}$ of the localization diagram for the free system are
plotted as dashed black lines. The phases are (I) extended phase, (II)
localized phase and (III) critical phase (b) Spectrum of $\hat{H}_{0}$, for
size $F_{n}=2584$, and $\hat{H}_{\text{BdG}}$, for size $F_{n}=610$, along
representative (red-dashed) lines of the phase diagram in Fig.1(a). In the
free system ($g=0$), all eigenstates undergo the transition from extended to
localized states at $V_{1}=V_{1}^{c}=2$ for $V_{2}=0.5$ (Fig.1(b3)), and from
extended to critical states at $V_{2}=V_{2}^{c}=1$ for $V_{1}=1$ (Fig.1(b1)).
However, this is only roughly true for the BdG system ($g=1$), and we can see
in Figs.1(b2) and 1(b4) that the spectrum exhibits some mobility edge
structure. We represent, in color,
$\alpha_{n}\equiv-\log\left[\text{IPR}\right]/\log\left[N\right]$.

On the other hand, if we want to investigate the effects of localization on
the gap parameters, we can define an IPR for the $\Delta_{m}$, similar to what
is done for the wave functions. The IPR for the $\Delta_{m}$ can be written as

$\text{IPR}_{\Delta}=\frac{\sum_{m=0}^{F_{n}-1}\left|\Delta_{m}\right|^{4}}{\left[\sum_{m=0}^{F_{n}-1}\left|\Delta_{m}\right|^{2}\right]^{2}}.$
(10)

This is an energy-independent quantity, which characterizes the localization
of $\Delta_{m}$ as a distribution on the lattice.

##  III Results

We applied the BdG method to the generalized AAH model with an on-site Hubbard
term, at zero temperature, and for moderate values of the interaction
parameter of the order of the uniform hopping parameter $t$. We found that it
shares a similar localization diagram with the parent model, as shown in
Fig.1(a). The MIPR exponent for the BdG wave functions allows us to define
three phases, as in the free model: extended, critical, and localized.The
exponent values are similar in the three regions and vary sharply close to the
transition lines, juxtaposing on the critical lines of the free model. The
mean-field algorithm converges smoothly for all points in the diagram,
starting from a homogeneous initial proposal for the distribution of gap
parameters.

However, unlike the free system that exhibits SWQC, we can see in Figs.1(b2)
and 1(b4) along some representative lines in the $\left(V_{1},V_{2}\right)$
diagram that the BdG system exhibits some mobility edge structure. Although
the transition occurs in the same way for most of the spectrum for the same
critical value, we can see in Fig.1(b2) that the states close to the BdG gap
transition from extended to localized for a critical value $V_{1}^{c}\gtrsim
2$. Additionally, in the transition from extended to critical, there is, again
for the states close to the superconductor gap, a transition to critical
states with a smaller IPR exponent $\alpha_{n}$, that may even approach zero
in the thermodynamic limit, which would indicate the presence of localized
states.

We have concluded that the BdG wave functions in our model share a
localization phase diagram that resembles that of the the generalized AAH
model, apart from the appearance of mobility edges. We now aim to understand
if the distribution of the gap parameters also has this behavior in the
parameter space $\left(V_{1},V_{2}\right)$ . However, we found that although
$\text{IPR}_{\Delta}$ is larger in the critical phase and even more so in the
localized phase, the gap parameters distribution never actually acquires a
critical or localized structure. We can verify this by looking at some
relevant points. Fig.2 shows the normalized Fourier transform of some BdG wave
functions at the edge of the spectrum for some points of the diagram
$\left(V_{1},V_{2}\right)$, which are marked in Fig.1 as $P_{I}$, $P_{II}$,
and $P_{III}$. We compare this BdG eigenstates structure with the gap
parameters structure in momentum space for the same points in the diagram
$\left(V_{1},V_{2}\right)$. In phase I, the behavior is the same, with the BdG
wave functions as well as the gap parameters having the same ballistic
structure, evident in the exponentially localized peaks for some crystal
momentum values. However, it is in the critical and localized phase that we
see the greatest differences between these two scalar distributions. In phase
III, the BdG functions suffer a partial delocalization around the ballistic
peaks, acquiring a fractal distribution, corresponding to a critical
distribution in real space. In phase III, they suffer a total delocalization
in the first Brillouin zone, corresponding to a localization in real space. On
the other hand, the distribution of gap parameters in momentum space is always
ballistic for these two phases. The larger value of $\text{IPR}_{\Delta}$ is
explained only by the appearance of more ballistic peaks for an extra small
subset of momentum values.

Figure 2: Momentum-space distribution of the BdG wave functions and of the gap
parameters vector, for a system of size $N=F_{n}=2584$ and interaction
parameter $g=1$. In (a)-(c) we plot the Fourier transform
$\left|U_{k}\right|^{2}$ of the $U$-components of the BdG wave function at the
lower edge of the spectrum ($E=E_{min}$). The chosen points are represented in
Figs.1(b2) and (b4) as $P_{I}$, $P_{II}$, and $P_{III}$, corresponding to the
points $\left(V_{1},V_{2}\right)=\left(1,0.5\right)$ (a),
$\left(V_{1},V_{2}\right)=\left(3,0.5\right)$ (b) and
$\left(V_{1},V_{2}\right)=\left(1,2\right)$ (c). Like its free system
counterpart, in momentum-space it is ballistic in phase I (a), extended in
phase II (b) and critical in phase III (c). The same cannot be said of the
Fourier transform $\left|\Delta_{k}\right|^{2}$ of the gap parameters vector,
represented in (d)-(f) for the same points in diagram
$\left(V_{1},V_{2}\right)$, which never exhibit a critical or extended
structure like the momentum-space BdG wave functions, as we show more
rigorously in Fig.3 with our finite-size analysis in real-space.

To complete our analysis of the localization diagram for our model, we
performed a finite-size analysis of both the MIPR of the BdG wave functions
and the $\text{IPR}_{\Delta}$ for relevant points in the diagram
$\left(V_{1},V_{2}\right)$, in Fig.3. As mentioned in Sec.II, we should be
able to perform a linear fit to $\text{IPR}\sim N^{-\alpha}$ in a log-log plot
of IPR against the size of the system in the large $N$ limit, allowing us to
extrapolate and estimate the scaling exponent $\alpha$. In Fig.3(a), we see
that we enter this algebraic regime for a system of size $N=610$, indicating
that our localization diagram in Fig.1 is sufficiently converged to draw our
previous conclusions. The algebraic scaling allows us to label phases I, II
and III as extended, localized and critical, respectively. This confirms our
result that the BdG wave functions are influenced by incommensurate
modulations in the same way as the eigenstates of the free system.

It is noteworthy that in Fig.3(b), the
$\text{IPR}_{\Delta}^{I}<\text{IPR}_{\Delta}^{III}<\text{IPR}_{\Delta}^{II}$
for all values of $N$. However, $\text{IPR}_{\Delta}$ scales with $N$ in the
same way as one would expect for a ballistic extended state. We can therefore
rigorously conclude that the gap parameters do not share the localization
properties of the BdG wave functions and the incommensurability of the
underlying AAH system has little influence on the localization of the
superconductor gap parameters.

Figure 3: (a) Finite-size analysis of MIPR for the BdG wave functions, with
$g=1$. The log-log plot of MIPR as a function of the system size $N=F_{n}$ for
$3$ relevant points $\left(V_{1},V_{2}\right)=\left(1,0.5\right)$ (Extended
phase I), $\left(V_{1},V_{2}\right)=\left(3,0.5\right)$ (Localized phase II)
and $\left(V_{1},V_{2}\right)=\left(1,2\right)$ (Critical phase III). We
perform a linear fit to $\text{IPR}\sim N^{-\alpha}$ for the larger system
sizes, getting $\alpha_{I}^{\text{BdG}}=0.997\pm 0.001$,
$\alpha_{II}^{\text{BdG}}=0.05\pm 0.02$ and $\alpha_{III}^{\text{BdG}}=0.24\pm
0.05$. (b) The same analysis is done for $\text{IPR}_{\Delta}$. Even though
$\text{IPR}_{\Delta}^{I}<\text{IPR}_{\Delta}^{III}<\text{IPR}_{\Delta}^{II}$,
as expected, we found that this quantity has an extended-like scaling in all
$3$ phases.

In Fig.4(a), we report the critical temperature in the
$\left(V_{1},V_{2}\right)$ parameter space of the generalized AAH model,
computed using the linear gap equation (7). For a representative value of the
interaction parameter, $g=0.5$, the critical temperature is significantly
higher in the localized phase II compared to the extended phase I. This same
enhancement also occurs in the critical phase III for small enough values of
the on-site parameter, $V_{1}\lesssim 1$. However, for larger values of
$V_{1}$ in the critical phase, there is a suppression of the critical
temperature. It is still higher than in the extended phase, but it attains
smaller values if compared with the localized phase. In addition to this, we
demonstrate, in Figs.4(c) and 4(d), the power-law behaviour of $T_{c}$ with
respect to $g$ within the localized and critical phases of our generalized AAH
model (with different exponents), in contrast to the BCS-like behaviour
$T_{c}\sim\exp(-c/g)$ (where $c$ depends on the non-interacting Hamiltonian
parameters) in the extended phase (not shown). This is in good agreement to
known results for the AAH model from Fan  _et al._ (2021). We compare the
incommensurate case with the commensurate to show that this power-law behavior
is due to the incommensurate nature of our diagonal and off-diagonal
quasiperiodic modulations. We observe in Figs.4(c) and 4(d), that in the
incommensurate case ($N_{\text{cell}}=1$) there is a power-law scaling of
$T_{c}$ with $g$. However, as we increase the number of unit cells up to
$N_{\text{cell}}=517$, we eventually obtain the BCS scaling expected for an
homogeneous superconductor in BCS theory. The fact that we need to build a
system with a large number of unit cells to achieve a BCS scaling implies that
the incommensurate effects on the critical temperature resulting in the
algebraic scaling are quite robust.

Figure 4: (a) $\left(V_{1},V_{2}\right)$ diagram of $k_{B}T_{c}$ computed with
the linear gap equation (7), for $g=0.5$ and $N=987$. (b)
$\left(V_{1},V_{2}\right)$ diagram of
$\max\left|\Delta\left(T=0\right)\right|$ computed with the BdG method, for
$g=1$ and $N=610$. (c)-(f) Scaling with $g$ for different numbers of unit
cells $N_{\text{cell}}\in\left\\{1,199,517\right\\}$, corresponding to
$Q_{i}\in\left\\{1597/2584,8/13,3/5\right\\}$, respectively. The black-dashed
lines correspond to the power-law fits, while the red-dashed ones correspond
to the BCS fits. (c) and (d) are the $k_{B}T_{c}$ results for the localized
and critical phases, respectively. (e) and (f) are the
$\max\left|\Delta\left(T=0\right)\right|$ results for the localized and
critical phases, respectively. The representative points of both these phases
are marked as $P_{II}$ and $P_{III}$ in Figs.4(a) and 4(b).

Moreover, we have obtained a similar $\left(V_{1},V_{2}\right)$ diagram at
zero temperature using the BdG method for a different energy scale. From the
gap parameters in the real-space basis, we can construct a scalar “order
parameter” defined as $\max\left|\Delta\right|$, which provides a reasonable
measure of the magnitude of the local superconductor pairing. In Fig.4(b), we
show a distribution of this scalar in the space of modulation amplitudes
$\left(V_{1},V_{2}\right)$ that is similar to the one found for the critical
temperature in Fig.4(a). This is a surprising result because these different
quantities are associated with different phenomena, one being the thermal
energy at which the superconductor pairing vanishes, computed with the linear
gap equation, and the other being the superconductor pairing amplitude at zero
temperature, computed with the BdG method. This indicates that the underlying
generalized AAH model strongly determines the behavior of these
superconductivity properties. Additionally, similarly to the critical
temperature, we found a power-law behavior $\max\left|\Delta\right|\sim
g^{\eta}$ in the localized and critical phases. When we compare the
commensurate case with the incommensurate case, we once again observe an
algebraic enhanced scaling due to incommensurability, but we do not find a BCS
scaling for the commensurate case.

##  IV Discussion

By studying a generalized AAH model with s-wave pairing, we were able to
analyse the interplay between superconductivity and quasiperiodicity in
extended, localized and critical quantum phases. Within the critical phase, we
found that the critical temperature aquires a power-law scaling with the
interaction parameter $g$. We have demonstrated that this behaviour is a
direct consequence of the incommensurate nature of the underlying model, by
showing that in the commensurate case, the scaling reverts back to what is
predicted by BCS theory for a uniform system. It was suggested in Fan  _et
al._ (2021) that the opening of a superconductor gap in the quasiparticle
spectrum could mask the localization transition at low temperatures for the
original AAH model. However, by analyzing the localization of the BdG
wavefunctions at zero temperature, we can conclude that not only is it
possible to observe the localization transition of the original AAH, but that
all single-particle localization transitions of the generalized AAH are
preserved by the BdG Hamiltonian for s-wave pairing, despite the spectrum
acquiring a slight mobility edge structure. We finally showed that the pairing
amplitude calculated at zero temperature with BdG also scales algebraically
with the interaction parameter, being enhanced in the incommensurate limit.
Studying the behavior of superfluid stiffness in the
$\left(V_{1},V_{2}\right)$ diagram at zero temperature could be interesting in
the future. This could help us get a better understanding of how to fine-tune
the modulations amplitudes in order to achieve superconductivity. Keeping in-
line with the reasoning of Fan  _et al._ (2021); Zhang and Foster (2022), the
transition lines of the generalized AAH model could represent the perfect
trade-off point between non-null superconducting pairing and phase coherence
associated with a non-zero superfluid stiffness.

Our results show that incomensurability effects can be of crucial importance
in shaping the nature of the superconducting state, particularly in parent
phases where the localization properties differ from the uniform case. Higher
dimensional systems also exhibit similar quasiperiodic-driven phases Devakul
and Huse (2017); Fu  _et al._ (2020); Gonçalves  _et al._ (2021). We therefore
anticipate that in these systems, incommensurability effects will also play a
critical role in understanding superconducting phases, in strong quasiperiodic
regimes, such as those recently observed in Uri  _et al._ (2023) for twisted
trilayer graphene. We leave the exploration of the interplay between
superconductivty and quasiperiodicity in 2D for future work.

## References

  * Roati  _et al._ (2008) G. Roati, C. D’Errico, L. Fallani, M. Fattori, C. Fort, M. Zaccanti, G. Modugno, M. Modugno, and M. Inguscio, Nature 453, 895 (2008).
  * Schreiber  _et al._ (2015) M. Schreiber, S. S. Hodgman, P. Bordia, H. P. Lüschen, M. H. Fischer, R. Vosk, E. Altman, U. Schneider, and I. Bloch, Science 349, 842 (2015).
  * Bordia  _et al._ (2016) P. Bordia, H. P. Lüschen, S. S. Hodgman, M. Schreiber, I. Bloch, and U. Schneider, Phys. Rev. Lett. 116, 140401 (2016).
  * Bordia  _et al._ (2017) P. Bordia, H. Lüschen, S. Scherg, S. Gopalakrishnan, M. Knap, U. Schneider, and I. Bloch, Phys. Rev. X 7, 041047 (2017).
  * Lüschen  _et al._ (2017) H. P. Lüschen, P. Bordia, S. Scherg, F. Alet, E. Altman, U. Schneider, and I. Bloch, Phys. Rev. Lett. 119, 260401 (2017).
  * An  _et al._ (2021) F. A. An, K. Padavić, E. J. Meier, S. Hegde, S. Ganeshan, J. H. Pixley, S. Vishveshwara, and B. Gadway, Phys. Rev. Lett. 126, 040603 (2021).
  * Kohlert  _et al._ (2019) T. Kohlert, S. Scherg, X. Li, H. P. Lüschen, S. Das Sarma, I. Bloch, and M. Aidelsburger, Phys. Rev. Lett. 122, 170403 (2019).
  * Balents  _et al._ (2020) L. Balents, C. R. Dean, D. K. Efetov, and A. F. Young, Nat. Phys. 16, 725 (2020).
  * Uri  _et al._ (2023) A. Uri, S. C. de la Barrera, M. T. Randeria, D. Rodan-Legrain, T. Devakul, P. J. D. Crowley, N. Paul, K. Watanabe, T. Taniguchi, R. Lifshitz, L. Fu, R. C. Ashoori, and P. Jarillo-Herrero, “Superconductivity and strong interactions in a tunable moiré quasiperiodic crystal,” (2023), arXiv:2302.00686 [cond-mat.mes-hall] .
  * Iyer  _et al._ (2013) S. Iyer, V. Oganesyan, G. Refael, and D. A. Huse, Phys. Rev. B 87, 134202 (2013).
  * Khemani  _et al._ (2017) V. Khemani, D. N. Sheng, and D. A. Huse, Phys. Rev. Lett. 119, 075702 (2017).
  * Lee  _et al._ (2017) M. Lee, T. R. Look, S. P. Lim, and D. N. Sheng, Phys. Rev. B 96, 075146 (2017).
  * Mondaini and Rigol (2015) R. Mondaini and M. Rigol, Phys. Rev. A 92, 041601 (2015).
  * Modak and Mukerjee (2015) R. Modak and S. Mukerjee, Phys. Rev. Lett. 115, 230401 (2015).
  * Žnidarič and Ljubotina (2018) M. Žnidarič and M. Ljubotina, Proceedings of the National Academy of Sciences 115, 4595 (2018), https://www.pnas.org/doi/pdf/10.1073/pnas.1800589115 .
  * Xu  _et al._ (2019) S. Xu, X. Li, Y.-T. Hsu, B. Swingle, and S. Das Sarma, Phys. Rev. Res. 1, 032039 (2019).
  * Doggen and Mirlin (2019) E. V. H. Doggen and A. D. Mirlin, Phys. Rev. B 100, 104203 (2019).
  * Vu  _et al._ (2022) D. Vu, K. Huang, X. Li, and S. Das Sarma, Phys. Rev. Lett. 128, 146601 (2022).
  * Aubry and André (1980) S. Aubry and G. André, Ann. Israel Phys. Soc 3, 18 (1980).
  * Sokoloff (1980) J. B. Sokoloff, Phys. Rev. B 22, 5823 (1980).
  * Kohmoto  _et al._ (1983) M. Kohmoto, L. P. Kadanoff, and C. Tang, Phys. Rev. Lett. 50, 1870 (1983).
  * Thouless (1983) D. J. Thouless, Phys. Rev. B 28, 4272 (1983).
  * Kohmoto and Banavar (1986) M. Kohmoto and J. R. Banavar, Phys. Rev. B 34, 563 (1986).
  * Tang and Kohmoto (1986) C. Tang and M. Kohmoto, Phys. Rev. B 34, 2041 (1986).
  * Sinai (1987) Y. G. Sinai, Journal of Statistical Physics 46, 861 (1987).
  * Han  _et al._ (1994) J. H. Han, D. J. Thouless, H. Hiramoto, and M. Kohmoto, Phys. Rev. B 50, 11365 (1994).
  * Chang  _et al._ (1997) I. Chang, K. Ikezawa, and M. Kohmoto, Phys. Rev. B 55, 12971 (1997).
  * Takada  _et al._ (2004) Y. Takada, K. Ino, and M. Yamanaka, Phys. Rev. E 70, 066203 (2004).
  * Liu  _et al._ (2014) F. Liu, S. Ghosh, and Y. Chong, Physical Review B 91 (2014), 10.1103/PhysRevB.91.014108.
  * Wang  _et al._ (2016) J. Wang, X.-J. Liu, G. Xianlong, and H. Hu, Phys. Rev. B 93, 104504 (2016).
  * Zeng  _et al._ (2016) Q.-B. Zeng, S. Chen, and R. Lü, Phys. Rev. B 94, 125408 (2016).
  * Devakul and Huse (2017) T. Devakul and D. A. Huse, Phys. Rev. B 96, 214201 (2017).
  * Liu  _et al._ (2017) T. Liu, P. Wang, S. Chen, and G. Xianlong, Journal of Physics B: Atomic, Molecular and Optical Physics 51, 025301 (2017).
  * Yahyavi  _et al._ (2019) M. Yahyavi, B. Hetényi, and B. Tanatar, Phys. Rev. B 100, 064202 (2019).
  * Evers and Mirlin (2008) F. Evers and A. Mirlin, Rev. Mod. Phys 80, 1355 (2008).
  * Abrahams  _et al._ (1979) E. Abrahams, P. W. Anderson, D. C. Licciardello, and T. V. Ramakrishnan, Physical Review Letters 42, 673 (1979), arXiv:1208.1722 .
  * Vollhardt and Wölfle (1980) D. Vollhardt and P. Wölfle, Phys. Rev. B 22, 4666 (1980).
  * MacKinnon and Kramer (1981) A. MacKinnon and B. Kramer, Phys. Rev. Lett. 47, 1546 (1981).
  * Kramer and MacKinnon (1993) B. Kramer and A. MacKinnon, Rep. Prog. Phys. 56, 1469 (1993).
  * Biddle and Das Sarma (2010) J. Biddle and S. Das Sarma, Phys. Rev. Lett. 104, 70601 (2010).
  * Bodyfelt  _et al._ (2014) J. D. Bodyfelt, D. Leykam, C. Danieli, X. Yu, and S. Flach, Phys. Rev. Lett. 113, 236403 (2014).
  * Ganeshan  _et al._ (2015) S. Ganeshan, J. H. Pixley, and S. Das Sarma, Phys. Rev. Lett. 114, 146601 (2015).
  * Deng  _et al._ (2019) X. Deng, S. Ray, S. Sinha, G. V. Shlyapnikov, and L. Santos, Phys. Rev. Lett. 123, 025301 (2019).
  * Wang  _et al._ (2020) Y. Wang, L. Zhang, S. Niu, D. Yu, and X.-J. Liu, Phys. Rev. Lett. 125, 073204 (2020).
  * Liu  _et al._ (2022) T. Liu, X. Xia, S. Longhi, and L. Sanchez-Palencia, SciPost Phys. 12, 27 (2022).
  * Vidal  _et al._ (1999) J. Vidal, D. Mouhanna, and T. Giamarchi, Phys. Rev. Lett. 83, 3908 (1999).
  * Schuster  _et al._ (2002) C. Schuster, R. A. Römer, and M. Schreiber, Phys. Rev. B 65, 115114 (2002).
  * Naldesi  _et al._ (2016) P. Naldesi, E. Ercolessi, and T. Roscilde, SciPost Phys. 1, 010 (2016).
  * Vu and Das Sarma (2021) D. Vu and S. Das Sarma, Phys. Rev. Lett. 126, 036803 (2021).
  * Chandran and Laumann (2017) A. Chandran and C. R. Laumann, Phys. Rev. X 7, 031061 (2017).
  * Crowley  _et al._ (2022) P. J. D. Crowley, C. R. Laumann, and A. Chandran, Journal of Statistical Mechanics: Theory and Experiment 2022, 083102 (2022).
  * Fan  _et al._ (2021) Z. Fan, G.-W. Chern, and S.-Z. Lin, Phys. Rev. Res. 3, 023195 (2021).
  * Zhang and Foster (2022) X. Zhang and M. S. Foster, Phys. Rev. B 106, L180503 (2022).
  * Fu  _et al._ (2020) Y. Fu, E. J. König, J. H. Wilson, Y.-Z. Chou, and J. H. Pixley, npj Quantum Materials 5, 71 (2020).
  * Gonçalves  _et al._ (2021) M. Gonçalves, H. Z. Olyaei, B. Amorim, R. Mondaini, P. Ribeiro, and E. V. Castro, 2D Materials 9, 011001 (2021).
  * Chou  _et al._ (2020) Y.-Z. Chou, Y. Fu, J. H. Wilson, E. J. König, and J. H. Pixley, Phys. Rev. B 101, 235121 (2020).
  * Feigel’man  _et al._ (2007) M. V. Feigel’man, L. B. Ioffe, V. E. Kravtsov, and E. A. Yuzbashyan, Phys. Rev. Lett. 98, 027001 (2007).
  * Zhao  _et al._ (2019) K. Zhao, H. Lin, X. Xiao, W. Huang, W. Yao, M. Yan, Y. Xing, Q. Zhang, Z.-X. Li, S. Hoshino, J. Wang, S. Zhou, L. Gu, M. S. Bahramy, H. Yao, N. Nagaosa, Q.-K. Xue, K. T. Law, X. Chen, and S.-H. Ji, Nature Physics 15, 904 (2019).
  * De Gennes and Pincus (1999) P. De Gennes and P. Pincus,  _Superconductivity Of Metals And Alloys_, Advanced Books Classics (Avalon Publishing, 1999).
  * Scalapino  _et al._ (1993) D. J. Scalapino, S. R. White, and S. Zhang, Phys. Rev. B 47, 7995 (1993).


# Converse: A Tree-Based Modular Task-Oriented Dialogue System

Tian Xie
Salesforce Research
<EMAIL_ADDRESS>
Xinyi Yang11footnotemark: 1
Salesforce Research
<EMAIL_ADDRESS>Angela S. Lin
Salesforce Research
<EMAIL_ADDRESS>
Feihong Wu
Salesforce Research
<EMAIL_ADDRESS>
Kazuma Hashimoto
Google Research
<EMAIL_ADDRESS>
Jin Qu
Salesforce Research
<EMAIL_ADDRESS>
Young Mo Kang22footnotemark: 2
Microsoft
<EMAIL_ADDRESS>
Wenpeng Yin22footnotemark: 2
Temple University
<EMAIL_ADDRESS>
Huan Wang
Salesforce Research
<EMAIL_ADDRESS>
Semih Yavuz
Salesforce Research
<EMAIL_ADDRESS>
Gang Wu
Salesforce Research
<EMAIL_ADDRESS>
Michael Jones
Salesforce Research
<EMAIL_ADDRESS>
Richard Socher22footnotemark: 2
you.com
<EMAIL_ADDRESS>
Yingbo Zhou
Salesforce Research
<EMAIL_ADDRESS>
Wenhao Liu
Salesforce Research
<EMAIL_ADDRESS>
Caiming Xiong
Salesforce Research
<EMAIL_ADDRESS>
Equal contribution.Work done while at Salesforce Research.

###### Abstract

Creating a system that can have meaningful conversations with humans to help
accomplish tasks is one of the ultimate goals of Artificial Intelligence (AI).
It has defined the meaning of AI since the beginning. A lot has been
accomplished in this area recently, with voice assistant products entering our
daily lives and chat bot systems becoming commonplace in customer service. At
first glance there seems to be no shortage of options for dialogue systems.
However, the frequently deployed dialogue systems today seem to all struggle
with a critical weakness - they are hard to build and harder to maintain. At
the core of the struggle is the need to script every single turn of
interactions between the bot and the human user. This makes the dialogue
systems more difficult to maintain as the tasks become more complex and more
tasks are added to the system. In this paper, we propose Converse, a flexible
tree-based modular task-oriented dialogue system. Converse uses an and-or tree
structure to represent tasks and offers powerful multi-task dialogue
management. Converse supports task dependency and task switching, which are
unique features compared to other open-source dialogue frameworks. At the same
time, Converse aims to make the bot building process easy and simple, for both
professional and non-professional software developers. The code is available
at https://github.com/salesforce/Converse.

##  1 Introduction

Task-oriented dialogue (TOD) systems help users complete tasks through
dialogue [9]. TOD systems can be valuable for various industries. Examples of
TOD tasks include: reserving a table at a restaurant, booking flight tickets,
making a customized T-shirt order, or checking vaccination appointment
availability. The typical pipeline for task-oriented dialog systems are
divided into several modules and are built on top of a structured task
ontology [18]. However, there are several challenges in building task-oriented
dialogue systems.

Firstly, it is challenging to define an efficient task ontology that captures
the variation in dialogue. Due to the varied nature of dialogue, there can be
several different ways or orders to complete the same task. For example, the
user can check the delivery status of an order using the order id, or the
username and the delivery address. Ideally, a task ontology should be simple
and efficient at capturing all of these task variations. If a bot builder
needs to specify all possible trajectories for completing a task, the building
process soon becomes intractable due to the combinatorial nature of the task.

Secondly, the adaptation to new tasks and building a new bot can be costly.
For instance, most dialogue state tracking models are domain-specific, and
cannot be directly generalized to new domains. For most pipeline TOD systems,
introducing a new task or building a new bot requires resources (annotated
data, training time, and computational resources) to retrain the natural
language understanding module to detect the desired new intent and entities.
These resource requirements hamper the bot building process, reducing adoption
and impeding bot builders when they try to add new use-cases.

Thirdly, handling conversations with interactions between tasks is difficult.
When building a bot, it is standard to treat each task as a standalone
configuration. But in real conversations with users, there will be
interactions between tasks, for example task switching. Task switching is a
situation where a user first starts a task X; then in the middle of task X,
the user starts a new task Y; after finishing task Y, the user should be able
to pick up where they left off in task X and continue the conversation.
Another example is the dependency between tasks. If checking the order status
and changing the delivery address both depend on user authentication, then
after checking the order status (and also authenticating the user), the
dialogue system should not authenticate the user again when changing the
delivery address. Solving these challenges is essential for creating a system
that works well for users who interact with bots and bot builders who build
bots.

To address the challenges above, we propose Converse, a low-code, tree-based,
modular, task-oriented dialogue system. Converse defines a task as an and-or
tree structure [16] that is called Task Tree. A Task Tree is composed of the
key pieces of information (entities and sub-tasks) needed for the task and
their relationships. This structure can represent various kinds of tasks. The
system traverses the tree to easily reference, maintain, and update the task-
related dialogue states. The bot builders111To avoid confusion on the persona
involved in this paper, we use the following definitions. A bot builder
(chatbot builder or bot admin) is the person who creates chatbots using
Converse. A user is a person who interacts with the runtime bot system. A user
session is created every time when a user starts a new conversation with the
chatbot. do not need to define the next step after each dialogue state one by
one. Instead, they only need to define the Task Tree structure. The tree
traversal automatically traverses the Task Tree and finds the next entity
(slot) and next task. Furthermore, the Task Tree also takes care of
interactions between tasks in conversations, such as switching tasks and
completing dependent sub-tasks. The Task Tree is versatile and simplifies the
bot building process.

Similarly, the other components of Converse can be utilized with ease. The bot
builder can build a new bot by writing a few configuration files and a bit of
code. To configure a bot, the bot builder only needs to define Task Trees for
their tasks that include: the information to collect from users and actions to
take after information is collected. To use the natural language understanding
module, annotated data or training models on in-domain data are not required.
We introduce a natural language inference based few-shot intent detection
model, which enables the bot builder to add new intents by listing a few
samples. We also provide common predefined entity types that the user can use
out-of-the-box without collecting more training data and re-training the
model. If bot builders want to further customize the natural language
understanding module, Converse’s modular design enables them to smoothly
switch out our models with their own. These design choices save bot builders
effort and time.

In this paper, we will mainly focus on how the tasks are represented in
Converse, i.e., the Task Tree and the Dialogue Management.

##  2 Converse’s Abilities and Limitations

###  2.1 What Converse can do

Before we talk about the technical details of Converse, we want to first show
what Converse can do and what Converse cannot do. We also provide an example
configuration of a Converse bot in A.6.

####  2.1.1 Define and reuse sub-tasks

Let’s begin with an online shopping helper bot which can help the user check
their order status and update their order. For security, the bot will verify
the user’s identity first before starting these two tasks.

_User : Hi, I would like to check my order status._

_Bot : Oh sure, I’d be happy to help you check your order status. First, I
need to pull up your account. Could you please tell me your email address?_

Checking the order status is the main task, which has a sub-task to verify the
user’s identity. We also used this sub-task in the task for updating the
order. Bot builders only need to define a sub-task once. Then the sub-task can
be used in other tasks. Reusing sub-tasks reduces the amount of configurations
that the bot builder needs to write. In addition, reusing sub-tasks allows
Converse to skip the sub-task if it has already been completed which improves
the user experience, for example, verifying the user’s identity only once in a
session.

####  2.1.2 Use and-or relations in the Task Tree to handle branching
conversations

The following conversation is a continuation of the example above. In this
conversation, the bot adjusts its response based on whether the user provides
the correct email address.

_Bot : Oh sure, I’d be happy to help you check your order status. First, I
need to pull up your account. Could you please tell me your email address?_

Trajectory 1 |  Trajectory 2
---|---
_User : [the correct email address]_ |  _User : I don’t remember it._
_Bot : I have verified your identity. Please provide your order id for your order status._ |  _Bot : I am sorry, but I could not recognize your email address. Could your please tell me your zip code?_
|  _User : [the correct zip code]_
|  _Bot : I have verified your identity. Please provide your order id for your
order status._

Note that the bot builders only need to create the and-or relations, instead
of specifying every possible linear conversational path. The Task Tree in
Converse is able to handle more nested and complex structures than in the
above example, as long as they can be represent in and-or relationships.

####  2.1.3 Switch between tasks in the middle of a task

Here’s an example of a flight booking bot where we’d like to show Converse’s
multi-task conversation handling.

_User : I’d like to book a round-trip flight._

_Bot : I’d be happy to help you book a flight. Where will you depart from?_

_User : Oh wait, could you please help me check tomorrow’s weather first?_

_Bot : I’d be happy to help you check the weather. What is the zip code of
your area?_

The user started a flight booking task, but after the bot asked about the
departure location, the user changed the mind and started a new weather query
task. The bot detected the new intent, switched to the new task weather query,
and asked for the zip code.

_User : [a zip code]._

_Bot : The weather in [city name of the zip code] is [some weather]. That’s
all I have about the weather. Where will you depart from?_

The bot successfully helped the user to query the weather. Then it picked up
what it left from the previous conversation, switched back to flight booking
task, and asked the user about the origin location again.

####  2.1.4 Configure responses to frequently asked questions

Converse can not only switch between tasks, but also answer frequently asked
questions (FAQs). The following conversation continues from the previous
conversation:

_User : San Francisco._

_Bot : Got it. Where is your destination?_

_User : Do I have free checked bags?_

_Bot : All frequent flyer program members will have one free checked bag.
Where is your destination?_

Converse defines FAQs as one-turn dialogues that can happen anywhere in a
conversation. FAQs can be easily configured in the task configuration by
listing the question and answer pairs, such as _"Do I have free checked bags?
- All frequent flyer program members will have one free checked bags."_. Here
the bot detected the question from the conversation and fetched the answer
from FAQ configuration, then continued the flight booking task.

###  2.2 What Converse cannot do

####  2.2.1 Multilingual support

Currently, Converse only supports English. If Bot builders want to build
chatbots in other languages, they need to use their own NLU models and
response templates.

####  2.2.2 Canceling an ongoing task

Currently, Converse doesn’t support canceling an ongoing task. Here is an
example conversation:

_Bot : Hi there, I am the digital assistant for Northern Trail Information
Center. What can I do for you?_

_User : I want to check order status_

_Bot : Oh sure, I’d be happy to help you check your order status. First, I
need to pull up your account. What is your email address?_

_User : I don’t want to check order status anymore_

_Bot : I am sorry, but I could not recognize your email address. What is your
zip code?_

In this example, the user changes the mind, and doesn’t want to continue the
check order status task anymore. However, the bot is still trying to extract
entity (slot) information from the user.

####  2.2.3 Discriminate between entities that have the same entity type

Here’s an example of a flight booking conversation that multiple entities with
the same entity type mentioned in one user’s utterance.

_User : I’d like to book a round trip flight from San Francisco to Los Angeles
for 2 people._

_Bot : I’d be happy to help you book a flight, I got multiple possible answers
for origin: San Francisco and Los Angeles, which one did you mean? Could you
walk me through the details?_

In above conversation the user already specified the origin and the
destination. Unfortunately, Converse detects entity based on type instead of
name; it treats San Francisco and Los Angeles equally as location entities and
fit them both into the first required location entity _origin_.

####  2.2.4 Commonsense Reasoning

Converse can handle only a limited amount of commonsense reasoning. In some
cases, this may cause the bot to incorrectly process user input. Here’s an
example:

_Bot : And here are your returning flights:
Oceanic 443, Depart at 4:16am, 800 USD
Ajira 232, Depart at 15:42pm, 1500 USD
Qantas 424, Depart at 23:08pm, 2300 USD_

_User : the late night one_

_Bot : Alright, your returning flight is Oceanic 443._

In this case, the bot is not able to relate “late night” to “23:08pm”.
However, the bot can understand “the last one” or “Qantas 424” based on the
rules we have implemented.

####  2.2.5 Mixed initiatives

In Converse, the bot always leads the conversations. Sometimes, users may not
follow the bot, and provide something not expected by the bot. Here’s an
example:

_Bot : Hi there, I am the digital assistant for Northern Trail Information
Center. What can I do for you?_

_User : I want to check order status_

_Bot : Oh sure, I’d be happy to help you check your order status. First, I
need to pull up your account. What is your email address?_

_User : Can I use my name to verify my identity?_

_Bot : Oh sure, I’d be happy to help you check your order status. First, I
need to pull up your account. What is your email address?_

Converse doesn’t allow users to lead the conversations, like other existing
task-oriented dialogue system frameworks, hence the conversations may not be
as natural as human conversations when the users don’t follow the bot.

####  2.2.6 Talk to users about open-ended topics

Converse is not an open-domain dialogue system. The conversations are
restricted by the defined tasks. Bot builders can define FAQs to make Converse
able to handle chitchat. Since Converse doesn’t have a model-based Natural
Language Generation (NLG) module, Converse’s chitchat ability is limited by
the FAQs defined by bot builders.

##  3 Related Work

In recent years, there has been an increasing amount of literature on studying
task-oriented dialogue systems. There are two main directions for this
research: (1) frameworks for building task-oriented bots [7, 11, 2, 3, 1, 6,
4, 5], and (2) systems for evaluating new dialogue models [12, 10]. Converse
aligns with the first research direction with a focus on creating a task-
oriented dialogue system that does not require much code to set up.

In existing conversational frameworks, bot builders need to specify every user
intent and bot action in a conversation, giving bot builders fine-grained
control over the bot’s behavior at the cost of simplicity. In Rasa [7], bot
builders create a list of user intents and bot actions for every linear
conversational path that the bot handles. However, natural conversations
branch when the user changes the topic or does not respond to the bot’s
questions, which does not match Rasa’s linear conversation configuration
design. In contrast, bot builders using Botpress [2], Google Dialogflow [3],
Microsoft Bot Framework Composer [1], and IBM Watson Assistant [6] connect
blocks that represent user intents and bot actions in a graphical interface to
configure the conversational flow of a task using a graph. These
conversational graph structures are more flexible to handle branches in the
conversation, however, bot builders still need to specify the bot’s behavior
at every conversational step. In Converse, on the other hand, bot builders
specify the entities for each task and the Task Tree structure, and the built-
in dialogue policy handles generating responses based on the dialogue states,
switching tasks, and steering the conversation back on track when the user
does not answer the bot’s questions, simplifying the conversation
configuration compared to existing conversational frameworks.

The task structure used in Converse is similar to a feature in Rasa, Amazon
Lex, and Google Dialogflow that collects multiple entities from users that are
required to complete a task, such as the date and time of an appointment. In
contrast to these other dialogue systems where bot builders can only configure
entities as required or optional, bot builders can use the task structure in
Converse to configure more complex logic to collect entities, such as asking
the user to provide two out of three types of user authentication (e.g. their
zip code, a two-factor authentication code, and government ID number).

##  4 System overview

Modern task-oriented dialogue systems are usually designed to be modular or a
pipeline. They usually comprise modules such as Natural Language Understanding
(NLU), Dialogue State Tracking (DST), Dialogue Management (DM), and Natural
Language Generation (NLG). To solve real-world problems, a Knowledge Base
(KB)/ Backend action is often connected to the task-oriented dialogue system.
The Knowledge Base can be a database, a knowledge graph, or anything else that
contains necessary information to fulfill user’s inquiry. In addition to the
aforementioned modules, fully functional spoken dialogue systems also
incorporate Automatic Speech Recognition (ASR) and Text to Speech (TTS)
modules.

Converse follows the typical design of modern task-oriented dialogue systems,
see Figure 1. The Orchestrator module works as the receptionist of Converse.
It handles communications between the user and the system, and also
coordinates with other modules. The core of Converse is Dialogue Management
(DM). The DM is connected with a unique component in Converse called the
Dialogue Tree Manager. The Dialogue Tree Manager manages the Task Tree, which
is an and-or tree-based data structure that represents tasks in Converse.

Figure 1: The architecture of Converse task-oriented dialog system

More details about the NLU module and the NLG module can be found in the
appendix and the documentation in the GitHub repo.

##  5 And-Or Task Tree

###  5.1 A new way to represent tasks

In task-oriented dialogue systems, tasks (intents) are the specific things
that we want the system to help users achieve, like checking the weather or
booking movie tickets. A task consists of a collection of slots (entities) and
their relationships. The simplest case is that a task has several necessary
entities. To complete the task, the bot needs to ask the user for the entity
value one by one. In more complex cases, the bot may only need to ask the user
for some entity value when a condition is met. In other words, to complete a
task in different situations, different combination of entities can be used.

The representation of tasks in a task-oriented dialogue system determines how
the system handles the tasks. In other words, the representation of tasks is
the organization of the slots (entities) for this task.

There are different ways to represent tasks in a task-oriented dialogue
system. In Converse, we chose an and-or tree structure to represent tasks,
instead of creating a story-based conversation turn by turn in a linear
structure. We defined a Task Tree structure based on and-or tree.

Why do we use and-or tree structure? We want to formulate every task as a
problem to solve, and make it possible to be solved in a generic way. The
problem can be considered as a combination of a set of sub-problems. The and-
or tree structure represents the search space for solving the problem.
Different search strategies for searching the space are possible. In Converse,
the Dialogue Tree Manager traverses the Task Tree based on the dialogue states
that are managed by the dialogue management module.

###  5.2 How to use and-or tree to represent tasks

With the and-or tree structure, we can convert almost every task into a
combination of and/or relations. For example, if a task verifies the user’s
identity, and we can verify either by name and email address, or by birthday
and social security number (SSN), the task can be represented as (Verify
_name_ and Verify _email address_) or (Verify _birthday_ and Verify _SSN_).

The and-or tree structure is simple yet powerful for representing tasks. We
don’t need to create different stories for different tasks. We only need to
reduce the task into several basic parts, and connect them with and/or
relations. In this way, configuring a new task can be much easier for bot
builders.

We defined 3 type of tree nodes for the Task Tree: And node, Or node, and Leaf
node. Each node has a success status label. If a tree node’s success status
label is _True_ , it means this node is successfully finished based on the
information extracted from the previous conversation, and it won’t be visited
again later in the conversation. For each type of node, we define a node
success condition to decide the value of success status label, which by
default is _False_.

The child nodes of an And node or Or node can be And nodes, Or nodes and Leaf
nodes. Leaf nodes are entity nodes, which store a group of entities and the
extracted entity values.

Table 1: Node types and success conditions Node Type | Success Condition
---|---
And node | all the child nodes’ success labels are _True_
Or node | at least one child node’s success label is _True_
Leaf node | all or a specified number of entities have correct values

At the beginning of each conversation, the Task Tree is a root node. The root
node is an Or node by default. The system don’t check the root node’s success
status. It only checks the task nodes. The task nodes (the tree nodes
represent tasks) are And or Or nodes. The task nodes will be added to the Task
Tree as the conversation goes.

###  5.3 The benefits of using an and-or tree to represent tasks

With the tree nodes we defined, the bot builders can configure complex and/or
relations, which means they can build complex task structures easily. A task
can depend on other tasks, i.e., it can have prerequisite tasks (sub-tasks). A
sub-task can be shared by different tasks. For example, bot builders may
configure several tasks and they both need identity verification. Then
identity verification can be a shared sub-task. If task A is task B’s sub-
task, Task node A should be Task node B’s child node intuitively. Note that in
actual implementation, in order to only have one copy for each task and check
task success status easily, all the task nodes are sibling nodes with the same
parent node, which is the root node. If task A is task B’s sub-task, task node
B won’t actually have task node A as its child node, but a reference to task
node A. In this way, task node A is still the root node’s child node, and task
node B’s structure is well-maintained, see Figure 2.

Figure 2: The Task Tree visualization of a task with sub-task

The Task Tree supports task switching. Users can tell the bot they want to do
task B when the bot is currently handling task A. The bot will pause task A
and switch to task B. After task B is finished, the bot will go back to task
A, and continue working on task A from where it stopped.

The Task Tree supports task repetition if the task is reusable. When a task is
repeated, the task node and all its child nodes will be reset. However, if the
task has sub-tasks, the sub-tasks will not be reset. For example, if a task is
_making online order_ , and it has a sub-task, _verify identity_. The _making
online order_ can be repeated to make another order, but the bot only needs to
verify the user’s identity when making the first order. Of course, if sub-
tasks are also independent tasks, they can be reset if users say they want to
do it again.

###  5.4 How Task Tree is managed in Converse

The Task Tree Manager in Converse handles operations on the Task Tree,
including adding a new task, tree traversal, and quitting a task. The Task
Tree Manager maintains the current task, current entity name, and the current
node. The current node is always a Leaf node. Adding a new task will construct
the task structure and add it under the root node. When the current node is
finished (either the success label is True or all the entities have been
tried), tree traversal can traverse to the next unfinished Leaf node. When the
current node is unfinished, tree traversal will stay at the current node. The
Task Tree manager quits a task when the number of turns about the task exceeds
the limit. The Task Tree Manager interacts with Dialogue Management module, as
shown in Figure 1 previously.

Figure 3 shows an example on how the Task Tree Manager works in detail. There
are two tasks in the Task Tree, _check order status_ and _verify user
identity_. The bot will work on the sub-task (_verify user identity_) first.
In _Step 1_ , for task _verify user identity_ , the information of slot
_birthday_ has been verified, and the current slot or entity is _zip code_.
When the sub-task is successfully finished, the Task Tree Manager will use
tree traversal operation to switch to the main task (check order status).
After this operation, the current slot or entity will be _order id_ , see
_Step 2_.

Figure 3: An example of Task Tree operations - check order status

##  6 Dialogue Management

###  6.1 Dialogue State Tracking

The dialogue state is the representation of the system’s beliefs about the
task(s) at any time during the dialogue given the dialogue history. Dialogue
state tracking (DST) is a key component in Dialogue Management that extracts
user-provided key information during the conversation and encodes them as a
compact set of dialogue states [15].

In Converse, there are three kinds of dialogue states: single-turn states,
multi-turn states, and task-related states.

Converse uses single-turn states to know what’s going on in the current turn.
The states include whether intent or entity information is extracted in this
turn, the polarity (positive, negative, neutral) of the user utterance, etc.

Converse uses multi-turn states to remember what happened in the previous
conversation turns to generate relevant dialogue in the current turn. With the
multi-turn states, Converse is able to reuse the information the user already
provided in the previous turns. For example, if the system tried to confirm
something with the user in the previous turn, a yes-or-no answer is expected
in the current turn. Another example is if a conversation length exceeds the
turn limit, then it might be time to try other solutions like connecting to a
human agent.

Converse uses task-related states to represent the system’s belief of the
tasks. The Task Tree itself maintains the task-related states. It tells the
system the current task and the current entity to focus on. The Task Tree
Manager also stores the tasks that were finished and are waiting to be
finished.

Converse uses all the three kinds of dialogue states to track the flow of
dialogue. The dialogue states accurately identify what the user wants and what
process the system is in. The dialogue states are managed by two modules in
Converse - the Orchestrator and the Dialogue State Manager. In each turn of a
conversation, the Orchestrator coordinates with other modules to collect and
update the single-turn and multi-turn states. If any operations on the tree
are triggered by these updated dialogue states (decided by the Dialogue Policy
and will be explained in detail later in the paper), the Dialogue State
Manager will update the Task Tree via Task Tree Manager.

###  6.2 Dialogue Policy

The Dialogue Policy in Converse follows a human-designed policy graph (which
can be customized) to decide the next dialogue action based on the dialogue
states, and generate the response through the Response Generation module. The
policy graph is a decision tree, which we call the Policy Decision Tree.

When the Dialogue Policy receives the updated dialogue states, it follows the
Policy Decision Tree to find the next dialogue action. The leaf nodes in the
Policy Decision Tree are the names of dialogue actions. All the other nodes in
the Policy Decision Tree are decision rules or conditions. During the
execution of the Dialogue Policy, Converse traverses the Policy Decision Tree
through a depth-first search (DFS). When a node is a condition, if the
condition is True, then its children can be visited. The DFS stops when a leaf
node is reached. Then the corresponding dialogue action will be executed.

The Dialogue Policy is shared between all the tasks in Converse. We assume
that all the tasks can be done by a set of general dialogue actions. The bot
builders don’t need to write dialogue actions by themselves for the tasks they
defined. The dialogue actions can be simple or complex, depending on simple or
complex cases we want them to deal with. An example of a simple dialogue
action is a greetings action, which generates a greeting response like "Hi,
how are you?" when conditions are met. An example of a complex dialogue action
is a _new task with info_ action, which handles the conversation when both
intent and entity information are extracted from user input. For a user’s
input like "I would like to check the weather for zip code 94105.", the _new
task with info_ action will add the new _check the weather_ task to the Task
Tree, update the _zip code_ entity node on the Task Tree, make the API call to
query the weather and finally generate a response "I would be happy to help
you query the weather, the weather in 94105, San Francisco is sunny. Is there
anything else I can help you with?".

With the Dialogue Policy, bot builders do not need to create different
conversation flows for different tasks. Sometimes, bot builders may find their
use cases require capabilities beyond what the current Dialogue Policy can do.
They can add their dialogue action code, then modify the conditions and
corresponding dialogue action names in the Policy Decision Tree configuration
file.

Here, we show an example of the execution of the Policy Decision Tree, see
Figure 4.

Figure 4: An example of the execution of the Policy Decision Tree

##  7 Ethical Considerations

Chatbot systems can be capable of producing unethical conversations. One
example is Microsoft’s Tay which learned and replicated offensive language
within hours of interacting with users on Twitter [14]. However, because
Converse does not contain a model-based NLG model, this capability is
mitigated in our system. A bot builder could still provide biased, racist, or
otherwise offensive Task Tree, training samples, or FAQs resulting in
inappropriate responses, but Converse does not have the ability to learn
offensive or racist language from the end-users. Likewise, Converse does not
have the ability to learn and distribute PII, keeping a user’s information
private. As with other chatbot systems, there is a potential for dialogue
failure. To minimizes the risk of user frustration and attrition, bot builders
can provide contingency plans for users such as links to a help page, or
transference to a human operator.

##  8 Conclusion

We introduce Converse, a low-code, tree-based, modular, task-oriented dialogue
system. Converse has a powerful and-or-tree task structure to handle various
tasks, can be adapted to new tasks easily, and handles inter-task level
conversation elegantly. In future work, we will integrate more advanced
conversational research into Converse, for example, model-based dialogue
policy, open-domain dialogue, dialogue act classification, etc. We will
continue to develop Converse as an easy-to-build, easy-to-use, easy-to-deploy,
task-oriented dialogue system.

## Acknowledgments and Disclosure of Funding

The initial idea and overall design for Converse was from Caiming Xiong and
Richard Socher. Tian Xie, Kazuma Hashimoto, Jin Qu and Yingbo Zhou built the
first PoC, which was demo’ed at Dreamforce 2019. Tian Xie, Xinyi Yang, Wenhao
Liu, and Caiming Xiong redesigned the architecture of Converse dialogue
management core to make the system more flexible, modular, and extensible.
Tian Xie, Xinyi Yang, Angela S. Lin, Feihong Wu, and Young Mo Kang further
extended Converse by adding additional features and improving ease of setup
and deployment. Wenpeng Yin, Huan Wang and Semih Yavuz made significant
contributions to the NLU models. We thank Gang Wu for his help in the front-
end development. We also thank Michael Jones for his help in product
management. Wenhao Liu and Yingbo Zhou led the initiative as project and team
managers. Last but not least, we received input and support from our Einstein
product and engineering team members throughout the process.

## References

  * bot [a] Bot framework composer.  https://docs.microsoft.com/en-us/composer/, a.  Accessed: 2021-11-23.
  * bot [b] Botpress.  https://botpress.com/, b.  Accessed: 2021-11-23.
  * [3] Dialogflow.  https://cloud.google.com/dialogflow/.  Accessed: 2021-11-23.
  * [4] Lex.  https://aws.amazon.com/lex/.  Accessed: 2021-11-23.
  * [5] Power virtual agents.  https://powervirtualagents.microsoft.com/en-us/.  Accessed: 2022-01-03.
  * [6] Watson assistant.  https://www.ibm.com/products/watson-assistant/.  Accessed: 2021-11-23.
  * Bocklisch et al. [2017] Tom Bocklisch, Joey Faulkner, Nick Pawlowski, and Alan Nichol.  Rasa: Open Source Language Understanding and Dialogue Management.  _arXiv preprint arXiv:1712.05181_ , 2017.
  * Jiao et al. [2020] Xiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang, Xiao Chen, Linlin Li, Fang Wang, and Qun Liu.  TinyBERT: Distilling BERT for natural language understanding.  In _Findings of the Association for Computational Linguistics: EMNLP 2020_ , pages 4163–4174, 2020.
  * Jurafsky and Martin [2021] Daniel Jurafsky and James H. Martin.  Chapter 24: Chatbots & dialogue systems.  In _Speech and Language Processing_ , 2021.
  * Miller et al. [2017] Alexander Miller, Will Feng, Dhruv Batra, Antoine Bordes, Adam Fisch, Jiasen Lu, Devi Parikh, and Jason Weston.  ParlAI: A Dialog Research Software Platform.  In _Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing: System Demonstrations_ , pages 79–84, Copenhagen, Denmark, September 2017. Association for Computational Linguistics.  doi: 10.18653/v1/D17-2014.  URL https://aclanthology.org/D17-2014.
  * Papangelis et al. [2020] Alexandros Papangelis, Mahdi Namazifar, Chandra Khatri, Yi-Chia Wang, Piero Molino, and Gökhan Tür.  Plato dialogue system: A flexible conversational AI research platform.  _CoRR_ , abs/2001.06463, 2020.  URL https://arxiv.org/abs/2001.06463.
  * Ultes et al. [2017] Stefan Ultes, Lina M. Rojas-Barahona, Pei-Hao Su, David Vandyke, Dongho Kim, Iñigo Casanueva, Paweł Budzianowski, Nikola Mrkšić, Tsung-Hsien Wen, Milica Gašić, and Steve Young.  PyDial: A Multi-domain Statistical Dialogue System Toolkit.  In _Proceedings of ACL 2017, System Demonstrations_ , pages 73–78, Vancouver, Canada, July 2017. Association for Computational Linguistics.  URL https://aclanthology.org/P17-4013.
  * White [2012] James Paul White.  UWashington: Negation resolution using machine learning methods.  In _*SEM 2012: The First Joint Conference on Lexical and Computational Semantics – Volume 1: Proceedings of the main conference and the shared task, and Volume 2: Proceedings of the Sixth International Workshop on Semantic Evaluation (SemEval 2012)_ , pages 335–339, 2012.
  * Wolf et al. [2017] Marty J Wolf, Keith W Miller, and Frances S Grodzinsky.  Why we should have seen that coming: comments on microsoft’s tay “experiment,” and wider implications.  _The ORBIT Journal_ , 1(2):1–12, 2017.
  * Wu et al. [2019] Chien-Sheng Wu, Andrea Madotto, Ehsan Hosseini-Asl, Caiming Xiong, Richard Socher, and Pascale Fung.  Transferable multi-domain state generator for task-oriented dialogue systems.  In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_. Association for Computational Linguistics, 2019.
  * Xiong et al. [2016] Caiming Xiong, Nishant Shukla, Wenlong Xiong, and Song-Chun Zhu.  Robot learning with a spatial, temporal, and causal and-or graph.  In _2016 IEEE International Conference on Robotics and Automation (ICRA)_ , pages 2144–2151, 2016.  doi: 10.1109/ICRA.2016.7487364.
  * Zhang et al. [2020a] Jianguo Zhang, Kazuma Hashimoto, Wenhao Liu, Chien-Sheng Wu, Yao Wan, Philip Yu, Richard Socher, and Caiming Xiong.  Discriminative nearest neighbor few-shot intent detection by transferring natural language inference.  In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pages 5064–5082, 2020a.
  * Zhang et al. [2020b] Zheng Zhang, Ryuichi Takanobu, Qi Zhu, MinLie Huang, and XiaoYan Zhu.  Recent advances and challenges in task-oriented dialog systems.  pages 1–17. Springer, 2020b.

##  Appendix A Appendix

###  A.1 Natural Language Understanding (NLU)

Intent detection

We use a simple and effective approach [17], discriminative nearest neighbor
classification (i.e., k-nearest neighbors (kNN) classification with $k=1$),
which is based-on natural language inference (NLI). When bot builders
configure tasks for Converse, they can add 3 $\sim$ 5 sample user utterances
for each task. During bot runtime, when there’s a user utterance, the system
will compute the entailment scores between the user utterance and all the
sample utterances. The sample utterance with the highest entailment score will
be selected, and the corresponding task will be the intent detection result.

We also set a threshold for the inference score, usually 0.6 $\sim$ 0.8 to
tackle the OOS intent problem.

Named-entity recognition (NER)

We trained an NER model based on TinyBERT6[8], and we use it as an important
entity extraction method for slot filling.

Negation detection

Usually, it is easier to know what the user wants to do in intent detection,
while it can be very hard to know what exactly the user doesn’t want to do in
a dialogue system. It is fairly common to have a system that treats “X does Y”
and “X does not Y” as having the very nearly same meaning.[13]

Here, we introduce negation detection to help us solve the problem. We defined
an algorithm to do intent resolution based-on the results of intent detection
model and negation detection model. A coreference resolution model is optional
for intent resolution.

###  A.2 Dialogue Context

A conversation from the beginning to the end usually consists of many turns.
Each turn is not isolated from the others, which imposes one of the hard
challenges on AI bots as they often fail to generate dialogue consistent with
past turns. In addition, Converse is designed as a distributed bot system that
can serve multiple users at the same time. It needs to maintain multiple
conversations and switch from one to the other, therefore the context of every
conversation a.k.a "Dialogue Context" should be memorized and managed. These
functionalities are fulfilled by the Dialogue Context Manager.

The Dialogue Context Manager can be configured to run in stand-alone mode or
distributed mode, with context stored in memory or Redis, respectively. Also,
we implemented the dialogue context manager using the factory design pattern
and proxy interface to make it flexible to extend beyond our two
implementations.

###  A.3 Entity Module

An entity is a piece of information that the user provides to the system in
order to carry out certain tasks. In Converse, we implemented entities as
objects instead of using strings because structured objects are easier to
manipulate than unstructured text. We provide a dedicated Entity Manager to
manage entity operations. We also provide multiple entity extraction methods.

Unlike most existing dialogue system frameworks, where entities have a life
span of a single turn, entities in Converse are long-lived throughout the user
session. We provide an Entity History Manager to manage all the entities
extracted throughout the user session and allows the system to insert, remove,
and retrieve an entity. This behavior mimics a human agent who can remember
entities provided by the user in earlier conversations and does not ask for
the same entity already provided in the past.

###  A.4 Natural Language Generation (NLG)

We use a simple template-based NLG module to generate natural language
responses. The NLG module connects to the Dialogue Policy. There are two kinds
of responses: general responses for all tasks and task-specific responses. Bot
builders can configure general responses in a response template file. Task-
specific responses can be configured in the task configuration file.

###  A.5 Entity backend

In order to solve real-world problems, we provide entity backend to process
the extracted entity values and return messages to the Dialogue Management
after processing. For example, if the entity backend is a weather checking
API, the input entity value can be a zip code and the return message can be a
string contains the weather checking results for this location.

The entity backend can be Python functions or RESTful APIs. In the task
configuration file, you can specify the entity backend function/ URL for each
entity.

###  A.6 Example Converse chatbot

Here, we provide an example Converse bot, which is for making health
appointment. To learn more about how to build a chatbot using Converse, please
check our GitHub repo.

Task configuration YAML file:

⬇

Bot:

text_bot: true

bot_name: Nurse Nancy

Task:

positive:

description: polarity

samples:

- "Yes"

- "Sure"

- "correct"

- "No problem"

- "that’s right"

- "yes please"

- "affirmative"

- "roger that"

\parnegative:

description: polarity

samples:

- "No"

- "Sorry"

- "No, I don’t think so."

- "I dont know"

- "It’s not right"

- "Not exactly"

- "Nothing to do"

- "I forgot my"

- "I forgot it"

- "I don’t want to tell you"

\parget_health_insurance_info:

description: get health insurance info

entities:

ssn:

function: verify_ssn

confirm: no

prompt:

- May I have the last four digits of your social security number?

response:

birthday:

function: verify_ssn

confirm: no

prompt:

- And your birthday?

response:

entity_groups:

ssn_group:

- ssn

birthday_group:

- birthday

success:

AND:

- VERIFY:

- ssn_group

- VERIFY:

- birthday_group

finish_response:

success:

- I have found your health insurance record.

failure:

- Sorry, I am not able to find your health insurance record.

repeat: false

max_turns: 10

\parhealth_appointment:

description: make an appointment at Nurse Nancy

samples:

- I want to see a doctor

- I don’t feel so good

- I would like to make an appointment

- I want to make an appointment

- I got a fever

- make an appointment at Nurse Nancy

entities:

appt_date:

function: collect_info

confirm: no

prompt:

- What date do you prefer for the appointment?

response:

appt_time:

function: collect_info

confirm: no

prompt:

- At what time?

response:

department:

function: collect_info

confirm: no

prompt:

- Which department do you want to make the appointment with?

response:

doctor_name:

function: collect_info

confirm:

prompt:

- May I have your preferred doctor name?

response:

covid_protocol:

function: covid_protocol

confirm: no

prompt:

response:

- <info>

have_health_insurance:

function: check_condition

confirm: no

prompt:

- Do you have health insurance?

response:

- <info>

name:

function: collect_info

confirm: no

prompt:

- Since you don’t have health insurance, let me create a profile for you.

What’s your name?

response:

birthday:

function: collect_info

confirm: no

prompt:

- What is your birthday?

response:

- I have created a profile for you.

entity_groups:

date_time_group:

- appt_date

- appt_time

department_doctor_group:

- department

- doctor_name

covid_protocol_group:

- covid_protocol

have_health_insurance_group:

- have_health_insurance

name_birthday_group:

- name

- birthday

success:

AND:

- INSERT:

- date_time_group

- INSERT:

- department_doctor_group

- OR:

- AND:

- API:

- have_health_insurance_group

- TASK:

- get_health_insurance_info

- INSERT:

- name_birthday_group

- INFORM:

- covid_protocol_group

finish_response:

success:

- I have booked an appointment for you.

failure:

- Sorry, I can’t help you book an appointment.

task_finish_function: create_appointment

repeat: true

repeat_response:

- Would you like to make another appointment?

max_turns: 10

Entity configuration YAML file:

⬇

Entity:

ssn:

type: CARDINAL

methods:

ner:

birthday:

type: DATE

methods:

ner:

appt_date:

type: DATE

methods:

ner:

appt_time:

type: TIME

methods:

ner:

department:

type: PICKLIST

methods:

fuzzy_matching:

- ICU

- Elderly services

- Diagnostic Imaging

- General Surgery

- Neurology

- Microbiology

- Nutrition and Dietetics

suggest_value: yes

doctor_name:

type: PERSON

methods:

ner:

name:

type: PERSON

methods:

ner:

covid_protocol:

methods:

have_health_insurance:

type: USER_UTT

methods:

user_utterance:

We provide a config UI tool to create or edit the bot, see Figure 5.

Figure 5: Converse config UI

Here is an example conversation of the health appointment bot, see Figure 6
and 7

Figure 6: Example conversation of the health appointment bot Figure 7: Task
tree visualization of the health appointment bot