# Visual Anomaly Detection for Images: A Survey

Jie Yang, Ruijie Xu, Zhiquan Qi, Yong Shi  University of Chinese Academy of
Sciences, Beijing 101408, China,
Email<EMAIL_ADDRESS>
###### Abstract

Visual anomaly detection is an important and challenging problem in the field
of machine learning and computer vision. This problem has attracted a
considerable amount of attention in relevant research communities. Especially
in recent years, the development of deep learning has sparked an increasing
interest in the visual anomaly detection problem and brought a great variety
of novel methods. In this paper, we provide a comprehensive survey of the
classical and deep learning-based approaches for visual anomaly detection in
the literature. We group the relevant approaches in view of their underlying
principles and discuss their assumptions, advantages, and disadvantages
carefully. We aim to help the researchers to understand the common principles
of visual anomaly detection approaches and identify promising research
directions in this field.

##  I Introduction

Anomaly detection is an important machine learning problem. Different from the
assumption of static and closed system, that most existing machine learning
methods are based on, it researches how machine learning models can deal with
the unknown and uncertain information under the open and dynamic system
environment. With the assumption of open environment, the learning systems
developed for anomaly detection are usually expected to leverage the knowledge
from the knows (normal data and patterns) to infer the unknowns (abnormal or
novel patterns that different from the normal ones). Anomaly detection
approaches usually extract, characterize and model the patterns with the
available normal data, and then develop reasonable anomaly detectors to
discover novel or abnormal patterns in the newly observed data. When the
target of anomaly detection is the image data, then comes the visual anomaly
detection or image anomaly detection.

The research of visual anomaly detection is important both in view of the
theory and applications. On the one hand, as mentioned, since the research
paradigm of visual anomaly detection is beyond the assumption that building
machine learning models in a closed systems, it will drive the development of
artificial intelligence in both theory and application. On the other hand,
visual anomaly detection has a broad application prospect. For example, in the
field of intelligent manufacturing, it can be applied to defects detection; in
the field of medical image analysis, it can be used to detect the lesions in
medical images; in the field of intelligent security, it can be used to detect
the abnormal events in videos.

This paper will provide a comprehensive review of the literature about visual
anomaly detection. We will group the relevant approaches in view of their
basic ideas and review each of them carefully following their developmental
logic. Generally, the categorization and review of the various visual anomaly
detection approaches in the current literature will help relevant researchers
to understand the development and further trend of visual anomaly detection,
develop novel detection techniques and open up new research directions.

##  II Overview of visual anomaly detection

From the perspective of whether the supervised information (whether there are
abnormal samples or abnormal patterns) is available, Visual anomaly detection
can be divided into two different research themes: supervised and unsupervised
visual anomaly detection. In this paper, we will mainly review the approaches
that address the unsupervised visual anomaly detection problem. On the one
hand, unsupervised visual anomaly detection drives the proposed approaches to
develop computer vision models that can capture the detection ability as our
human vision. On the other hand, the unsupervised situation is more common for
most practical application scenarios. Because in many application scenes,
abnormal image samples are very rare and difficult to collect, there is no
effective supervision information to use. Moreover, abnormal samples or
abnormal patterns are usually variable in shape, color and size, and they do
not have stable statistical laws. All these will make it difficult for the
supervised learning model to capture enough statistical information or salient
features about abnormal image patterns.

Besides, in view of different visual detection granularity, visual anomaly
detection can be grouped into two categories: image-level and pixel-level
visual anomaly detection. Among them, image-level detection usually only
focuses on the question of whether the whole image is normal or abnormal,
while pixel-level anomaly detection further requires detect or locate the
abnormal regions in the image.

In addition, according to the historical development of visual anomaly
detection researches, the literature for unsupervised image (including image-
level and pixel-level) anomaly detection can be roughly divided into two
stages: before deep learning and after deep learning. Before the deep learning
is put forward, the research for visual anomaly detection focus on developing
anomaly detection strategies or mechanisms. The main research problem is:
After obtaining the shallow features of images by hand, such as the gray
value, SIFT [1] and HOG [2], it attempts to develop different the detection
mechanisms based on statistics or traditional machine learning methods, such
as density estimation, one-class classification and image reconstruction. It
estimates the distribution model of normal images or the images features
first. Then, if the images or the features do not meet the corresponding
distribution model, they will be recognized as the anomalies. After the
development of deep learning techniques, especially after that the deep
convolution neural networks have been made great success both in low-level and
high-level computer vision tasks [3, 4, 5, 6, 7, 8, 9], the relevant
researchers gradually shift their attentions to the question of how to combine
the powerful representation capability of the deep convolution network with
the problem of visual anomaly detection, and devote themselves to develop the
end-to-end detection approaches.

In the next sections, we will follow the development of the research of
unsupervised visual anomaly detection, group the relevant approaches into
categories in view of the different detection mechanisms behind them and
review the existing researches on image-level and pixel-level anomaly
detection respectively.

##  III Image-level visual anomaly detection

Based on the different detection mechanisms, unsupervised image-level anomaly
detection methods can be roughly divided into four groups: density estimation,
one-class classification, image reconstruction and self-supervised
classification.

###  III-A Density estimation

The density estimation method estimates the probability distribution model of
the normal images or features firstly, then detects and identifies whether the
newly observed image is abnormal or normal by testing against the established
distribution. Methods based on density estimation usually assume that if the
testing image or image feature does not meet the probability distribution
model that is estimated with the normal image samples, it will be classified
as anomaly. Concretely, density estimation methods first model the probability
distribution of the normal images or features, then judge whether the test
image is normal or abnormal by estimating the likelihood probability or score
of the test image against the established distribution.

Typical density methods include parameter distribution estimation, such as
Gaussian model and Gaussian mixture model [10, 11], non-parametric estimation
methods, such as nearest neighbor and kernel density estimation method [11].
However, estimating a reasonable probability density requires a large number
of training samples. And when the feature dimension of the samples is very
large (such as image data), this problem of the number of training samples
becomes particularly prominent. In addition, the scalability of these classic
models is poor. The deep generative models [12, 13, 14, 15] are capable of
establishing the probability distribution of the high-dimension data, such as
images. But they still need a large number of image samples for the related
task. At the same time, deep generative models are not robust enough, and
their performances for anomaly detection are not stable. Through a large
number of experiments, the authors in [16] found that the current popular deep
generative models, such as variational automatic encoder (VAE) [12] or flow
model (Glow) [15], are not even competent for simple image anomaly detection
tasks.

###  III-B One-class classification

As the name suggests, one-class classification is to classify a single class,
concretely which attempts to construct a decision boundary of the target class
(normal images) in the feature space. Classic approaches are one-class support
vector machines (OCSVM) [17] and support vector data description (SVDD) [18].
One-class methods do not need to estimate the concrete probability of each
sample point of the image distribution, so they do not require a large number
of training samples. But they still suffer from the problems of dimension
disaster and scalability.

After the deep learning techniques are put forward, especially the deep
convolution neural network, the relevant researchers gradually shift their
attention on how to combine the deep convolution network with classic one-
class classification approaches. Perera et al. [19] propose an one-class
classification method based on transfer learning, which fine-tunes the pre-
trained convolution network to extract discriminative image features and then
takes the nearest neighbor classification method to construct the one-class
classifier. Perera et al. [20] further extend it to the problem of detecting
anomalies for multiple known classes instead of one class. Since the
approaches are not end-to-end deep classification models, their performance
may be sub-optimal [21]. Afterwards, Ruff et al. [22] propose an end-to-end
deep support vector description model and use it for anomaly detection. Oza et
al. [23] propose an end-to-end one-class classification neural network
(OCCNN).

###  III-C Image reconstruction

Image reconstruction approaches map the image to a low-dimensional vector
representation (latent space), and then try to find an inverse mapping or
reconstruction for the original image. The reconstruction-based approaches for
anomaly detection assume that the reconstruction errors of the normal images
are small, while that of abnormal images are larger. The widely used
reconstruction model is autoencoder. Autoencoder is proposed by Hinton [24]
and the basic idea behind it is redundancy compression and non-redundancy
separation. Autoencoder is a neural network that has a narrow middle hidden
layer. It tries to compress the input data through the hidden layer and then
regenerates the input. Because the hidden layer is very narrow, the network
may compress the redundant information in the input data while retain and
distinguish the non-redundant information. The model is also used to simulate
the information processing of the hippocampus in our brains [25].

Japkowicz et al. [25] first introduce the autoencoder into the field of
anomaly detection. Its working mechanism is that redundant information in
normal data may not be redundant information in abnormal data and vice versa.
Along with the development of deep learning, Sakurada et al. [26] first use
the deep autoencoder for anomaly detection of high-dimensional data. In
addition to the reconstruction error, the reconstruction probability estimated
by Monte Carlo sampling for scoring anomalies is proposed in [27].

At the same time, some scholars propose to leverage the distribution in the
latent space and reconstruction errors of the deep autoencoder simultaneously,
which can further improve the anomaly detection performance of the
reconstruction-based models. In [28], the author propose a Gaussian mixture
model to estimate the distribution of the latent code of autoencoders.
Besides, the probability distribution of the latent code is modeled by an
auto-regressive neural network in [29]. Moreover, in [30], the authors
introduce memory units for the latent code of the autoencoder, where a few
feature memory units are exploited to represent the latent distribution.

In addition, some methods suggest to increase the difficulties for the image
reconstruction. Typically, some transformations for the input image are
firstly performed, such as color removal or geometric transformations. Then
the autoencoder is trained to reconstruct the original input image with the
incomplete input image on which the transformation is made [31, 32]. This
method can effectively increase the reconstruction difficulties for abnormal
images, so their reconstruction errors are usually large. As a result, it can
effectively increase the disparities between normal images and abnormal
images, thus improving the performance of anomaly detection.

Schleglv et al. [33] is the first to adopt generative adversarial network
(GAN) for visual anomaly detection. The GAN model is trained by normal image
beforehand, and then the anomaly can be detected by calculating the difference
between the test image and the normal image that is the closest to the test
image. The closest normal image is found by performing an iterative
optimization process. Firstly, we try to find the closest latent code for the
test image in the GAN’s latent space with the gradient descent strategy, and
then use the GAN model to generate the corresponding normal image with the
obtained latent code. Since this model needs to perform an iterative search
process, its efficiency is usually unsatisfactory in practice.

Some approaches combine image reconstruction and adversarial training to
further improve the performance and efficiency of visual anomaly detection.
Sabokrou et al. [34] is the first to leverage autoencoder and adversarial
training simultaneously for image anomaly detection. Their model include a
generator which is a convolutional autoencoder and a discriminator. They
optimize the model both with the mean square error loss and the adversarial
loss. In the testing stage, the reconstruction error and the output
probability of discriminator are used as the indications for detection. Akçay
et al.[35] further introduce an encoder where the difference between the
latent code of reconstructed image and the ones of the input image is also
used as an indicator for the anomaly. Zenati et al. [36] adopt BiGAN [37] for
image anomaly detection. In [38], the authors propose to constrain or
regularize the feature distribution of the latent code in the joint model of
autoencoder and adversarial network. The approach further improves the
performance of visual anomaly detection. In order to overcome the disadvantage
of lacking robustness when using discriminator’s output of an GAN model as the
anomaly score, a new training strategy is proposed in [39]. The training
strategy can effectively improve the stability of the probability output of
the discriminator.

###  III-D Self-supervised classification

Visual anomaly detection by self-supervised classification mainly owes to the
powerful visual feature representation capability of self-supervised learning.
Self-supervised learning usually leverages certain auxiliary task (pretext)
and attempts to mine the available supervision information from large-scale
unsupervised data. It takes full use of the self-constructed supervision
information to learn the visual representation typically by a deep
convolutional neural network, and then the representations can be transferred
to many downstream tasks, such as image classification, object detection and
anomaly detection [40, 41, 42].

The idea behind self-supervised classification for anomaly detection is that
through self-supervised training, models can learn unique and more significant
characteristics and features of normal samples. The representations learned
for the target objects not only reflect their color, texture and other low-
level features, but also reflect the high-level features such as the location,
shape, position and direction. By learning these features only from normal
samples, the model then can effectively discern abnormal samples without such
characteristics. Golan et al. [40] proposes RotateNet, which makes a neural
model learn to distinguish the different geometric transformations (rotations)
that performed on normal images. This approach is the first to detect image
anomalies by constructing a self-supervised classification model.

Ali et al. [41] compared various self-supervised methods and found that the
self-supervised classification method, i.e. RotateNet [40], shows the state-
of-the-art performance for anomaly detection. In order to predict the rotation
of the image, RotateNet must learn about the shape, location and direction of
the target object in the image. Obviously, only learning the low-level
features such as color and texture is not enough to predict the rotation of
the image. Therefore, unlike other self-supervised representation learning
methods (such as image reconstruction), RotateNet learns about both of the
low-level and high-level features, thus performing better on the visual
anomaly detection task. However, for those symmetrical objects, RotateNet may
fail to predict the rotation and capture effective representations for anomaly
detection. Dan et al. [42] further propose to increase the difficulty of the
task for self-supervised classification, i.e. not only distinguishing the
rotation of the image but also classifying the translation of the image. Tack
et al. [43] introduce contrastive learning (a kind of self-supervised
classification method) for image anomaly detection and show that it performs
better when compared with other self-supervised classification methods. Sehwag
et al. [44] further improve and extend the contrastive learning for anomaly
detection and achieve the state-of-art image-level anomaly detection
performance.

##  IV Pixel-level visual anomaly detection

In terms of different anomaly detection mechanisms, approaches for
unsupervised pixel-level anomaly detection can be roughly divided into two
categories: image reconstruction and feature modeling. It should be pointed
out that all image-level anomaly detection methods generally can be used for
pixel-level anomaly detection, because we can segment the whole image into
multiple pieces, and then perform image-level anomaly detectionon the image
patches. However, image-level anomaly detection algorithms focus on the
semantic information of the whole image. But the semantic information in each
image patch may be weak, so the applicability of image-level detection may be
questionable. In the next sections, the methods specifically developed for
pixel-level unsupervised anomaly detection will be reviewed in detail.

###  IV-A Image reconstruction

A typical method of image reconstruction is to compress and reconstruct the
input image with the deep convolution autoencoder [45, 46, 47]. It first learn
to reconstruction of the normal images. Then, potential anomalies are detected
by evaluating the pixel difference between the input image and the
reconstructed image, where pixel-level $l_{2}$-distance [48]and image
structure similarity measure (SSIM) [49] can be used to measure the
disparities before and after the reconstruction. Generally, reconstruction-
based methods assume that the convolutional autoencoder trained only on normal
images cannot be generalized to abnormal images, in other words, i.e. it
cannot reconstruct the abnormal image as well as the normal ones.

The deep generative models based on variational autoencoder (VAE) [12] and
generative adversarial network (GAN) [50] can also be used as the
reconstruction model. Baur et al. [51] propose VAE-GAN which is used to detect
suspicious lesions in brain magnetic resonance images (MRI). There, GAN is
used for adversarial training to improve the quality of the reconstructed
image. During testing, VAE-GAN only uses pixel-level $l_{1}$-distance to score
the abnormality. Schlegl et al. [52] adopt a similar method. They take
convolution autoencoder instead of variational autoencoder and detect
anomalies for optical coherence tomography image. In addition to using the
common distance to measure the pixel difference, anomaly detection methods
based on the deep generative model can further leverage the reconstruction
probability [46, 53] or likelihood score [54, 55] as additional anomaly
measures.

Besides, some methods detect anomalies not by comparing the differences
between the input image and the reconstructed image, but by calculating the
differences between the input image and its nearest normal image. Schlegl et
al. [33] propose AnoGAN. Firstly, a GAN model is trained with normal images.
Then the anomaly is detected by estimating the difference between the test
image and the normal image which is closest to the test image. This normal
image is obtained through an iterative optimization process. Firstly, the
latent code that is closest to the test image’s is searched in the latent
space of the GAN model. Then the corresponding normal image is generated with
the generator of the GAN with the obtained latent code. David et al. [56] also
propose to detect anomalies by comparing the difference between the test image
and its nearest neighbor normal image obtained by an optimization. Since both
methods need to perform an iterative search process, they are inefficient for
practical applications.

Moreover, some methods propose to increase the difficulty of reconstruction
[57, 58]. They remove some information of the input image firstly, and then
make the convolutional autoencoder to reconstruct the input image with the
incomplete or degraded input. The information degradation process can
effectively increase the difficulty of abnormal image reconstruction, so it
can enlarge the anomaly score between the normal and abnormal samples, thus
improving the detection performance.

Image reconstruction for pixel-level anomaly detection is very intuitive. But
because it detects potential anomalies by evaluation the pixel-wise
differences in the pixel or image space, it usually is expected to regenerate
high-quality images for comparisons. However, high quality image generation
itself is still a challenging task. For example, the reconstruction approaches
usually struggle to regenerate the sharp edges and complex texture structure
for images. As a result, large reconstruction errors often appear in the edge
or texture regions, leading to a large number of false abnormal alarms.

###  IV-B Feature modeling

In stead of detecting anomaly in the image space, the feature-based methods
detect anomaly in the feature space. This category of methods is devoted to
constructing the effective representation of the local regions of the whole
image by using the handcrafted features [59, 60, 61, 62] or the representation
learned by neural networks [63, 64, 65, 66]. Then, many machine learning
models such as sparse coding [61, 62, 63], Gaussian mixed model [59, 60]and
Kmeans clustering [64] can be used to model the feature distribution of normal
images. For anomaly detection, if the regional feature corresponding to the
local region of the test image deviate from the modeled feature distribution,
this region will be labeled as abnormal.

In order to improve the detection performance, the multi-scale model ensemble
strategy [59, 62] is usually adopted which combines the results of multiple
single models derived from different image region sizes. Besides, to locate
the abnormal region in the image, feature-based methods usually needs to
divide the image into many small image patches firstly, and then model and
detect the anomalies in image-patch level. Therefore, it is very time-
consuming during both training and testing, especially when the deep neural
network is required to extract the deep image features. Mover, because each
local region of an image is evaluated independently, it may not be able to
infer anomalies by leveraging the global context information of the image.
Although the proposed multi-scale modeling strategy can alleviate the
mentioned shortcomings [59, 62]. However, the multi-scale strategy implicitly
assumes that each scale is independent and totally ignores the relationship
between different feature scales which is very important for making a
comprehensive detection decision.

Recently, Bergmann et al. [45] developed a benchmark dataset for evaluating
unsupervised image anomaly detection algorithms: MVtec AD. The dataset
consists of various texture and object categories, and contains more than 70
different types of anomalies. The authors evaluated many methods based on
image reconstruction and feature modeling on the proposed dataset, and found
that the detection performances of these methods on different data categories
are quite unstable, which shows an considerable room for improvement. Later,
Bergmann et al. [65] further proposed an unsupervised anomaly detection method
with a student-teacher distillation framework, and achieved very promising
results on MVtec AD dataset. They leverage the transferred deep convolution
features and detect the anomaly through feature regression. Specifically, they
take the pre-trained deep convolution features (such as ResNet18 [8]) as the
regression target or the teacher, and train a group of student networks that
imitate the teacher’s behavior or regress the target features of the normal
images. During testing, it first uses the student networks to predict the
teacher’s network output, and then calculates the anomaly score according to
the corresponding prediction errors and uncertainties (variance). This method
assumes that the student network only trained to regress the output of the
teacher network on the normal images may not be able to predict the output of
the teacher network on the abnormal images.

Recently, some feature-based methods, such as [66, 67, 68], are devoted to
coding multiple spatial context information by making use of pre-trained deep
hierarchical convolution features, which have shown great potential for pixel-
level anomaly detection and segmentation. Shi et al. [66] propose to make full
use of the hierarchical features of the pre-trained deep convolution network,
such as VGG19 [7] on Imagenet [69], and develop an effective feature
reconstruction mechanism for anomaly detection. Yi et al. [67] propose a
hierarchical convolutional encoder which can extract hierarchical features and
designs a self-supervised training strategy. For anomaly detection, they
specially develop a feature matching mechanism. Concretely, the features of
normal image patches are extracted and stored beforehand. Then, in the
reference stage, the features of the test image will be matching with the
features those have been stored previously by the nearest neighbor searching
method. Finally, the minimum matching distance is taken as the anomaly score
of each patch of the test image. Cohen et al. [68] adopt a similar feature
matching mechanism. Instead, they suggest using the pre-trained deep pyramid
convolution features, such as the convolution feature maps from ResNet18 [8]
on Imagenet [69].

Another research line of visual anomaly detection for images is leveraging the
gradient-based attention mechanism, such as Grad-CAM [70]and interpretable
deep generative models [71, 72]. Venkataramanan et al. [72] develop an guided
attention mechanism to locate the abnormal regions in the image. Liu et al.
[71] propose a gradient-based visual interpretation approach to estimate the
potential anomalies in the image with the variational autoencoder that only
trained on the normal data.

##  V Conclusion

In this survey paper, we have discussed various visual anomaly detection
approaches. The goal of this survey is to investigate and identify the
underlying principles and assumptions of the different models for anomaly
detection and help the researchers to understand the current research status
and trends of visual anomaly detection, draw insights from the current
approaches and open up new research directions.

## References

  * [1] D. G. Lowe, “Object recognition from local scale-invariant features,” in _Proceedings of the seventh IEEE international conference on computer vision_ , vol. 2. Ieee, 1999, pp. 1150–1157.
  * [2] N. Dalal and B. Triggs, “Histograms of oriented gradients for human detection,” in _2005 IEEE computer society conference on computer vision and pattern recognition (CVPR’05)_ , vol. 1. Ieee, 2005, pp. 886–893.
  * [3] Y. Zhang, Y. Tian, Y. Kong, B. Zhong, and Y. Fu, “Residual dense network for image restoration,” _IEEE Transactions on Pattern Analysis and Machine Intelligence_ , pp. 1–1, 2020.
  * [4] Y. S. Jie Yang, Zhiquan Qi, “Learning to incorporate structure knowledge for image inpainting,” in _Proceedings of the AAAI Conference on Artificial Intelligence_ , vol. 34, no. 7, 2020, pp. 12 605–12 612.
  * [5] S. Xie and Z. Tu, “Holistically-nested edge detection,” in _Proceedings of the IEEE International Conference on Computer Vision_ , 2015, pp. 1395–1403.
  * [6] K. Li, Y. Tian, B. Wang, Z. Qi, and Q. Wang, “Bi-directional pyramid network for edge detection,” _Electronics_ , vol. 10, no. 3, 2021.
  * [7] K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” in _arXiv preprint arXiv:1409.1556_ , 2014\.
  * [8] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in _Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition_ , 2016, pp. 770–778.
  * [9] R. Sun, X. Zhu, C. Wu, C. Huang, J. Shi, and L. Ma, “Not all areas are equal: Transfer learning for semantic segmentation via hierarchical region selection,” in _Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition_ , 2019, pp. 4355–4364.
  * [10] C. M. Bishop, _Pattern Recognition and Machine Learning (Information Science and Statistics)_. Pattern Recognition and Machine Learning (Information Science and Statistics), 2006.
  * [11] S. S. Khan and M. G. Madden, “A survey of recent trends in one class classification,” in _Artificial Intelligence and Cognitive Science-irish Conference_ , 2009.
  * [12] D. P. Kingma and M. Welling, “Auto-encoding variational bayes,” in _Proceedings of the International Conference on Learning Representations_ , vol. 29, 2014, pp. 5652–5661.
  * [13] L. Dinh, J. Sohl-Dickstein, and S. Bengio, “Density estimation using real nvp,” _arXiv preprint arXiv:1605.08803_ , 2016.
  * [14] N. Akoury and A. Nguyen, “Spatial pixelcnn: Generating images from patches,” _arXiv preprint arXiv:1712.00714_ , 2017.
  * [15] D. P. Kingma and P. Dhariwal, “Glow: Generative flow with invertible 1x1 convolutions,” _arXiv preprint arXiv:1807.03039_ , 2018.
  * [16] E. Nalisnick, A. Matsukawa, Y. W. Teh, D. Gorur, and B. Lakshminarayanan, “Do deep generative models know what they don’t know?” in _International Conference on Learning Representations_ , 2018.
  * [17] B. Schölkopf, J. C. Platt, J. Shawe-Taylor, A. J. Smola, and R. C. Williamson, “Estimating the support of a high-dimensional distribution,” _Neural Computation_ , vol. 13, no. 7, pp. 1443–1471, 2001.
  * [18] D. Tax and R. Duin, “Support vector data description,” _Machine Learning_ , vol. 54, no. 1, pp. 45–66, 2004.
  * [19] P. Perera and V. M. Patel, “Learning deep features for one-class classification,” _IEEE Transactions on Image Processing_ , vol. 28, no. 11, pp. 5450–5463, 2019.
  * [20] ——, “Deep transfer learning for multiple class novelty detection,” in _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition_ , 2019, pp. 11 544–11 552.
  * [21] B. Philippe, J. Neil, and W. I-Jeng, “Where’s wally now? deep generative and discriminative embeddings for novelty detection,” in _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition_ , 2019, pp. 11 507–11 516.
  * [22] L. Ruff, R. A. Vandermeulen, N. Grnitz, L. Deecke, and M. Kloft, “Deep one-class classification,” in _Proceedings of the International Conference on Machine Learning_ , 2018, pp. 3590–3600.
  * [23] P. Oza and V. M. Patel, “One-class convolutional neural network,” _IEEE Signal Processing Letters_ , vol. 26, no. 2, pp. 277–281, 2019.
  * [24] E. Hinton., “Connectionist learning procedures,” _Artificial Intelligence_ , 1989.
  * [25] N. Japkowicz, C. Myers, and M. Gluck, “A novelty detection approach to classification,” _Morgan Kaufmann Publishers Inc._ , 1995.
  * [26] M. Sakurada and T. Yairi, “Anomaly detection using autoencoders with nonlinear dimensionality reduction,” in _Proceedings of the MLSDA 2014 2nd Workshop on Machine Learning for Sensory Data Analysis_ , 2014, pp. 4–11.
  * [27] J. An and S. Cho, “Variational autoencoder based anomaly detection using reconstruction probability,” _Special Lecture on IE_ , vol. 2, no. 1, pp. 1–18, 2015.
  * [28] B. Zong, Q. Song, M. R. Min, W. Cheng, C. Lumezanu, D. Cho, and H. Chen, “Deep autoencoding gaussian mixture model for unsupervised anomaly detection,” in _International Conference on Learning Representations_ , 2018.
  * [29] D. Abati, A. Porrello, S. Calderara, and R. Cucchiara, “Latent Space Autoregression for Novelty Detection,” in _Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition_ , 2019, pp. 3705–3714.
  * [30] D. Gong, L. Liu, V. Le, B. Saha, M. R. Mansour, S. Venkatesh, and A. V. Den Hengel, “Memorizing normality to detect anomaly: Memory-augmented deep autoencoder for unsupervised anomaly detection,” in _Proceedings of the IEEE International Conference on Computer Vision_ , 2019, pp. 1705–1714.
  * [31] Y. Fei, C. Huang, C. Jinkun, M. Li, Y. Zhang, and C. Lu, “Attribute restoration framework for anomaly detection,” _IEEE Transactions on Multimedia_ , 2020.
  * [32] M. Salehi, A. Eftekhar, N. Sadjadi, M. H. Rohban, and H. R. Rabiee, “Puzzle-ae: Novelty detection in images through solving puzzles,” _arXiv preprint arXiv:2008.12959_ , 2020.
  * [33] T. Schlegl, P. Seebock, S. M. Waldstein, U. Schmidterfurth, and G. Langs, “Unsupervised anomaly detection with generative adversarial networks to guide marker discovery,” in _Proceedings of the International Conference Information Processing_ , 2017, pp. 146–157.
  * [34] M. Sabokrou, M. Khalooei, M. Fathy, and E. Adeli, “Adversarially learned one-class classifier for novelty detection,” in _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition_ , 2018, pp. 3379–3388.
  * [35] S. Akçay, A. Atapour-Abarghouei, and T. P. Breckon, “Skip-ganomaly: Skip connected and adversarially trained encoder-decoder anomaly detection,” in _2019 International Joint Conference on Neural Networks (IJCNN)_. IEEE, 2019, pp. 1–8.
  * [36] H. Zenati, C. S. Foo, B. Lecouat, G. Manek, and V. R. Chandrasekhar, “Efficient gan-based anomaly detection,” _arXiv preprint arXiv:1802.06222_ , 2018.
  * [37] J. Donahue, P. Krähenbühl, and T. Darrell, “Adversarial feature learning,” _arXiv preprint arXiv:1605.09782_ , 2016.
  * [38] P. Perera, R. Nallapati, and B. Xiang, “Ocgan: One-class novelty detection using gans with constrained latent representations,” in _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition_ , 2019, pp. 2898–2906.
  * [39] M. Z. Zaheer, J.-h. Lee, M. Astrid, and S.-I. Lee, “Old is gold: Redefining the adversarially learned one-class classifier training paradigm,” in _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , 2020, pp. 14 183–14 193.
  * [40] I. Golan and E. Y. Ran, “Deep anomaly detection using geometric transformations,” 2018.
  * [41] R. Ali, M. Khan, and C. M. Kyung, “Self-supervised representation learning for visual anomaly detection,” 2020.
  * [42] H. Dan, K. Lee, and M. Mazeika, “Using self-supervised learning can improve model robustness and uncertainty,” 2019.
  * [43] J. Tack, S. Mo, J. Jeong, and J. Shin, “Csi: Novelty detection via contrastive learning on distributionally shifted instances,” in _34th Conference on Neural Information Processing Systems (NeurIPS) 2020_. Neural Information Processing Systems, 2020.
  * [44] V. Sehwag, M. Chiang, and P. Mittal, “Ssd: A unified framework for self-supervised outlier detection,” _arXiv preprint arXiv:2103.12051_ , 2021\.
  * [45] P. Bergmann, M. Fauser, D. Sattlegger, and C. Steger, “Mvtec ad — a comprehensive real-world dataset for unsupervised anomaly detection,” in _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition_ , 2019, pp. 9592–9600.
  * [46] P. Bergmann, S. Löwe, M. Fauser, D. Sattlegger, and C. Steger, “Improving unsupervised defect segmentation by applying structural similarity to autoencoders,” in _arXiv: Computer Vision and Pattern Recognition_ , 2018\.
  * [47] S. Mei, H. Yang, and Z. Yin, “An unsupervised-learning-based approach for automated defect inspection on textured surfaces,” _IEEE Transactions on Instrumentation and Measurement_ , vol. 67, no. 6, pp. 1266–1277, 2018.
  * [48] R. Hadsell, S. Chopra, and Y. LeCun, “Dimensionality reduction by learning an invariant mapping,” in _Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition_ , vol. 2, 2006, pp. 1735–1742.
  * [49] Z. Wang, C. A. Bovik, R. H. Sheikh, and P. E. Simoncelli, “Image quality assessment: from error visibility to structural similarity,” _IEEE Transactions on Image Processing_ , pp. 600–612, 2004.
  * [50] I. Goodfellow, J. Pougetabadie, M. Mirza, B. Xu, D. Wardefarley, S. Ozair, A. Courville, and Y. Bengio, “Generative adversarial nets,” in _Proceedings of Advances in Neural Information Processing Systems_ , 2014, pp. 2672–2680.
  * [51] C. Baur, B. Wiestler, S. Albarqouni, and N. Navab, “Deep autoencoding models for unsupervised anomaly segmentation in brain mr images,” in _arXiv: Computer Vision and Pattern Recognition_ , 2018.
  * [52] T. Schlegl, P. Seebock, S. M. Waldstein, G. Langs, and U. Schmidterfurth, “f-anogan: Fast unsupervised anomaly detection with generative adversarial networks.” _Medical Image Analysis_ , vol. 54, pp. 30–44, 2019.
  * [53] J. An and S. Cho, “Variational autoencoder based anomaly detection using reconstruction probability,” in _SNU Data Mining Center, Technology Report_ , 2015.
  * [54] M. Sabokrou, M. Pourreza, M. Fayyaz, R. Entezari, M. Fathy, J. Gall, and E. Adeli, “Avid: Adversarial visual irregularity detection.” in _arXiv: Computer Vision and Pattern Recognition_ , 2018.
  * [55] Y. Tang, L. Zhao, S. Zhang, C. Gong, and J. Yang, “Integrating prediction and reconstruction for anomaly detection,” _Pattern Recognition Letters_ , vol. 129, pp. 123–130, 2019.
  * [56] D. Dehaene, O. Frigo, S. Combrexelle, and P. Eline, “Iterative energy-based projection on a normal data manifold for anomaly localization,” in _International Conference on Learning Representations_ , 2020, pp. 103–113.
  * [57] X. Yan, H. Zhang, X. Xu, X. Hu, and P.-A. Heng, “Learning semantic context from normal samples for unsupervised anomaly detection,” in _Proceedings of the AAAI Conference on Artificial Intelligence_ , vol. 35, no. 02, 2021, pp. 12 620–12 628.
  * [58] V. Zavrtanik, M. Kristan, and D. Skočaj, “Reconstruction by inpainting for visual anomaly detection,” _Pattern Recognition_ , vol. 112, p. 107706, 2021.
  * [59] X. Xianghua and M. Mirmehdi, “Texems: Texture exemplars for defect detection on random textured surfaces,” _IEEE Transactions on Pattern Analysis and Machine Intelligence_ , vol. 29, no. 8, pp. 1454–1464, 2007.
  * [60] T. Bottger and M. Ulrich, “Real-time texture error detection on textured surfaces with compressed sensing,” _Pattern Recognition and Image Analysis_ , vol. 26, no. 1, pp. 88–94, 2016.
  * [61] D. Carrera, F. Manganini, G. Boracchi, and E. Lanzarone, “Defect detection in sem images of nanofibrous materials,” _IEEE Transactions on Industrial Informatics_ , vol. 13, no. 2, pp. 551–561, 2017.
  * [62] D. Carrera, G. Boracchi, A. Foi, and B. Wohlberg, “Scale-invariant anomaly detection with multiscale group-sparse models,” in _International Conference on Image Processing_ , 2016, pp. 3892–3896.
  * [63] ——, “Detecting anomalous structures by convolutional sparse models,” in _International Joint Conference on Neural Networks_ , 2015, pp. 1–8.
  * [64] P. Napoletano, F. Piccoli, and R. Schettini, “Anomaly detection in nanofibrous materials by cnn-based self-similarity,” _Sensors_ , vol. 18, no. 1, pp. 209–209, 2018.
  * [65] P. Bergmann, M. Fauser, D. Sattlegger, and C. Steger, “Uninformed students: Student-teacher anomaly detection with discriminative latent embeddings,” in _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition_ , 2020, pp. 4183–4192.
  * [66] Y. Shi, J. Yang, and Z. Qi, “Unsupervised anomaly segmentation via deep feature reconstruction,” _Neurocomputing_ , 2020.
  * [67] J. Yi and S. Yoon, “Patch svdd: Patch-level svdd for anomaly detection and segmentation,” in _Proceedings of the Asian Conference on Computer Vision_ , November 2020.
  * [68] N. Cohen and Y. Hoshen, “Sub-image anomaly detection with deep pyramid correspondences,” _arXiv preprint arXiv:2005.02357_ , 2020.
  * [69] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein _et al._ , “Imagenet large scale visual recognition challenge,” _International Journal of Computer Vision_ , vol. 115, no. 3, pp. 211–252, 2015.
  * [70] R. R. Selvaraju, M. Cogswell, A. Das, R. Vedantam, D. Parikh, and D. Batra, “Grad-cam: Visual explanations from deep networks via gradient-based localization,” in _Proceedings of the IEEE international conference on computer vision_ , 2017, pp. 618–626.
  * [71] W. Liu, R. Li, M. Zheng, S. Karanam, Z. Wu, B. Bhanu, R. J. Radke, and O. Camps, “Towards visually explaining variational autoencoders,” in _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition_ , 2020, pp. 8642–8651.
  * [72] S. Venkataramanan, K.-C. Peng, R. V. Singh, and A. Mahalanobis, “Attention guided anomaly localization in images,” in _European Conference on Computer Vision_. Springer, 2020, pp. 485–503.


# Topological States in Two-Dimensional Su-Schrieffer-Heeger Models

Chang-An Li<EMAIL_ADDRESS>Institute for Theoretical Physics and
Astrophysics, University of Würzburg, 97074 Würzburg, Germany

(August 28, 2024)

###### Abstract

We study the topological properties of the generalized two-dimensional (2D)
Su-Schrieffer-Heeger (SSH) models. We show that a pair of Dirac points appear
in the Brillouin zone (BZ), consisting a semimetallic phase. Interestingly,
the locations of these Dirac points are not pinned to any high-symmetry points
of the BZ but tunable by model parameters. Moreover, the merging of two Dirac
points undergoes a novel topological phase transition, which leads to either a
weak topological insulator or a nodal-line metallic phase. We demonstrate
these properties by constructing two specific models, which we referred as
type-I and type-II 2D SSH models. The feasible experimental platforms to
realize our models are also discussed.

##  I Introduction

Topological phases of matter have attracted tremendous research interests in
recent decades Qi and Zhang (2011); Hasan and Kane (2010). Among those famous
topological models, the 1D Su-Schrieffer-Heeger (SSH) model provides a
prototype and simple model endowed with rich physics to investigate
topological phenomena in condensed matter physics Su  _et al._ (1979). It
exhibits fascinating topological properties such as the topological phase
transitions associated with Zak phase and fractional fermions number at the
ends of the sample Su  _et al._ (1979). It also helps to clarify the theory of
bulk polarization based on Berry phase King-Smith and Vanderbilt (1993), which
has wide and deep impacts on condensed matter physics in recent decades,
especially on the development of topological band insulators Shen (2017);
Bernevig and Hughes (2013).

Recently, the 1D SSH model has been extended to 2D on a square lattice. For
instance, Liu et al. found that the 2D SSH model shows nontrivial topological
phases even the Berry curvature is zero in the whole BZ Liu and Wakabayashi
(2017). Benalcazar et al. extended the 1D SSH model to two-, and three-
dimensional systems with a $\pi$-flux inserted at each plaquette of the
lattice. The proposed Benalcazar-Bernevig-Hughes (BBH) models hold quantized
bulk quadrupole and octupole moments in 2D and 3D, respectively Benalcazar
_et al._ (2017a, b). Similar to 1D SSH model, bound states carrying fractional
charges exist at the corners of the system. Thus the BBH provides a concert
example for the higher-order topological insulators (HOTIs). Such HOTIs
generalize the conventional bulk-boundary correspondence. Typically, a
topological bulk state in $d$-dimension has robust $(d-1)$-dimensional
boundary states. Nevertheless, HOTIs have localized states at boundaries that
are two or three dimensions lower than the bulk. The HOTIs have consequently
attracted both theoretical and experimental interest over past years Langbehn
_et al._ (2017); Song  _et al._ (2017); Geier  _et al._ (2018); Schindler  _et
al._ (2018); Serra-Garcia  _et al._ (2018); Peterson  _et al._ (2018); Ezawa
(2018); Kudo  _et al._ (2019); Volpez  _et al._ (2019); Sheng  _et al._
(2019); Hua  _et al._ (2020); Chen  _et al._ (2020); Zhang  _et al._ (2020a);
Roy (2019); Peng and Refael (2019); Li and Wu (2020); Li  _et al._ (2020,
2021a); Chen  _et al._ (2019); Qi  _et al._ (2020); Wei  _et al._ (2021); Ning
_et al._ (2022), and the higher-order topological protection has been extended
to superconductors Wang  _et al._ (2018); Yan  _et al._ (2018); Zhang  _et
al._ (2019); Zhang and Trauzettel (2020); Zhu (2018); Wu  _et al._ (2020);
Zhang  _et al._ (2020b) and semimetals Wang  _et al._ (2020); Ghorashi  _et
al._ (2020); Wang  _et al._ (2019).

Since several types of 2D SSH models are possible when generalizing the 1D SSH
model, it is thus natural to ask whether these models exhibit interesting
topological properties. In this work, we investigate the properties of two
typical kinds of 2D SSH models. Remarkably, we find that these models have
rich topological phases. In the semimetallic phase, a pair of Dirac points
appear in the BZ. Interestingly, the locations of the Dirac points are not
pinned but can be easily tuned by continuous parameter modulations without
breaking any symmetries. The merging of two Dirac points will experience a
novel topological phase transition which transform the system to either a weak
topological insulator or a nodal-line metallic phase. We demonstrate the
topological properties of these different phases by employing two independent
winding numbers together with boundary signatures and symmetry arguments. We
also discuss how to realize our model experimentally based on synthetic
quantum materials.

The remainder of this paper is organized as follows. Section II introduces the
type-I 2D SSH model and its band structure. Section III presents the
semimetallic phases of the type-I 2D SSH model. Section IV shows the
anisotropic nature of type-I 2D SSH model. Section V considers properties of
type-II 2D SSH model. Finally, we conclude our results with a discussion in
Section VI.

##  II type-I two-dimensional SSH model

Let us focus on the type-I 2D SSH model first Li  _et al._ (2021b). We
consider a type-I 2D SSH model as shown in Fig. 1(a), where the weak (thin)
bonds and strong (thick) bonds are alternately dimerized along the two
adjacent parallel lattice rows ($x$-direction) or columns ($y$-direction). The
four orbital degrees of freedom in each unit cell are labeled as $1-4$. For
clarity, we consider spinless fermions. The lattice Hamiltonian is

$\displaystyle H_{1}$ $\displaystyle=\sum_{{\bf R}}(t_{x}C_{{\bf
R},1}^{\dagger}C_{{\bf R},3}+tC_{{\bf R},2}^{\dagger}C_{{\bf R},4}+h.c.)$
$\displaystyle+\sum_{{\bf R}}(tC_{{\bf R},1}^{\dagger}C_{{\bf
R},4}+t_{y}C_{{\bf R},2}^{\dagger}C_{{\bf R},3}+h.c.)$
$\displaystyle+\sum_{{\bf R}}(tC_{{\bf R},1}^{\dagger}C_{{\bf
R}+\hat{x},3}+t_{x}C_{{\bf R},4}^{\dagger}C_{{\bf R}+\hat{x},2}+h.c.)$
$\displaystyle+\sum_{{\bf R}}(t_{y}C_{{\bf R},1}^{\dagger}C_{{\bf
R}+\hat{y},4}+tC_{{\bf R},3}^{\dagger}C_{{\bf R}+\hat{y},2}+h.c.),$ (1)

where $C_{{\bf R},i}^{\dagger}$ is the creation operator for the degree of
freedom $i$ in the unit cell ${\bf R}$ with $i=1,2,3,4$, as shown in the Fig.
1(a). Transforming it into the reciprocal space, the effective Bloch
Hamiltonian describing the type-I 2D SSH model reads

$\displaystyle H_{1}({\bf k})$
$\displaystyle=\left(\begin{array}[]{cc}0&q_{1}({\bf k})\\\
q_{1}^{\dagger}({\bf k})&0\end{array}\right),$ (4) $\displaystyle q_{1}({\bf
k})$
$\displaystyle\equiv\left(\begin{array}[]{cc}t_{x}+te^{ik_{x}}&t+t_{y}e^{ik_{y}}\\\
t_{y}+te^{-ik_{y}}&t+t_{x}e^{-ik_{x}}\end{array}\right);$ (7)

where ${\bf k}=(k_{x},k_{y})$ is the 2D wave-vector; $t$ and $t_{x/y}$ are the
staggered hopping amplitudes along $x/y$-directions. For simplicity, we put
the lattice constant to be unity and assume $t>0$ hereafter. From its off-
diagonal form, the Hamiltonian in Eq. (4) respects chiral (sublattice)
symmetry. Explicitly, the chiral symmetry is $\mathcal{C}H({\bf
k})\mathcal{C}^{-1}=-H({\bf k})$ with the chiral-symmetry operator
$\mathcal{C}=\tau_{3}\otimes\sigma_{0}$, where $\tau$ and $\sigma$ are Pauli
matrices for different orbital degrees of freedom in the unit cell. The energy
bands and corresponding wave functions can be obtained analytically. The
energy bands of Eq. (4) are

$E_{\eta}^{\pm}({\bf k})=\pm\sqrt{\xi_{\eta}^{2}({\bf
k})+\zeta_{\eta}^{2}({\bf k})}=\pm|\varepsilon_{\eta}({\bf k})|,$ (8)

where we have defined $\xi_{\eta}({\bf
k})\equiv(t+t_{x})\cos\dfrac{k_{x}}{2}+\eta(t+t_{y})\cos\dfrac{k_{y}}{2}$,
$\zeta_{\eta}({\bf
k})\equiv(t-t_{x})\sin\dfrac{k_{x}}{2}-\eta(t-t_{y})\sin\dfrac{k_{y}}{2}$, and
$\varepsilon_{\eta}({\bf k})\equiv\xi_{\eta}({\bf k})+i\zeta_{\eta}({\bf k})$
with $\eta=\pm 1$. The convenient form of energy bands Eq. (8) will help us to
locate the Dirac points and identify the phase diagram of the system.

Figure 1: (a) Schematic of the type-I 2D SSH lattice. Blue (red) thick and
thin bonds mark alternately dimerized hopping amplitudes in $x(y)$-direction.
(b) The full phase diagram of the type-I 2D SSH model in the parameter space
$(t_{x},t_{y})$. The shadowed region represents the semimetals (SMs) with a
pair of Dirac points. The orange dashed line at $t_{x}=t_{y}$ corresponds to a
nodal-line metallic phase. Other regions are the weak topological insulators.

##  III Semimetallic phases

The type-I 2D SSH model actually possesses three different topological phases,
as shown in the phase diagram Fig. 1(b). Here we first discuss the
semimetallic phase with a pair of Dirac points within the region
$|t_{x}+t_{y}|<2t$ and $t_{x}\neq t_{y}$. Due to the presence of chiral
symmetry, the conduction and valence bands touch at zero energy [Fig. 2(a)].
Thus, the existence of Dirac points is constrained by the conditions
$\xi_{\eta}({\bf k})=\zeta_{\eta}({\bf k})=0$. Consequently, we find a pair of
Dirac points located at ${\bf K}_{\pm}\equiv\pm(K_{x},-K_{y})$, where
$K_{x/y}$ are given by

$K_{x/y}=2\arccos\sqrt{\frac{(t+t_{y/x})^{2}(2t-t_{x}-t_{y})}{4t(t^{2}-t_{x}t_{y})}}.$
(9)

Astonishingly, the Dirac points are not pinned to any high-symmetry points but
are highly tunable by parameter modulations. If we consider a simple
parameterization with $t_{x}=s\in[0,t]$, $t_{y}=t-s$, and $t=1$, we find that
the relation $K_{x}+K_{y}=2\pi/3$ holds true. As a result, the Dirac points
move along a line segment when we vary the parameter $s$. Interestingly, no
symmetries are broken as we move around Dirac points by variation of $t_{x}$
and $t_{y}$. The Dirac points are topologically protected by a quantized
charge $Q_{{\bf K_{\pm}}}=\frac{1}{2\pi i}\oint_{\ell}d{\bf
k}\cdot\mathrm{Tr}\left[q^{-1}({\bf k})\nabla_{{\bf k}}q({\bf k})\right]$,
where the loop $\ell$ is chosen such that it encircles a single Dirac point
${\bf K}_{\pm}$ Schnyder and Ryu (2011); Heikkilä  _et al._ (2011). In
essence, it is based on the $\pi$ Berry phase, which is actually the same as
in graphene. The two Dirac points in the BZ have opposite topological charges
$Q_{{\bf K}_{\pm}}=\pm 1$. They annihilate each other when they meet in ${\bf
k}$-space.

Figure 2: Band structure in different phases of type-I 2D SSH model. (a) Band
structure in the semimetallic phase with $t_{x}=0.2t$ and $t_{y}=0.8t$. (b)
Band structure for the nodal-line metallic phase with $t_{x}=t_{y}=0.5t$. (c)
Band structure for a critical phase point with $t_{x}=1.6t$ and $t_{y}=0.4t$.
(d) Band structure for the weak topological insulators with $t_{x}=1.6t$ and
$t_{y}=1.2t$.

Let us then turn to the nodal-line metallic phase under the specific condition
$t_{x}=t_{y}$ [Fig. 2(b)]. From Eq. (8), we find that the system exhibits a
gapless nodal line at

$k_{x}+k_{y}=0,\ \mathrm{if}\ t_{x}=t_{y}\neq t.$ (10)

The appearance of a gapless nodal line is a direct consequence of accidental
mirror symmetry along the line $x+y=0$. In momentum space, the mirror symmetry
is expressed as $MH(k_{x},k_{y})M^{-1}=H(-k_{y},-k_{x})$. Note that the
Hamiltonian $H({\bf k})$ commutes with the mirror operator $M$ along the
nodal-line $k_{x}+k_{y}=0$. Therefore, we can label the eigen states of the
Hamiltonian $H({\bf k})$ by the eigen states of mirror operator $M$ as

$\displaystyle H({\bf k})|\pm\rangle$ $\displaystyle=\pm
E|\pm\rangle,M|\pm\rangle=\pm|\pm\rangle.$ (11)

We further note that the mirror operator commute with the chiral symmetry
operator, i.e., $[\mathcal{C},M]=0$. Therefore, we can show that
$\mathcal{C}|+\rangle$ is also an eigenstate of $M$ with eigen value $+1$.
Moreover, $\mathcal{C}|+\rangle$ is eigenstate of $H({\bf k})$ with energy
$+E$. Actually, the chiral symmetry maps the state $|+\rangle$ with energy
$+E$ to state $\mathcal{C}|+\rangle$ with energy $-E$. This implies that those
states are degenerated states at energy $E=0$.

Figure 3: (a) Energy spectrum of a ribbon along $x$-direction with width
$W_{y}=20$. Notice the flat band at zero energy. (b) Energy spectrum of the
ribbons along $y$-direction with width $W_{x}=20$. (c) Wannier bands
$\theta_{y}$ as a function of $k_{x}$. (d) Wannier bands $\theta_{x}$ as a
function of $k_{y}$. The other parameters are $t_{x}=1.2t$ and $t_{y}=1.8t$.

##  IV Weak topological insulating phases

The merging of two Dirac points can transfer the system from the semimetallic
phase to a weak topological insulator, which provides a novel type of
topological phase transition. Figure 2(c) presents the band structure at the
critical merging points, at which the spectrum stays linear along one
direction while becomes parabolic along another direction Montambaux  _et al._
(2009). Specifically, the weak topological insulators is located in the region
$|t_{x}+t_{y}|>2t$ and $t_{x}\neq t_{y}$. The weak topological insulators
possess a direct band gap, see Fig. 2(d). It is described by two winding
numbers $(w_{x},w_{y})$ with one of them being one and the other being zero.
The winding number is defined as

$\displaystyle w_{x/y}$ $\displaystyle=\frac{1}{2\pi
i}\int_{0}^{2\pi}dk_{x/y}\mathrm{Tr}[q_{1}^{-1}({\bf
k})\partial_{k_{x/y}}q_{1}({\bf k})]$

for arbitrary $k_{y/x}\in[0,2\pi]$. Actually, this weak topological insulators
can be further divided into two subphases: (i) $w_{x}=1,w_{y}=0$
($t_{x}>t_{y}$ and $|t_{x}+t_{y}|>2t$) and (ii) $w_{x}=0,w_{y}=1$
($t_{x}<t_{y}$ and $|t_{x}+t_{y}|>2t$). When $w_{x}=1,w_{y}=0$
($w_{x}=0,w_{y}=1$), the system is nontrivial along $x$($y$)-direction and
trivial along $y(x)$-direction. It is clear that once crossing the boundary
$t_{x}=t_{y}$ the system will shift from subphase (i) to subphase (ii) or vice
versa. Correspondingly, a totally flat edge band exists in the gap of the
energy spectrum of a ribbon along $x$($y$)-direction for the subphase (i)
(subphase (ii)). Figures 3(a) and (b) present the band structure of a ribbons
along $x$\- and $y$ -direction, respectively, for the subphase (ii). The flat
edge bands exist only in Fig. 3(a). Notably, neither the topologically trivial
insulator with $w_{x}=w_{y}=0$ nor the nontrivial phase with $w_{x}=w_{y}=1$
appear in the inclined 2D SSH model.

Furthermore, the calculation of Wannier bands can also provide consistent
results with that of $w_{x/y}$ to identify the topological properties.
Specifically, the Wilson loop operator parallel to $y$ direction is
constructed as Benalcazar  _et al._ (2017b); Alexandradinata  _et al._ (2014)

$\hat{P}_{y,{\bf k}}=P_{N_{y}\delta k_{y}+k_{y}}P_{(N_{y}-1)\delta
k_{y}+k_{y}}\cdots P_{\delta k_{y}+k_{y}}P_{k_{y}},$ (12)

where each projection operator is defined as $P_{m\delta
k_{y}+k_{y}}\equiv\sum_{n\in N_{\mathrm{occ}}}|u_{k_{x},m\delta
k_{y}+k_{y}}^{n}\rangle\langle u_{k_{x},m\delta k_{y}+k_{y}}^{n}|$ with
$|u_{k_{x},m\delta k_{y}+k_{y}}^{n}\rangle$ being the $n$-th eigen state of
occupied bands at point $(k_{x},m\delta k_{y}+k_{y})$, and $m$ is an integer
taking values from $\\{1,2,\cdots,N_{y}\\}$. The projection method can avoid
the arbitrary phase problem in numerical realizations. Here $N_{y}$ is the
number of unit cells, $n$ is the band index, and $N_{\mathrm{occ}}$ is the
number of occupied bands. Note that $\hat{P}_{y,{\bf k}}$ has dimension of $N$
now with $N$ being the total bands number. After projection onto the occupied
bands at base point ${\bf k}$, there is $N_{\mathrm{occ}}\times
N_{\mathrm{occ}}$ matrix $\mathcal{W}_{y,{\bf k}}$ that defines a Wannier
Hamiltonian $H_{\mathcal{W}_{y}}({\bf k})$ from the relation
$\mathcal{W}_{y,{\bf k}}=\exp[iH_{\mathcal{W}_{y}}({\bf k})]$. The eigen
values of $H_{\mathcal{W}_{y}}({\bf k})$ give the Wannier bands
$2\pi\theta_{y}(k_{x})$ associated with eigen states $|\theta_{y,{\bf
k}}^{j}\rangle$, $j\in\\{1,2,\cdots,N_{\mathrm{occ}}\\}$. The Wannier bands
plotted in Figs. 3(c) and (d) are corresponding to the cases in Figs. 3(a) and
(b). It is clear the two occupied bands in Fig. 3(c) gives a quantized half-
integer polarization while the two occupied bands in Fig. 3(d) gives a zero
polarization (mod 1). The quantized half-integer polarization indicates the
nontrivial topological properties.

##  V type-II two-dimensional SSH model

Figure 4: (a) Schematic of the type-II 2D SSH lattice. Blue (red) thick and
thin bonds mark alternately dimerized hopping amplitudes in $x(y)$-direction.
(b) The band structure with at pair of Dirac points. Her we take $t_{x}=0.4t$,
$t_{y}=1.2t$.

Now, let us consider another similar model: the type-II 2D SSH model, in which
the alternatively dimerization pattern is shown in Fig. 4(a). The lattice
Hamiltonian reads as

$\displaystyle H_{2}$ $\displaystyle=\sum_{{\bf R}}(t_{x}C_{{\bf
R},1}^{\dagger}C_{{\bf R},3}+tC_{{\bf R},2}^{\dagger}C_{{\bf R},4}+h.c.)$
$\displaystyle+\sum_{{\bf R}}(tC_{{\bf R},1}^{\dagger}C_{{\bf
R},4}+t_{y}C_{{\bf R},2}^{\dagger}C_{{\bf R},3}+h.c.)$
$\displaystyle+\sum_{{\bf R}}(tC_{{\bf R},1}^{\dagger}C_{{\bf
R}+\hat{x},3}+t_{x}C_{{\bf R},4}^{\dagger}C_{{\bf R}+\hat{x},2}+h.c.)$
$\displaystyle+\sum_{{\bf R}}(tC_{{\bf R},1}^{\dagger}C_{{\bf
R}+\hat{y},4}+t_{y}C_{{\bf R},3}^{\dagger}C_{{\bf R}+\hat{y},2}+h.c.).$ (13)

The type-II model has many similarities with the type-I model, thus we just
focus on the semimetallic phase with Dirac points here. The effective Bloch
Hamiltonian describing the type-II 2D SSH model has the same form as Eq. (4)
but with the off-diagonal parts replaced as

$\displaystyle q_{2}({\bf k})$
$\displaystyle\equiv\left(\begin{array}[]{cc}t_{x}+te^{ik_{x}}&t+te^{ik_{y}}\\\
t_{y}+t_{y}e^{-ik_{y}}&t_{x}+te^{-ik_{x}}\end{array}\right).$ (16)

Its energy bands are

$E_{\eta}^{\pm}({\bf k})=\pm\sqrt{h_{0}({\bf
k})+\eta\sqrt{\sum_{j=x,y,z}h_{j}^{2}({\bf k})}},$ (17)

where we have defined the functions as $h_{0}({\bf
k})\equiv(t-t_{x})^{2}+4t_{x}t\cos^{2}\frac{k_{x}}{2}+2(t^{2}+t_{y}^{2})\cos^{2}\dfrac{k_{y}}{2}$,
$h_{x}({\bf k})\equiv
2\cos\frac{k_{y}}{2}\left[t(t_{x}+t_{y})\cos(k_{x}+k_{y}/2)+(t^{2}+t_{x}t_{y})\cos\frac{k_{y}}{2}\right]$,
$h_{y}({\bf k})\equiv
2\cos\frac{k_{y}}{2}\left[t(t_{x}+t_{y})\sin(k_{x}+\frac{k_{y}}{2})+(t^{2}+t_{x}t_{y})\sin\frac{k_{y}}{2}\right]$,
and $h_{z}({\bf k})\equiv 2(t^{2}-t_{y}^{2})\cos^{2}\dfrac{k_{y}}{2}$. The
type-II model has a glide-mirror symmetry: performing a mirror symmetry
$M_{x}$ and then a half translation $g_{y}$ along $y$-direction, the system
goes back to itself.

Its Dirac points are located along $k_{x}=0$ (or $k_{x}=\pi$) when $t_{y}>0$
(or $t_{y}<0$) [see Fig. 4(b)]. Explicitly, the Dirac points locate at $(0,\pm
2\arccos\sqrt{\frac{(t+t_{x})^{2}}{4tt_{y}}})$ for $t_{y}>0$ or $(\pi,\pm
2\arccos\sqrt{\frac{(t-t_{x})^{2}}{-4tt_{y}}})$ for $t_{y}<0$. Corresponding,
the physical solutions hold under the condition $(t+t_{x})^{2}<4t_{y}t$ or
$(t-t_{x})^{2}<-4t_{y}t$. The effective Hamiltonian close to the Dirac points
can also be obtained analytically. For simplicity, let us focus on the case of
$t_{y}>0$. To this end, we need to get the two zero-energy eigen states at the
Dirac points as a basis and then project the full Hamiltonian to the basis.
Finally, the effective Hamiltonian is expressed as

$H_{\mathrm{eff}}({\bf
k})=v_{x}\kappa_{x}\sigma_{x}-v_{y}\kappa_{y}\sigma_{y},$ (18)

where $v_{x}=\frac{\sqrt{t_{y}t}(t-t_{x})}{t+t_{y}}$, and
$v_{y}=\mathrm{sgn}(t+t_{x})\frac{\sqrt{t_{y}t(4t_{y}t-(t+t_{x})^{2})}}{t+t_{y}}.$

##  VI Discussion and conclusions

Here we discuss how to realize our proposals experimentally. The most
important ingredient is the controllable nearest-neighbor couplings between
sites on the square lattice. Fortunately, such techniques have been developed
in synthetic quantum materials such as photonic and acoustic crystals Wang
_et al._ (2009); Xie  _et al._ (2019); Chen  _et al._ (2019); Serra-Garcia
_et al._ (2018); Ni  _et al._ (2019), electric circuits Imhof  _et al._
(2018), and waveguides Peterson  _et al._ (2018); Cerjan  _et al._ (2020). For
instance, to realize our model in an acoustic system, the 3D printed “atoms”
can be arranged to a square lattice with four contained in each unit cell and
the alternately dimerized couplings between neighbours can be modulated the
diameters that the sound wave go through. Another feasible platform to realize
our model is based on ultracold gases in optical lattices Christian and
Immanuel (2017); Tarruell  _et al._ (2012), in which the lattice geometry and
hopping strengths are adjustable.

Note that our results are distinctively different from recent reports to
realize Dirac states in square lattices Shao  _et al._ (2021); Xue  _et al._
(2021). These proposals require necessary $\pi$ fluxes on each plaquette, and
the Dirac points are pinned to boundaries of the BZ, which may makes it more
difficult to detect experimentally. While our 2D SSH model does not require
delicate manipulations of external flux. Interestingly, our models even
provide platforms to realize the so called toric-code insulator Tam  _et al._
(2022).

In conclusion, we have proposed the 2D SSH models on a square lattice to
realize tunable Dirac states. We have found that the locations of Dirac points
are not pinned in the BZ but movable by parameter modifications. The merging
of two Dirac points leads to a topological phase transition, which converts
the system from a semimetallic phase to either a nodal-line metallic or a weak
topological insulator. We expect that our model can be realized in different
metamaterial platforms.

##  VII Acknowledgments

The author acknowledges S. B. Zhang, S. J. Choi, B. Fu, and B. Trauzettel for
helpful discussions. This work was supported by the DFG (SPP1666 and SFB1170
“ToCoTronics”), the Würzburg-Dresden Cluster of Excellence ct.qmat, EXC2147,
Project-id 390858490, and the Elitenetzwerk Bayern Graduate School on
“Topological Insulators”, and the NSF of Zhejiang under Grant No. LQ20A04005.

## References

  * Qi and Zhang (2011) X.-L. Qi and S.-C. Zhang, Rev. Mod. Phys. 83, 1057 (2011).
  * Hasan and Kane (2010) M. Z. Hasan and C. L. Kane, Rev. Mod. Phys. 82, 3045 (2010).
  * Su  _et al._ (1979) W. P. Su, J. R. Schrieffer, and A. J. Heeger, Phys. Rev. Lett. 42, 1698 (1979).
  * King-Smith and Vanderbilt (1993) R. D. King-Smith and D. Vanderbilt, Phys. Rev. B 47, 1651 (1993).
  * Shen (2017) S.-Q. Shen,  _Topological Insulators: Dirac Equation in Condensed Matter_ , 2nd ed. (Springer, Singapore, 2017).
  * Bernevig and Hughes (2013) B. A. Bernevig and T. L. Hughes,  _Topological insulators and topological superconductors_ (Princeton University Press, 2013).
  * Liu and Wakabayashi (2017) F. Liu and K. Wakabayashi, Phys. Rev. Lett. 118, 076803 (2017).
  * Benalcazar  _et al._ (2017a) W. A. Benalcazar, B. A. Bernevig, and T. L. Hughes, Science 357, 61 (2017a).
  * Benalcazar  _et al._ (2017b) W. A. Benalcazar, B. A. Bernevig, and T. L. Hughes, Phys. Rev. B 96, 245115 (2017b).
  * Langbehn  _et al._ (2017) J. Langbehn, Y. Peng, L. Trifunovic, F. von Oppen, and P. W. Brouwer, Phys. Rev. Lett. 119, 246401 (2017).
  * Song  _et al._ (2017) Z. Song, Z. Fang, and C. Fang, Phys. Rev. Lett. 119, 246402 (2017).
  * Geier  _et al._ (2018) M. Geier, L. Trifunovic, M. Hoskam, and P. W. Brouwer, Phys. Rev. B 97, 205135 (2018).
  * Schindler  _et al._ (2018) F. Schindler, Z. Wang, M. G. Vergniory, A. M. Cook, A. Murani, S. Sengupta, A. Y. Kasumov, R. Deblock, S. Jeon, I. Drozdov, H. Bouchiat, S. Guéron, A. Yazdani, B. A. Bernevig, and T. Neupert, Nat. Phys. 14, 918 (2018).
  * Serra-Garcia  _et al._ (2018) M. Serra-Garcia, V. Peri, R. Süsstrunk, O. R. Bilal, T. Larsen, L. G. Villanueva, and S. D. Huber, Nature 555, 342 (2018).
  * Peterson  _et al._ (2018) C. W. Peterson, W. A. Benalcazar, T. L. Hughes, and G. Bahl, Nature 555, 346 (2018).
  * Ezawa (2018) M. Ezawa, Phys. Rev. Lett. 120, 026801 (2018).
  * Kudo  _et al._ (2019) K. Kudo, T. Yoshida, and Y. Hatsugai, Phys. Rev. Lett. 123, 196402 (2019).
  * Volpez  _et al._ (2019) Y. Volpez, D. Loss, and J. Klinovaja, Phys. Rev. Lett. 122, 126402 (2019).
  * Sheng  _et al._ (2019) X.-L. Sheng, C. Chen, H. Liu, Z. Chen, Z.-M. Yu, Y. X. Zhao, and S. A. Yang, Phys. Rev. Lett. 123, 256402 (2019).
  * Hua  _et al._ (2020) C.-B. Hua, R. Chen, B. Zhou, and D.-H. Xu, Phys. Rev. B 102, 241102 (2020).
  * Chen  _et al._ (2020) R. Chen, C.-Z. Chen, J.-H. Gao, B. Zhou, and D.-H. Xu, Phys. Rev. Lett. 124, 036803 (2020).
  * Zhang  _et al._ (2020a) R.-X. Zhang, F. Wu, and S. Das Sarma, Phys. Rev. Lett. 124, 136407 (2020a).
  * Roy (2019) B. Roy, Phys. Rev. Research 1, 032048 (2019).
  * Peng and Refael (2019) Y. Peng and G. Refael, Phys. Rev. Lett. 123, 016806 (2019).
  * Li and Wu (2020) C.-A. Li and S.-S. Wu, Phys. Rev. B 101, 195309 (2020).
  * Li  _et al._ (2020) C.-A. Li, B. Fu, Z.-A. Hu, J. Li, and S.-Q. Shen, Phys. Rev. Lett. 125, 166801 (2020).
  * Li  _et al._ (2021a) C.-A. Li, S.-B. Zhang, J. Li, and B. Trauzettel, Phys. Rev. Lett. 127, 026803 (2021a).
  * Chen  _et al._ (2019) X.-D. Chen, W.-M. Deng, F.-L. Shi, F.-L. Zhao, M. Chen, and J.-W. Dong, Phys. Rev. Lett. 122, 233902 (2019).
  * Qi  _et al._ (2020) Y. Qi, C. Qiu, M. Xiao, H. He, M. Ke, and Z. Liu, Phys. Rev. Lett. 124, 206601 (2020).
  * Wei  _et al._ (2021) Q. Wei, X. Zhang, W. Deng, J. Lu, X. Huang, M. Yan, G. Chen, Z. Liu, and S. Jia, Phys. Rev. Lett. 127, 255501 (2021).
  * Ning  _et al._ (2022) Z. Ning, B. Fu, D.-H. Xu, and R. Wang, “Tailoring quadrupole topological insulators with periodic driving and disorder,” (2022), arXiv:2201.02414 [cond-mat.mes-hall] .
  * Wang  _et al._ (2018) Q. Wang, C.-C. Liu, Y.-M. Lu, and F. Zhang, Phys. Rev. Lett. 121, 186801 (2018).
  * Yan  _et al._ (2018) Z. Yan, F. Song, and Z. Wang, Phys. Rev. Lett. 121, 096803 (2018).
  * Zhang  _et al._ (2019) R.-X. Zhang, W. S. Cole, X. Wu, and S. Das Sarma, Phys. Rev. Lett. 123, 167001 (2019).
  * Zhang and Trauzettel (2020) S.-B. Zhang and B. Trauzettel, Phys. Rev. Research 2, 012018 (2020).
  * Zhu (2018) X. Zhu, Phys. Rev. B 97, 205134 (2018).
  * Wu  _et al._ (2020) Y.-J. Wu, J. Hou, Y.-M. Li, X.-W. Luo, X. Shi, and C. Zhang, Phys. Rev. Lett. 124, 227001 (2020).
  * Zhang  _et al._ (2020b) S.-B. Zhang, W. B. Rui, A. Calzona, S.-J. Choi, A. P. Schnyder, and B. Trauzettel, Phys. Rev. Research 2, 043025 (2020b).
  * Wang  _et al._ (2020) H.-X. Wang, Z.-K. Lin, B. Jiang, G.-Y. Guo, and J.-H. Jiang, Phys. Rev. Lett. 125, 146401 (2020).
  * Ghorashi  _et al._ (2020) S. A. A. Ghorashi, T. Li, and T. L. Hughes, Phys. Rev. Lett. 125, 266804 (2020).
  * Wang  _et al._ (2019) Z. Wang, B. J. Wieder, J. Li, B. Yan, and B. A. Bernevig, Phys. Rev. Lett. 123, 186401 (2019).
  * Li  _et al._ (2021b) C.-A. Li, S.-J. Choi, S.-B. Zhang, and B. Trauzettel, (2021b), arXiv:2112.07697 [cond-mat.mes-hall] .
  * Schnyder and Ryu (2011) A. P. Schnyder and S. Ryu, Phys. Rev. B 84, 060504 (2011).
  * Heikkilä  _et al._ (2011) T. T. Heikkilä, N. B. Kopnin, and G. E. Volovik, JETP Letters 94, 233 (2011).
  * Montambaux  _et al._ (2009) G. Montambaux, F. Piéchon, J.-N. Fuchs, and M. O. Goerbig, Phys. Rev. B 80, 153412 (2009).
  * Alexandradinata  _et al._ (2014) A. Alexandradinata, X. Dai, and B. A. Bernevig, Phys. Rev. B 89, 155114 (2014).
  * Wang  _et al._ (2009) Z. Wang, Y. Chong, J. D. Joannopoulos, and M. Soljačić, Nature 461, 772 (2009).
  * Xie  _et al._ (2019) B.-Y. Xie, G.-X. Su, H.-F. Wang, H. Su, X.-P. Shen, P. Zhan, M.-H. Lu, Z.-L. Wang, and Y.-F. Chen, Phys. Rev. Lett. 122, 233903 (2019).
  * Ni  _et al._ (2019) X. Ni, M. Weiner, A. Alù, and A. B. Khanikaev, Nat. Mater. 18, 113 (2019).
  * Imhof  _et al._ (2018) S. Imhof, C. Berger, F. Bayer, J. Brehm, L. W. Molenkamp, T. Kiessling, F. Schindler, C. H. Lee, M. Greiter, T. Neupert, and R. Thomale, Nat. Phys. 14, 925 (2018).
  * Cerjan  _et al._ (2020) A. Cerjan, M. Jürgensen, W. A. Benalcazar, S. Mukherjee, and M. C. Rechtsman, Phys. Rev. Lett. 125, 213901 (2020).
  * Christian and Immanuel (2017) G. Christian and B. Immanuel, Science 357, 995 (2017).
  * Tarruell  _et al._ (2012) L. Tarruell, D. Greif, T. Uehlinger, G. Jotzu, and T. Esslinger, Nature 483, 302 (2012).
  * Shao  _et al._ (2021) L. B. Shao, Q. Liu, R. Xiao, S. A. Yang, and Y. X. Zhao, Phys. Rev. Lett. 127, 076401 (2021).
  * Xue  _et al._ (2021) H. Xue, Z. Wang, Y.-X. Huang, Z. Cheng, L. Yu, Y. X. Foo, Y. X. Zhao, S. A. Yang, and B. Zhang, (2021), arXiv:2107.11564 [cond-mat.mes-hall] .
  * Tam  _et al._ (2022) P. M. Tam, J. W. F. Venderbos, and C. L. Kane, Phys. Rev. B 105, 045106 (2022).