# The nontrivial effects of annealing on superconducting properties of Nb
single crystals

Amlan Datta  Kamal R. Joshi  Giulia Berti  Sunil Ghimire  Aidan Goerdt
Makariy A. Tanatar  Deborah L. Schlagel  Matthew F. Besser  Dapeng Jing
Matthew Kramer  Maria Iavarone  Ruslan Prozorov<EMAIL_ADDRESS>
###### Abstract

The effect of annealing on the superconducting properties of niobium single
crystals cut from the same master boule was studied by local and global
magnetic measurements, as well as scanning tunneling microscopy (STM). The
formation of large hydride precipitates was observed in unannealed samples.
The variation in structural and magnetic properties was studied after
annealing under high vacuum at 800 for 3 hours, 1400 for 3 hours, and near the
melting point of niobium (2477 ) for a few seconds. The initial samples had a
high hydrogen content. Low-temperature polarized optics and magneto-optical
studies show that the formation of large niobium hydride precipitates is
suppressed already by 800 +3 h annealing. However, the overall superconducting
properties in the annealed samples did not improve after annealing, and in
fact, worsened. In particular, the superconducting transition temperature
decreased, the upper critical field increased, and the pinning strength
increased. Parallel studies were conducted using STM, where the sample was
annealed initially at 400 , measured, annealed again at 1700 , and measured
again. These studies revealed a “dirty” superconducting gap with a significant
spatial variation of tunneling conductance after annealing at 400 . The clean
gap was recovered after annealing at 1700 . It is likely that these results
are due to oxygen redistribution near the surface, which is always covered by
oxide layers in as-grown crystals.

Overall, the results indicate that vacuum annealing at least up to 1400 ,
while expected to remove a large amount of hydrogen, introduces additional
nanosized defects, perhaps hydride precipitates, that act as efficient pair-
breaking and pinning centers. The dimensionless scattering rate is estimated
to have increased from $\Gamma=0.2$ to about $\Gamma=0.4$ after annealing at
1400 . These results on single crystals differ drastically from those from
polycrystalline bulk niobium (i.e. cut from superconducting radio-frequency
(SRF) cavities), where annealing has significant positive effects that are
attributed to the improvement of crystalline structure masking the more subtle
influence of the hydrides.

[Ames]organization=Division of Materials Engineering, Ames National
Laboratory, city=Ames, postcode=50011, state=IA, country=U.S.A.

[ISUPhysics]organization=Department of Physics & Astronomy, Iowa State
University,city=Ames, postcode=50011, state=IA, country=U.S.A.

[Temple]organization=Department of Physics, Temple University,
city=Philadelphia, postcode=19122, state=PA, country=U.S.A.

##  1 Introduction

Macroscopic quantum coherence makes superconductors highly appealing for
quantum information science (QIS) [1, 2, 3, 4, 5, 6, 7] and accelerator-
related technologies [8, 9, 10]. Niobium is a frequently used superconductor
due to its high thermal conductivity at low temperatures in the normal state,
the highest superconducting transition temperature $T_{c}\approx
9.35\>\mathrm{K}$ among elemental metals, and the ability to carry microwaves
with minimal losses in its superconducting state [11, 12, 13, 14, 15, 16, 17,
18]. These properties make niobium a good choice for Josephson junction-based
qubits in thin-film two-dimensional (2D) architecture [19] and superconducting
radio-frequency (SRF) cavities traditionally used in particle accelerators
[20, 21, 22, 23, 24, 25, 26], but more recently in quantum informatics
applications in cavity quantum electrodynamics (cQED) modes [27, 28, 29].
Since its discovery in the 1930s [30], elemental niobium has become one of the
most studied superconductors [12, 31]. However, there are still fundamental
aspects of niobium properties that necessitate further investigation, both
experimental and theoretical. Recent examples are first-principles
calculations of its anisotropy in normal and superconducting states [32], and
derived from this work the suggestion that, intrinsically, the clean limit
niobium is a type-I superconductor [33].

Like all refractory metals, niobium presents some physical-chemical challenges
that can complicate or even obstruct its use in applications. For example, one
of the most critical issues in Nb SRF cavities is the so-called “hydrogen
$Q-$disease” - a significant reduction in the quality factor $Q$, apparently
due to niobium hydrides [34, 35, 36]. Niobium has a significant affinity for
hydrogen and can be charged up to five atomic percent [37, 38, 39, 40, 41].
Hydrogen may come from various hydrogen-rich sources, for example, during
liquid-assisted cutting and polishing, and even from ambient moisture. Since
all applications related to the superconducting state of niobium require
cooling to low temperatures, it is important to understand the formation of
various phases, in particular, niobium hydrides and their effect on the
superconducting properties [38, 42, 35, 36, 43]. In addition, hydrogen is a
possible source for two-level systems (TLS), e.g., quantum systems that can
exist with the quantum superposition of two independent states, which are the
main sources of quantum decoherence in QIS-related devices and structures. The
study of TLS-related losses represents a significant portion of contemporary
research in applied superconductivity [44, 45, 46].

A traditional approach to the removal of contaminants from metallic solids is
heat treatment. Despite a very large body of work, in the case of niobium,
there is still significant uncertainty in understanding the evolution of
properties with annealing performed at different temperatures and following
different protocols. Moreover, device-oriented studies were mostly performed
on polycrystalline samples of bulk niobium cut from SRF cavities or whole
cavities. In these cases, significant variations in superconducting properties
are dominated by re-crystallization, grain growth, fusion, inter-diffusion and
other major morphological and structural changes [47, 48, 49, 15, 50]. Single
crystals are a good baseline for studying the more subtle effects of hydrogen
and other contaminants. Indeed, this aspect was already well understood in the
1960s [47, 48]. The novelty of the present work lies in the experimental
methods used.

In an unannealed sample with a high load of hydrogen, niobium hydrides of
various shapes form below 190 K as very large precipitates, up to hundreds of
micrometers in size, easily visible in an optical microscope [42, 36, 43]. If
the hydrogen load is not large, round or square precipitates of sub-micrometer
size are formed, leading to local plastic deformations and nucleation of
interstitial prismatic dislocation loops [38].

It was reported that after annealing at 800 in vacuum for a few hours, a
significant amount of hydrogen was removed and it was assumed that niobium
hydrides no longer pose a problem [39, 51, 35, 22]. However, in this paper, we
show that other superconducting properties indicate a reduced performance
after annealing at intermediate temperatures (compared to the melting point),
likely because of a continuing detrimental influence of residual hydrogen in
the system. Diffusion of oxygen from the surface to the bulk is also possible.
However, it is unlikely that a few nanometer thick surface oxide layers can
provide enough oxygen to affect the bulk properties of thick crystals. A
simple estimate shows that if all oxygen from, say, 5 nm thick oxide layers
covering a $1\times 1\times 1\>\textrm{mm}^{3}$ diffuses in, it will produce a
volume atomic percentage of less than $1\times 10^{-4}$ at.$\%$, which is
negligible. We also note that many earlier studies used annealing near and
above 2000 as a starting point to obtain high-quality samples with a high
residual resistivity ratio, $R(300\,\textrm{K})/R(T_{c})>100$ [12, 37, 38,
52]. On the other hand, it is important to look for approaches that are as
simple as possible, but still produce acceptable results. This is especially
important for potential applications and mass production of devices. For
example, annealing at 2300 requires quite specialized thermal and vacuum
equipment and is much more difficult to carry out compared to annealing at 800
.

In this paper, we study the effects of annealing at 800 , 1400 , 1700 and near
the melting point of Nb (2477 ) on the superconducting properties of single
crystals of niobium, all cut from the same single crystal boule. The results
suggest that each potential application should develop its own optimized
annealing protocol. For example, contrary to common sense, large hydrides are
not too detrimental to the overall superconducting properties of the
surrounding material but certainly impact the total surface impedance, crucial
for SRF cavities. We find that annealing at intermediate temperatures leads to
a reduction in superconducting performance manifested in suppression of the
transition temperature, $T_{c}$, an inhomogeneous ”dirty” superconducting gap
with in-gap states, an increase in the upper critical field, $H_{c2}$, and
elevated pinning. Therefore, our findings have important implications for the
development of a wide spectrum of niobium-based superconducting devices, both
for accelerators and for quantum informatics applications.

##  2 Material and methods

###  2.1 Niobium single crystals

Niobium single crystals were cut from a large single crystal boule
(approximately $12\times 12\times 50\>\mathrm{mm^{3}}$) grown at the Materials
Preparation Center at the Ames National Laboratory in 1989. This original
single crystal boule was grown from a high purity polycrystalline Nb using an
arc-zone melting technique with the resultant orientation of the long axis
within 2°of [310] direction [53]. Laue diffraction study indicated a high
degree of crystallinity of the sample. The sample morphology was further
studied using high-resolution electron microscopy [54].

The master crystal has been stored on a shelf since then. Multiple smaller
samples were cut from the boule over the years using different methods. The
original cuts used electrical discharge machining (EDM) with a paraffinic
hydrocarbon as the cooling fluid. The samples for our study were cut using a
diamond wire saw with Rock-Oil as lubricant. The final polishing / etching
steps included vibratory polishing in a suspension of alumina;
electropolishing in a dilute aqueous solution of 5% aqua regia; acid etching
in a solution of hydrochloric acid mixed with hydrogen peroxide. At least some
of these etchants (i.e. hydrochloric acid) remove niobium oxide, enabling
access to the fresh metal surface. Therefore, as a result of handling, storage
and many hydrogen-containing chemicals involved, the initial, ”as-grown”
single crystals had a high level of hydrogen, which was readily identified
when large formations of niobium hydride were observed at the first cooling
below 190 K.

The samples studied were shaped as flat cuboids with the two largest
dimensions of the order of 3-5 mm and a thickness of 1-2 mm. For this work,
the orientation of the crystals was not important, although we know that we
had [100] and [110] directions perpendicular to flat faces.

It is crucial to control and record the first cooling. If a sample was cooled
for measurements prior to annealing, large niobium hydride precipitates formed
below 190 K. Some were up to 100 µm in size and had different shapes: cubes,
four-point stars, boomerangs, chicken feet, worms, and droplets. Figure 1
shows polarized light images of the variety of morphologies observed. Panel
(a) shows the $100-150\,\micro\mathrm{m}$ long surface formations. Apparently,
they are so large that they irreversibly deform the crystal lattice. When
warmed up, the remnants (which we call “scars”, other papers “skeletons” [38])
of this significant plastic deformation are clearly visible, as shown in
Fig.1(b). We found that these scars on the surface cannot be removed by
annealing at any temperature and require re-polishing or re-melting to be
removed from the surface. Figure 1(c,d,e) shows polarized light images of
different crystals at 4 K. No systematic direct correlation was found between
the crystallographic orientation and the shape of the hydrides. Figure 1 (a),
(b) and (c) shows samples that are [100] oriented perpendicular to the page;
(d) and (e) are [110] oriented. The shape of the hydride precipitates is
probably determined by some residual strain from the crystal growth and
depends on where the particular crystal was located inside the master boule.

Figure 1: Large hydride precipitates in niobium single crystals observed in a
linearly polarized light microscope. (a) After cooling to $T=4\>\mathrm{K}$
and (b) when the same sample was warmed up to room temperature showing the
scars left by large hydrides formed upon first cooling. (c,d,e) Images of
different crystals at $T=4\>\mathrm{K}$. No systematic correlation between the
crystallographic orientation and the shape of hydrides is found. (a), (b) and
(c) are [100] oriented perpendicular to the page; (d) and (e) are [110]
oriented.

###  2.2 Heat treatment

Different types of annealing protocols were used for the comparative study
using optical and magnetization methods. Two protocols involved vacuum
annealing at 800 and 1400 , respectively. A separate protocol was used for STM
studies whose main purpose was to remove the surface oxide layer. One of the
STM samples was partially melted in an ultra-high vacuum (UHV) chamber, with a
base pressure of $1\times 10^{-11}$ torr, during an attempt to remove surface
oxygen and was then subjected to optical and magnetic measurements.

One Nb single crystal was first measured at low temperatures and then annealed
at 800 for three hours, and measured again. The crystal was spot-welded onto a
tantalum sample plate using tantalum wires and then loaded into an Omicron
ultra-high vacuum (UHV) chamber for cleaning and annealing. The base pressure
of the UHV chamber is $2\times 10^{-11}$ torr. Before vacuum annealing, the
sample was sputtered with a 1 kV monoatomic Ar+ beam to remove surface
contamination and the native oxide layer. After removal of carbon and oxygen,
confirmed by X-ray photoelectron spectroscopy, the sample was annealed in UHV
at 800 for 3 h. Heating to 800 at a rate of 6 /min took roughly 2 hours;
cooling was faster, at 10 /min.

Four other crystals were annealed simultaneously in one run. The crystals were
tightly wrapped in tantalum foil and put together in an alumina crucible. The
chamber was evacuated using a diffusion pump down to $1\times
10^{-11}\,\textrm{torr}$. The heating and cooling ramp rates were 700 per
hour. The furnace was heated to 1400 and held there for 3 hours. The next day,
after the furnace completely cooled overnight, still actively maintaining a
high vacuum, the chamber was back-filled with dry air for passivation to
facilitate the formation of the surface oxide layer for protection from
moisture. For the planned ”global” measurements that obtain the signal from
sample volume, this a few nanometers thick layer did not contribute. Samples
were quickly moved to the glovebox, unwrapped, and placed in their containers.
Each sample was exposed to air for only a few minutes maximum before
measurements. The following four samples were made. Sample A: $5.56\times
2.91\times 0.90\,\mathrm{mm^{3}}$, [110] normal to the flat face. This sample
was not cooled prior to vacuum annealing at 1400 for 3 hours. No hydrides were
observed in optical microscopy when the sample was cooled after annealing.
Sample B: $5.56\times 3.44\times 0.90\>\mathrm{mm^{3}}$, [110] normal to the
flat face. (Step 1) Cooled to 4 K and measured before any annealing. Polarized
light imaging, as well as magneto-optical imaging, revealed large hydrides
that appeared during the first cooldown at 190 K. (Step 2) The sample was
annealed at 1400 . When cooled again, no large hydrides were observed in
optical microscopy. However, the scars left by the hydrides formed in Step 1
were clearly visible. Sample C: $3.12\times 3.00\times 1.09\>\mathrm{mm^{3}}$,
[111] normal to the flat face. (Step 1) Similar to sample B, cooled first
before any annealing. Low temperature measurements revealed large hydrides;
(Step 2) Annealing at 800 for 3 hours. After this annealing, visible hydrides
did not appear, but their remnants (scars) remained. (Step 3) The sample was
annealed at 1400 together with samples A and B. Again, no hydrides were
observed optically. The scars from the hydrides formed in Step 1 were still
visible and did not change visually from Step 2. Sample D: $4.00\times
2.50\times 1.50\>\mathrm{mm^{3}}$, [100] normal to the flat face. (Step 1)
Cooled to 4 K and measured before annealing. Low-temperature imaging revealed
large hydrides. (Step 2) [accidental] annealing in UHV at 2477 for several
seconds during the attempt to remove surface oxygen for tunneling studies.
Part of the sample melted, but part remained solid. We were able to cut out
and measure this part. Visible hydrides were not observed after cooling.
However, the appearance of scars left by large hydrides from Step 1 was
practically unchanged, indicating that only a complete re-melting can remove
those plastic deformations of the crystal lattice.

The annealing process for the samples studied with STM was conducted within a
UHV chamber directly attached to the STM chamber. This setup facilitated the
transfer of samples to the STM without the need to break the vacuum. Using
this method, the sample surface was preserved, effectively preventing
contaminations that could affect STM measurements. The treatment here aimed to
remove any adsorbed material and, in particular, the surface oxide layer. A Nb
(100) single crystal was mounted on an e-beam sample holder made of tantalum
and cleaned with sputtering and annealing cycles in an ultra-high vacuum (UHV)
system with a base pressure of low $1\times 10^{-11}\,\textrm{torr}$. Inside
the UHV system, the sample was first sputtered for approximately 2 hours at
room temperature at 1.5 keV under a partial argon pressure of $1\times
10^{-5}\,\textrm{torr}$. The sample was then slowly heated for several hours
until the maximum temperature of 400 was reached at which the sample was kept
for a maximum of 10 minutes. The temperature of the sample was measured using
an optical pyrometer set outside the UHV chamber. After this treatment, the
sample was transferred to the attached STM chamber for STM investigation.

After STM measurements, the sample was transported again to the room
temperature UHV chamber, without breaking the vacuum, for another sputtering
cycle and several annealing cycles up to 1700 . During each flash annealing,
the pressure in the UHV chamber was kept below $8\times
10^{-8}\,\textrm{torr}$.

###  2.3 Experimental Methods

####  2.3.1 Low-temperature polarized optics and magneto-optics

Optical studies were performed in a low-temperature polarized light setup
consisting of the closed-cycle optical cryo-station Model-s50 from _Montana
Instruments_ and the _Olympus BX3M_ optical system with long focal length
objectives. The sample was placed on top of a gold-plated cold finger inside
the vacuum chamber and could be directly observed through two optical windows.
This completely closed-cycle system allows controlled measurements from 3.8 K
and up to room temperature. Optical characterization was performed in two
modes. (1) Direct study of the sample surface in a polarized light microscope
with nearly crossed polarizer and analyzer axes, which greatly enhanced the
contrast of surface features. We refer to this measurement simply as
”polarized optics” (PO). In particular, large hydride formations are clearly
observable, as is shown in Fig.1. (2) The second mode is based on the magneto-
optical Faraday effect, and we call it a ”magneto-optical” (MO) study. Here,
we use specially fabricated magneto-optical indicators, multilayered
structures with the active ferrimagnetic bismuth-doped iron-garnet layer with
in-plane magnetization. A gold or aluminum mirror layer is deposited at the
bottom to reflect incident light back to the objective. The indicator is
placed on top of the sample studied. Linearly polarized light propagates
through the transparent magnetic layer, reflects from the mirror, and returns
to the objective. As a result, it acquires a double (light travels the
thickness twice) Faraday rotation by an angle proportional to the component of
magnetization along the light path. This $z-$component of magnetization
appears only in response to the $z-$component of the magnetic induction on the
sample surface. Therefore, a two-dimensional picture revealed by this double
Faraday effect in the garnet maps the distribution of the $z-$component of the
garnet magnetization, which in turn mimics the distribution of the
$z-$component of the magnetic induction on the sample surface. In all images,
brighter corresponds to higher magnetic induction. Black is a complete
screening, $B=0$. More details can be found elsewhere[16].

####  2.3.2 Magnetic measurements

Magnetization was measured using a _Quantum Design_ vibrating sample
magnetometer (VSM) in a 9 T _Quantum Design_ Physical Property Measurement
System (PPMS). The instrument allows true sweeping of the external magnetic
field at a controlled rate, which is very useful for studies of flux dynamics
in superconductors. To minimize the differences in the out-of-plane
demagnetizing factors, all samples were measured with a magnetic field applied
along the extended surface. The total measured magnetic moment, $m$, was
normalized, $M=\gamma m$, to obtain the magnetization $M$ in gauss. Here, the
calibration constant $\gamma=4\pi\left(1-N\right)/V$, where $V$ is the volume
of the sample in cm3. The demagnetizing factor, $N$, of a cuboidal sample with
dimensions $a\times b\times c$, along the $c-$axis, is given by,
$N_{c}\approx\left(1+3c\left(a^{-1}+b^{-1}\right)/4\right)^{-1}$[55].
Comparing the calibration factor $\gamma$ with the slope of the initial
magnetization at low temperatures, $-d\left(4\pi m\right)/dH$, we found
excellent numerical agreement for all samples.

####  2.3.3 Scanning tunneling microscopy (STM)

STM measurements were performed in a Unisoku STM system. Pt-Ir tips were used
in all experiments. They were tested on Au (111) films before imaging the Nb
single crystal. Spectroscopic measurements of differential conductance were
performed with a lock-in technique with an ac modulation of 0.2 mV and a
frequency $f=373.1\>\mathrm{Hz}$ superimposed on the sample bias at
$T=1.5\>\mathrm{K}$.

##  3 Results

###  3.1 Polarized Optical and Magneto-optical imaging

First, we show the variety of different morphologies of niobium hydrides in
single crystals cooled before any annealing. Polarized light images of the
sample surface are presented in Fig.1. The (false) green color is due to the
green-light monochromatic filter used for all our magneto-optical imaging. The
natural appearance of the niobium crystals is metallic-gray.

Figure 2: Magneto-optical images of the trapped (remnant) magnetic flux in Nb
single crystals. (a,b,d) Samples were cooled in a 400 Oe magnetic field to 4
K, then the field was turned off and the image recorded. (c) The same protocol
but cooling in a 320 Oe field to 8 K then the field was turned off. Panels
(a,b) are [100] oriented, (c,d) are [110] oriented. (We emphasize that sample
surface is not visible in magneto-optical images, since there is a mirror
sputtered at the bottom of the magneto-optical indicator.)

Figure 2 shows the magneto-optical image of the remnant (trapped) magnetic
flux. These are the same crystals as those used to compose the image in Fig.1.
In the experiment, a few hundred oersted magnetic fields was applied above the
superconducting transition temperature, the sample was cooled down, and the
magnetic field was turned off. Due to omnipresent pinning, the superconductor
retains a large amount of magnetic flux in the form of Abrikosov vortices. The
images in frames (a), (b) and (d) show trapped flux when a magnetic field was
turned off at 4 K, whereas in image (c) the magnetic field was turned off at 8
K. Frames (a), (b), and (d) show a fairly uniform background flux
distribution, indicative of low pinning. The large hydrides are clearly
visible. They are (likely) not superconducting, but they appear bright because
they trap magnetic flux, as would any cavity surrounded by the supercurrents.
Frame (c) shows a greater variation of the flux density, indicating greater
inhomogeneity at temperatures approaching $T_{c}$. (We emphasize that the
sample surface is not visible in magneto-optical images, since there is a
mirror sputtered at the bottom of the magneto-optical indicator.)

Now we examine the process of nucleation of large hydrides upon cooling.
Figure 3 shows the series of polarized light images taken at different
temperatures in sample B that was cooled before subsequent annealing at 1400 .
The upper row of Fig.3 shows that the first detectable hydrides appear around
187 K. Hydrides grow fast in size and stabilize at 150:K, without any changes
thereafter. The bottom row shows the same sample B after it was annealed at
1400 . At all temperatures, some scars from the hydrides can be seen, but no
actual formation of new hydrides is observed.

Figure 3: Polarized light imaging of sample B at different temperatures. Top
row: appearance of niobium hydrides at around 187 K, their quick growth and
stabilization already at 150 K. An arrow points to the first hydride we could
resolve visually at 187 K. Bottom row: similar imaging but after annealing at
1400 . No visible hydrides are formed, but the scars are visible at all
temperatures.

We now examine sample A, which was first annealed at 1400 and only then was it
cooled for the first time. The result is shown in Fig.4. The upper row of
Fig.4 shows the sequence of polarized light images recorded at different
temperatures that show no visible change and therefore no signature of the
formation of large hydrides. The bottom row of Fig.4 shows magneto-optical
imaging in the superconducting state. The first two images were obtained after
cooling the sample in a zero magnetic field to 4 K and applying the indicated
magnetic field to study flux penetration. This is known as the zero-field-
cooled (ZFC) process. The last two images were taken in the same magnetic
field, but the sample was first cooled in the indicated magnetic field to 4 K,
and then this field was removed to reveal the trapped magnetic flux. This is
known as the field-cooled (FC) remanent state. These two types of magneto-
optical imaging are used to estimate the magnetic flux gradient, hence the
shielding persistent current density, which allows us to discuss the pinning
strength in the material.

Figure 4: Imaging of sample A annealed at 1400 before first cooling. Top row:
no hydrides are visible in the polarized light optical images at any
temperature upon cooldown. Bottom row: no hydrides are observed in magneto
optical imaging. Two left frames of the bottom row show magnetic flux
penetration when 320 Oe and 400 Oe were applied after zero-field cooling to 6
K, respectively. Two right frames show remanent trapped magnetic flux after
the sample was first cooled to 4 K in the indicated magnetic field, then the
magnetic field was turned off and the image recorded.

Finally, Fig.5 compares flux penetration and flux trapping before (top row)
and after (bottom row) annealing. The left column shows the penetration of
magnetic flux in a magnetic field of 400 Oe applied after cooling in a zero
field to 8 K. The large hydride precipitates are clearly visible in a sample
prior to annealing. It appears that these hydride formations do not hinder
flux penetrations, which is natural considering their large size being
irrelevant for the pinning of vortices. The flux front reaches much further
into the sample before annealing at 1400 , top left image of Fig.5. The flux
penetrates to a much smaller depth after annealing, which indicates a stronger
pinning. This is unexpected after annealing, which usually reduces the pinning
strength. The second column of Fig.5 shows trapped magnetic flux after the
sample was cooled in a 400 Oe magnetic field to 4 K and the field was turned
off. Again, the hydrides in the sample before annealing do not seem to play
any role in determining the flux distribution. The image after annealing shows
a large amount of trapped flux, again consistent with elevated pinning.

Note that spatially resolved vortex pinning on hydrides was studied by Bitter
decoration forty years ago [42]. Interestingly, in that study the researchers
could not determine whether the hydrides were normal or superconducting. They
found that vortices enter the hydride precipitates in integers of a magnetic
flux quantum. Of course, even in a normal cavity embedded in a superconductor
bulk, the magnetic flux is quantized. Bulk niobium hydrides are not
superconducting. However, small hydrogen-rich precipitates could become
superconducting by the superconducting proximity effect with the niobium
matrix. This question deserves further microscopic study, perhaps using STM
and other scanning magnetic probes.

Figure 5: Magneto-optical images of a sample before (top row) and after
(bottom row) the annealing at 1400 . The first column shows magnetic flux
penetration after zero-field cooling to 8 K whence a 400 Oe magnetic field was
applied. The second column shows the remanent trapped magnetic flux after
cooling to 4 K in a 400 Oe magnetic field and turning the field off.

In summary, polarized optics and magneto-optical studies of single crystals
before and after annealing show that already 800 treatment prevents the
formation of large visible niobium hydrides. However, this cannot be taken as
evidence that all hydrogen was removed by this treatment. The magneto-optical
images reveal that contrary to expectations, vortex pinning not only did not
decrease but actually increased following the annealing process. This means
that large hydrides do not interact magnetically with the surrounding niobium
matrix. Annealing surely removes a large percentage of hydrogen, leading to
the disappearance of these large hydride formations. However, some dilute
uniformly distributed background hydrogen remains, and its density might even
increase after annealing, leading to the formation of efficient pinning
centers with sizes that match the coherence length. To investigate this
hypothesis, we turn to magnetic measurements.

###  3.2 Magnetization

Figure 6: Magnetization loops measured at a 1 K interval between 2 and 9 K in
samples A, B and C. In all frames, vertical and horizontal scales are the
same, which allows for a visual comparison of the magnitude of magnetization
before and after annealing. Evidently, only partial melting forced a
substantial change.

Magnetization loops recorded at temperatures from 2 K to 9 K with a 1 K
interval are shown in Fig.6. To enable visual comparison, the loops are
plotted using the same vertical and horizontal scales. The largest effect is
observed in the partially melted sample, where the irreversible part of
magnetization (the difference between the descending and ascending branches)
is drastically reduced, indicating a significant decrease in the pinning
strength. In contrast to this expected behavior, in annealed samples, the
pinning did not decrease and even increased slightly after annealing, which
defies common sense. Especially since previous studies of polycrystalline
niobium showed a significant reduction in pinning strength after annealing
[41, 39]. Naturally, it was interpreted to be due to significant morphological
changes during annealing leading to a more perfect crystal structure,
unrelated to the pining of vortices on impurities, which dominates our
measurements.

A pronounced pinning-related feature of Fig.6(a,b,c) is the observation of
thermomagnetic instabilities [56, 16]. These sudden magnetic flux jumps occur
when the critical current density is large and heat dissipation from fast-
moving vortices has nowhere to dissipate, resulting in a catastrophic
thermomagnetic runaway. This may even lead to a total collapse of the critical
state, so large that jumps in sample temperature could be measured [16].
Unfortunately for superconducting applications, niobium is prone to
thermomagnetic instabilities more than any other superconductor. This
instability is observed for all sample geometries and degree of crystallinity,
including polycrystalline bulk, thin and thick foils, and thin films [56, 16,
57].

Figure 7: Comparison of $M(H)$ loops at (a) 2 K and (b) 5 K of the studied
samples. The flux jump magnitude is the largest in sample A which was annealed
before being cooled down. Inset in (a): detail of the higher field region
showing that the upper critical field is the largest in the annealed sample A,
followed by the annealed sample B and, finally, by the as-grown sample B
confirming a commensurate sequence of non-magnetic scattering strength.

We further look at the magnitude of thermomagnetic instabilities in Fig.7
comparing magnetization loops of all samples at 2 K in panel (a) and at 5 K in
panel (b). The absence of flux jumps at 5:K confirms that their intrinsic
nature is not related to any issues with sample structure or morphology.
Clearly, sample A (bright green line) shows the largest avalanches indicative
of stronger pinning. Sample B after annealing (red line) shows intermediate
jump amplitudes compared to the smallest jumps in sample B before annealing
(black line). The partially melted sample shows the smallest hysteresis and no
thermomagnetic instabilities consistent with a complete removal of hydrogen,
hence the sources of pinning.

Another feature of Fig.7 is the evolution of the upper critical field,
$H_{c2}$. The inset in Fig.7(a) zooms in on the higher field region, showing
that the upper critical field is the largest in annealed sample A, followed by
annealed sample B, and finally by as-grown sample B. Previous studies found
that $H_{c2}$ is insensitive to structural parameters such as tension and
plastic deformation in crystals [47]. In theory, $H_{c2}$ is linearly
proportional to the non-magnetic scattering rate [58, 59] and this observation
means that this rate increase after annealing points to the proliferation of
nanosized defects that can act as efficient scattering centers.

Figure 8: Comparison of the temperature dependent magnetic susceptibility,
$\chi(T)$, of the studied samples. For each sample, both ZFC and FC traces are
shown. Note that annealing reduces the transition temperature. Only the
partially melted sample has recovered the original transition.

Another important parameter sensitive to the scattering rate is the
superconducting transition temperature $T_{c}$. The anisotropy of the
superconducting state of niobium has recently attracted significant attention,
because of this anisotropy even non-magnetic scattering is pair-breaking,
which is detrimental to the performance of QIS hardware [32]. Experimental
studies confirm the theory [59].

Figure 8 shows magnetic susceptibility as a function of the temperature
recorded in the studied samples at 10 Oe. Each sample was first cooled to 2 K
in zero field and a 10 Oe magnetic field was applied. Then, the magnetization
was measured on warming. After reaching temperatures above $T_{c}$, the
measurements continued on cooling in the same magnetic field of 10 Oe. Due to
almost perfect shielding of a weak 10 Oe magnetic field at 2 K after ZFC, the
magnetic susceptibility was set at -1 at that point, providing a natural
calibration to the whole ZFC-FC curve.

As can be easily seen in Fig.8, annealing reduces the transition temperature.
Only the partially melted sample has recovered the original transition. At the
same time, the initial curve of sample B measured before annealing shows the
highest $T_{c}=9.2\;\mathrm{K}$. As we have already concluded, this indicates
that large hydrides are not effective pair-breakers and do not lead to the
reduction of $T_{c}$ seen. Instead, the evidence from magneto-optical and
magnetization measurements for the enhanced pinning resulting from the
increase of $H_{c2}$, which led to an increase of the non-magnetic scattering
rate, together with a suppression of $T_{c}$, points to the proliferation of
nanosized scattering/pinning centers as a result of annealing. The only
candidates that we can think of are nano-hydrides. Of course, we cannot
exclude some additional influence of oxygen ions that might have diffused into
the bulk from the surface. However, the minuscule total amount of surface
oxygen is not expected to have an impact on the bulk properties of the large
single crystals studied here.

We also note that magnetic susceptibility values after field cooling to low
temperatures are comparable for all samples, except for the partially melted
sample. This reversible component is determined by the competition between
Meissner expulsion and flux pinning, and this indicates that substantial
changes could only be obtained after annealing at a very high temperature.

###  3.3 Scanning tunneling microscopy (STM)

Figure 9: (a) STM topography image of a Nb (100) single crystal after
annealing at 400 . The topography has been acquired with tunneling conditions:
$I=30\,\mathrm{pA}$, $V=1.0\,\mathrm{V}$. (b) Nb (100) topography after
annealing at 1700 clearly showing a $(3\times 1)$ oxygen reconstruction.
Tunneling conditions were: $I=30\,\mathrm{pA}$, $V=1.4\,\mathrm{V}$. (c)
Typical tunneling spectra acquired at $T=1.5\,\mathrm{K}$ on the two surfaces
shown in panels (a) and (b). Tunneling conditions were $I=60\,\mathrm{pA}$,
$V=10\,\mathrm{mV}$, and a lock-in modulation $V=0.2\,\mathrm{mV}$, and
frequency $f=373.1\,\mathrm{Hz}$.

To examine the effect of annealing on the intrinsic superconducting properties
and their (in)homogeneity at the atomic level, we conducted a scanning
tunneling microscopy (STM) study. Importantly, the sample for the STM study
was cut from the same master boule as the rest of the samples in this study.
In the case of STM, surface condition plays a crucial role. To address this,
STM samples were treated in separate procedures described in the experimental
section. In addition to hydrogen, niobium has a high affinity for oxygen. Bulk
oxygen impurities reduce the superconducting transition temperature of Nb at a
rate of 1 K per atomic percent [60]. It is important to note that this study
involved annealing in an oxygen-rich atmosphere, which is different from the
present research where oxygen is only available in the surface oxide layers.

In the case of samples handled under normal laboratory conditions, the surface
of Nb exposed to the atmosphere is always covered by a complex oxide layer of
a few nanometers thick [61, 62]. An atom-probe study showed that oxygen
diffuses to a depth of up to 10 nanometers from the surface, while hydrogen
and niobium hydrides are present much deeper, essentially over the entire
depth of their study of about 80 nm [61]. Complete removal of niobium hydrides
appears possible by annealing under ultra-high vacuum at temperatures higher
than 2000 and more (melting point of Nb is 2477 ) [47, 63]. However, it is
unknown whether surface oxygen can be completely removed without melting the
sample.

In an initial experiment, the Nb (100) crystal was annealed at 400 . Figure
9(a) shows a topography image of a scan area of $47\times 47\>\mathrm{nm^{2}}$
showing a root mean square roughness of $1.5\>\mathrm{nm}$. At this stage, the
complex surface oxide is expected to be metallic disordered NbOx. In the next
step, the same Nb (100) crystal was annealed at 1700 . Figure 9(b) shows a
$28\times 28\>\mathrm{nm^{2}}$ topographic image of the reconstructed
$(3\times 1)$ oxygen structure of the NbO (100) layer on Nb (100) [63]. In
Fig. 9(c), characteristic tunneling spectra acquired on these two surfaces at
$T=1.5\>\mathrm{K}$ are shown. In the sample annealed at 400 a significantly
broadened tunneling spectrum is observed with a reduced gap of 1.35 meV (black
curve). Although disordered oxygen ions near the surface occupied by a few
nanometer thick NbOx certainly play a significant role [64], it is plausible
that nanosized hydride precipitates further smear the tunneling curves. In the
case of the sample annealed at 1700 the conductance below the gap drops to
zero and the superconducting gap is 1.55 meV (blue curve). No spatial
variations in tunneling spectra were observed in the sample annealed at 1700 ,
while the gap varied significantly on the surface of the same sample annealed
at 400 . It is quite possible that after this relatively low temperature
annealing, intermediate-sized hydrides are formed, leading to a significant
spatial variation when observed in a relatively small STM scan frame. However,
oxygen redistribution near the surface must also play a significant role. A
conductance map at the Fermi level acquired on this sample is shown in Fig.
10(a). Figure 10(b) shows the select conductance curves ranging from lower
conductance (cleaner gap), shown by the blue curve, to areas of higher
conductance, shown by the green curve. The map in Fig. 10(a) also shows
nanometer-sized regions with much higher levels of conductance at Fermi
energy, shown by the orange and red spectra in Fig. 10(c). These in-gap
states, exhibiting conductance levels exceeding that of normal metals, suggest
the presence of localized magnetic impurities[65, 66, 67]. These impurities
are likely associated with vacancies in the disordered NbOx top layer or in
regions where the pentoxide has not been completely removed.

Figure 10: (a) Conductance map at the Fermi energy acquired on the surface of
a Nb (100) single crystal after annealing at 400 . (b) Tunneling spectra,
$dI/dV$, as function of the bias voltage, $V$, acquired on the regions with
the lowest conductance (blue) and on the regions with higher (but not the
highest) conductance (green) on the same area shown in panel (a). (c)
Tunneling spectra acquired at isolated regions on the map showing in-gap bound
states (peaks at zero bias). Tunneling conditions for the conductance map and
the spectra were $I=60\>\mathrm{pA}$, $V=10\>\mathrm{mV}$, and a lock-in
modulation, $V=0.2\>\mathrm{mV}$ with a lock-in frequency of
$373.1\>\mathrm{Hz}$.

##  4 Discussion

We now discuss the results of the presented systematic study of the effect of
annealing niobium single crystals with a significant initial hydrogen load.
The high hydrogen content, a result of contact with water during normal sample
cutting, polishing, etc. of the single crystal ingot, and storage under
ambient conditions for many years, led to the formation of large hydride
precipitates, of the order of 1-100 µm and more when the samples were cooled.
Although these hydrides significantly distort the crystal lattice, causing
irreparable damage, they do not affect the microscopic superconducting
properties of the surrounding niobium, such as pinning, critical temperature,
and critical magnetic field. Of course, these large hydride formations
significantly affect surface roughness, including some precipitates that rise
above the surface by 6-8 µm [36], and surely degrade the performance of
superconducting cavities [35, 36]. However, even moderate annealing at 800 ,
importantly - performed before any cooling - prevents the formation of these
large hydride precipitates, which seems to solve the problem. However, our
findings point to the emergence of other potentially serious problems as a
result of annealing.

Without microscopic spatially resolved elemental analysis, we can only suggest
plausible scenarios. Regardless of the microscopic mechanisms, we have the
following facts and conclusions.

(1) Annealing at moderate temperatures, at least at 800 , eliminates the
formation of large precipitates of hydrides (tens and hundreds of
micrometers). (2) Annealing at least up to 1400 , leads to a reduction of the
superconducting transition temperature, $T_{c}$, from its value in the same
samples prior to annealing. Annealing very close to the melting point recovers
the original $T_{c}$. (3) Annealing at 400 shows inhomogeneous
superconductivity with regions of dirty superconducting gap significantly
contaminated by the in-gap states. In addition, there is direct evidence for
zero-bias states in the gap consistent with magnetic impurities. This finding
is consistent with the observation of a non-monotonic evolution of the quality
factor of the Nb SRF resonators upon annealing [68]. Annealing at 1700
recovers a clean superconducting gap. (4) The upper critical field increases
after annealing at intermediate temperatures. The magnitude of the effect is
correlated with the magnitude of suppression of $T_{c}$. (5) Contrary to
expectations of decrease, the pinning strength increases moderately after
annealing. (6) Only partial melting leads to a significant reduction in
pinning, a much larger Meissner effect, and the recovery of $T_{c}$.

A large portion of the hydrogen absorbed by Nb from its environment can be
removed by relatively low-temperature annealing. However, we suggest that some
dilute hydrogen subsystem, bound or not, remains, and upon cooling it leads to
the formation of nanosized niobium hydride precipitates. Together, our results
indicate that annealing leads to the proliferation of defects that affect
superconductivity, so they must be of the order of the coherence length, 10-40
nm. Due to the gap anisotropy, those nonmagnetic scattering centers suppress
$T_{c}$. At the same time, the upper critical field and the pinning strength
increase.

Another potential scenario is that during annealing, oxygen from the surface
oxide layers diffuses into the bulk. However, it was determined that niobium
oxides are mainly distributed within the first 10 micrometers of the surface
[48]. If the suppression of the $T_{c}$ we observed was due to such oxygen
ions, the transition curves would not parallel shift, but would become
smeared, which was not the case here. The same can be said with respect to the
upper critical field, which is determined by the entire vortex length of 1-2
mm in our case, and the small amount of oxygen from a surface layer would not
change its bulk values. Since it has been shown that high temperature vacuum
annealing at 2300 for several hours significantly reduces background oxygen
[47, 48], it can be minimized by a pre-annealing step if needed. Finally, as
estimated in the Introduction, the total amount of oxygen in the oxide layers
is way too small to cause a noticeable variation of bulk properties.

We stress that apart from a pronounced effect of the suppression of
macroscopic hydrides, the changes upon annealing discussed in this paper are
subtle. However, these issues are potentially important for delicate QIS
applications and, perhaps mitigating them holds the key to a substantial
improvement of quantum hardware.

##  5 Conclusions

A systematic study of the effects of annealing on the superconducting
properties of niobium crystals was carried out using optical, magnetic, and
tunneling spectroscopy measurements. It is shown that fairly accessible
annealing at 800 , indeed, suppresses the formation of very large hydrides,
probably due to the removal of most of the absorbed hydrogen. However, such
annealing does not eliminate all hydrogen and introduces new problems
associated with impurities that affect superconductivity. It appears that
high-vacuum annealing at temperatures, perhaps exceeding 1700 , is needed to
obtain niobium for applications that require ultra-low losses suitable for QIS
applications. We note that many studies of the 1960-1980s routinely used UHV
annealing above 2000 for a few hours to obtain high-quality samples free of
not only mechanical deformation, but also impurities such as oxygen and
hydrogen [47, 48].

##  6 Acknowledgements

We thank Arne Swanson of the Materials Processing Center at Ames National
Laboratory for running the 1400$\>\celsius$ annealing. We thank Thomas
Lograsso for growing the original Nb crystal. This work was supported by the
U.S. Department of Energy, Office of Science, National Quantum Information
Science Research Centers, Superconducting Quantum Materials and Systems Center
(SQMS) under contract number DE-AC02-07CH11359. The research was carried out
at the Ames Laboratory, operated for the U.S. DOE by Iowa State University
under contract # DE-AC02-07CH11358.

## References

  * [1] C. Grèzes, Towards a Spin-Ensemble Quantum Memory for Superconducting Qubits, 1st Edition, Springer, 2016.
  * [2] M. Kjaergaard, M. E. Schwartz, J. Braumüller, P. Krantz, J. I.-J. Wang, S. Gustavsson, W. D. Oliver, Superconducting qubits: Current state of play, Annu. Rev. Conden. Ma. P. 11 (1) (2020) 369–395.  doi:10.1146/annurev-conmatphys-031119-050605.
  * [3] H.-L. Huang, D. Wu, D. Fan, X. Zhu, Superconducting quantum computing: a review, Sci. China. Inform. Sci. 63 (8) (Jul. 2020).  doi:10.1007/s11432-020-2881-9.
  * [4] K. He, X. Geng, R. Huang, J. Liu, W. Chen, Quantum computation and simulation with superconducting qubits*, Chinese Phys. B 30 (8) (2021) 080304.  doi:10.1088/1674-1056/ac16cf.
  * [5] I. Siddiqi, Engineering high-coherence superconducting qubits, Nat. Rev. Mater. 6 (10) (2021) 875–891.  doi:10.1038/s41578-021-00370-4.
  * [6] K. Xiong, J. Feng, Y. Zheng, J. Cui, M. Yung, S. Zhang, S. Li, H. Yang, Materials in superconducting quantum circuits, Chinese Science Bulletin-chinese 67 (2) (2022) 143–162.  doi:10.1360/tb-2021-0479.
  * [7] O. Ezratty, Perspective on superconducting qubit quantum computing, Eur. Phys. J. A 59 (5) (2023).  doi:10.1140/epja/s10050-023-01006-7.
  * [8] H. Padamsee, RF Superconductivity, 1st Edition, Wiley-VCH, Weinheim, 2009.
  * [9] A. W. Chao, Applications of superconducting technology to accelerators, in: W. Chou (Ed.), Reviews of Accelerator Science and Technology, no. 5 in Reviews of accelerator science and technology, World Scientific Publishing Co Pte Ltd, Singapore, 2014, p. 1369.
  * [10] A. M. Valente-Feliciano, C. Antoine, S. Anlage, G. Ciovati, J. Delayen, F. Gerigk, A. Gurevich, T. Junginger, S. Keckert, G. Keppe, J. Knobloch, T. Kubo, O. Kugeler, D. Manos, C. Pira, T. Proslier, U. Pudasaini, C. E. Reece, R. A. Rimmer, G. J. Rosaz, T. Saeki, R. Vaglio, R. Valizadeh, H. Vennekate, W. V. Delsolaro, M. Vogel, P. B. Welander, M. Wenskat, Next-generation superconducting rf technology based on advanced thin film technologies and innovative materials for accelerator enhanced performance and energy reach, arXiv:2204.02536 (2022).
  * [11] T. F. Stromberg, The superconducting properties of high purity niobium, Ph.D. thesis, Iowa State University (1965).
  * [12] D. K. Finnemore, T. F. Stromberg, C. A. Swenson, Superconducting properties of high-purity niobium, Phys. Rev. 149 (1) (1966) 231–243.  doi:10.1103/physrev.149.231.
  * [13] J. Daams, J. P. Carbotte, Thermodynamic properties of superconducting niobium, J. Low Temp. Phys. 40 (1) (1980) 135–154.  doi:10.1007/bf00115987.
  * [14] M. Bahte, F. Herrmann, P. Schmuser, Magnetization and susceptibility measurements on niobium samples for cavity production [8th Workshop on RF Superconductivity], Part. Accel. 60 (1-4) (1998) 121–133.
  * [15] A. Koethe, J. I. Moench, Preparation of ultra high purity niobium, Mater. Trans., JIM 41 (1) (2000) 7–16.
  * [16] R. Prozorov, D. V. Shantsev, R. G. Mints, Collapse of the critical state in superconducting niobium, Phys. Rev. B 74 (2006) 220511.  doi:10.1103/PhysRevB.74.220511.
  * [17] V. Kozhevnikov, A.-M. Valente-Feliciano, P. J. Curran, A. Suter, A. H. Liu, G. Richter, E. Morenzoni, S. J. Bending, C. V. Haesendonck, Equilibrium properties of superconducting niobium at high magnetic fields: A possible existence of a filamentary state in type-II superconductors, Phys. Rev. B 95 (17) (2017) 174509.  doi:10.1103/physrevb.95.174509.
  * [18] D. B. Liarte, S. Posen, M. K. Transtrum, G. Catelani, M. Liepe, J. P. Sethna, Theoretical estimates of maximum fields in superconducting resonant radio frequency cavities: stability theory, disorder, and laminates, Supercond. Sci. Technol. 30 (3) (2017) 033002.  doi:10.1088/1361-6668/30/3/033002.
  * [19] G. Wendin, Quantum information processing with superconducting circuits: a review, Rep. Prog. Phys. 80 (10) (2017) 106001.
  * [20] H. Padamsee, J. Knobloch, T. Hays, RF Superconductivity for Accelerators, Wiley, 2008.
  * [21] A. Gurevich, Superconducting radio-frequency fundamentals for particle accelerators, Rev. Accel Sci. Technol. 05 (2012) 119–146.  doi:10.1142/s1793626812300058.
  * [22] Singer, W, SRF Cavity Fabrication and Materials, arXiv:1501.07142 (2014).  doi:{10.5170/CERN-2014-005.171}.
  * [23] A. Gurevich, Theory of RF superconductivity for resonant cavities, Supercond. Sci. Technol. 30 (3) (2017) 034004.  doi:10.1088/1361-6668/30/3/034004.
  * [24] A. Romanenko, R. Pilipenko, S. Zorzetti, D. Frolov, M. Awida, S. Belomestnykh, S. Posen, A. Grassellino, Three-Dimensional Superconducting Resonators at T=20 mK with Photon Lifetimes up to $\tau=2$ s, Phys. Rev. Appl. 13 (2020) 034032\.  doi:10.1103/PhysRevApplied.13.034032.
  * [25] H. Ueki, M. Zarea, J. A. Sauls, The frequency shift and q of disordered superconducting rf cavities, arXiv:2207.14236 (2022).
  * [26] H. Ueki, M. Zarea, J. A. Sauls, Electromagnetic response of superconducting rf cavities, arXiv:2209.11752 (2022).
  * [27] A. Blais, R.-S. Huang, A. Wallraff, S. M. Girvin, R. J. Schoelkopf, Cavity quantum electrodynamics for superconducting electrical circuits: An architecture for quantum computation, Phys. Rev. A 69 (6) (2004) 062320.  doi:10.1103/physreva.69.062320.
  * [28] H. Paik, D. I. Schuster, L. S. Bishop, G. Kirchmair, G. Catelani, A. P. Sears, B. R. Johnson, M. J. Reagor, L. Frunzio, L. I. Glazman, S. M. Girvin, M. H. Devoret, R. J. Schoelkopf, Observation of high coherence in josephson junction qubits measured in a three-dimensional circuit QED architecture, Phys. Rev. Lett. 107 (24) (2011) 240501.  doi:10.1103/physrevlett.107.240501.
  * [29] M. Reagor, W. Pfaff, C. Axline, R. W. Heeres, N. Ofek, K. Sliwa, E. Holland, C. Wang, J. Blumoff, K. Chou, M. J. Hatridge, L. Frunzio, M. H. Devoret, L. Jiang, R. J. Schoelkopf, Quantum memory with millisecond coherence in circuit QED, Phys. Rev. B 94 (1) (2016) 014506.  doi:10.1103/physrevb.94.014506.
  * [30] J. G. Daunt, K. Mendelssohn, F. A. Lindemann, Equilibrium curve and entropy difference between the supraconductive and the normal state in pb, hg, sn, ta, and nb, Proc. Roy. Soc. London. Ser. A - Math. Phys. Sci. 160 (900) (1937) 127–136.  doi:10.1098/rspa.1937.0099.
  * [31] P. Kneisel, G. Ciovati, P. Dhakal, K. Saito, W. Singer, X. Singer, G. R. Myneni, Review of ingot niobium as a material for superconducting radiofrequency accelerating cavities, Nucl. Instrum. Methods Phys. Res., Sect. A 774 (2015) 133–150.  doi:10.1016/j.nima.2014.11.083.
  * [32] M. Zarea, H. Ueki, J. A. Sauls, Effects of anisotropy and disorder on the superconducting properties of niobium, Aip. Conf. Proc. 11 (2023) 1269872.  doi:10.3389/fphy.2023.1269872.
  * [33] R. Prozorov, M. Zarea, J. A. Sauls, Niobium in the clean limit: An intrinsic type-I superconductor, Phys. Rev. B 106 (18) (2022) L180505.  doi:10.1103/PhysRevB.106.L180505.
  * [34] J. Knobloch, The “Q disease” in Superconducting Niobium RF Cavities, AIP Conf. Proc. 671 (1) (2003) 133–150.  doi:10.1063/1.1597364.
  * [35] F. Barkov, A. Romanenko, A. Grassellino, Direct observation of hydrides formation in cavity-grade niobium, Phys. Rev. Spec. Top. Accel Beams 15 (12) (2012) 122001.  doi:10.1103/physrevstab.15.122001.
  * [36] F. Barkov, A. Romanenko, Y. Trenikhina, A. Grassellino, Precipitation of hydrides in high purity niobium after different treatments, J. Appl. Phys. 114 (16) (2013) 164904.  doi:10.1063/1.4826901.
  * [37] O. Buck, D. Thompson, C. Wert, The effect of hydrogen on the low temperature internal friction of a niobium single crystal, J. Phys. Chem. Sol. 32 (10) (1971) 2331–2344.  doi:10.1016/s0022-3697(71)80227-5.
  * [38] T. Schober, The niobium–hydrogen system – an electron microscope study. ii. low-temperature structures, phys. stat. sol. (a) 30 (1) (1975) 107–116.  doi:10.1002/pssa.2210300111.
  * [39] S. Isagawa, Influence of hydrogen on superconducting niobium cavities, J. Appl. Phys. 51 (11) (1980) 6010–6017.  doi:10.1063/1.327523.
  * [40] S. Isagawa, Hydrogen absorption and its effect on low-temperature electric properties of niobium, Journal of Applied Physics 51 (8) (1980) 4460–4470.  doi:10.1063/1.328267.
  * [41] A. Dzyuba, L. D. Cooley, Combined effects of cold work and chemical polishing on the absorption and release of hydrogen from srf cavities inferred from resistance measurements of cavity-grade niobium bars, Superconductor Science and Technology 27 (3) (2014) 035001.  doi:10.1088/0953-2048/27/3/035001.
  * [42] L. Y. Vinnikov, A. O. Golubok, Direct observation of magnetic structure in niobium single crystals with hydride precipitate pinning centres, Phys. Stat. Sol. A 69 (2) (1982) 631–636.  doi:10.1002/pssa.2210690224.
  * [43] J. Köszegi, O. Kugeler, D. Abou-Ras, J. Knobloch, R. Schäfer, A magneto-optical study on magnetic flux expulsion and pinning in high-purity niobium, J. Appl. Phys. 122 (17) (2017) 173901.  doi:10.1063/1.4996113.
  * [44] J. Burnett, L. Faoro, T. Lindstrom, Analysis of high quality superconducting resonators: consequences for TLS properties in amorphous oxides, Supercond. Sci. Technol. 29 (4) (2016) 044008.  doi:10.1088/0953-2048/29/4/044008.
  * [45] C. Müller, J. H. Cole, J. Lisenfeld, Towards understanding two-level-systems in amorphous solids: insights from quantum circuits, Rep. Prog. Phys. 82 (12) (2019) 124501.  doi:10.1088/1361-6633/ab3a7e.
  * [46] C. R. H. McRae, H. Wang, J. Gao, M. R. Vissers, T. Brecht, A. Dunsworth, D. P. Pappas, J. Mutus, Materials loss measurements using superconducting microwave resonators, Rev. Sci. Instrum. 91 (9) (2020) 091101.  doi:10.1063/5.0017378.
  * [47] C. S. Tedmon, R. M. Rose, J. Wulff, Resistive measurements of structural effects in superconducting niobium, J. Appl.Phys. 36 (3) (1965) 829–835.  doi:10.1063/1.1714227.
  * [48] J. Halbritter, Low temperature oxidation of nb and of nb-compounds in relation to superconducting application, Journal of the Less Common Metals 139 (1) (1988) 133–148.  doi:10.1016/0022-5088(88)90336-0.
  * [49] C. Z. Antoine, Influence of crystalline structure on rf dissipation in superconducting niobium, Phys. Rev. Accel. Beams 22 (3) (2019) 034801.  doi:10.1103/physrevaccelbeams.22.034801.
  * [50] A. Dangwal Pandey, T. F. Keller, M. Wenskat, A. Jeromin, S. Kulkarni, H. Noei, V. Vonk, W. Hillert, D. Reschke, N. Walker, H. Weise, A. Stierle, Grain boundary segregation and carbide precipitation in heat treated niobium superconducting radio frequency cavities, Appl. Phys. Lett. 119 (19) (2021) 194102\.  doi:10.1063/5.0063379.
  * [51] M. Hakovirta, Measurements of hydrogen content in bulk niobium by Thermal Desorption Spectroscopy, CERN-EST-2002-005-SM, https://cds.cern.ch/record/572772 (2001).
  * [52] S. Ooi, M. Tachiki, T. Konomi, T. Kubo, A. Kikuchi, S. Arisawa, H. Ito, K. Umemori, Observation of intermediate mixed state in high-purity cavity-grade nb by magneto-optical imaging, Phys. Rev. B 104 (6) (2021) 064504\.  doi:10.1103/physrevb.104.064504.
  * [53] T. A. Lograsso, F. A. Schmidt, Solid-state crystal growth of refractory metals by arc-zone melting, J. Cryst. Growth 110 (3) (1991) 363–372.  doi:10.1016/0022-0248(91)90272-7.
  * [54] W. E. King, G. H. Campbell, A. Coombs, M. J. Mills, M. Rühle, Hrem investigation of the structure of the $\sigma$5(310)/[001] symmetric tilt grain boundary in nb, MRS Proc. 209 (1990).  doi:10.1557/proc-209-39.
  * [55] R. Prozorov, V. G. Kogan, Effective demagnetizing factors of diamagnetic samples of various shapes, Phys. Rev. Applied 10 (2018) 014030.  doi:10.1103/PhysRevApplied.10.014030.
  * [56] D. P. Young, M. Moldovan, P. W. Adams, R. Prozorov, Magneto-optical studies of flux penetratim in super-hard Nb wire, Superc. Sci. Technol. 18 (2005) 776–779.
  * [57] K. R. Joshi, S. Ghimire, M. A. Tanatar, A. Datta, J.-S. Oh, L. Zhou, C. J. Kopas, J. Marshall, J. Y. Mutus, J. Slaughter, M. J. Kramer, J. A. Sauls, R. Prozorov, Quasiparticle Spectroscopy, Transport, and Magnetic Properties of Nb Films Used in Superconducting Qubits, Phys. Rev. Appl. 20 (2) (2023) 024031\.  doi:10.1103/PhysRevApplied.20.024031.
  * [58] E. Helfand, N. R. Werthamer, Temperature and purity dependence of the superconducting critical field, ${H}_{c2}.$ ii, Phys. Rev. 147 (1966) 288–294.  doi:10.1103/PhysRev.147.288.
  * [59] M. A. Tanatar, D. Torsello, K. R. Joshi, S. Ghimire, C. J. Kopas, J. Marshall, J. Y. Mutus, G. Ghigo, M. Zarea, J. A. Sauls, R. Prozorov, Anisotropic superconductivity of niobium based on its response to nonmagnetic disorder, Phys. Rev. B 106 (2022) 224511.  doi:10.1103/PhysRevB.106.224511.
  * [60] C. C. Koch, J. O. Scarbrough, D. M. Kroeger, Effects of interstitial oxygen on the superconductivity of niobium, Phys. Rev. B 9 (3) (1974) 888–897.  doi:10.1103/physrevb.9.888.
  * [61] Y.-J. Kim, R. Tao, R. F. Klie, D. N. Seidman, Direct atomic-scale imaging of hydrogen and oxygen interstitials in pure niobium using atom-probe tomography and aberration-corrected scanning transmission electron microscopy, ACS Nano 7 (1) (2012) 732–739.  doi:10.1021/nn305029b.
  * [62] A. A. Murthy, P. Masih Das, S. M. Ribet, C. Kopas, J. Lee, M. J. Reagor, L. Zhou, M. J. Kramer, M. C. Hersam, M. Checchin, A. Grassellino, R. d. Reis, V. P. Dravid, A. Romanenko, Developing a chemical and structural understanding of the surface oxide in a niobium superconducting qubit, ACS Nano 16 (10) (2022) 17257–17262.  doi:10.1021/acsnano.2c07913.
  * [63] B. An, S. Fukuyama, K. Yokogawa, M. Yoshimura, Surface structures of clean and oxidized nb(100) by leed, aes, and stm, Phys. Rev. B 68 (2003) 115423.  doi:10.1103/PhysRevB.68.115423.
  * [64] A. B. Odobesko, S. Haldar, S. Wilfert, J. Hagen, J. Jung, N. Schmidt, P. Sessi, M. Vogt, S. Heinze, M. Bode, Preparation and electronic properties of clean superconducting nb(110) surfaces, Phys. Rev. B 99 (11) (2019) 115437.  doi:10.1103/physrevb.99.115437.
  * [65] L. Yu, Bound state in superconductors with paramagnetic impurities, Acta Phys. Sin-ch. Ed. 21 (1) (1965) 75.  doi:10.7498/aps.21.75.
  * [66] H. Shiba, Classical spins in superconductors, Prog. Theor. Phys. 40 (3) (1968) 435–451.  doi:10.1143/ptp.40.435.
  * [67] A. I. Rusinov, On the theory of gapless superconductivity in alloys containing paramagnetic impurities, [Zh. Eksp. Teor. Fiz. 56, 2047-2056 (1969)] Sov. Phys. JETP (1969) 1101–1106.
  * [68] D. Bafia, A. Grassellino, A. Romanenko, Probing the Role of Low Temperature Vacuum Baking on Photon Lifetimes in Superconducting Niobium 3-D Resonators, arXiv:2108.13352 (2021).


11institutetext: School of Computer Science and Engineering, University of
Electronic Science and Technology of China
11email<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>22institutetext: Aalborg University, Danmark
22email<EMAIL_ADDRESS>
# HIFI: Anomaly Detection for Multivariate Time Series with High-order Feature
Interactions

Liwei Deng 11 Xuanhao Chen 11 Yan Zhao 22 Kai Zheng(🖂) 11

###### Abstract

Monitoring complex systems results in massive multivariate time series data,
and anomaly detection of these data is very important to maintain the normal
operation of the systems. Despite the recent emergence of a large number of
anomaly detection algorithms for multivariate time series, most of them ignore
the correlation modeling among multivariate, which can often lead to poor
anomaly detection results. In this work, we propose a novel anomaly detection
model for multivariate time series with HIgh-order Feature Interactions
(HIFI). More specifically, HIFI builds multivariate feature interaction graph
automatically and uses the graph convolutional neural network to achieve high-
order feature interactions, in which the long-term temporal dependencies are
modeled by attention mechanisms and a variational encoding technique is
utilized to improve the model performance and robustness. Extensive
experiments on three publicly available datasets demonstrate the superiority
of our framework compared with state-of-the-art approaches.

###### Keywords:

Multivariate Time Series Anomaly Detection Graph Neural Networks.

##  1 Introduction

Complex systems such as servers [8] and aircrafts [1] are ubiquitous in the
real world. Monitoring the behaviors of these systems generates huge amounts
of multivariate time series data. A key task in managing complex systems is to
detect system anomalies in a timely and accurate manner in order to reduce or
avoid the losses caused by system anomalies. Due to the various of anomalies
and lack enough labelled anomalies data, supervised anomaly detection methods
are hard to adopt. In this work we will design an unspervised model to detect
system anomalies.

Recently, many unsupervised anomaly detection models [3, 8, 6] are proposed.
EncDec-AD [6] uses autoencoder architecture with LSTM and treats the
reconstruction errors as anomaly scores to detect anomaly. OmniAnomaly [8]
adopts advanced variational techniques to improve the ability of modeling
complex time series. Although these methods can get better performance than
their baselines for multivariate time series, they have some disadvantages.

Firstly, these studies ignore the correlation between multivariate, which is
helpful for modeling complex temporal information [11]. Secondly, they
generally adopt RNN or its variants to model temporal information, which
hardly capture the long-term temporal dependencies [7]. Thirdly, some of them
use deterministic models [1] which are unrobustness and weak representation
ability [8].

To address the above-mentioned problems, we design a novel unsupervised model
called HIFI (anomaly detection for multivariate time series with HIgh-order
Feature Interactions). Specifically, a feature interaction graph is
constructed automatically and then is delivered to GNN to model high-order
feature interaction. To capture long-term dependencies and improve the
robustness, attention-based time series modeling module and variational
technique are used.

The main contributions of this paper are as follows:

  * •

We design a multivariate feature interaction module, which uses the graph
convolutional neural network to conduct high-order feature interactions on
multi-dimensional temporal variables.

  * •

We utilize the attention mechanism to model the long-term temporal dependence
and variational encoding to improve the robustness of the model, which is
critical for anomaly detection.

  * •

We conduct extensive experiments on three publicly available datasets, which
empirically demonstrate the advantages of our proposed model compared with the
representative models.

##  2 Related Work

In this section, we will introduce some work related to our model, such as
unsupervised time series anomaly detection, graph convolutional neural
network, and time series modeling method based on attention mechanism.

EncDec-AD is proposed by [6], which adopts the structure of sequence to
sequence and uses two independent LSTM models as encoder and decoder
respectively. [1] develops the LSTM-NDT model, which is used to model the
temporal information through LSTM. OmniAnomaly [8] aims to capture the normal
patterns of multivariate time series by stochastic variable connections and
panar normalizing flow. OED [3] is developed to use recurrent autoencoder
ensembles to detect anomaly. However, none of them explicitly model the
relationship between features. Therefore, in this work, we use the graph
neural network to model the high-order interaction features.

Graph Convolutional network (GCN) is firstly proposed in [4], which shows a
strong representation ability of unstructured graph in node classification
task and attracts the attention of a large number of researchers. Then a
series of variants of GCN are proposed. GAT [10] introduces the correlation
between nodes through the attention mechanism. PPNP [5] uses personalized
pagerank to extend the size of neighborhood and avoids oversmooth.

Transformer [9] is the first time series modeling approach that completely
abandons both recurrent nerual network structures and convolutional nerual
network structures. Its performance reflects the superiority of its model
structure. SASRec [2] also adopts the attention mechanism to model the
sequential relation of items, and achieves the good performance in the field
of sequential recommendation. However, few works adopt the attention mechanism
in the field of anomaly detection.

Figure 1: Framework overview. Our model adopts encoder-decoder architecture in
which three modules are involved such as multivariate feature interaction
module, attention-based time series modeling module and variational encoding
module.

##  3 Methodology

As shown in Figure 1, our model consists of three type of parts, namely, the
multivariate feature interaction module, the attention-based time series
modeling module, and the variational encoding module. Each part will be
elaborated in the following.

###  3.1 Multivariate Feature Interaction Module

In order to model the relationship between variables, the multivariate feature
interaction module firstly constructs the interaction graph through feature
embedding, and then gets the high-order interaction features through the graph
convolutional neural network. In practice, it is hard to use graph
convolutional neural network to get high-oder features for multivariate time
series because of the agnostic of relation graph among multivariate. So we
construct the relation graph automatically in which each node represents a
variable.

Inspired by MTGNN [11], we directly transform the original features
$X=(x_{t-w+1},$ $x_{t-w+2},\cdots,x_{t})\in\mathbb{R}^{w\times d}$ to the
hidden space $X^{h}=(x_{t-w+1}^{h},x_{t-w+2}^{h},$
$\cdots,x_{t}^{h})\in\mathbb{R}^{w\times d_{1}}$. In this way, we can control
the size of the interaction graph. When the original features have a higher
dimension, we can set a smaller $d_{1}$ to reduce the amount of calculation of
the graph convolution.

$\footnotesize x_{i}^{h}=W_{h}x_{i}+b_{h}$ (1)

where $W_{h}\in\mathbb{R}^{d_{1}\times d}$, $b_{h}\in\mathbb{R}^{d_{1}}$ are
model parameters.

Then, in order to obtain the interaction graph with more expressive
capability, we adopt an asymmetric construction method and define two
independent feature embedding matrices $E_{1}$ and $E_{2}$, in which the
$i$-th row of each matrix represents the embedding of $i$-th feature. Then we
calculate the embedding similarity of each feature, and express the strength
of feature correlation by the similarity as follow.

$\displaystyle M_{1}=$ $\displaystyle tanh(E_{1}\Theta_{1})$ (2)
$\displaystyle M_{2}=$ $\displaystyle tanh(E_{2}\Theta_{2})$ $\displaystyle
A=ReLU(tanh$ $\displaystyle(M_{1}M_{2}^{T}-M_{2}^{T}M_{1}))$

where $E_{1}\in\mathbb{R}^{d_{1}\times d_{1}}$,
$E_{2}\in\mathbb{R}^{d_{1}\times d_{1}}$,
$\Theta_{1}\in\mathbb{R}^{d_{1}\times d_{2}}$,
$\Theta_{2}\in\mathbb{R}^{d_{1}\times d_{2}}$ are model weights, which are
learnable during training. $A\in\mathbb{R}^{d_{1}\times d_{1}}$ is the feature
interaction graph.

Obviously, the interaction graph constructed by the above methods is a
complete graph. In order to reduce the computation of graph convolution
module, $topk$ is used to return the maximum $k$ values in each row of the
adjacency matrix, turning the complete graph into a sparse graph.

$\displaystyle\mathbb{A}=$ $\displaystyle topk(A)$ (3)

####  3.1.1 Graph Convolution Module

We take the constructed feature interaction graph $\mathbb{A}$ and the hidden
features $X^{h}$ into the graph convolutional network [5] to obtain the
higher-order interaction features. We first calculate
$\hat{A}=\tilde{D}^{-\frac{1}{2}}\tilde{A}\tilde{D}^{-\frac{1}{2}}$, where
$\tilde{A}=\mathbb{A}+I_{N}$ and $I_{N}$ is identity matrix and
$\tilde{D}_{ii}=\sum_{j}\tilde{A}_{ij}$.

$\footnotesize H_{k+1}=(1-\alpha)\hat{A}H_{k}+\alpha H_{0}$ (4)

where $H_{k}\in\mathbb{R}^{d_{1}\times w}$ represents the high-order
interaction features obtained by the $k$-th convolution. $H_{0}$ is the hidden
features ${X^{h}}^{T}$. $\alpha$ is a hyperparameter defining the amount of
information that retains the original feature at every convolution. It is
important to note that the feature interaction does not interact across time
steps. The higher-order intereaction features of the current time step are
completely calculated by its own hidden features.

Moreover, since the convolution depth required by each high-order feature may
be different, we concatenate the output of the convolution of each step to
obtain the final higher-order feature representation through linear
transformation.

$\footnotesize X^{ho}=Concat(H_{0}^{T},H_{1}^{T},...,H_{K}^{T})W^{ho}$ (5)

where
$X^{ho}=(x_{t-w+1}^{ho},x_{t-w+2}^{ho},\cdots,x_{t}^{ho})\in\mathbb{R}^{w\times
d_{1}}$ is the high-order features corresponding to $X^{h}$. $Concat$ denote
the concatenation operation. $W^{ho}\in\mathbb{R}^{Kd_{1}\times d_{1}}$ is the
model weights. $K$ is the maximal graph convolutional depth.

###  3.2 Attention-based Time Series Modeling Module

We use the attention mechanism to model temporal information and capture long-
term temporal dependencies, which are hardly captured by RNN model.

####  3.2.1 Attention Layer

We use one of the most common attention mechanisms, scaled-dot attention [9],
which can be described as follows.

$\footnotesize Attention(Q,K,V)=softmax(\frac{QK^{T}}{\sqrt{d_{k}}})V$ (6)

where $Q\in\mathbb{R}^{w\times d_{k}}$, $K\in\mathbb{R}^{w\times d_{k}}$,
$V\in\mathbb{R}^{w\times d_{v}}$ are queries, keys and values respectively.
$\sqrt{d_{k}}$ is the scaling factor. Intuitively, the nature of the attention
mechanism is to take the weighted sum of all time steps according to the
weights calculated. It allows information from any distance of time steps to
flow directly to the current step, giving the attention mechanism the ability
to capture long-term temporal dependencies. Multi-head attention [9], which
can allow the model to jointly attend to information from different
representation subspaces at different positions, is used in our work.

####  3.2.2 Nonlinear Layer

Although multi-head attention can aggregate the information of each time step
through adaptive weights, it is still a linear model. This greatly limits the
capability of the model, so we use two linear network with $ReLU$ activation
to introduce nonlinear information to the model.

$\footnotesize NonLinear(X)=W_{2}^{n}ReLU(W_{1}^{n}X+b_{1}^{n})+b_{2}^{n}$ (7)

where $W_{1}^{n}\in\mathbb{R}^{d_{3}\times d_{1}}$,
$W_{2}^{n}\in\mathbb{R}^{d_{1}\times d_{3}}$,
$b_{1}^{n}\in\mathbb{R}^{d_{3}}$, $b_{2}^{n}\in\mathbb{R}^{d_{1}}$ are model
parameters. Due to the nature of position invariance of attention layer, we
follow [9] to introduce sinusoidal positional encoding
$P\in\mathbb{R}^{w*d_{1}}$ to add the sequential information after
multivariate feature interaction module. Specifically, $X^{in}=P+X^{ho}+X$
where $X^{in}$ is the input of attention-based time series modeling module.
Our encoder and decoder can be obtained by alternately stacking multi-head
attention layer and nonlinear layer, in which layer normalization and residual
connection are used to prevent overfitting and gradient disappearance
respectively.

###  3.3 Variational Encoding Module

To improve the robustness and performance of the model, we model the
deterministic encoding of the encoder
$X^{eo}=(x_{t-w+1}^{eo},x_{t-w+2}^{eo},\cdots,x_{t}^{eo})\in\mathbb{R}^{w\times
d_{1}}$ as a normal distribution. We obtain the mean and the logarithm of
variance of the normal distribution by two independent linear layers.

$\footnotesize\begin{split}\mu_{i}=W_{\mu}x_{i}^{eo}+b_{\mu}\\\ log\
\sigma^{2}_{i}=W_{\sigma}x_{i}^{eo}+b_{\sigma}\end{split}$ (8)

where $W_{\mu}\in\mathbb{R}^{d_{1}\times d_{1}}$,
$W_{\sigma}\in\mathbb{R}^{d_{1}\times d_{1}}$, $b_{\mu}\in\mathbb{R}^{d_{1}}$,
$b_{\sigma}\in\mathbb{R}^{d_{1}}$ are model weights. We then adopt the
reparameterization trick to sample from the normal distribution and input the
samples into the decoder. We fix the number of samples at 1.

$\footnotesize z_{i}=\mu_{i}+\epsilon*\sigma_{i}$ (9)

where $\epsilon$ is a sample from $N(0,1)$. $\mu_{i}$ and $\sigma_{i}$ are the
mean and the variance of normal distribution in $i$-th time step. The
resampled $Z$ is inputted to attention-based time series modeling module of
decoder and treated as $K$ and $V$.

###  3.4 Model Training

We use the reconstruction error of the entire current window and the Kullback-
Leibler divergence between variational encoding of sample and the standard
normal distribution to train the model.

$\footnotesize
loss=\sum_{i=1}^{w}||x_{i}-x_{i}^{rec}||_{2}+\beta\sum_{i=1}^{w}KL(N(\mu_{i},\sigma_{i}^{2})||N(0,1)))$
(10)

where $\beta$ is a hyperparameter, which is used to balance the loss of the
two parts.

In current window, we regard $||x_{t}-x_{t}^{rec}||_{2}$ as the anomaly score,
based on which we can detect anomalies.

##  4 Experiments

In this section, we evaluate our model by comparing it with some state-of-the-
art models. We begin by introducing the setup of the experiment, and then
report and analyze the results of the experiment.

###  4.1 Experimental Setup

####  4.1.1 Datasets and Metrics

We conduct experiments on three publicly available datasets, i.e. SMD (Server
Machine Dataset) [8], SMAP (Soil Moisture Active Passive satellite) and MSL
(Mars Science Laboratory rover) [1], in two different domains. We use
Precision($Pre$), Recall($Rec$) and F1-score($F1$) to evaluate the performance
of HIFI and baselines. We enumerate all possible anomaly thresholds to search
for the best F1, denoted as $F1_{best}$. And a point-adjust [12] is adopted to
get the final prediction which is same as [8].

####  4.1.2 Baselines

In our experiments, we select four representative models. LSTM-NDT [1]
predicts the values of time step $t$ and uses predictive error as anomaly
scores of step $t$. EncDec-AD [6] adopts autoencoder architecture with LSTM
and treats reconstruction error as anomaly score. OED-IF [3] employs multiple
autoencoder with different connection structures to improve the performance of
anomaly detection. OmniAnomaly [8] adopts advanced variational encoding
techniques with autoencoder architecture to detect anomaly.

####  4.1.3 Implementation details

All models take the sliding window data of the original data as input and we
set the window size $w$ to 100. We randomly select 30% from the training data
as validation sets, set the batch size as 64 for training and run for 100
epochs. We save the model with the least loss of the validation set as the
final test model. We use Adam optimizer for stochastic gradient desent with an
initial learning rate of 0.005. For our model, we turn hyperparameters in
validation set. Specifically, we set $d_{1}=64$, $d_{2}=64$, $d_{k}=16$,
$l=2$, $\alpha=0.2$, $\beta=1$, $K=3$ for all datasets. In MSL dataset, we set
$d_{3}=256$ and in other datasets, we set $d_{3}=128$. For all of the
baselines, if they are tested on the same dataset, we follow the settings of
the original paper, or we tune the model to be optimal.

###  4.2 Overall Performance Comparison

Table 1: The performance of HIFI with other baseline methods over three
datasets

Methods | MSL | SMAP | SMD
---|---|---|---
$F1_{best}$ | $Pre$ | $Rec$ | $F1_{best}$ | $Pre$ | $Rec$ | $F1_{best}$ | $Pre$ | $Rec$
LSTM-NDT | 0.8623 | 0.7830 | 0.9594 | 0.7852 | 0.6756 | 0.9373 | 0.7942 | 0.6865 | 0.9481
EncDec-AD | 0.9039 | 0.8606 | 0.9520 | 0.8707 | 0.7737 | 0.9956 | 0.9491 | 0.9317 | 0.9673
OED-IF | 0.9185 | 0.8754 | 0.9661 | 0.8458 | 0.7351 | 0.9959 | 0.9730 | 0.9685 | 0.9777
OmniAnomaly | 0.9257 | 0.8802 | 0.9762 | 0.8966 | 0.8198 | 0.9893 | 0.9503 | 0.9337 | 0.9675
HIFI | 0.9546 | 0.9133 | 0.9998 | 0.9708 | 0.9475 | 0.9952 | 0.9773 | 0.9811 | 0.9737

Table 1 shows the performance of our model compared with the baseline models
in three datasets. LSTM-NDT performs worst in all the baselines in terms of
$F1_{best}$, which shows the disadvantage of the predictive model. In most
cases, OED-IF can get better performance than EncDec-AD, which shows that
model ensemble is a good strategy for anomaly detection. OmniAnomaly generally
performs better than other baselines, which illustrates the variational
encoding can improve the performance of anomaly detection. Last but not least,
HIFI outperforms all baselines on three datasets in terms of $F1_{best}$. In
particular, HIFI outperforms the best-performing state-of-the-art method by
2.89%, 7.42% and 0.43% on MSL, SMAP and SMD dataset respectively, which shows
the effectiveness of the proposed model.

###  4.3 Ablation Study

We perform an ablation study at $F1_{best}$ to verify the effectiveness of
each component of our model. We name different variants of HIFI as follows:

w/o FI:  HIFI without multivariate feature interaction module.

w/o VE:  HIFI without variational encoding module.

w/o FI+VE:  HIFI without multivariate feature interaction module and
stochastic variable embedding module.

w/o FI+VE+EN:  HIFI only with encoder part. We stack 4 encoder layers to fair
comparison.

The results of our model and its variants are shown in the Table 2. In most
cases, HIFI can achieve the best results. In the SMD dataset, the performance
of each model is similar. This is because the time series information is
sufficient to detect anomalies, and introducing complex features does not
improve the performance of the model. In MSL and SMAP datasets, we can clearly
see that w/o FI and w/o VE outperform w/o FI+VE, which proves the
effectiveness of the multivariate feature interaction module and variational
encoding module. Comparing performance between w/o FI+VE and w/o FI+VE+EN, we
can find that w/o FI+VE can get better performance, which shows the
superiority of Encoder-Decoder model in anomaly detection. Finally, compared
with the baselines, w/o FI+VE+EN can get better performance generally, which
shows the importance of long-term temporal dependency modeling in anomaly
detection.

Table 2: The $F1_{best}$ of HIFI and its variants

Methods | MSL | SMAP | SMD
---|---|---|---
HIFI | 0.9546 | 0.9708 | 0.9773
w/o FI | 0.9455 | 0.9674 | 0.9781
w/o VE | 0.9423 | 0.8821 | 0.9777
w/o FI+VE | 0.9415 | 0.8703 | 0.9787
w/o FI+VE+EN | 0.9358 | 0.8295 | 0.9771

##  5 Conclusion

In this paper, we propose a model, namely HIFI, an unsupervised anomaly
detection model for multivariate time series with high-order feature
interaction. Extensive empirical study based on real datasets confirms the
advantage of our proposed model compared with the state-of-the-art methods as
well as the importance of different components of our model for multivariate
anomaly detection.

Acknowledgements. This work is supported by NSFC (No. 61972069, 61836007,
61832017) and Sichuan Science and Technology Program under Grant 2020JDTD0007.

## References

  * [1] Hundman, K., Constantinou, V., Laporte, C., Colwell, I., Soderstrom, T.: Detecting spacecraft anomalies using lstms and nonparametric dynamic thresholding. In: KDD. p. 387–395 (2018)
  * [2] Kang, W.C., McAuley, J.: Self-attentive sequential recommendation. In: ICDM. pp. 197–206 (2018)
  * [3] Kieu, T., Yang, B., Guo, C., Jensen, C.: Outlier detection for time series with recurrent autoencoder ensembles. In: IJCAI. pp. 2725–2732 (2019)
  * [4] Kipf, T.N., Welling, M.: Semi-Supervised Classification with Graph Convolutional Networks. ArXiv (2016)
  * [5] Klicpera, J., Bojchevski, A., Günnemann, S.: Predict then propagate: Graph neural networks meet personalized pagerank. In: ICLR (2019)
  * [6] Malhotra, P., Ramakrishnan, A., Anand, G., Vig, L., Agarwal, P., Shroff, G.: Lstm-based encoder-decoder for multi-sensor anomaly detection. ArXiv (2016)
  * [7] Qin, Y., Song, D., Chen, H., Cheng, W., Jiang, G., Cottrell, G.W.: A dual-stage attention-based recurrent neural network for time series prediction. In: IJCAI. pp. 2627–2633 (2017)
  * [8] Su, Y., Zhao, Y., Niu, C., Liu, R., Sun, W., Pei, D.: Robust anomaly detection for multivariate time series through stochastic recurrent neural network. In: KDD. p. 2828–2837 (2019)
  * [9] Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, L., Polosukhin, I.: Attention is all you need. ArXiv (2017)
  * [10] Velickovic, P., Cucurull, G., Casanova, A., Romero, A., Liò, P., Bengio, Y.: Graph attention networks. ArXiv (2018)
  * [11] Wu, Z., Pan, S., Long, G., Jiang, J., Chang, X., Zhang, C.: Connecting the dots: Multivariate time series forecasting with graph neural networks. In: KDD (2020)
  * [12] Xu, H., Chen, W., Zhao, N., Li, Z., Bu, J., Li, Z., Liu, Y., Zhao, Y., Pei, D., Feng, Y., Chen, J., Wang, Z., Qiao, H.: Unsupervised anomaly detection via variational auto-encoder for seasonal kpis in web applications. In: WWW. p. 187–196 (2018)