# SketchXAI: A First Look at Explainability for Human Sketches

Zhiyu Qu1,3 Yulia Gryaditskaya1 Ke Li1,2 Kaiyue Pang1 Tao Xiang1,3 Yi-Zhe
Song1,3
1SketchX, CVSSP, University of Surrey 2Beijing University of Posts and
Telecommunications
3iFlyTek-Surrey Joint Research Centre on Artificial Intelligence
{z.qu, y.gryaditskaya, kaiyue.pang, t.xiang<EMAIL_ADDRESS>
<EMAIL_ADDRESS>

###### Abstract

This paper, for the very first time, introduces human sketches to the
landscape of XAI (Explainable Artificial Intelligence). We argue that sketch
as a “human-centred” data form, represents a natural interface to study
explainability. We focus on cultivating sketch-specific explainability
designs. This starts by identifying strokes as a unique building block that
offers a degree of flexibility in object construction and manipulation
impossible in photos. Following this, we design a simple explainability-
friendly sketch encoder that accommodates the intrinsic properties of strokes:
shape, location, and order. We then move on to define the first ever XAI task
for sketch, that of stroke location inversion (SLI). Just as we have heat maps
for photos, and correlation matrices for text, SLI offers an explainability
angle to sketch in terms of asking a network how well it can recover stroke
locations of an unseen sketch. We offer qualitative results for readers to
interpret as snapshots of the SLI process in the paper, and as GIFs on the
project page. A minor but interesting note is that thanks to its sketch-
specific design, our sketch encoder also yields the best sketch recognition
accuracy to date while having the smallest number of parameters. The code is
available at https://sketchxai.github.io.

Figure 1: Explainability, but for human sketches. We demonstrate a new
methodology for explaining AI decisions on human sketch data. Instead of one
static explanation per instance as in existing works, our proposed method
supports generating infinitely many dynamic explanations with each showcasing
how an AI classifier responds to a different view of the same sketch input.
This is made possible by seeing stroke as the fundamental block to explain a
sketch and randomising every stroke location to introduce stochasticity at
every case. The infinite varieties of explanation paths allows humans to enjoy
a wider coverage on how AI functions, and therefore to better scrutinise AI.

##  1 Introduction

It is very encouraging to witness a recent shift in the vision and language
communities towards Explainable AI (XAI) [van2004explainable,
ribeiro2016should, lipton2018mythos, zhou2016learning, bahdanau2014neural,
arrieta2020explainable, tjoa2021survey]. In a world where “bag of visual
words” becomes “bag of tricks”, it is critically important that we understand
why and how AI is making the decisions, especially as they overtake humans on
a series of tasks [silver2016mastering, he2015imagenet, jumper2021highly,
ouyang2022training].

XAI research to date has focused on two modalities: photo
[escalante2018explainable, molnar2022interpretable, zhang2020explainable,
linardatos2021explainable] and text [shi-etal-2016-string, voita2018context,
linzen2016assessing, liu2021explainaboard, galassi2020attention]. Great
strides have been made in the XAI for the photo domain, with the trend of
going from heat/saliency maps [selvaraju2016grad, chattopadhay2018grad,
srinivas2019full, simonyan2013deep, zeiler2014visualizing] to the
rules/semantics-oriented approaches [kim2018interpretability,
karras2020analyzing, shen2020interpreting]. The text side is captivating due
to the flexibility of sentence construction. Early works in text models
explainability also started with visualisations [simonyan2013deep,
zeiler2014visualizing, adebayo2018sanity], moving onto linguistic phenomena
[linzen2016assessing, blevins2018deep, williams2018latent], and most recently
to attention [strubell2018linguistically, hao2020self, rogers2020primer].

In this paper, we make a first attempt at XAI for human freehand sketches. The
“why” we hope is obvious – sketches are produced by humans in the first
place(!), from thousands of years ago in caves, and nowadays on phones and
tablets. They are uniquely expressive, not only depicting an object/scene but
also conveying stories – see a “Hunter and Arrows” here for a story dating
back 25,000 years in France111https://www.worldhistory.org/Lascaux_Cave/.
They, therefore, form an ideal basis for explainability which is also human-
facing.

The sketch domain is uniquely different from both of the well-studied photo
and text domains. Sketch differs from photo in that it can be freely
manipulated, while photos are rigid and hard to manipulate. This is largely
thanks to the stroke-oriented nature of sketches – jittering strokes might
give the “same” sketch back, jittering pixels gives you a “peculiar”-looking
image. Sketches have the same level of flexibility in semantic construction as
text: strokes are the building block for a sketch as words are for text. With
these unique traits of sketch, the hope of this paper is to shed some light on
what XAI might look for sketch data, and what it can offer as a result to the
larger XAI community. This, however, is only the very first stab, the greater
hope is to stir up the community and motivate follow-up works in this new
direction of “human-centred” data for XAI.

With that in mind, we focus our exploration on what makes sketches unique –
yes, strokes. They allow for flexible object construction and make sketches
free to manipulate. We then ask how strokes collectively form objects. For
that, we identify three inherent properties associated with strokes: shape,
location, and order. These three variables define a particular sketch: shape
defines how each stroke looks like, location defines where they reside, and
order encodes the temporal drawing sequence.

Our first contribution is a sketch encoder, that factors in all the mentioned
essential properties of strokes. We hope that this encoder will build into its
DNA how strokes (and in turn sketches) are represented, and therefore be more
accommodating when it comes to different explainability tasks (now and in the
future) – and for this, we name it SketchXAINet (“X” for
E$\underline{X}$plainability). We are acute to the fact that explainability
takes simple forms [MILLER20191], so we refrained from designing a complicated
network. In fact, we did not go any further than introducing a branch to
encode each of the three stroke properties (shape, location, and order), and
simply feed these into a standard transformer architecture with a cross-
entropy loss. Interestingly, however, just with this simple architecture, we
already observe state-of-the-art sketch recognition performance improving on
all prior arts.

With an explainability-compatible sketch encoder in place, we now want to
examine if we can actually make anything explainable. First and foremost, of
course, sketch explainability can be performed in the form of a heat map
[selvaraju2016grad, chattopadhay2018grad, srinivas2019full] – just treat
sketches as a raster image and we are done. This, however, would be entirely
against our very hope of spelling out sketch-specific explainability – the
“explainability” one can obtain there is at best at the level of photo
heatmaps (see Fig. 1).

Instead, we utilise our sketch encoder and put forward the first XAI task for
sketch – that of stroke location inversion (SLI) (see Figs. 1 and
LABEL:fig:recovery). We study two types of tasks: recovery and transfer.
Intuitively, during the recovery, we ask our optimisation procedure to jitter
the stroke locations to _recover_ sketch so that it belongs to the same class
as the original sketch. During the transfer task, we ask our optimisation
procedure to jitter the stroke locations to obtain a sketch that belongs to a
new class that we pass as input to the optimiser. The idea is then that how
well the network has learned is positively correlated with how well it does at
this inversion task, and that explainability lies in visualising this process.
So, in addition to heat maps for photos, and correlation matrices for text,
for sketch, we now have visualisations, that theoretically be manifested of
infinite variety, and in the form of a video/GIF to capture the SLI process.
We finish by playing with variants of the proposed SLI: (i) sketch recovery,
to offer insights on category-level understanding of a learned encoder,
_i.e_., reconstructing a sketch to the same category, and (ii) sketch
transfer, to shed light on cross-category understanding, _i.e_., using strokes
of one category to reconstruct another.

Our contributions are as follows: (i) we argue for sketches to be introduced
to the field of XAI, (ii) we identify strokes as the basic building block and
build a sketch encoder, named as SketchXAINet, that encapsulates all unique
sketch properties, (iii) we introduce stroke location inversion (SLI) as a
first XAI task for sketch, (iv) we offer qualitative results of the inversion
process and deliver best sketch recognition performance as a by-product.

##  2 Related work

Raster and vector sketch encoders. Sketch contains high-level human
understanding and abstraction of visual signals and is a distinctive modality
to photos. Many of the previous works [klare2010matching, schneider2014sketch,
li2014fine, qi2015making, sangkloy2016sketchy, pang2019generalising,
pang2020solving, liu2020scenesketcher, wang2021sketchembednet], however, treat
sketches with no difference to photos – they operate on raster format and feed
them into contemporary CNNs for visual learning. Facilitated by the
availability of sketch datasets with stroke-level information [ha2017neural,
ge2020creative], there is an ongoing trend of works that turn to model sketch
as a temporal sequence of vector coordinates, hoping to open up new research
insights for downstream sketch tasks [muhammad2018learning, usp,
song2018learning, lopes2019learned, sketchbert, das2020beziersketch,
yang2021sketchaa, li2022free2cad, yang2022finding]. Along with this
representation change on sketch data is also the backbone upgrade, from CNN to
Transformer [sketchbert, sketchformer], the choice of which we also embrace in
constructing our proposed sketch encoder. Scarcely few existing works have
anchored their focus on the explainability of sketch models, with
[muhammad2018learning] [alaniz2022primitives] being moderately relevant to our
best knowledge. At a high level, both works, just like ours, explore the
impact of strokes on forming a sketch object. But instead of studying sketch
abstraction, _i.e_., how strokes can be deleted or simplified without altering
the holistic semantic meaning, we leverage the free-hand stroke itself as a
building block to understand sketch model explainability.

Ante-hoc and post-hoc explainability methods. Several recent surveys and books
discuss explainability methods in detail [molnar2022interpretable,
antoniadi2021current, holzinger2019causability, arrieta2020explainable].
Explainability methods are often split into two groups: _ante-hoc_
[letham2015interpretable, caruana2015intelligible] and _post-hoc_
[zeiler2014visualizing, zhou2016learning, ibrahim2019global,
ribeiro2016should, lundberg2017unified, ribeiro2018anchors] methods. Ante-hoc
methods are inherently and intrinsically interpretable, while post-hoc methods
require designing separate techniques to provide probes into model
explainability. The former, also known as the white/glass box approach, is
preferable under the context of explainability, but limited by a few specific
choices of instantiations, _e.g_., decision trees [wan2021nbdt], generalised
additive models [agarwal2021neural]. The latter being less transparent has no
restrictions on model learning and therefore often achieves better test-time
task performance. Achieving the optimal trade-off of such is then the core to
both schools of explainable AI [holzinger2019causability,
arrieta2020explainable]. Our proposed sketch explainability method SLI is
post-hoc, but facilitated by a tailor-designed, less black-box (ante-hoc
alike) sketch encoder (that allows reasoning over a stroke-based decision into
shape, location, and order). Notably, our final sketch model achieves state-
of-the-art recognition performance.

Counterfactual explanation and adversarial attack. Our post-hoc explainability
strategy SLI of “relocating first, recovery later” is also reminiscent of a
specific AI explainability genre – counterfactual explanation (CE)
[wachter2017counterfactual, karimi2020survey, looveren2021interpretable]. CE
aims to identify what are the minimal input changes for a model to make a
different visual decision. The model is then explained towards credibility if
these changes are key in defining the underlying visual concept. In this
sense, SLI identifies the stroke location changes that matter (_e.g_., the
tires and the front handle for a bicycle in Fig. 1) through multiple randomly
initialised stroke inversion tasks (because important strokes gets highlighted
across trials). Closely related to CE is another field known of adversarial
attack [szegedy2013intriguing, goodfellow2014explaining, moosavi2017universal,
baluja2017adversarial], which aims at the generation of adversarial examples
(AE) having imperceptible differences to human vision but results in
completely different AI predictions. Conceptual connections between CE and AE
have been extensively discussed in the literature [pawelczyk2021connections,
browne2020semantics, wachter2017counterfactual], where
[pawelczyk2021connections] suggests that AE is part of a broader class of
examples represented by CE. Our proposed SLI also generates sketch samples
that dictates a prediction change. We however model the generation process via
the spatial reconfiguration of strokes, which is intrinsically distinctive to
AE – the movement of strokes is less likely to be imperceptible changes to
human viewers compared with those by local pixel jittering.

Figure 2:  SketchXAINet architecture. We build a sketch classifier upon stroke
vectors rather than raster pixels. All strokes are decomposed into three parts
– order, shape and location. We use a bidirectional LSTM, a linear model and a
learnable time embedding matrix to encode such decomposed stroke
representation respectively. The dashed line refers to the gradient flow of
the location parameters when we generate explanations by SLI with a trained
classifier.

##  3 Methodology

In this section, we first introduce our classification model which is designed
around strokes as sketch building blocks. We then introduce our method for
model explainability.

As a pre-processing step, we simplify all sketches by the RDP algorithm
[douglas1973algorithms]. For each stroke $s_{i}$ consisting of $k$ points,
$\\{s_{i,1},s_{i,2},...,s_{i,k-1},s_{i,k}\\}$, we identify three inherent
properties in $s_{i}$ and learn respective descriptor for each: location
$l_{i}$, shape $sh_{i}$ and stroke order $o_{i}$. We use the coordinate value
$(x_{i},y_{i})$ of $s_{i,1}$ to represent the location of each stroke $l_{i}$.
In order to disentangle shape information $sh_{i}$ from its actual location,
we use relative instead of absolute coordinates and move the starting point of
all strokes to the canvas centre. As per convention, each $sh_{i}$ point also
contains a two-dimensional binary pen state [ha2017neural] – (1, 0): stroke is
being drawn, (0, 1): the end of the stroke, (0, 0): padding points to account
for the fact that all strokes have a different number of points.

Sketch-specific encoder. Our proposed sketch encoder $f_{w}$, which we name
SketchXAINet (“X” for E$\underline{X}$plainability), first learns to encode
$l_{i}$, $sh_{i}$ and $o_{i}$ with different learnable components before
fusing them together into a Transformer for final decision. This tailored
model design is then ready to undertake the novel explainability task defined
later. A full high-level schematic is shown in Fig. 2. We use a bidirectional
LSTM [hochreiter1997long] to extract shape information of each stroke
$sh_{i}$, and one linear layer for location $l_{i}$ embedding learning. We
pre-define the maximum number of strokes allowed and assign a learnable
embedding for each order (time) embedding $o_{i}$. Finally, we sum them all
and add one extra [CLS] token before feeding into a transformer encoder
[dosovitskiy2020image]. We adopt [CLS] for classification task, optimised
under the conventional multi-class cross-entropy loss.

Sketch explainability - SLI. We introduce a new task for explaining sketch
model, that of Stroke Location Inversion, SLI. Initiating from replacing each
sketch stroke at a random location, SLI explains a sketch classifier through
the following hypothesis: to trust a classifier has indeed mastered one
concept, a classifier should be able to relocate a group of random strokes
towards readable visual imagery that actually corresponds to the underlying
concept. SLI thus corresponds to an iterative optimisation problem, aiming to
reconfigure strokes locations for increasing recognition confidence. Denoting
a sketch composing of $N$ strokes with class label $y$ in bold $\bf{s}$, this
process is formulated as:

$\arg\min_{l_{1},\cdots,l_{N}}\mathcal{L}\left(f_{w}\left(\text{Relocate}(\bf{s})\right),y\right),$
(1)

where $\text{Relocate}(\cdot)$ refers to placing the strokes of a given sketch
to random locations on a blank canvas.

In connection to counterfactual & latent optimisation. At first glimpse, SLI
draws considerable similarity to counterfactual explanation – finding input
variations that lead to complete change of prediction outcomes. We adapt this
definition under our context with a slight modification to its original
formulation [wachter2017counterfactual]:

$\arg\min_{l_{1},\cdots,l_{N}}\mathcal{L}\left(f_{w}\left(\bf{s^{\prime}}\right),{y^{\prime}}\right)+d\left(\bf{s},\bf{s^{\prime}}\right),$
(2)

where ${y^{\prime}}$ denotes another label different from $y$, $d(\cdot)$ is
some distance measure and can be a simple sum of location difference here. The
advantage of SLI becomes evident under such comparison. Unlike the
counterfactual approach restricted by a local input search space, SLI enjoys a
much bigger flexibility with each time explaining a different facet of fact
through random replacements of $\bf{s}$. SLI is also connected to latent
optimisation, a technique extensively explored in GAN literature [xia2021gan].
If we dissect $f_{w}$ into $f_{l}\;\text{(location-relevant component)}\circ
f_{w\setminus l}$ (location-irrelevant component) and draw an analogy to the
latent vector $z$ and generator $G(\cdot)$ in GAN language respectively, this
becomes a standard GAN inversion problem. The difference is instead of
traversing along the non-interpretable $z$ space, $f_{w}$ is interpretable in
nature with each update dictating the direction and pace of the next sketch
stroke movement.

Formal Definition. We now define two types of SLI tasks, where stroke
relocation is leveraged as a gateway to explaining a sketch classifier.
Recovery: During the recovery task, we randomise the locations of all strokes
and only keep their shapes. We specify the target label $y$ as the original
sketch label and use Eq. 1 to optimise ($l_{1},\cdots,l_{N}$). We visualise
the entire optimisation process to understand the inner workings of the
classifier. Transfer: For the transfer task, we keep stroke shapes and
locations intact, while specifying the target label $y$ as a different
category to that of the input sketch. We use this setup to build cross-
category understandings.

##  4 Experiments

###  4.1 Experimental Settings

We adopt the QuickDraw dataset [ha2017neural] to train $f_{w}$, which contains
345 object categories with 75K sketches each. Following convention the 75K
sketches are divided into training, validation and testing sets with size of
70K, 2.5K and 2.5K, respectively. For the analysis of generated explanations
by SLI, we randomly select 30 categories. We compare our model with a variety
of sketch recognition models: CNN-based [resnet, yu2015sketch], hybrid-based
[sketchmate, yang2021sketchaa, li2018sketch] and Transformer variants
[dosovitskiy2020image, liu2021swin, sketchformer]. We use the same learning
rate of $0.00001$, Adam optimiser [adam2014kingma], and 20 epochs for all
methods. All experiments of this stage are run on 5 NVIDIA 3090 GPUs with a
batch size of 100 per GPU. For better SLI training stability, we use gradient
clip [pascanu2013difficulty], CosineAnnealingLR scheduler [loshchilov2016sgdr]
and SGD optimiser without momentum to limit the distance a stroke can move.

###  4.2 Main Results

SLI achieves SoTA sketch recognition. We use top-1 classification accuracy to
assess the sketch recognition task. LABEL:tab:evaluation_performance shows
performance comparison between all selected models and ours. We include all
five major sketch recognition works in contemporary time, Sketch-a-Net
[yu2015sketch], SketchMate [sketchmate], SketchAA [yang2021sketchaa],
SketchFormer [sketchformer] and Sketch-R2CNN [li2018sketch] and find out
Sketch-R2NN has significant edges over others. We also experiment with not
sketch-specific but more mainstream vision representation learning
architecture, Vision Transformer (ViT) [dosovitskiy2020image] and its more
advanced variant Swin Transformer [liu2021swin]. Both however is only on par
to SketchFormer, a Transformer-based framework on point, other than patch
pixel embedding. SketchXAINet demonstrates that Transformer can outperform CNN
(Sketch-R2CNN with ResNet-101) on sketch recognition tasks. We achieve a new
state-of-the-art sketch recognition performance, improving on all prior arts.
We also conduct controlled study to verify the relative importance of ech
component in our decomposed stroke representation. Without surprise, the shape
feature plays a major role while the order information is the least important.


# Electronic and Thermal Properties of GeTe/Sb2Te3 Superlattices by ab initio
Approach: Impact of Van der Waals Gaps on Vertical Lattice Thermal
Conductivity

Benoît Sklénard  Univ. Grenoble Alpes, CEA, Leti, F-38000, Grenoble, France
François Triozon  Univ. Grenoble Alpes, CEA, Leti, F-38000, Grenoble, France
Chiara Sabbione  Univ. Grenoble Alpes, CEA, Leti, F-38000, Grenoble, France
Lavinia Nistor  Applied Materials France, 38190 Bernin, France  Michel Frei
Applied Materials Inc., Santa Clara, CA 95054-3299, United States  Gabriele
Navarro  Univ. Grenoble Alpes, CEA, Leti, F-38000, Grenoble, France  Jing Li
<EMAIL_ADDRESS>Univ. Grenoble Alpes, CEA, Leti, F-38000, Grenoble, France

###### Abstract

In the last decade, several works have focused on exploring the material and
electrical properties of GeTe/Sb2Te3 superlattices (SLs) in particular because
of some first device implementations demonstrating interesting performances
such as fast switching speed, low energy consumption, and non-volatility.
However, the switching mechanism in such SL-based devices remains under
debate. In this work, we investigate the prototype GeTe/Sb2Te3 SLs, to analyze
fundamentally their electronic and thermal properties by ab initio methods. We
find that the resistive contrast is small among the different phases of
GeTe/Sb2Te3 because of a small electronic gap (about $0.1$ eV) and a
consequent semi-metallic-like behavior. At the same time the out-of-plane
lattice thermal conductivity is rather small, while varying up to four times
among the different phases, from $0.11$ to $0.45$ W m-1K-1, intimately related
to the number of Van der Waals (VdW) gaps in a unit block. Such findings
confirm the importance of the thermal improvement achievable in GeTe/Sb2Te3
superlattices devices, highlighting the impact of the material stacking and
the role of VdW gaps on the thermal engineering of the Phase-Change Memory
cell.

Phase-Change Memory (PCM) is considered among the most promising non-volatile
memory technologies. It has achieved in the last decade a high level of
maturity, demonstrated by its commercialization for Storage Class Memory
applications Cheng  _et al._ (2019) and its proven potential to become the
mainstream solution for the embedded automotive market Cappelletti  _et al._
(2020). In order to target ultra-low programming current in the next
generation of the technological nodes, the programming current reduction in
PCM has been the object of several works, in particular focusing on the
engineering of the deposited material stack. Indeed, the optimization of the
thermal conductivity of the phase-change material, could lead to a significant
reduction of the current needed to perform the crystalline-to-amorphous
reversible transition in the PCM device during the programming operations Song
_et al._ (2020); Kusiak  _et al._ (2016). Among the studies targeting the
power efficiency improvement in PCM, the solution based on GeTe/Sb2Te3
crystalline superlattices (SLs) was proposed as featuring fast and low-power
programming operations compared to the traditional bulk Ge2Sb2Te5 (GST)
Simpson  _et al._ (2011).

Several different mechanisms have been evoked along the years to explain the
transition between the SET state (i.e. low resistance state) and the RESET
state (i.e. high resistance state) in such devices. In particular, a solid-to-
solid transition without any melting of the active layer has been proposed.
This first group of theories supports a crystal-to-crystal transition (i.e.
hexagonal-to-hexagonal) based on the transition between two of the possible
phases of hexagonal (hex) GST (i.e. between Petrov and Inverted-Petrov, or
between Inverted-Petrov and Ferro, as reported in Fig. 1), taking into account
an atomic vertical diffusion (i.e. Ge diffusion) combined with a lateral
motion of the sublayers Yu and Robertson (2015); Mitrofanov  _et al._ (2019).
More recently, in order to overcome the discrepancy with the experimental
results and the oversimplification of previous theories, the reconfiguration
of Van der Waals (VdW) gaps through the inversion of the SbTe planes between
neighboring blocks has been proposed, justifying the presence of a local
deviation in stoichiometry from quasi-binary compositions as observed in TEM
experiments Kolobov  _et al._ (2017); Kowalczyk  _et al._ (2018). In later
reports, the motion of the stacking faults along the layer Chen  _et al._
(2018a) and the intermixing of Ge/Sb Saito  _et al._ (2019) have been proposed
as mechanisms behind the possible electronic properties change in GeTe/Sb2Te3
SLs.

A second group of studies supports a thermal-based explanation for the reduced
programming current in GeTe/Sb2Te3. The phase-change transition is equivalent
to standard bulk-based PCM, but is made more efficient thanks to the
particular stack configuration of a SL. Preliminary works on amorphous SLs
Chong  _et al._ (2006) have already evidenced an improved thermal efficiency
in these layers, reinforced by several following works demonstrating the
reduction of the thermal conductivity in SLs with respect to bulk layers Tong
_et al._ (2011); Long, Tong, and Miao (2012). Moreover, the anisotropy of the
thermal conductivity that can be achieved in GeTe/Sb2Te3 SLs Campi  _et al._
(2017) could be extremely advantageous in reducing the power involved in the
device programming operations Navarro  _et al._ (2018). Recently, these
studies have received even more support from the experimental demonstration in
PCM devices of the higher thermal resistance of a SL with respect to a bulk
device, attributed to the presence of multiple interfaces and multiple VdW
gaps Boniardi  _et al._ (2019); Térébénec  _et al._ (2021); Kwon  _et al._
(2021); Khan  _et al._ (2021).

In this letter, we report the investigation of the electronic and thermal
properties of the different hex GST phases, including the most stable Kooi
structure Kooi and De Hosson (2002) and the different GeTe/Sb2Te3 SLs, using
ab initio methods. We highlight the small difference in electrical
conductivity among the different phases and the presence of thermal
conductivity anisotropy in all of them. Finally, we show how the out-of-plane
thermal conductivity is correlated with the total number of VdW gaps in the
unit block, emphasizing importance of stack engineering to control and enhance
the presence of VdW gaps in the phase-change layer to achieve a more thermally
efficient PCM device.

Figure 1: (a) GST Kooi structure and other hex GST phases: (b) Petrov, (c)
InvPetrov, and (d) Ferro. The unit cells are indicated by a dashed blue
rectangle. Ge, Sb, and Te atoms are in purple, red, and green respectively. In
one unit cell, Kooi has single Te-Te VdW gap; Petrov and Ferro have one Te-Te
VdW gap and two Ge-Te long bonds; and InvPetrov has two Te-Te VdW gaps and one
Ge-Ge long bonds. Figure 2: (a-d) Electronic structure obtained using HSE06
functional (solid lines) and PBE functional (magenta dashed lines) for (a)
Kooi, (b) Petrov, (c) InvPetrov, and (d) Ferro phases respectively. (e) I-V
curves of the four phases. (f) Ratio of the current flowing in two different
phases as a function of the bias voltage.

The atomic structures are relaxed using density functional theory (DFT) with
PBE functional including VdW corrections (D3)Grimme  _et al._ (2010), $8\times
8\times 4$ $k$-mesh, and $400$ eV cutoff energy. Instability of Kooi structure
with D3 correction (imaginary phonon) is observed, due to the larger volume of
the unit cell, consistent with Ref. Song, Kim, and Jhi (2018). To avoid such
instability, as reported in Ref. Campi  _et al._ (2017), we adopt D2
correction Grimme (2006) for Kooi structure. The relaxed lattice parameters of
hex unit cells ($a$ and $c$) are listed in Table 1. The relaxed structures are
available in supplementary materials.

Electronic structures are obtained using hybrid functional (HSE06)Heyd,
Scuseria, and Ernzerhof (2003) with $12\times 12\times 4$ $k$-mesh and $400$
eV cutoff energy. Electron transport in the vertical direction (perpendicular
to VdW gap) is computed using the non-equilibrium Green’s function (NEGF)
formalism based on maximally localized Wannier functions (MLWF) approach
starting from HSE calculations. The bias voltage is applied across the two
electrodes, which are made of the same material. MLWF was computed using
Wannier90Pizzi  _et al._ (2020), NEGF was performed using an in-house
codeDragoni  _et al._ (2020).

Phonon dispersions and anharmonicity are calculated using finite difference
method with an atomic displacement of $0.01$ Å and $0.03$ Å, respectively i.e.
$1472$ ab initio calculations after taking advantage of the structural
symmetry for Kooi, Petrov, and Inverted-Petrov (InvPetrov); twice that amount
for Ferro due to the breaking of bulk inversion symmetry. Phonon calculation
adopts PBE functional with $400$ eV cut-off energy, $2\times 2\times 2$
supercell with $4\times 4\times 2$ $k$-mesh for phonon dispersion; $2\times
2\times 1$ super cell with $4\times 4\times 4$ $k$-mesh for anharmonicity
calculation. Thermal conductivity is calculated by solving the Boltzmann
transport equation using the phono3py package Togo, Chaput, and Tanaka (2015)
with interpolation on an $11\times 11\times 11$ $q$-mesh. All ab initio
calculations were performed using VASP code Kresse and Furthmüller (1996);
Kresse and Joubert (1999) with spin-orbit coupling.

Table 1: In-plane and out-of plane lattice parameter ($a$ and $c$) of hexagonal phases relaxed using PBE with VdW correction. Electronic band gap obtained using HSE06 ($E_{g}^{\text{HSE06}}$) and PBE ($E_{g}^{\text{PBE}}$) functionals. In-plane and out-of-plane thermal conductivity ($\kappa_{\parallel}$ and $\kappa_{\perp}$) at $300$ K. Free energy with respect to Kooi structure at $300$ K.  | a ($\AA$) | c ($\AA$) |  $E_{g}^{\text{HSE06}}$ (meV) |  $E_{g}^{\text{PBE}}$ (meV) |  $\kappa_{\perp}$ (W m-1K-1) |  $\kappa_{\parallel}$ (W m-1K-1) |  $\Delta E$ (eV)
---|---|---|---|---|---|---|---
Kooi | 4.213 | 17.190 | 166 | 11 | 1.526 | 0.450 | 0.0
Petrov | 4.268 | 17.501 | 151 | 35 | 1.481 | 0.253 | 0.85
InvPetrov | 4.229 | 17.985 | 165 | 85 | 1.221 | 0.111 | 0.88
Ferro | 4.281 | 17.341 | 87 | 10 | 1.292 | 0.293 | 0.77
Exp. | 4.22a 4.27b | 17.24a 17.89b | - | - | 0.42c 0.47d | -
a Ref.Matsunaga, Yamada, and Kubota (2004) |  b Ref. Park  _et al._ (2009) |  c Ref. Lee  _et al._ (2013) |  d Ref. Lyeo  _et al._ (2006) |  |  |  |

Figure 2(a-d) shows the electronic structure of the four phases using PBE and
HSE functionals. The electronic gap calculated from PBE functional is about
tens of meV, consistent with what was reported in Ref. Tominaga  _et al._
(2014). It is well known that PBE functional generally underestimates the
electronic gap; HSE functional with a range-dependent fractional amount of
Fock exchange is more reliable for the evaluation of the electronic structure
Chen  _et al._ (2018b). Indeed, HSE yields a larger bandgap with respect to
PBE (Table 1). The four structures have a similar electronic gap, which is
about $100$ meV. The electronic gap has not been measured directly; an optical
gap of $0.5$ eV has been reported, however, a smaller electronic gap of $0.3$
eV was considered to explain Hall measurements Lee  _et al._ (2005). Because
of such a narrow electronic gap, we expect that these materials would behave
like semi-metals with a relatively high electric conductivity at room
temperature or beyond.

GeTe/Sb2Te3 SL is stacked along $[0001]$ direction in a final device, with
electrodes connected at the top and the bottom surfaces of the layer.
Therefore, electric transport in out-of-plane ($[0001]$) direction is modeled
by NEGF method with the assumption of ballistic transport, which is suitable
to evaluate the resistive contrast among different phases, thanks to the thin
phase-change material (i.e. less than $100$ nm) and only a portion of the
phase-change material participating in phase-transition, reducing further the
transport channel length. Fig. 2e shows the current as a function of voltage
(I-V) characteristics at $300$ K computed for the four phases. The current
flow is carried by conduction (valence) bands for positive (negative) bias
voltages. We can observe strong similarities in the I-V characteristics of the
four structures. The current ratio between different phases is reported in
Fig. 2f in order to better highlight the differences. The maximum ratio of
about $100$ is achieved between Petrov and Kooi structures. However, the
conductivity ratio between Petrov and InvPetrov, and between Ferro and
InvPetrov phases are far below the one reported experimentally for the ratio
between the SET and RESET states in PCM devices based on GeTe/Sb2Te3SLs
Mitrofanov  _et al._ (2019); Takaura  _et al._ (2014), making it difficult to
justify those results with a simplified hex-to-hex transition, as already
mentioned in the introduction. The low calculated resistive contrast is in
good accordance with previous NEGF calculations with metal contacts, as
reported in Ref.Nakamura  _et al._ (2017).

Figure 3: (a-d) Phonon dispersion for (a) Kooi, (b) Petrov, (c) InvPetrov, and
(d) Ferro phases respectively. (e) Thermal conductivity of the four phases at
different temperatures and (f) cumulative thermal conductivity, including
phonons with frequency lower than $\omega$. In-plane and out-of-plane thermal
conductivity are represented by solid lines and dashed lines respectively.

The phonon dispersions of the four structures are shown in Fig. 3(a-d). It is
interesting to notice that phonon bands are less dispersive in the
perpendicular direction ($\Gamma$-A) for GeTe/Sb2Te3 SLs than for Kooi
structure. This is likely because of the presence of additional VdW gaps and
different bonds arrangement in SLs. Indeed, in the unit cell of Petrov and
Ferro phases, we find one Te-Te VdW gap and two Ge-Te long bonds, and
InvPetrov phase presents two Te-Te VdW gaps and one Ge-Ge long bond. On the
contrary, a single Te-Te VdW gap is present in Kooi structure. These
structural differences could have a huge impact on the out-of-plane thermal
conductivity as shown in the following.

Thermal conductivities at different temperatures are shown in Fig. 3e, and
Table 1. The in-plane thermal conductivity ($\kappa_{\parallel}$) is similar
among the four structures and varies only from $1.25$ to $1.5$ W m-1K-1 at
$300$ K. The out-of-plane thermal conductivity ($\kappa_{\perp}$) varies of
about $4$ times, from $0.11$ to $0.45$ W m-1K-1 going from InvPetrov to Kooi
structure, confirming the impact on thermal conductivity of the presence of
different structural features between the four phases (i.e. VdW gaps and long
bonds number). Our calculations confirm the anisotropic thermal conductivity
of Kooi and Petrov phases reported by previous theoretical studies
Mukhopadhyay, Lindsay, and Singh (2016); Campi  _et al._ (2017), and complete
the picture adding InvPetrov and Ferro phases. Previous experiments report a
lattice thermal conductivity of about $0.42$-$0.47$ W m-1K-1, which is close
to the one we found for Kooi phase in the perpendicular direction Lyeo  _et
al._ (2006); Lee  _et al._ (2013). The cumulative thermal conductivity shown
in Fig. 3f indicates that low energy phonons below $2$ THz dominate the out-
of-plane thermal conductivity for GeTe/Sb2Te3 SLs. On the contrary, in Kooi
structure the contribution from higher energy phonons at $4$ THz is visible.

Finally, by including phonons in free energy calculation, we find that Kooi
phase is more stable than other three phases by about $0.8$ eV per unit cell
at $300$ K (Table 1).

Kooi structure is known to be the most stable among the hex GST structures,
confirmed in our calculation of the free energy, and such stability can play a
role during the growth of GeTe/Sb2Te3 SLs (i.e. during deposition) but also
during the fabrication steps. The intermixing of GeTe and SbTe layers, already
observed in previous works, is likely to happen, in particular if SLs are
submitted to high-temperature exposure during the fabrication process of the
PCM device. The hypothesis of a perfect crystal-to-crystal transition advanced
to support the electrical results shown in literature, seems difficult to be
sustained in the light of the poor conductivity contrast that we calculated
between the four possible hex GST phases. As previously reported, our
simulations corroborate the hypothesis that GeTe/Sb2Te3 SL devices could work
like a standard PCM device, through a melt-quench process, but likely
involving a smaller active volume in the PCM layer, which would reduce the
energy consumption and increase the switching speed. To better limit the size
of the melted volume, it seems interesting to engineer the phase-change
material stack: a) introducing highly conductive layers, to reduce the power
consumption; b) finely controlling the material structure, adding structural
features in order to enhance the thermal anisotropy of the layer (i.e. VdW
gaps, long bonds, interfaces, etc.); c) carefully limiting/controlling the
programming power to avoid the impact on the layer integrity.

In conclusion, we systematically investigated the electronic and thermal
properties of hex GST phases, in particular comparing standard Kooi structure
and GeTe/Sb2Te3 SLs (Petrov, InvPetrov, and Ferro). We demonstrated that all
four phases have similar electronic properties, i.e. small bandgap (about
$0.1$ eV) and semi-metallic behavior, leading to a low resistive contrast,
which is not favorable to sustain a perfect crystal-to-crystal transition in
SLs based PCM devices. GeTe/Sb2Te3 SLs present a strong thermal conductivity
anisotropy, correlated to the structure of the layer, nominally the presence
of VdW gaps and long bonds (i.e. weak atomic interactions). Indeed, we show
that all SLs structures present a lower out-of-plane thermal conductivity with
respect to standard stable Kooi structure. These results support the interest
of the thermal engineering of the PCM cell starting from the fine-tuning of
the structure of the phase-change layer.

Supplementary Material Atomic coordinates in unit cells of Kooi, Petrov,
InvPetrov, and Ferro phases are reported.

###### Acknowledgements.

B. S. and J. L. thank the allocation of computational resource from
GENCI–IDRIS (Grant 2020-A0090912036).

Data Availability Data available on request from the authors.

## References

  * Cheng  _et al._ (2019) H.-Y. Cheng, F. Carta, W.-C. Chien, H.-L. Lung, and M. J. BrightSky, Journal of Physics D: Applied Physics 52, 473002 (2019).
  * Cappelletti  _et al._ (2020) P. Cappelletti, R. Annunziata, F. Arnaud, F. Disegni, A. Maurelli, and P. Zuliani, Journal of Physics D: Applied Physics 53, 193002 (2020).
  * Song  _et al._ (2020) W.-X. Song, Y. Cheng, D. Cai, Q. Tang, Z. Song, L. Wang, J. Zhao, T. Xin, and Z.-P. Liu, Journal of Applied Physics 128, 075101 (2020).
  * Kusiak  _et al._ (2016) A. Kusiak, J.-L. Battaglia, P. Noé, V. Sousa, and F. Fillot, Journal of Physics: Conference Series 745, 032104 (2016).
  * Simpson  _et al._ (2011) R. E. Simpson, P. Fons, A. V. Kolobov, T. Fukaya, M. Krbal, T. Yagi, and J. Tominaga, Nature Nanotechnology 6, 501–505 (2011).
  * Yu and Robertson (2015) X. Yu and J. Robertson, Scientific Reports 5, 12612 (2015).
  * Mitrofanov  _et al._ (2019) K. V. Mitrofanov, Y. Saito, N. Miyata, P. Fons, A. V. Kolobov, and J. Tominaga, physica status solidi (RRL) – Rapid Research Letters 13, 1900105 (2019).
  * Kolobov  _et al._ (2017) A. V. Kolobov, P. Fons, Y. Saito, and J. Tominaga, ACS Omega 2, 6223 (2017).
  * Kowalczyk  _et al._ (2018) P. Kowalczyk, F. Hippert, N. Bernier, C. Mocuta, C. Sabbione, W. Batista-Pessoa, and P. Noé, Small 14, 1704514 (2018).
  * Chen  _et al._ (2018a) N.-K. Chen, X.-B. Li, X.-P. Wang, S.-Y. Xie, W. Q. Tian, S. Zhang, and H.-B. Sun, IEEE Transactions on Nanotechnology 17, 140–146 (2018a).
  * Saito  _et al._ (2019) Y. Saito, A. V. Kolobov, P. Fons, K. V. Mitrofanov, K. Makino, J. Tominaga, and J. Robertson, Applied Physics Letters 114, 132102 (2019).
  * Chong  _et al._ (2006) T. C. Chong, L. P. Shi, R. Zhao, P. K. Tan, J. M. Li, H. K. Lee, X. S. Miao, A. Y. Du, and C. H. Tung, Applied Physics Letters 88, 122114 (2006).
  * Tong  _et al._ (2011) H. Tong, X. S. Miao, X. M. Cheng, H. Wang, L. Zhang, J. J. Sun, F. Tong, and J. H. Wang, Applied Physics Letters 98, 101904 (2011).
  * Long, Tong, and Miao (2012) P. Long, H. Tong, and X. Miao, Applied Physics Express 5, 031201 (2012).
  * Campi  _et al._ (2017) D. Campi, L. Paulatto, G. Fugallo, F. Mauri, and M. Bernasconi, Phys. Rev. B 95, 024311 (2017).
  * Navarro  _et al._ (2018) G. Navarro, G. Bourgeois, J. Kluge, A. L. Serra, A. Verdy, J. Garrione, M.-C. Cyrille, N. Bernier, A. Jannaud, C. Sabbione, and et al., in  _2018 IEEE International Memory Workshop (IMW)_ (IEEE, 2018) p. 1–4.
  * Boniardi  _et al._ (2019) M. Boniardi, J. E. Boschker, J. Momand, B. J. Kooi, A. Redaelli, and R. Calarco, physica status solidi (RRL) – Rapid Research Letters 13, 1800634 (2019).
  * Térébénec  _et al._ (2021) D. Térébénec, N. Castellani, N. Bernier, V. Sever, P. Kowalczyk, M. Bernard, M.-C. Cyrille, N.-P. Tran, F. Hippert, and P. Noé, physica status solidi (RRL) – Rapid Research Letters 15, 2000538 (2021).
  * Kwon  _et al._ (2021) H. Kwon, A. I. Khan, C. Perez, M. Asheghi, E. Pop, and K. E. Goodson, Nano Letters 21, 5984–5990 (2021).
  * Khan  _et al._ (2021) A. I. Khan, A. Daus, R. Islam, K. M. Neilson, H. R. Lee, H.-S. P. Wong, and E. Pop, Science 373, 1243–1247 (2021).
  * Kooi and De Hosson (2002) B. J. Kooi and J. T. M. De Hosson, Journal of Applied Physics 92, 3584–3590 (2002).
  * Grimme  _et al._ (2010) S. Grimme, J. Antony, S. Ehrlich, and H. Krieg, The Journal of Chemical Physics 132, 154104 (2010).
  * Song, Kim, and Jhi (2018) Y.-S. Song, J. Kim, and S.-H. Jhi, Physical Review Applied 9, 054044 (2018).
  * Grimme (2006) S. Grimme, Journal of Computational Chemistry 27, 1787 (2006).
  * Heyd, Scuseria, and Ernzerhof (2003) J. Heyd, G. E. Scuseria, and M. Ernzerhof, The Journal of Chemical Physics 118, 8207 (2003).
  * Pizzi  _et al._ (2020) G. Pizzi, V. Vitale, R. Arita, S. Blügel, F. Freimuth, G. Géranton, M. Gibertini, D. Gresch, C. Johnson, T. Koretsune, and et al.,  32, 165902 (2020).
  * Dragoni  _et al._ (2020) A. Dragoni, B. Sklénard, V. Olevano, and F. Triozon, Physical Review B 101, 075402 (2020).
  * Togo, Chaput, and Tanaka (2015) A. Togo, L. Chaput, and I. Tanaka, Phys. Rev. B 91, 094306 (2015).
  * Kresse and Furthmüller (1996) G. Kresse and J. Furthmüller, Physical Review B 54, 11169–11186 (1996).
  * Kresse and Joubert (1999) G. Kresse and D. Joubert, Physical Review B 59, 1758–1775 (1999).
  * Matsunaga, Yamada, and Kubota (2004) T. Matsunaga, N. Yamada, and Y. Kubota, Acta Crystallographica Section B: Structural Science 60, 685–691 (2004).
  * Park  _et al._ (2009) J.-W. Park, S. H. Eom, H. Lee, J. L. F. Da Silva, Y.-S. Kang, T.-Y. Lee, and Y. H. Khang, Physical Review B 80, 115209 (2009).
  * Lee  _et al._ (2013) J. Lee, E. Bozorg-Grayeli, S. Kim, M. Asheghi, H.-S. Philip Wong, and K. E. Goodson, Applied Physics Letters 102, 191911 (2013).
  * Lyeo  _et al._ (2006) H.-K. Lyeo, D. G. Cahill, B.-S. Lee, J. R. Abelson, M.-H. Kwon, K.-B. Kim, S. G. Bishop, and B.-k. Cheong, Applied Physics Letters 89, 151904 (2006).
  * Tominaga  _et al._ (2014) J. Tominaga, A. V. Kolobov, P. Fons, T. Nakano, and S. Murakami, Advanced Materials Interfaces 1, 1300027 (2014).
  * Chen  _et al._ (2018b) W. Chen, G. Miceli, G.-M. Rignanese, and A. Pasquarello, Physical Review Materials 2, 073803 (2018b).
  * Lee  _et al._ (2005) B.-S. Lee, J. R. Abelson, S. G. Bishop, D.-H. Kang, B.-k. Cheong, and K.-B. Kim, Journal of Applied Physics 97, 093509 (2005).
  * Takaura  _et al._ (2014) N. Takaura, T. Ohyanagi, M. Tai, M. Kinoshita, K. Akita, T. Morikawa, H. Shirakawa, M. Araidai, K. Shiraishi, Y. Saito, and J. Tominaga, in  _2014 IEEE International Electron Devices Meeting_ (2014) pp. 29.2.1–29.2.4.
  * Nakamura  _et al._ (2017) H. Nakamura, I. Rungger, S. Sanvito, N. Inoue, J. Tominaga, and Y. Asai, Nanoscale 9, 9386–9395 (2017).
  * Mukhopadhyay, Lindsay, and Singh (2016) S. Mukhopadhyay, L. Lindsay, and D. J. Singh, Scientific Reports 6, 37076 (2016).