# Exploring a Test Data-Driven Method for Selecting and Constraining
Metamorphic Relations

Alejandra Duque-Torres2, Dietmar Pfahl2, Claus Klammer3, and Stefan Fischer3
2Institute of Computer Science , University of Tartu, Tartu, Estonia
E-mail: {duquet<EMAIL_ADDRESS>3Software Competence Center Hagenberg
(SCCH) GmbH, Hagenberg, Austria
E-mail: {claus.klammer<EMAIL_ADDRESS>
###### Abstract

Identifying and selecting high-quality Metamorphic Relations (MRs) is a
challenge in Metamorphic Testing (MT). While some techniques for automatically
selecting MRs have been proposed, they are either domain-specific or rely on
strict assumptions about the applicability of a pre-defined MRs. This paper
presents a preliminary evaluation of MetaTrimmer, a method for selecting and
constraining MRs based on test data. MetaTrimmer comprises three steps:
generating random test data inputs for the SUT (Step 1), performing test data
transformations and logging MR violations (Step 2), and conducting manual
inspections to derive constraints (Step 3). The novelty of MetaTrimmer is its
avoidance of complex prediction models that require labeled datasets regarding
the applicability of MRs. Moreover, MetaTrimmer facilitates the seamless
integration of MT with advanced fuzzing for test data generation. In a
preliminary evaluation, MetaTrimmer shows the potential to overcome existing
limitations and enhance MR effectiveness.

###### Index Terms:

Test Oracle, Metamorphic Testing, Metamorphic Relations, Test Data

##  I Introduction

Metamorphic Testing (MT) is a software testing approach introduced by [1] to
address the test oracle problem. The oracle problem arises when the System
Under Test (SUT) lacks an oracle or when creating one to determine whether the
SUT outputs are correct is practically impossible. Unlike traditional testing
approaches, MT examines the relations between input-output pairs of
consecutive SUT executions, called Metamorphic Relations (MRs). MRs define how
the outputs should vary in response to specific changes in the input, enabling
testers to indirectly test the SUT by checking whether the inputs and outputs
satisfy the MRs [2]. A violated MR suggests a high probability that the SUT
has a fault, but no violations do not ensure a fault-free SUT. Selecting
appropriate MRs is non-trivial and requires a deep understanding of the SUT
and its domain. Hence, MR selection remains a significant challenge in MT.
Although some techniques have been proposed for automatic MR selection, they
either focus on specific domains or operate under strict assumptions about the
applicability of pre-defined MRs. For instance, Predicting Metamorphic
Relations (PMR) uses Machine Learning (ML) techniques to automatically select
probable MRs of program methods based on extracted features from the method’s
Control-Flow Graph (CFG) [3]. The idea behind PMR is to create a model that
predicts whether a specific MR can be used to test a method in a newly
developed SUT. Initial PMR evaluations used path- and node-based features
extracted from CFGs of Java methods and three predefined MRs to train SVM and
decision tree models [3]. Later, the approach was extended to six predefined
MRs using graph similarity measures, such as RWK and GK [4]. Other works have
followed the PMR approach, such as [5] who used semi-supervised learning on
CFG-based features [5], [6] who applied PMR to matrix-based programs [6], and
[7] who used software metrics instead of CFG-based features [7].

Despite promising results from the PMR study and subsequent works, the PMR
approach has significant limitations. Firstly, it relies on binary classifiers
that require labelled datasets to provide examples for learning. Labelled
datasets may not always be available, and obtaining them can be time-
consuming. Secondly, the feature extraction process for model training is
based on CFG or source code metrics, which may not account for refactoring.
This limitation can affect the accuracy of the PMR approach, as refactoring
can change the structure of the code and, consequently, the way MRs apply.
Lastly, the binary output of PMR may not consider test data and its impact on
MR applicability. This limitation implies that PMR does not consider the
possibility that an MR may apply to some test data with specific
characteristics and not others, leading to false positives or false negatives
in MR selection.

Motivated by the limitations of PMR and the challenges in selecting
appropriate MRs, this paper proposes MetaTrimmer, a test data-driven method
for selecting and constraining MRs and presents preliminary results. Similar
to PMR, we assume a pre-defined list of MRs is available. However, MetaTrimmer
does not rely on labelled datasets and takes into account that an MR may only
be applicable to test data with specific characteristics. The main goal of
MetaTrimmer is to simplify the process of selecting MRs from the pre-defined
set and provide constraints to the MRs based on the test data.

MetaTrimmer comprises three main steps: (1) Test Data Generation (TD
Generation), (2) MT Process, and (3) MR Analysis. Step 1, TD Generation, is
responsible for generating random test data for the SUT. In step 2, the MT
Process carries out necessary test data transformations based on the MRs, and
generates logs to record information about inputs, outputs, and any MR
violations during the execution of the test data and the transformed test data
against the SUT. MR Analysis, step 3, conducting manual inspections of
violation and non-violation results and identifying specific test data or
ranges where the MR is applicable to derive constraints. To evaluate the
feasibility and effectiveness of our approach, this paper aims to answer two
research questions.

RQ1: [Selection] How well does MetaTrimmer perform compared to the PMR
approach in terms of MR selection? This research question investigates the
feasibility of using test data to determine the applicable MRs for a given
method. Our hypothesis is that an MR that is violated 100% of the time does
not apply to the tested method, while an MR that is not violated in 100% of
the cases aligns with the tested method. To this end, we used a set of 25
methods, each labelled with a set of six predefined MRs used in the PMR
evaluation by [4] [4]. We carefully designed the test data to avoid triggering
any potential exceptions that the SUT may throw due to invalid inputs, as we
assume that the authors of the original PMR approach also did the same.
Specifically, we restrict the test data to positive integral numbers.

RQ2: [Constraints] How can test data be used to obtain constraints for MRs?
This research question investigates how test data can be used to generate
constraints for MRs, particularly in scenarios where violations and non-
violations do not reach 100%, referred to as mixed cases. The hypothesis is
that mixed cases can provide valuable insights into the behaviour of MRs and
aid in generating constraints. Building upon RQ1, where test data was limited
to positive integral numbers, this question incorporates test data that can
potentially cause the SUT to throw exceptions to explore how constraints for
MRs can be obtained when valid input data knowledge is not available. To this
end, we use the same MRs and the same 25 methods used in RQ1.

Our preliminary results indicate that MetaTrimmer is feasible and can
efficiently select and constrain MRs based on test data. However, further
empirical evaluation is required to verify the effectiveness and
generalisability of MetaTrimmer. We intend to perform additional experiments
and assessments to validate MetaTrimmer and determine any potential
shortcomings and areas for improvement. Despite this, we believe that our
approach can significantly contribute to the field of MRs selection.

The rest of the paper is structured as follows. Section II presents the main
concepts used in our study. In Section III, we introduce MetaTrimmer, along
with the research questions, the MRs, and the SUTs used for the evaluation. In
Section IV, we present the answers to the research questions and discuss our
results. We provide the related work in Section V. Finally, we conclude the
paper in Section VI.

##  II Background

This section presents the key concepts used in our research. Section II-A
introduces the MT approach. Section II-B provides a brief description of test
data generation techniques, Section II-C gives a brief description of PMR.

###  II-A Metamorphic Testing

MT is a software testing technique that aims to address the test oracle
problem by using internal properties of a SUT to verify expected outputs or
generate new test cases. This is achieved by analysing the relations between
the inputs and outputs of multiple SUT executions, known as MRs. MRs provide
descriptions of how outputs should change with specific variations in the
input. The MT process typically involves five main steps:

  1. 1.

Create a set of initial test data (td).

  2. 2.

Identify a list of MRs that the SUT should satisfy.

  3. 3.

Generate follow-up test data (ftd) by applying selected MR-specified
transformations to the inputs.

  4. 4.

Execute the corresponding SUT with td and ftd.

  5. 5.

Verify that the changes in the output observed in the td and ftd match the
changes defined by the MR.

The final step requires further analysis to determine the outcome of the MT
workflow, as no violations do not guarantee that the SUT is implemented
correctly. If an MR is violated, it suggests a fault in the SUT, assuming the
MR is correctly.

###  II-B Test Data Generation

In software testing, test data refers to the input data used during test
execution. It is utilised for positive testing to verify that the functions of
the SUT produce expected outputs for specific inputs and for negative testing
to evaluate the SUT’s ability to handle unusual or unexpected inputs.
Insufficiently constructed test data could result in some potential test cases
being missed, negatively impacting the software’s quality.

This paper does not aim to introduce new techniques for test data generation.
Instead, we leverage Fuzz Testing for generating test data. Fuzz Testing is a
software testing technique that injects erroneous or random data into software
systems to discover coding errors and security vulnerabilities [8]. Fuzzing
consists of three main components: the input generator, executor, and defect
monitor. The input generator provides the executor with various inputs. The
executor runs target programs on these inputs. The defects monitors the
execution to determine whether it discovers new execution states or defects
[8].

###  II-C Predicting Metamorphic Relations

PMR was introduced by [4] [4] as an approach to predict whether a particular
MR can be used to test a method in a newly developed SUT. PMR consists of
three phases, regardless of whether the feature extraction mechanism is CFG-
based or software metrics. In Phase I, features are extracted from the method,
either by a graph description representation derived from the method’s CFG or
by extracting desired software metrics from the SUT source code. Phase II
involves data preparation, including encoding categorical features, to meet
the requirements of the ML algorithms. Finally, in Phase III, binary
classification models are trained and evaluated to predict whether a specific
MR is relevant to the unit testing of a particular method.

It is essential to note that the PMR approach requires a labelled dataset with
a sample of methods where each method is assigned a label from a set of pre-
defined MRs to use. This dataset is used to train and evaluate the binary
classification models required to predict whether a specific MR is relevant to
the unit testing of a particular method. Without this labelled dataset, the
PMR approach cannot be applied. To evaluate the PMR approach, [4] used a code
corpus of 100 Java methods from open-source libraries such as Colt Project,
Apache Mahout, Apache Commons Mathematics, Java Collections, and six pre-
defined MRs. They manually labelled each method as either matching or not
matching each pre-defined MR, resulting in a binary label of $1$ or $0$,
respectively, to create a training dataset.

Figure 1: MetaTrimmer overview workflow

##  III Methodology

This section introduces MetaTrimmer (Section III-A) and details the
experimental setup for the evaluation. This includes information about the MRs
as well as the methods used as a SUT (Section III-B).

###  III-A MetaTrimmer

Figure 1 provides an overview of MetaTrimmer. Overall, MetaTrimmer consists of
three main steps: Test Data Generation (TD Generation), MT Process, and MR
Analysis. In the TD Generation step, test data (TD) is generated. The MT
Process step consists of three internal processes. Firstly, the TD produced in
the TD Generation step is transformed based on the MRs specifications,
resulting in transformed test data (TTD). Next, both the TD and TDT are
executed against the SUT, and the outputs are compared against the MR
specifications using the MR Checker, which provides a violation status for
each MR. Throughout these steps, the TD, TDT, corresponding SUT outputs, and
the violation status of each predefined MR are stored in a log file. Finally,
in the MR Analysis step, the recorded data is analysed to determine the
frequency of MR violations and non-violations for each applied MR. The output
of this step is a JSON file that contains such information. The selection and
constraint process involves manual analysis and inspection. The frequency of
MR violations or non-violations is examined to determine their applicability
to the SUT. A consistent 100% violation rate indicates that the MR does not
apply to the SUT, while a non-violation rate suggests a match with the SUT
behaviour. In scenarios with mixed cases, i.e., where violations and non-
violations are not 100%, it becomes crucial to identify specific TD or ranges
where the MR is applicable. This situation raises important questions for the
tester: ‘What is the valid input space in which the MR is violated or not
violated?’ and ‘What is the input space that results neither violates nor non-
violation of MRs, but causes the system to crash?’. By considering these
questions and performing the necessary analysis, the tester can not only
select MRs but also accurately specify the input-output relations across the
valid input space.

###  III-B System under test and pre-defined set of MRs

As we explain in Section II-C, [4] manually labelled $100$ Java methods with a
set of six pre-defined MRs in a binary manner. In a subsequent study, [9] [9]
extended the original PMR approach to include two additional programming
languages, Python and C++. They created two datasets consisting of source
codes of methods written in Python and C++. The methods in each dataset are
functionally identical to those used in the original Java dataset used by [4].
Because the functionality of the Python methods is equivalent to that of the
Java methods, [9] postulated that the same MRs that matched the Java methods
would also match the corresponding Python and C++ methods.

TABLE I: MRs used and the total number of methods to which a specific MR
applies (column ‘✓’)

MR | Change in the input | Output expected | ✓ | ✗
---|---|---|---|---
MRPER | Permute the components | Remain constant | $23$ | $2$
MRADD | Add a positive constant | Increase or remain constant | $21$ | $4$
MRMUL | Multiply by a positive constant | Increase or remain constant | $24$ | $1$
MRINV | Take the inverse of each element | Decrease or remain constant | $20$ | $5$
MRINC | Add a new element | Increase or remain constant | $14$ | $11$
MREXC | Remove an element | Decrease or remain constant | $13$ | $12$
Total number of cases to which the set of MRs applies (✓) and does not apply (✗) | $115$ | $35$

In this paper, we used 25 Python methods from the dataset created by [9]. We
also kept the same MRs and their labels, ensuring that they are the same as
those created by [4][4]. Table I summarises the MRs used, the changes in the
inputs and expected outputs, and the total number of methods to which a
specific MR applies. Table II presents the list of methods with their
respective labels as reported in [4] and [9]. The label ‘$1$’ indicates that
the MR applies (always), while the label ‘$0$’ indicates that the MR does not
apply (always) to the method. Additionally,

TABLE II: Set of methods with labels from [4] and [9]: ‘1’ denotes the MR-
method applies (always); ‘0’ denotes that the MR-method does not applies
(always)

Method name | MRPER | MRADD | MRMUL | MRINV | MRINC | MREXC
---|---|---|---|---|---|---
add_values | 1 | 1 | 1 | 1 | 1 | 1
average | 1 | 1 | 1 | 1 | 0 | 0
checkNonNegative | 1 | 0∗ | 1 | 1 | 1 | 0
checkPositive | 1 | 0∗ | 1 | 1 | 1 | 0
cnt_zeros | 1 | 0∗ | 0∗ | 0∗ | 1 | 1
count_non_zeros | 1 | 1 | 1 | 1 | 1 | 1
durbinWatson | 0 | 0 | 1 | 0 | 0 | 0
entropy | 1 | 1 | 1 | 0 | 1 | 1
find_magnitude | 1 | 1 | 1 | 1 | 1 | 1
find_max | 1 | 1 | 1 | 1 | 1 | 1
find_max2 | 0 | 1 | 1 | 1 | 1 | 1
find_median | 1 | 1 | 1 | 1 | 0 | 0
find_min | 1 | 1 | 1 | 1 | 0 | 1
geometric_mean | 1 | 1 | 1 | 1 | 0 | 0
harmonicMean | 1 | 1 | 1 | 1 | 0 | 0
kurtosis | 1 | 1 | 1 | 0 | 0 | 0
max | 1 | 1 | 1 | 1 | 1 | 1
min | 1 | 1 | 1 | 1 | 0 | 0
product | 1 | 1 | 1 | 1 | 1 | 1
safeNorm | 1 | 1 | 1 | 1 | 1 | 1
sampleVariance | 1 | 1 | 1 | 1 | 0 | 0
skew | 1 | 1 | 1 | 0 | 0 | 0
sum | 1 | 1 | 1 | 1 | 1 | 1
sumOfLogarithms | 1 | 1 | 1 | 1 | 1 | 1
variance | 1 | 1 | 1 | 1 | 0 | 0

Figure 2: Possible implementation pipeline of MetaTrimmer.

##  IV Results and Discussion

A replication package with the full set of data generated during our
experiments as well as all scripts can be found in our GitHub
repo111https://tinyurl.com/MetaTrimmer. Figure 2 illustrates the pipeline that
was developed for implementing MetaTrimmer and conducting the evaluations. The
implementation consists of five Python scripts. The first script, named
InputGenerator.py 1, is a fuzzer that uses a random number generator to create
the test data, which is based on a list of parameters. The output of this
script is a JSON a file that contains the generated test data. The parameters
are:

  * •

low (l): Fuzzer minimum value threshold.

  * •

high (h): Fuzzer maximum value threshold.

  * •

input_type (it): The type of elements in the list. Currently, the only
available options are ‘int’ or ‘float’.

  * •

$t_{end}$ (t): The end time of the program execution.

  * •

output (o): The name of the output file.

The second script, InputTransformer.py 2, transforms the test data generated
by InputGenerator.py based on the rules defined by each MR. The
InputTransformer.py script takes the JSON a file containing the generated test
data as input and produces a new JSON b file with the transformed data as
output. The number of fields in the JSON b file will depend on the number of
MRs used. For instance, we used six MRs, so we expected to have seven fields:
the original test data and the transformed data for each of the six MRs. It is
important to note that the MRs are described in natural language and need to
be translated into code so that they can be applied to the test data. The MRs
are hardcoded in InputTransformer.py script so that they are applied
automatically to the generated test data to generate the transformed test
data.

As Figure 2 shows, for each method tested, there exists an
Executer_<method>.py 3 script. The main purpose of the executer scripts is to
run the original test data, and the transformed test data generated for each
MR, i.e., JSON b, and store their outputs, represented by output JSON d in the
Figure 2. The number of executers required depends on the number of methods
being tested. In our experiment, we tested 25 different methods, creating 25
different executers and getting 25 JSON c files.

Then, the MR-Checker.py 4 script consumes the outputs generated by the
executer scripts and checks whether the outputs of the original test data and
the transformed test data match the corresponding MR. Similar to
InputTransformer.py script, the expected output relations for each MR are
hardcoded into the MR-Checker.py script, which means that the script applies
these relations automatically to the generated outputs from the executer
scripts. After the test data is generated, transformed, and checked, a JSON d
file is produced per each method containing information about the execution
ID, the original test data, the transformed test data for each MR, and the
verdict of the MR-Checker for each MR. The JSON d files produced by the MR-
Checker are used as input for the final script, called Analiser.py 5. The
Analiser.py script’s purpose is to calculate for each method how often each of
the applied MRs is violated or not violated, and store this information, JSON
e in Figure 2.

Figure 3:  GT values for MetaTrimmer evaluation: 1 means the MR always
applies, while 0 means it doesn’t always apply. We use symbols ✓and ✗ to
indicate the percentage of runs where the MR applies or is violated. ✓at 100%
means the GT is correct. Otherwise, it’s incorrect. If ✓ is 0, GT is fully
incorrect; if it’s less than 100% but not 0, it’s partially incorrect (mixed
case). Similarly, ✗ at 100% means the GT is correct. Otherwise, it could be
partially incorrect (mixed case), but if ✗ is 0, the GT is incorrect.

###  IV-A RQ1: How well does the proposed method perform compared to the PMR
approach in terms of MR selection?

In RQ1, we are interested to know whether an MR applies to a specific method.
We hypothesise that if the MR is violated in all test data, it does not apply
to the tested method. Conversely, if the MR is not violated for all test data,
it applies to the tested method. MetaTrimmer differs from the PMR method in
that it chooses MRs based on test data, while PMR employs binary classifiers
to predict if a given method consistently applies to a specific MR. Thus,
comparing the performance of the proposed method with the PMR approach in
terms of MR selection is not appropriate. However, we can compare the outcomes
of MetaTrimmer with the PMR approach in terms of the number of MRs that apply
to a given method based on its Ground Truth (GT). We assumed that the GT
labels were intended for only positive numbers. As such, we generated test
data with the constraint of using positive numbers only, and we avoided any
possible exceptions that may arise due to invalid inputs. To generate the test
data, we used InputTransformer.py script with the parameters specified below:
l$=1$, h$=50$, it$=$ int, t$=0.5$ s.

TABLE III: Set of methods with the GT from [4] and [9]: ‘1’ means that the MR
always applies, and ‘0’ means that the MR does not always apply. Symbol ✓
denotes the percentage of runs when the MR applies, and symbol ✗ denotes the
percentage of runs when the MR does not apply (= is violated). Test data
restriction: only positive integer numbers

Method name | MRPER | MRADD | MRMUL | MRINV | MRINC | MREXC
---|---|---|---|---|---|---
GT | ✓ [%] | ✗ [%] | GT | ✓ [%] | ✗ [%] | GT | ✓ [%] | ✗ [%] | GT | ✓ [%] | ✗ [%] | GT | ✓ [%] | ✗ [%] | GT | ✓ [%] | ✗ [%]
add_values | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0
average | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 0 | 0 | 100 | 0 | 50 | 50
checkNonNegative | 1 | 100 | 0 | 0 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 0 | 100 | 0
checkPositive | 1 | 100 | 0 | 0 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 0 | 100 | 0
cnt_zeros | 1 | 100 | 0 | 0 | 100 | 0 | 0 | 100 | 0 | 0 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0
count_non_zeros | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0
durbinWatson | 0 | 4 | 96 | 0 | 0 | 100 | 1 | 100 | 0 | 0 | 14 | 86 | 0 | 88 | 12 | 0 | 48 | 52
entropy | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 0 | 89 | 11 | 1 | 100 | 0 | 1 | 100 | 0
find_magnitude | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0
find_max | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0
find_max2 | 0 | 14 | 86 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0
find_median | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 0 | 9 | 91 | 0 | 54 | 46
find_min | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 0 | 49 | 51 | 1 | 86 | 14
geometric_mean | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 0 | 0 | 100 | 0 | 59 | 41
harmonicMean | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 0 | 3 | 97 | 0 | 69 | 31
kurtosis | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 0 | 17 | 83 | 0 | 48 | 52 | 0 | 65 | 35
max | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0
min | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 0 | 49 | 51 | 0 | 86 | 14
product | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0
safeNorm | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0
sampleVariance | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 0 | 0 | 100 | 0 | 0 | 100
skew | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 0 | 11 | 89 | 0 | 81 | 19 | 0 | 50 | 50
sum | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0
sumOfLogarithms | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0
variance | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 0 | 91 | 9 | 0 | 46 | 54
GT: Ground Truth |  |  |  |  |  |  |  |  |  |  |  |

Figure 3 shows the possible values of GT and its corresponding meaning for
MetaTrimmer. When GT is set to ‘$1$’, the MR always applies. On the other
hand, a value of ‘$0$’ means that the MR does not always apply. The symbol ✓
denotes the percentage of runs when the MR applies, and it has two possible
outcomes: If ✓is 100%, we assume that the GT is correct. These cases are
marked in Table III and Table IV using non-bold and non-italics formatting.
However, if it is less than 100%, we assume the GT is incorrect. In such
cases, we distinguish between two types of incorrectness: if ✓is equal to $0$,
it means that the GT is fully incorrect. These cases are marked in Table III
and Table IV. If ✓is less than 100% but not equal to 0, we refer to it as a
mixed case, where the GT is partially incorrect. These cases are marked in
Table III and Table IV using bold and italics formatting. Similarly, the
symbol ✗ denotes the percentage of runs where the MR does not apply or is
violated. If ✗is 100%, we assume that the GT is correct. These cases are
marked in Table III and Table IV using non-bold and non-italics formatting.
However, if it is less than 100%, we may consider it a mixed case, where the
GT could be partially incorrect. These cases are marked in Table III and Table
IV using italics formatting. If ✗is equal to 0, it means that the GT is
incorrect. These cases are marked in Table III and Table IV using bold
formatting.

Table III shows the methods used, their GT, and the frequency with which each
applied MR is violated or not violated per method. While analysing Table III,
at least four distinct patterns can be drawn: i) Methods labelled as $1$ in
the GT showed a 100% compliance rate, indicating that the MRs may apply to
those methods. ii) In only 5 out of 35 cases, an MR was violated 100% of the
time. This is for, durbinWatson violated MRADD 100% of the time, while
average, geometric_mean, and sampleVariance violated MRINC and sampleVariance
violated MREXC, all 100% of the time. iii) Some methods had a small proportion
of non-violations (less than 17%) and a high proportion of violations. This
was observed in 7 out of 35 cases. For instance, durbinWatson violated MRPER
only 4% of the time, while harmonic_mean violated it only 3% of the time.

These findings suggest that there is not always a scenario where an MR cannot
apply to a specific method. However, it is important to note that such
findings do not render the MRs useless. Instead, investigating and
understanding the small proportion of non-violations can be valuable in
improving the MRs. By making them more precise and customised to the specific
test data. iv) the analysis revealed cases where violations and non-violations
were relatively proportional. This was observed in 11 out of 34 cases, where
the violations and non-violations were proportional, indicating that the MRs
but with exceptions. For instance, kurtosis violated MRINC 52% of the time and
had no violations 48% of the time, while for MREXC, it had 35% violations and
65% non-violations. This implies that exceptions must be considered and
accounted for when applying MRs. In such cases, defining constraints based on
the specific test data is even more important.

Regarding $RQ_{1}$, our findings show that MetaTrimmer for selecting MRs
performs better than the PMR approach, with a compliance rate of 100% for all
methods labelled as ‘1’ in the GT. Furthermore, we identified three methods
with incorrect labels. Additionally, MetaTrimmer identified cases where the
MRs do not apply, cases with a small proportion of non-violations and a high
proportion of violations, as well as cases where violations and non-violations
are relatively proportional for methods labelled as ‘0’ in the GT. These
findings suggest that there is not always a scenario where an MR cannot apply
to a specific method. By investigating and understanding these non-violations,
we can improve the MRs by making them more precise and customised to the
specific test data, i.e., adding constraints. Even with initial constraints
for the test data (only positive integer numbers), MetaTrimmer can provide
valuable constraints for MRs that may only apply to specific test data. These
constraints can help uncover situations that may improve the overall test
coverage of the test suite.

TABLE IV: Set of methods with the GT from [4] and [9]: ‘1’ means that the MR
always applies, and ‘0’ means that the MR does not always apply. Symbol ✓
denotes the percentage of runs when the MR applies, and symbol ✗ denotes the
percentage of runs when the MR does not apply. Test data restriction: only
integers. Numbers in parentheses refer to the percentage of invalid input data
(crashes).

Method name | MRPER | MRADD | MRMUL | MRINV | MRINC | MREXC
---|---|---|---|---|---|---
GT | ✓ [%] | ✗ [%] | GT | ✓ [%] | ✗ [%] | GT | ✓ [%] | ✗ [%] | GT | ✓ [%] | ✗ [%] | GT | ✓ [%] | ✗ [%] | GT | ✓ [%] | ✗ [%]
add_values | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 46 | 54 | 1 | 37 |  44 (19) | 1 | 100 | 0 | 1 | 50 | 50
average | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 46 | 54 | 1 | 37 | 44 (19) | 0 | 80 | 20 | 0 | 50 | 50
checkNonNegative | 1 | 100 | 0 | 0 | 100 | 0 | 1 | 100 | 0 | 1 | 81 | 0 (19) | 1 | 100 | 0 | 0 | 98 | 2
checkPositive | 1 | 100 | 0 | 0 | 100 | 0 | 1 | 100 | 0 | 1 | 81 | 0 (19) | 1 | 100 | 0 | 0 | 98 | 2
cnt_zeros | 1 | 100 | 0 | 0 | 84 | 16 | 0 | 100 | 0 | 0 | 81 | 0 (19) | 1 | 100 | 0 | 1 | 100 | 0
count_non_zeros | 1 | 100 | 0 | 1 | 84 | 16 | 1 | 100 | 0 | 1 | 81 | 0 (19) | 1 | 100 | 0 | 1 | 100 | 0
durbinWatson | 0 | 4 | 96 | 0 | 41 | 59 | 1 | 100 | 0 | 0 | 39 |  42 (19) | 0 | 80 | 20 | 0 | 55 | 45
entropy | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 0 | 58 |  24 (18) | 1 | 100 | 0 | 1 | 100 | 0
find_magnitude | 1 | 100 | 0 | 1 | 60 | 40 | 1 | 100 | 0 | 1 | 81 | 0 (19) | 1 | 100 | 0 | 1 | 100 | 0
find_max | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 98 | 2 | 1 | 79 | 2 (19) | 1 | 100 | 0 | 1 | 100 | 0
find_max2 | 0 | 25 | 75 | 1 | 100 | 0 | 1 | 92 | 8 | 1 | 73 | 8 (19) | 1 | 100 | 0 | 1 | 100 | 0
find_median | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 49 | 51 | 1 | 38 | 43 (19) | 0 | 75 | 25 | 0 | 55 | 45
find_min | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 2 | 98 | 0 | 2 |  79 (19) | 0 | 99 | 1 | 1 | 87 | 13
geometric_mean | 1 | 59 | 0 (41) | 1 | 24 | 19 (57) | 1 | 59 | 0 (41) | 1 | 40 | 0 (60) | 0 | 19 |  40 (41) | 0 | 28 |  9 (63)
harmonicMean | 1 | 81 | 0 (19) | 1 | 43 | 23 (34) | 1 | 40 | 41 (19) | 1 | 40 | 41 (19) | 0 | 17 | 64 (19) | 0 | 41 | 40 (19)
kurtosis | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 0 | 19 | 62 | 0 | 80 | 20 | 0 | 65 | 35
max | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 98 | 2 | 1 | 79 | 2 (19) | 1 | 100 | 0 | 1 | 100 | 0
min | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 2 | 98 | 1 | 2 | 79 (19) | 0 | 99 | 1 | 0 | 87 | 13
product | 1 | 100 | 0 | 1 | 52 | 48 | 1 | 59 | 41 | 1 | 41 | 40 (19) | 1 | 59 | 41 | 1 | 59 | 41
safeNorm | 1 | 100 | 0 | 1 | 60 | 40 | 1 | 100 | 0 | 1 | 81 | 0 (19) | 1 | 100 | 0 | 1 | 100 | 0
sampleVariance | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 81 | 0 (19) | 0 | 0 | 100 | 0 | 0 | 100
skew | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 0 | 40 | 41 (19) | 0 | 18 | 82 | 0 | 50 | 50
sum | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 46 | 54 | 1 | 37 | 44 (19) | 1 | 100 | 0 | 1 | 50 | 50
sumOfLogarithms | 1 | 81 | 0 (19) | 1 | 34 | 32 (34) | 1 | 81 | 0 (19) | 1 | 81 | 0 (19) | 1 | 81 | 0 (19) | 1 | 81 | 0 (19)
variance | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 100 | 0 | 1 | 81 | 0 (19) | 0 | 9 | 91 | 0 | 46 | 54
GT: Ground Truth (NB: We use the same GT as in TABLE III to make the direct comparison of entries easier) |  |  |  |

###  IV-B RQ2: How can test data be used to obtain constraints for MRs?

In RQ1, we assumed a scenario where we had prior knowledge of the initial
restriction for the test data, i.e., only positive numbers. In RQ2, we
investigate a scenario where we lack this prior knowledge. Thus, we aim to
determine if mixed cases can provide valuable information for constraining
MRs. To generate the test data, we used InputTransformer.py script with the
parameters specified below: l$=-15$, h$=15$, it$=$ int, t$=0.5$ s. Upon
initial examination of the results presented in Table IV, one can observe
three types of outcomes: violation, non-violation, and invalid data. The
percentage of invalid data is denoted in parentheses in the column that
indicates that the MR does not apply (i.e., column ✗ [%]). Upon analysing the
results presented in Table IV, one can identify at least five patterns. i) It
is evident that the applicability of MRs can be easily determined by checking
if there are 100% no violations. When the GT is labelled as ‘1’, we observe
that some previously identified MRs still hold. For example, 20 out of the 23
cases in MRPER remain unchanged.

ii) Unlike in Table III, some GTs marked as ‘1’ in Table IV have mixed cases.
For instance, the add_values method under MRMUL has 46 non-violations and 54
violations. iii) When there is no initial constraint, a third type of outcome
could happen, invalid data. For instance, the geometric_mean method has only
59% non-violations and 0% violations, indicating that 41% of the test data was
invalid. iv) Some methods had a small proportion of non-violations and a high
proportion of violations and vice versa. v), similar to RQ1, there are cases
where the violations and non-violations were proportional. To extract
constraints, we manually inspected the mixed cases for each method. This
detailed examination allowed us to identify a clear pattern: most violations
occurred when negative numbers were involved in the test data. We also noticed
that empty arrays in the test data could result in either violations or
invalid data.

Regarding RQ2, our findings indicate that test data can be used to derive
constraints for MRs by examining their violations and non-violations for
various inputs. When an MR consistently holds for specific test data, it can
be considered a constraint for the MR. Conversely, if an MR is consistently
violated for specific test data, it is not appropriate for the SUT. Mixed
cases may also arise, indicating specific test data or test data ranges for
which the MR is applicable and providing constraints to restrict the scope of
the MR accordingly. By analysing the reasons behind these mixed cases,
specific constraints for the MR can be identified. We recognise that deriving
constraints for MRs through manual inspection of violation and non-violation
results can be a tedious and time-consuming task. To address this issue, in
the next stage of our research, we plan to focus on developing data mining
techniques to automate the derivation of constraints for MRs. This will
involve identifying relevant features and patterns in the data to improve the
analysis coverage and identify potential constraints that may have been missed
during manual inspections.

###  IV-C Threats to Validity

In the context of our study, two types of threats to validity are most
relevant: threats to internal and external validity.

To achieve internal validity, we used the same set of methods and MRs as in
[4]. There is a potential risk of bias in selecting the MRs or the test data
used, which could potentially impact the results obtained. For instance, we
found cases where certain methods and MRs were incorrectly labelled during our
analysis.

To enhance external validity and ensure the generalisability of the results,
it would have been preferable to include a wider range of methods in the
evaluation process. This would have helped to mitigate any potential bias that
could have arisen from the selection of the methods used. Therefore, the
current study may not be able to determine the full extent of the
effectiveness of MetaTrimmer.

###  IV-D Remarks on General Relevance

The results obtained in our preliminary evaluation demonstrate a small yet
promising potential of MetaTrimmer. It is important to note that MetaTrimmer
is designed to automate the process of selecting and constraining MRs based on
test data, which offers significant time and effort savings compared to manual
selection and analysis. Additionally, MetaTrimmer’s methodology is domain-
agnostic, allowing its application to diverse software systems and domains.
This practical relevance makes it a versatile solution suitable for various
testing scenarios, regardless of the source code or specific domain.
Furthermore, MetaTrimmer goes beyond MR selection by deriving constraints for
test data. This practical feature enables the identification of specific test
data or ranges where MRs are applicable, providing valuable guidance to
testers in creating focused test cases and ensuring comprehensive testing
coverage. While we acknowledge the need for further validation and
verification, we have plans to expand the evaluation of MetaTrimmer across
multiple domains. By testing various software systems representing different
domains, we aim to assess the method’s effectiveness and generalisability in
diverse contexts. Additionally, collaboration with other researchers and
testing practitioners will be sought to validate the MetaTrimmer method in
their respective environments. Sharing the approach, guidelines, and codebase
will encourage adoption and facilitate gathering feedback from the community.
To establish the practical relevance of MetaTrimmer, comparative studies will
be conducted by applying MetaTrimmer alongside existing MR selection methods
or alternative testing approaches. This comparative analysis will enable the
comparison of results, efficiency, and effectiveness of MetaTrimmer against
other methods, highlighting its advantages and practical relevance in the
field.

##  V Related work

Several studies have built upon the PMR approach [5, 6, 7, 10]. Despite the
promising results of the PMR approach and subsequent studies, there are
notable limitations. Firstly, the reliance on binary classifiers necessitates
labelled datasets for effective learning. Secondly, based on CFG or source
code metrics, the feature extraction process may not fully consider the
effects of refactoring. Additionally, the binary output of PMR may not account
for the influence of test data on MR applicability. Moreover, there is a lack
of comprehensive analysis in the existing studies regarding scenarios where
MRs may not always be applicable. Regarding finding constraints of MRs, [11]
proposed a method that generates MRs based on two concepts: identifying
potential input constraints and utilising constraint solvers to produce
concrete input values satisfying the identified constraints. This approach is
argued to generate more powerful and effective MRs compared to traditional
methods. However, it should be noted that using constraint solving requires
significant technical expertise and resources. Additionally, constraint
solving can be computationally expensive and may require longer processing
times, particularly for complex systems.

##  VI Conclusions

In this paper, we present and evaluate MetaTrimmer, a method for selecting and
constraining MRs based on test data. In RQ1, we investigated whether MRs can
be determined based on test data with known input restrictions. We
hypothesised that if a particular MR is violated 100%, it does not apply to
the tested method. On the other hand, if the MR is not violated in 100% of the
cases, we assume that it applies to the tested method. We compared the
performance of MetaTrimmer with the PMR approach in terms of MR selection, and
the results suggest that MetaTrimmer is effective.

In RQ2, we examined whether mixed scenarios can offer insights into MR
behaviour and aid in creating constraints without knowing any restrictions
regarding the test data used. We hypothesised that data from mixed cases could
offer insights into the behaviour of the MRs and aid in the generation of
constraints. The results suggest that the method is also effective and can
provide valuable information for generating constraints on MRs. One
significant outcome of our study is, indeed, that MetaTrimmer can identify MRs
that normally may have been excluded, i.e., those cases with small portions of
non-violations. This can lead to a more thorough and effective test suite with
improved coverage of edge cases and potential errors. Additionally, the
constraints can optimise the test suite by focusing on the most critical and
sensitive test data.

It is worth noting that the constraints on MRs are derived through manual
inspection of violation status, a tedious and time-consuming task. In the next
stage of our research, we will focus on developing data mining techniques to
identify relevant features and patterns in the data and automate the
derivation of constraints. Automating this process will increase analysis
coverage and identify potential constraints that may have been missed in
manual inspections, allowing testers to understand the constraints and
applicability of MRs better.

Finally, we would like to mention that with MetaTrimmer, it is possible to
reuse lists of known MRs as a starting point for the selection. Thus, if there
existed an open-source database of MRs, which is constantly growing by adding
new MRs whenever they emerge in specific contexts, then such a database could
replace the tedious process of having domain experts come up with an initial
set of suitable MRs to start from.

## Acknowledgement

The research reported in this paper has been partly funded by BMK, BMAW, and
the State of Upper Austria in the frame of the SCCH competence center
INTEGRATE [(FFG grant no. 892418)] part of the FFG COMET Competence Centers
for Excellent Technologies Programme, as well as by the European Regional
Development Fund, and grant PRG1226 of the Estonian Research Council.

## References

  * [1] Tsong Y Chen, Shing C Cheung and Shiu Ming Yiu  “Metamorphic testing: a new approach for generating next test cases”  In _Department of Computer Science, Hong Kong University of Science and Technology, Hong Kong, Tech. Rep. HKUST-CS98-01_ , 1998
  * [2] A. Duque-Torres, D. Pfahl, C. Klammer and S. Fischer  “Bug or not Bug? Analysing the Reasons Behind Metamorphic Relation Violations”  In _IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)_ , 2023, pp. 905–912  DOI: 10.1109/SANER56733.2023.00109
  * [3] Upulee Kanewala and James M. Bieman  “Using machine learning techniques to detect metamorphic relations for programs without test oracles”  In _IEEE 24th International Symposium on Software Reliability Engineering (ISSRE)_ , 2013, pp. 1–10  DOI: 10.1109/ISSRE.2013.6698899
  * [4] Upulee Kanewala, James M Bieman and Asa Ben-Hur  “Predicting metamorphic relations for testing scientific software: a machine learning approach using graph kernels”  In _Software testing, verification and reliability_ 26.3 Wiley Online Library, 2016, pp. 245–269
  * [5] Bonnie Hardin and Upulee Kanewala  “Using Semi-Supervised Learning for Predicting Metamorphic Relations”  In _3rd IEEE/ACM International Workshop on Metamorphic Testing (MET)_ , MET’18, 2018
  * [6] Karishma Rahman and Upulee Kanewala  “Predicting Metamorphic Relations for Matrix Calculation Programs”  In _3rd IEEE/ACM International Workshop on Metamorphic Testing (MET)_ , MET’18, 2018, pp. 10–13
  * [7] Alejandra Duque-Torres, Dietmar Pfahl, Claus Klammer and Stephan Fisher  “Using Source Code Metrics for Predicting Metamorphic Relations at Method Level”  In _5th Workshop on Validation, Analysis and Evolution of Software Tests_ , 2022
  * [8] Xiaogang Zhu, Sheng Wen, Seyit Camtepe and Yang Xiang  “Fuzzing: A Survey for Roadmap”  In _ACM Comput. Surv._ 54.11s New York, NY, USA: Association for Computing Machinery, 2022  DOI: 10.1145/3512345
  * [9] Alejandra Duque$-$Torres, Dietmar Pfahl, Rudolf Ramler and Claus Klammer  “A Replication Study on Predicting Metamorphic Relations at Unit Testing Level”  In _2022 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)_ , 2022, pp. 709–719  DOI: 10.1109/SANER53432.2022.00088
  * [10] Pengcheng Zhang, Xuewu Zhou, Patrizio Pelliccione and Hareton Leung  “RBF-MLMR: A Multi-Label Metamorphic Relation Prediction Approach Using RBF Neural Network”  In _IEEE Access_ 5, 2017, pp. 21791–21805  DOI: 10.1109/ACCESS.2017.2758790
  * [11] M. Castro-Cabrera, Antonio García-Domínguez and Inmaculada Medina-Bulo  “Using Constraint Solvers to Support Metamorphic Testing”  In _2019 IEEE/ACM 4th International Workshop on Metamorphic Testing (MET)_ , 2019, pp. 32–39  DOI: 10.1109/MET.2019.00013


# Transport evidence for the surface state and spin-phonon interaction in
FeTe0.5Se0.5

Mu-Yun Li  Center for High pressure Science and Technology Advanced Research,
Shanghai 201203, China  Ge Huang  Center for High pressure Science and
Technology Advanced Research, Shanghai 201203, China  Wei-Jian Li  Center for
High pressure Science and Technology Advanced Research, Shanghai 201203, China
Jia-Wei Hu  Center for High pressure Science and Technology Advanced Research,
Shanghai 201203, China  Ya-Kang Peng  Center for High pressure Science and
Technology Advanced Research, Shanghai 201203, China  Guangyong Xu  NIST
Center for Neutron Research, National Institute of Standards and Technology,
Gaithersburg, MD 20899, USA  Genda Gu  Condensed Matter Physics & Materials
Science Division, Brookhaven National Laboratory, Upton, NY 11973, USA  Xiao-
Jia Chen<EMAIL_ADDRESS>Center for High pressure Science and Technology
Advanced Research, Shanghai 201203, China  School of Science, Harbin Institute
of Technology, Shenzhen 518055, China

###### Abstract

The iron chalcogenides have been proved to be intrinsic topological
superconductors to implement quantum computation because of their unique
electronic structures. The topologically nontrivial surface states of
FeTe0.5Se0.5 have been predicted by several calculations and then confirmed by
high-resolution photoemission and scanning tunneling experiments. However, so
far, the shreds of the electrical transport evidence for topological surface
states are still in absence. By carrying out electrical transport experiments,
we observe a topological transition with a nonlinear Hall conductivity and
simultaneous linear magnetoresistance near the superconducting transition
temperature. Furthermore, we observe a sign reversal of the Hall coefficient
accompanied by a concurrently softening of the ${A}_{1g}$ phonon mode at about
40 K, indicating a nematic transition. The synchronized phonon softening with
nematicity manifests an enhanced fluctuation state through spin-phonon
interaction. Our results solidly corroborate the topological surface states of
FeTe0.5Se0.5 and provide an understanding of the mechanism of the
superconductivity in iron chalcogenides.

##  I Introduction

The iron chalcogenides are one of the most favored materials in the field of
topological superconductivityxu  because of their structural simplicity1 ,
uncomplicated phase diagram2  and easily-substitution-tuned physical
properties3 ; 4 . The parent compound FeSe has a transition temperature
(${T}_{c}$) of 8 K under ambient pressure5 , and of 37 K at a pressure of
about 9 GPa6 . Through proximity effect, a surprisingly higher ${T}_{c}$ of 65
K was reported accompanied by a topological phase in the single-layer FeSe
film on SrTiO37 . It has been proposed that the lattice vibrations8  and
excitations of electronic origin such as spin or electronic polarizability
fluctuations5  are the two important candidates of Cooper pairing for high-
temperature superconductivity in these superconductors. Later well-designed
studies revealed that both are important to the pairing interaction strengths
in FeSe9 . The strong enhancement of $T_{c}$ of the monolayer FeSe film was
suggested to result from the strong electron-phonon coupling (EPC) played by
an interface soft mode9 ; 10 ; 66 . Therefore, identifying the potential soft
phonon modes in unconventional superconductors remains an arduous but
necessary task and will help understand the mechanism of superconductivity70 .
With the increasing concentration of the Te atom, an intense spin-orbit
coupling effect is introduced in Fe1+yT$e_{x}$Se1-x systems20  and the
${T}_{c}$ rises to 14.5 K at $x$ around 0.511 . The spin-orbit interaction
will cause a band inversion near the Brillouin center. Thus, an s-wave
superconducting gap on the surface state of FeTe0.5Se0.5 below ${T}_{c}$ was
observed by the recent angle-resolved photoemission spectroscopy (ARPES)
experiments, solidly confirming the existence of the topological
superconductivity11 ; 12 . By tuning the nontrivial superconductivity on the
surface, the iron chalcogenides can be a promising candidate for realizing
Majorana bound states and paving the way for quantum computation57 ; 13 ; 14 .

The inverted electronic structure and spin-helical surface texture for
FeTe0.5Se0.5 resemble those of topological insulators11 ; 12 ; 58 . As
reported by Qu $et$ $al$, the acquired transport parameters of surface states
can help to investigate the high-mobility Dirac fermions and Majorana bound
states19 . So far, there is little information on FeTe0.5Se0.5 in this
aspect12 . The lack of transport information on surface state, especially the
carrier mobility, has hindered the further understanding of topological states
in FeTe0.5Se0.5. Meanwhile, the mechanisms of unconventional superconductivity
are still controversial issues5 ; 8 ; 9 . Previous Raman scattering
experiments on iron chalcogenides were mainly focused on the lattice
dynamics15 ; 16 ; 17 ; 18 , while the features for superconductivity or other
electronic states such as nematicity have not been reliably clarified. The
systematical studies on the vibrational properties of high-quality single-
crystal FeTe0.5Se0.5 are desirable. This could help the understanding of the
mechanism(s) of superconductivity and the possible role of the electron-phonon
coupling in iron-based superconductors.

In this work, we carry out the first-principles calculations, temperature-
dependent electrical transport, and Raman scattering measurements to explore
the topological superconductivity of single-crystal FeTe0.5Se0.5. We
corroborate a topological surface state with high mobility through transport
measurements, which is consistent with our theoretical predictions. Combined
with vibrational properties, we generally demonstrate the phase diagram of
FeTe0.5Se0.5. We find a nematic transition followed by the appearance of the
topological surface state. We conclude that both the spins and phonons play an
essential role in the unconventional superconductivity of iron chalcogenides.

Figure 1: Temperature dependence of the dc magnetization of FeTe0.5Se0.5. The
magnetic fields were set to be 20 Oe. The red and blue symbols denote the data
points of zero-field cooling (ZFC) and field cooling (FC), respectively. The
inset demonstrates the magnification in the temperature range from 2 K to 25
K. The ${T}_{c}$ was determined to be 14.5 K from the inset figure. Figure 2:
(a) The schematic crystalline structure of Fe(Te,Se) and the sketch of the
Brillouin zone of FeTe0.5Se0.5. The in-plane (001) surface Brillouin zone is
projected along the ${k}_{z}$ direction and marked by red solid lines. (b)
Electronic band structure of FeTe0.5Se0.5. The red line marks the area where
the band inversion emerges. (c) Electronic density of states of FeTe0.5Se0.5.
The black solid line represents the total density of states. The red and green
solid line denote the projected density of states of the Fe ($d$-orbit) and
Te/Se ($p$-orbit) atoms, respectively. (d) Electronic band structure projected
to the (001) surface. The red solid line shows the evident nontrivial Dirac-
cone state.

##  II Experimental and Calculation Details

High-quality single crystal with nominal composition FeTe0.5Se0.5 was grown by
the unidirectional solidification method. The oxygen-annealing method was used
to remove the excess Fe atoms in the interstitial sites. The ${T}_{c}$ of 14.5
K was determined by magnetization measurements with Quantum Design’s Magnetic
Properties Measurement System, as shown in Fig. 1. Fresh and clean surface of
FeTe0.5Se0.5 was cleaved in the glove box for electrical transport and Raman
scattering measurements with the size of about 150 $\times$ 150 $\mu$m and the
thickness of about 25 $\mu$m.

The electrical resistivity (${\rho}$) was measured with Quantum Design’s
Physical Property Measurement System using the standard four-probe method and
Platinum electrodes. To eliminate the transverse (longitudinal) resistivity
component from the misalignment of contacts, we obtained the ${\rho}_{xy}$ and
${\rho}_{xx}$ through ${\rho}_{xy}=[{\rho}_{xy}{(+H)}-{\rho}_{xy}{(-H)}]/2$
and ${\rho}_{xx}=[{\rho}_{xx}{(+H)}+{\rho}_{xx}{(-H)}]/2$, respectively. The
components for the Hall conductivity along the $xx$ and $xy$ directions are
related to the two expressions $\sigma_{xx}=1/\rho_{xx}$ and
$\sigma_{xy}=\rho_{xy}/(\rho_{xx}^{2}+\rho_{xy}^{2})$.

The Raman spectra were collected using a single-stage spectrograph equipped
with a thermoelectrically cooled charge-coupled device. The measurements were
carried out on a freshly cleaved sample surface of the crystal using a laser
with the wavelength of 488 nm in the temperature range from 296 K to 5 K. The
incident power was set below 1.5 mW with a spot diameter of about 10 $\mu$m to
avoid the heating effect.

All the first-principles calculations were performed in the framework of the
density functional theory48 ; 49 , as implemented in the Vienna $ab$ $inito$
simulation package50 ; 51 ; 52 . The spin-orbit coupling was included in the
calculations. The Perdew-Burke-Ernzerhof of generalized gradient approximation
was used for the exchange-correlation potential53 . The optimized experimental
lattice parameters54  were used to construct the crystal structure. The unit
cell with nominal composition FeTe0.5Se0.5 was extended to a large one in the
$c$ direction, with two Fe atoms and one atom for each of the Te and Se
elements involved (Fe2TeSe). For both self-consistent field and non-self-
consistent field calculations, a 9$\times$9$\times$6 k-point mesh was used in
the Brillouin zone, and the cut-off energy was set to 520 eV. The open-source
software package (Wanniertools)55  was used to investigate the topological
nature on the projected (001) surface of FeTe0.5Se0.5. The $s$ and $p$ orbits
for Fe atoms and the $p$ orbits for Te/Se atoms were selected when employing
the maximally localized Wannier functions56 .

##  III RESULTS AND DISCUSSION

###  III.1 Dirac-cone-like surface state from calculations

The schematic structure of layered FeTexSe1-x with ordered Te/Se sites and the
sketched Brillouin zone of FeTe0.5Se0.5 are presented in Fig. 2(a). Each of
the Fe atoms is connected with four neighboring Te/Se atoms, forming a
tetrahedron. Tunning the dopant level of Te/Se atoms introduces an enormous
spin-orbit coupling effect and significantly influences the band structure
near Fermi level (${E}_{f}$)11 . A topological transition emerges at around
$x$ = 0.511 ; 12 . The Brillouin zone of FeTe0.5Se0.5 has eight points with
time-reversal symmetry which include $\Gamma$(0,0,0), $M$($\pi$,$\pi$,0),
$Z$(0,0,$\pi$), $A$($\pi$,$\pi$,$\pi$), two $X$($\pi$,0,0) and two
$R$($\pi$,0,$\pi$). The two-dimensional Brillouin zone of the (001) surface is
projected along the ${k}_{z}$ direction. Based on the $k$ points of the
Brillouin zone, figure 2(b) gives the calculated bulk electronic structure of
FeTe0.5Se0.5. The band dispersion of the bulk state is generally consistent
with the preceding theoretical predictions and ARPES experiments20 ; 11 ; 12 .
Previous researches substantiated the Dirac-cone-like surface states of
FeTe0.5Se0.5 in the proximity to bulk superconductivity11 ; 12 . Within the
spin-orbit coupling, the nontrivial topological superconductivity is induced
by the band inversion between the Fe-$d$ and Te/Se-$p$ orbits along the
$\Gamma$ to $Z$ direction. The place where the band inversion appears is
marked by the red frame. For a better interpretation, figure 2(c) demonstrates
the density of states for different atoms. The Fe-$d$ and Te/Se-$p$ orbits
dominate the Fermi surface topology near ${E}_{f}$, although the weight of
Te/Se-$p$ components is relatively small. Based on the reliable bulk
calculations, we constructed the tight-binding model to reveal the (001)
surface’s topological nature. Figure 2(d) displays the calculated Dirac-cone-
like surface state along the ${k}_{y}$ direction. An evident linear dispersion
of the band structure near the ${E}_{f}$ can be observed. The calculations
demonstrate that the surface state is gapless and topologically nontrivial,
consistent with previous reports11 ; 12 . The linear dispersion of the
electronic structure shares similarities with the surface-state band
structures in topological insulators19 . From the calculations, we conclude
that FeTe0.5Se0.5 is a topological superconductor. The unique electronic
structure indicates that when the neighboring bands are twisted into the Dirac
cones, the carriers become high-mobility Dirac fermions. The results of
theoretical calculations provide insightful guidance for the following
experiments.

###  III.2 Electrical transport properties

Figure 3: (a) Temperature dependence of the electrical resistivity in
FeTe0.5Se0.5 single crystal. The inset shows the temperature dependence of the
resistivity at various magnetic fields up to 9 T. The applied field is
parallel to the $c$ axis. (b) Representative Hall conductivities of
FeTe0.5Se0.5 at different temperatures. The red open circles and blue solid
lines denote the experimental data and linear fitting curves, respectively.
The magnetic fields were set to change from -9 T to 9 T for a temperature of
20 K. At other temperatures, the magnetic fields were set to change from -3 T
to 3 T.

Before carrying out the Hall effect measurements, it is necessary to examine
the quality of the sample. Figure 3(a) presents the temperature dependence of
the resistivity for FeTe0.5Se0.5. The inset displays the resistivities below
18 K at each applied magnetic field from 0 T to 9 T. The sample turns into a
metallic state below 250 K ($d\rho/dT>0$) and exhibits superconductivity at
the temperature of about 15 K [See the magnetization measurements shown in the
Fig. 1(a)]. With increasing magnetic field, the resistivity transition
broadens and the ${T}_{c}$ shifts to lower temperatures. Some similar
broadening behaviors have been reported previously in other 11-type Fe-based
systems21 . The relative high ${T}_{c}$ value and metallic resistivity without
the antiferromagnetic-like upturn illustrate that the crystal used is well
annealed and that the distribution of excess Fe interstitials can be ruled
out22 ; 23 . The excess Fe usually comes from inadequate ${O}_{2}$-annealing
and significantly affects the electronic properties. It could provide extra
moments that localize the electrons24 ; 25  and even cause a negative
magnetoresistance22 . The excellent growth quality of our sample makes us
confident for the following experiments and the related results.

For studying the topological properties of FeTe0.5Se0.5, we performed
temperature-dependent Hall resistivity measurements. Figure 3(b) shows the
Hall conductivity ($\sigma_{xy}$) at applied magnetic fields for some
representative temperatures. The obtained Hall conductivity $\sigma_{xy}$
follows a linear relationship with the applied magnetic field up to 3 T for
temperatures from 300 K down to 30 K. Thus, the Hall coefficient (${R}_{H}$)
and carrier concentration (${n}_{H}$) can be obtained from the single-band
model26 :

$R_{H}=\rho_{xy}/\mu_{0}H$ (1) $n_{H}=1/eR_{H}$ (2)

The slope ($d\sigma_{xy}/dH$) keeps negative above 50 K and becomes positive
below 40 K, indicating that the dominant carriers change from the electrons to
holes. The transport properties of dominant hole-like carriers at low
temperature are similar to those reported by Pimentel $et$ $al$29  but differ
from others27 ; 28 . In any case, as a common phenomenon in iron
chalcogenides, the sign reversal of ${R}_{H}$ near 40 K can be explained by
the Fermi surface reconstruction that leads to the nematic transition22 ; 27 ;
28 . In particular, numerous ARPES experiments reported the splitting of
${d}_{xz}/{d}_{yz}$ bands near ${E}_{f}$, which triggers the structure
evolution from the four-fold to two-fold symmetry30 ; 31 ; 32 ; 28 .

When the temperature is lowered to 20 K, a distinctive nonlinear behavior is
observed. Two features are noteworthy for the Hall conductivity at 20 K:
Firstly, the $\sigma_{xy}$ (or $\rho_{xy}$) deviates from linearity in the low
field range, while in the normal state above 30 K, the linear behavior
maintains up to 3 T. Secondly, the slope of the $\sigma_{xy}$-$H$ curve
remains positive up to 9 T, again confirming the dominant hole carriers in the
low-temperature transport within the whole field range. For the topological
insulating state, the Hall resistivity does not exhibit a linear behavior but
has a resonant structure at the small magnetic field. The transport anomalies
at 20 K are identical to those in other topological insulators, such as the
Bi2Te3 and Bi2Se319 ; 64 , in which the surface states play a non-negligible
role in the overall transport processes. Considering the recent ARPES results
for FeTe0.5Se0.5 with a topological-insulator Dirac surface state at 15 K11 ;
12 , we believe that the Hall and MR anomalies appearing in the vicinity of
superconductivity are induced by the nontrivial electronic structure.
Furthermore, a linear dependence of the magnetoresistance (MR) on the magnetic
field appears coincidently, as shown in Fig. 4(b), which can be interpreted as
the result of the Dirac cone states34 ; 12 ; 64 . The results mentioned above
are an excellent opportunity for us to investigate the contributions of the
surface state to the transport properties.

###  III.3 Transport evidence for the surface state

Figure 4: (a) The field-dependent Hall conductivity of FeTe0.5Se0.5 at the
temperature of 20 K up to 9 T. The blue arrow pointing to the left axis
denotes the whole conductivity ($\sigma_{xy}$). The black arrow pointing to
the right axis represents the relevant surface term ($G_{xy}$). The blue
circles denote the raw data, with the red solid lines denoting the whole
fitting results. (b) The magnetic-field-dependent MR
[=($\rho_{H}-\rho_{0}$)/$\rho_{0}$] of FeTe0.5Se0.5 at the temperature of 20 K
for the applied magnetic fields up to 9 T. The inset shows the schematic
picture of measurements. Figure 5: The contribution of the surface state in
FeTe0.5Se0.5 to the total conductivity at the magnetic field from -9 T to 9 T.
The blue symbols denote the ratio of the surface state conductivity.

Figure 4 displays the Hall conductivity and MR at a temperature of 20 K as a
function of the magnetic fields up to 9 T. The MR exhibits conventional
parabolic lineshape at low magnetic fields. At higher fields, the MR increases
linearly due to the quantum limit and corroborates the Dirac-cone-like band
dispersion34 ; 11 ; 12 . The behavior of MR is a bit different in topological
insulators, where the linear MR was also identified in the low magnetic field
range19 ; 35 . This is because the topological insulators have a much larger
Landau level splitting than the conventional bulk bands34 . Therefore, the
quantum limit of topological insulators can be achieved in the lower magnetic
field regions36 . The MR of FeTe0.5Se0.5 at 9 T and 20 K (0.7%) is much larger
than those of as-grown (0.03%) and half-annealed (0.14%) samples of
Fe1+yTe0.6Se0.434 . The relatively large and positive MR again demonstrates
the good growth quality of our sample22 . We used the quantum equation for
topological insulators19 . The observed Hall conductivity $\sigma_{xy}$ can be
described as the sum of the surface Hall conductivity $\sigma_{xy}^{s}$ and
the bulk $\sigma_{xy}^{b}$19 :

$\sigma_{xy}=\sigma_{xy}^{s}+\sigma_{xy}^{b}~{}~{}.$ (3)

The surface conductivity $\sigma_{xy}^{s}$ can be expressed as:

$\sigma_{xy}^{s}=G_{xy}/d=\frac{2\pi
e^{3}}{dh^{2}}\frac{Bl^{2}}{1+(\mu_{s}B)^{2}}~{}~{},$ (4)

Where $B$ is the magnetic flux density, $d$ is the sample thickness, $l$ is
the mean free path, and $\mu_{s}$ is the surface carrier mobility. The bulk
conductivity $\sigma_{xy}^{b}$ can be expressed by the semiclassical form:

$\sigma_{xy}^{b}=p_{eff}e\mu_{b}\frac{(\mu_{b}B)^{2}}{1+(\mu_{b}B)^{2}}~{}~{},$
(5)

Where $p_{eff}$ is the effective carrier concentration and $\mu_{b}$ is the
bulk carrier mobility. The fitting matches well with the experimental data and
gives $P_{eff}$ = 1.65$\times$ 1023 m-3 and $l$ = 179 nm. The acquired value
of the mean path for FeTe0.5Se0.5 is larger than that of FeSe (30 nm for the
outer hole pocket $\beta$ and 80 nm for the inner hole pocket $\delta$ in the
Brillouin center)37 , but close to that of Bi2Se3 (235 nm)19 . Intriguingly,
from equations (3)-(5), the obtained mobility of the surface state (6440
cm2V-1s-1) is almost ten times larger than that of the bulk state (610
cm2V-1s-1). To be more specific, figure 5 shows the ratio of the surface state
conductivity to the total conductivity ($\sigma_{xy}^{s}/\sigma_{xy}$). In the
low magnetic field range, the surface state accounts for about 5% to a maximum
of 20%. Despite the relatively small weight, the surface state can dominate
the low-magnetic-field electrical transport with much higher mobility induced
by the Dirac-cone-like band dispersion.

###  III.4 Phonon spectra in the superconducting and normal state

To further investigate the superconducting nature of FeTe0.5Se0.5, we
systematically carried out the temperature-dependent Raman scattering
measurements. The results are shown in Fig. 6. Two phonon modes, ${A}_{1g}$
and ${B}_{1g}$, were observed in the temperature-dependent mapping of Fig.
6(a). The frequencies of the ${A}_{1g}$ and ${B}_{1g}$ phonon mode at room
temperature are about 158 and 192 cm-1, respectively. They are close to the
earlier reported values18 ; 38 . The linewidth of the ${A}_{1g}$ mode is
significantly larger than that of the ${B}_{1g}$ mode. Both phonon modes show
a hardening behavior with the decreasing temperature. The hardening modes were
commonly reported in FeTexSe1-x and were thought to be caused by the
temperature-induced lattice contraction18 . Surprisingly, compared with the
generally hardening trend, there appears to be a slight softening behavior of
the ${A}_{1g}$ mode below 40 K. This softening phonon mode will be analyzed
qualitatively and discussed in detail later. The representative Raman spectra
at different temperatures are shown in Fig. 6(b). A marginally asymmetric
phonon line shape emerges in the high-temperature range and becomes more
notable at around 150 K. When the temperature decreases below 100 K, the
symmetry of phonon peaks is profoundly refined. Taking this asymmetric effect
into account, we used Fano function39 ; 40  to fit the phonon spectra:

$I(\omega)={I}_{0}\frac{(\frac{x-{\omega}_{0}}{\gamma}+q)^{2}}{1+(\frac{x-{\omega}_{0}}{\gamma})^{2}}+{I}_{b}(\omega)$
(6)

Where ${\omega}_{0}$ is the bare frequency, $q$ is the parameter
quantitatively characterizing asymmetry, $\gamma$ is the phonon linewidth,
${I}_{0}$ is the parameter of intensity, and ${I}_{b}(\omega)$ denotes the
background. The asymmetric lineshape turns back into Lorentzian lineshape when
${q}{\rightarrow}{0}$. The Fano fitting matches well with our experimental
data.

The detailed temperature evolution of the frequency and linewidth for the
${A}_{1g}$ and ${B}_{1g}$ mode using Fano fitting are shown in Fig. 7.
Considering that the ${A}_{1g}$ mode has a relatively small frequency change
compared with its large phonon linewidth, we carefully designed and performed
two-round Raman scattering experiments to ensure the consistency and accuracy
of our results. We tried to measure the Raman spectra as detailed as possible
in the low-temperature range which we most care about (4-50 K), with the
temperature step set to be less than 0.5 K. In the temperature range of 50-120
K, the temperature step was set to be about 1-3 K, while at higher
temperatures this value was set to be around 5-10 K. The results of the first
and second measurements matches well with each other. Taking a brief look at
the graph, we find a blueshift of the ${A}_{1g}$ and ${B}_{1g}$ mode when the
temperature is decreased, as expected from the lattice contraction18 . The
${B}_{1g}$ mode shows a larger hardening behavior than the ${A}_{1g}$ mode,
which can be attributed to the influence of the local spin state of Fe atoms17
. Upon cooling, the linewidth of the ${B}_{1g}$ mode generally narrows, with
some abnormal changes showing up at around 250 K and 40 K. The narrowing
effect is well acknowledged because the linewidth is inversely proportional to
the phonon lifetime41 ; 42 . As the temperature goes down, the phonon lifetime
increases, and hence the linewidth decreases. Yet, the narrowing of ${A}_{1g}$
mode is almost undecipherable.

Figure 6: (a) Mapping of the temperature-dependent Raman spectra of
FeTe0.5Se0.5 from room temperature down to 4 K. The spectrum intensity denoted
by different colors is presented at the top of the figure. The temperature
evolution of the two phonon mode, the ${A}_{1g}$ and ${B}_{1g}$ mode, can be
observed clearly. (b) Representative temperature-dependent Raman spectra of
FeTe0.5Se0.5 at different temperatures. For clarity, 6 representative curves
are displayed in this figure. The open blue circles and red solid lines denote
experimental data points and Fano fitting curves, respectively. The open blue
circles and red solid lines denote experimental data points and Fano fitting
curves. Figure 7: (a)-(d) Temperature dependence of the phonon frequency and
linewidth in FeTe0.5Se0.5. The crystal’s point group symmetry probes the
${A}_{1g}$ and ${B}_{1g}$ channel. The inset graphs in (a) and (b) show the
schematic illustrations for the ${A}_{1g}$ and ${B}_{1g}$ polarization mode.
The blue atoms denote the Fe atoms, while the yellow atoms are the Te/Se
atoms. The phonon frequency and linewidth of the ${A}_{1g}$ and ${B}_{1g}$
mode are displayed by the red and black symbols, respectively. The first and
second rounds of the measurements are presented by the open and solid symbols,
respectively. The four graphs are roughly divided into three parts using three
different colors.

Nevertheless, the ${A}_{1g}$ mode softens evidently at around 40 K, followed
by the sign reversal of ${R}_{H}$ mentioned above. We also used the Lorentzian
function to fit the phonon lineshape, which turns out to have almost the same
softening behavior below 40 K. Below ${T}_{c}$, the ${A}_{1g}$ frequency rises
again due to the self-energy effects68 . The sudden reduction of the
${A}_{1g}$ phonon energy at 40 K, however, hasn’t been reported previously in
FeTe0.5Se0.5 (or near $x$ = 0.5) single crystals18 , probably because of the
impurities or vacancies induced by imperfect growth conditions15 ; 43 . Some
similar softening anomalies have been found in FeTe17  and the interface of
the single-layer FeSe film on substrates10 . Notably, the great enhancement of
the ${T}_{c}$ in thin FeSe film can be interpreted as the consequence of the
enhanced EPC interaction66 ; 10 . Moreover, previous calculations and ultra-
fast dynamic experiments revealed that the ${A}_{1g}$ mode is the most
substantial phonon mode in the EPC spectra of iron chalcogenides44 ; 45 .
Correspondingly, it is not surprising to find the softening behavior of the
${A}_{1g}$ mode in FeTe0.5Se0.5. Our results demonstrate the importance of the
EPC on the superconductivity in iron chalcogenides.

###  III.5 Phase diagram for the superconducting, nematic, and normal state

To better illustrate the electronic and structural dynamics, we summarize the
temperature-dependent Hall coefficient (${R}_{H}$) and carrier concentration
(${n}_{H}$) obtained from Equations (1) and (2) in Fig. 8. The graph can be
divided into three parts, denoted as three different colors like Fig. 7, to
show a schematic phase diagram. The effective carrier concentration at 20 K is
obtained by Equation (5) [$P_{eff}$(20 K) = 1.65 $\times$ 1023 m-3]. From 300
K to 250 K (the yellow region IV), the sample shows a nonmetallic-normal state
(NNS) for $d\rho/dT\leq 0$. The ${{R}_{H}}$ changes drastically in this
temperature range. Below 250 K (the green region III), a probable nematic
fluctuations (NF) state is produced45 . At this time, the ${{R}_{H}}$ and
${n}_{H}$ suddenly turn to be almost constant. Simultaneously, an abnormality
of the ${B}_{1g}$ linewidth seems to appear. Below 40 K (the blue region III),
the nematic state (NS) emerges due to the Fermi surface reconstruction. With
further cooling (the blue region on the left side of the red dash line),
topological superconductivity is induced by the band inversion of Fe$-{3d}$
and Te/Se$-{p}$ orbits near the hole pockets11 ; 12 . The critical magnetic
field measure for supporting the topological superconductivity in studied
FeTe0.5Se0.5 was recently given by Yuan and Chenyuan .

Figure 8: Phase diagram of FeTe0.5Se0.5. Temperature dependence of the Hall
coefficient (${R}_{H}$) (a) and the effective carrier concentration
(${n}_{H}$) (b). The red dash line marks the ${T}_{c}$. The phase diagram can
be divided into four parts using gradient ramp: (I) topological
superconductivity (TSC), (II) nematic state (NS), (III) nematic fluctuations
(NF), (IV) nonmetallic-normal state (NNS).

As seen from the schematic phase diagram, the topological superconductivity
emerges right after the phonon softening and resides in the region of nematic
order. It is natural to ask: what is the joint driving force behind these
phenomena. The earlier widely accepted theory is that the spin fluctuations
give rise to both nematicity and superconductivity5 ; 46 . However, the effect
of phonons, especially the ${A}_{1g}$ mode, cannot be simply omitted9 ; 10 ;
66 . In iron chalcogenides, the ${A}_{1g}$ mode would induce huge fluctuations
through spin-phonon coupling47 ; 67 . The fluctuations-enhanced EPC can be
accountable for the experimentally observed ${T}_{c}$ of iron chalcogenides9 ;
47 . That explains why the ${A}_{1g}$ mode softens concomitantly with the
nematic transition and becomes the softest at ${T}_{c}$. Our results provide a
prospective approach to understanding the interrelationship between the spin
fluctuations and EPC through transport and vibrational properties.

##  IV CONCLUSIONS

In summary, we have found the nematic transition of FeTe0.5Se0.5 followed by
the topological superconductivity with strong spin-phonon interaction from
both the electrical transport and Raman scattering experiments. At around 250
K, a probable fluctuation state shows up with the explicit changes of the Hall
coefficient, carrier concentration, and phonon linewidth. As the temperature
is decreased to about 40 K, the compound undergoes a clear nematic transition,
which is confirmed by the sign reversal of the Hall coefficient and the
concurrent softening of the ${A}_{1g}$ phonon mode. However, unlike other Se-
doping rate samples such as FeTexSe1-x, FeTe0.5Se0.5 does not exhibit an
evident resistivity upturn at the nematic transition. That is probably due to
the relatively small amplitude of nematicity compared with the extensive
background. The softening ${A}_{1g}$ mode at nematicity indicates a muscular
spin-phonon interaction and an enhanced electron-phonon coupling strength in
this superconductor. As the temperature is decreased down to 20 K, the
nonlinear Hall conductivity and linear magnetoresistance are observed. Both
corroborate the topological superconductivity on the surface. The high-
mobility topological-insulator surface state has been identified successfully
from the bulk state through the anomalous transport properties. Our results
shed light on understanding the multiple electronic phases and the spin-phonon
interaction in iron-based superconductors.

##  V ACKNOWLEDGEMENTS

This work was partially funded through the National Key R&D Program of China
(Grant No. 2018YFA0305900) at HPSTAR, the Shenzhen Science and Technology
Program (Grant No. KQTD20200820113045081), and the Basic Research Program of
Shenzhen (Grant No. JCYJ20200109112810241). The work at BNL was supported by
the US Department of Energy’s the Office of Basic Energy Sciences with
contract No. DOE-SC0012704.

## References

  * (1) G. Xu, B. Lian, P. Tang, X. L. Qi, and S. C. Zhang, Topological superconductivity on the surface of Fe-based superconductors, Phys. Rev. Lett. 117, 047001 (2016).
  * (2) R. Thomale, C. Platt, W. Hanke, J. P. Hu, and B. A. Bernevig, Exotic $d$-wave superconducting state of strongly hole-doped KxBa1-xFe2As2, Phys. Rev. Lett. 107, 117001 (2011).
  * (3) J. P. Sun, K. Matsuura, G. Z. Ye, Y. Mizukami, M. Shimozawa, K. Matsubayashi, M. Yamashita, T. Watashige, S. Kasahara, Y. Matsuda, J. Q. Yan, B. C. Sales, Y. Uwatoko, J. G. Cheng, and T. Shibauchi, Dome-shaped magnetic order competing with high-temperature superconductivity at high pressures in FeSe, Nat. Commun. 7, 1 (2016).
  * (4) M. Abdel-Hafiez, Y. Y. Zhang, Z. Y. Cao, C. G. Duan, G. Karapetrov, V. M. Pudalov, V. A. Vlasenko, A. V. Sadakov, D. A. Knyazev, T. A. Romanova, D. A. Chareev, O. S. Volkova, A. N. Vasiliev, and X. J. Chen, Superconducting properties of sulfur-doped iron selenide, Phys. Rev. B 91, 165109 (2015).
  * (5) K. Terao, T. Kashiwagi, T. Shizu, R. A. Klemm, and K. Kadowaki, Superconducting and tetragonal-to-orthorhombic transitions in single crystals of ${\mathrm{FeSe}}_{1-x}{\mathrm{Te}}_{x}$ $(0\leq$ $x$ $\leq 0.61)$, Phys. Rev. B 100, 224516 (2019).
  * (6) T. Imai, K. Ahilan, F. L. Ning, T. M. McQueen, and R. J. Cava, Why does undoped FeSe become a high-${T}_{c}$ superconductor under pressure? Phys. Rev. Lett. 102, 177005 (2009).
  * (7) S. Margadonna, Y. Takabayashi, Y. Ohishi, Y. Mizuguchi, Y. Takano, T. Kagayama, T. Nakagawa, M. Takata, and K. Prassides, Pressure evolution of the low-temperature crystal structure and bonding of the superconductor FeSe $({T}_{c}=37\text{ }\text{K})$, Phys. Rev. B 80, 064506 (2009).
  * (8) N. N. Hao, and J. P. Hu, Topological phases in the single-layer FeSe, Phys. Rev. X 4, 031053 (2014).
  * (9) O. Rösch, and O. Gunnarsson, Electron-phonon interaction in the $t\mathrm{\text{$-$}}J$ model, Phys. Rev. Lett. 92, 146403 (2004).
  * (10) S. Gerber, S. L. Yang, D. Zhu, H. Soifer, J. A. Sobota, S. Rebec, J. J. Lee, T. Jia, B. Moritz, C. Jia, A. Gauthier, Y. Li, D. Leuenberger, Y. Zhang, L. Chaix, W. Li, H. Jang, J. S. Lee, M. Yi, G. L. Dakovski, S. Song, J. M. Glownia, S. Nelson, K. W. Kim, Y. D. Chuang, Z. Hussain, R. G. Moore, T. P. Devereaux, W. S. Lee, P. S. Kirchmann, and Z. X. Shen, Femtosecond electron-phonon lock-in by photoemission and x-ray free-electron laser, Science 357, 71 (2017).
  * (11) B. Rosenstein, and B. Y. Shapiro, High-temperature superconductivity in single unit cell layer FeSe due to soft phonons in the interface layer of the SrTiO3 substrate, Phys. Rev. B 100, 054514 (2019).
  * (12) J. J. Lee, F. T. Schmitt, R. G. Moore, S. Johnston, Y. T. Cui, W. Li, M. Yi, Z. K. Liu, M. Hashimoto, Y. Zhang, D. H. Lu, T. P. Devereaux, D. H. Lee, and Z. X. Shen, Interfacial mode coupling as the origin of the enhancement of $T_{c}$ in FeSe films on SrTiO3, Nature 515, 245 (2014).
  * (13) X. J. Chen, Exploring high-temperature superconductivity in hard matter close to structural instability, Matter Radiat. Extremes 5, 068102 (2020).
  * (14) Z. J. Wang, P. Zhang, G. Xu, L. K. Zeng, H. Miao, X. Y. Xu, T. Qian, H. M. Weng, P. Richard, A. V. Fedorov, H. Ding, X. Dai, and Z. Fang, Topological nature of the FeSe0.5Te0.5 superconductor, Phys. Rev. B 92, 115119 (2015).
  * (15) P. Zhang, K. Yaji, T. Hashimoto, Y. Ota, T. Kondo, K. Okazaki, Z. J. Wang, J. S. Wen, G. D. Gu, H. Ding, and S. Shin, Observation of topological superconductivity on the surface of an iron-based superconductor, Science 360, 182 (2018).
  * (16) P. Zhang, Z. J. Wang, X. X. Wu, K. Yaji, Y. Ishida, Y. Kohama, G. Y. Dai, Y. Sun, C. Bareille, K. Kuroda, K. Okazaki, K. Kindo, X. C. Wang, C. Q. Jin, J. P. Hu, R. Thomale, K. Sumida, S. L. Wu, K. Miyamoto, T. Okuda, H. Ding, G. D. Gu, T. Tamegai, T. Kawakami, M. Sato, and S. Shin, Multiple topological states in iron-based superconductors, Nat. Phys. 15, 41 (2019).
  * (17) C. Nayak, S. H. Simon, A. Stern, M. Freedman, and S. Das Sarma, Non-Abelian anyons and topological quantum computation, Rev. Mod. Phys. 80, 1083 (2008).
  * (18) D. F. Wang, L. Y. Kong, P. Fan, H. Chen, S. Y. Zhu, W. Y. Liu, L. Cao, Y. J. Sun, S. X. Du, J. Schneeloch, R. D. Zhong, G. D. Gu, L. Fu, H. Ding, and H. J. Gao, Evidence for Majorana bound states in an iron-based superconductor, Science 362, 333 (2018).
  * (19) T. Machida, Y. Sun, S. Pyon, S. Takeda, Y. Kohsaka, T. Hanaguri, T. Sasagawa, and T. Tamegai, Zero-energy vortex bound state in the superconducting topological surface state of Fe(Se,Te), Nat. Mater. 18, 811 (2019).
  * (20) O. V. Yazyev, J. E. Moore, and S. G. Louie, Spin polarization and transport of surface states in the topological insulators ${\mathrm{Bi}}_{2}{\mathrm{Se}}_{3}$ and ${\mathrm{Bi}}_{2}{\mathrm{Te}}_{3}$ from first principles, Phys. Rev. Lett. 105, 266806 (2010).
  * (21) D. X. Qu, Y. S. Hor, J. Xiong, R. J. Cava, and N. P. Ong, Quantum oscillations and Hall anomaly of surface states in the topological insulator Bi2Te3, Science 329, 821 (2010).
  * (22) T. L. Xia, D. Hou, S. C. Zhao, A. M. Zhang, G. F. Chen, J. L. Luo, N. L. Wang, J. H. Wei, Z. Y. Lu, and Q. M. Zhang, Raman phonons of $\alpha$-FeTe and Fe1.03Se0.3Te0.7 single crystals, Phys. Rev. B 79, 140510 (2009).
  * (23) K. Okazaki, S. Sugai, S. Niitaka, and H. Takagi, Phonon, two-magnon, and electronic Raman scattering of Fe1+yTe1-xSex, Phys. Rev. B 83, 035103 (2011).
  * (24) V. Gnezdilov, Y. Pashkevich, P. Lemmens, A. Gusev, K. Lamonova, T. Shevtsova, I. Vitebskiy, O. Afanasiev, S. Gnatchenko, V. Tsurkan, J. Deisenhofer, and A. Loidl, Anomalous optical phonons in FeTe chalcogenides: spin state, magnetic order, and lattice anharmonicity, Phys. Rev. B 83, 245127 (2011).
  * (25) Y. J. Um, A. Subedi, P. Toulemonde, A. Y. Ganin, L. Boeri, M. Rahlenbeck, Y. Liu, C. T. Lin, S. J. E. Carlsson, A. Sulpice, M. J. Rosseinsky, B. Keimer, and M. Le Tacon, Anomalous dependence of $c$-axis polarized Fe ${\mathrm{B}}_{1g}$ phonon mode with Fe and Se concentrations in Fe1+yTe1-xSex, Phys. Rev. B 85, 064519 (2012).
  * (26) P. Hohenberg, and W. Kohn, Inhomogeneous electron gas, Phys. Rev. 136, 864 (1964).
  * (27) W. Kohn, and L. J. Sham, Self-consistent equations including exchange and correlation effects, Phys. Rev. A 140, 1133 (1965).
  * (28) G. Kresse, and J. Hafne, Ab initio molecular dynamics for liquid metals, Phys. Rev. B 47, 558 (1993).
  * (29) G. Kresse, and J. Hafner, Ab initio molecular-dynamics simulation of the liquid-metal amorphous-semiconductor transition in germanium, Phys. Rev. B 49, 14251 (1994).
  * (30) G. Kresse, and J. Furthmüller, Efficient iterative schemes for ab initio total-energy calculations using a plane-wave basis set, Phys. Rev. B 54, 11169 (1996).
  * (31) J. P. Perdew, K. Burke, and M. Ernzerhof, Generalized gradient approximation made simple, Phys. Rev. Lett. 77, 3865 (1996).
  * (32) S. L. Li, C. de la Cruz, Q. Huang, Y. Chen, J. W. Lynn, J. P. Hu, Y. L. Huang, F. C. Hsu, K. W. Yeh, M. K. Wu, and P. C. Dai, First-order magnetic and structural phase transitions in ${\text{Fe}}_{1+y}{\text{Se}}_{x}{\text{Te}}_{1-x}$, Phys. Rev. B 79, 054503 (2009).
  * (33) Q. S. Wu, S. N. Zhang, H. F. Song, M. Troyer, and A. A. Soluyanov, WannierTools: An open-source software package for novel topological materials, Comput. Phys. Commun. 224, 405 (2018).
  * (34) I. Souza, N. Marzari, and D. Vanderbilt, Maximally localized Wannier functions for entangled energy bands, Phys. Rev. B 65, 035109 (2001).
  * (35) H. C. Lei, R. W. Hu, E. S. Choi, J. B. Warren, and C. Petrovic, Pauli-limited upper critical field of ${\text{Fe}}_{1+y}{\text{Te}}_{1-x}{\text{Se}}_{x}$, Phys. Rev. B 81, 094518 (2010).
  * (36) J. Hu, T. J. Liu, B. Qian, and Z. Q. Mao, Coupling of electronic and magnetic properties in Fe1+y(Te1-xSex), Phys. Rev. B 88, 094505 (2013).
  * (37) Y. Sun, Y. Tsuchiya, T. Taen, T. Yamada, S. Pyon, A. Sugimoto, T. Ekino, Z. X. Shi, and T. Tamegai, Dynamics and mechanism of oxygen annealing in Fe1+yTe0.6Se0.4 single crystal, Sci. Rep. 4, 4585 (2014).
  * (38) T. J. Liu, X. Ke, B. Qian, J. Hu, D. Fobes, E. K. Vehstedt, H. Pham, J. H. Yang, M. H. Fang, L. Spinu, P. Schiffer, Y. Liu, Z. Q. Mao, and J. P. Hu, Charge-carrier localization induced by excess Fe in the superconductor Fe1+yTe1-xSex, Phys. Rev. B 80, 174509 (2009).
  * (39) Y. Sun, T. Taen, Y. Tsuchiya, Q. Q. Ding, S. S. Pyon, Z. X. Shi, and T. Tamegai, Large, homogeneous, and isotropic critical current density in oxygen-annealed Fe1+yTe0.6Se0.4 single crystal, Appl. Phys. Express. 6, 043101 (2013).
  * (40) T. Otsuka, S. Hagisawa, Y. Koshika, S. Adachi, T. Usui, N. Sasaki, S. Sasaki, S. Yamaguchi, Y. Nakanishi, M. Yoshizawa, S. Kimura, and T. Watanabe, Incoherent-coherent crossover and the pseudogap in Te-annealed superconducting Fe1+yTe1-xSex revealed by magnetotransport measurements, Phys. Rev. B 99, 184505 (2019).
  * (41) J. L. Pimentel, P. Pureur, M. A. Vila, and R. A. Ribeiro, Magnetotransport properties and Seebeck effect in the superconductor FeSe0.5Te0.5, J. Phys.: Conf. Ser. 480, 012016 (2014).
  * (42) C. S. Zhu, J. H. Cui, B. Lei, N. Z. Wang, C. Shang, F. B. Meng, L. K. Ma, X. G. Luo, T. Wu, Z. Sun, and X. H. Chen, Tuning electronic properties of FeSe0.5Te0.5 thin flakes using a solid ion conductor field-effect transistor, Phys. Rev. B 95, 174513 (2017).
  * (43) G. C. Lin, J. Guo, Y. L. Zhu, S. Cai, Y. Z. Zhou, C. Huang, C. L. Yang, S. J. Long, Q. Wu, Z. Q. Mao, T. Xiang, and L. L. Sun, Correlation between Fermi surface reconstruction and superconductivity in pressurized FeTe0.55Se0.45, Phys. Rev. B 101, 214525 (2020).
  * (44) T. Shimojima, SY. uzuki, T. Sonobe, A. Nakamura, M. Sakano, J. Omachi, K. Yoshioka, M. Kuwata-Gonokami, K. Ono, H. Kumigashira, A. E. Böhmer, F. Hardy, T. Wolf, C. Meingast, H. V. Löhneysen, H. Ikeda, and K. Ishizaka, Lifting of $xz$/$yz$ orbital degeneracy at the structural transition in detwinned FeSe, Phys. Rev. B 90, 121111 (2014).
  * (45) K. Nakayama, Y. Miyata, G. N. Phan, T. Sato, Y. Tanabe, T. Urata, K. Tanigaki, and T. Takahashi, Reconstruction of band structure induced by electronic nematicity in an FeSe superconductor, Phys. Rev. Lett. 113, 237001 (2014).
  * (46) P. Zhang, T. Qian, P. Richard, X. P. Wang, H. Miao, B. Q. Lv, B. B. Fu, T. Wolf, C. Meingast, X. X. Wu, Z. Q. Wang, J. P. Hu, and H. Ding, Observation of two distinct ${d}_{xz}$/${d}_{yz}$ band splittings in FeSe, Phys. Rev. B 91, 214503 (2015).
  * (47) X. L. Wang, Y. Du, S. X. Dou, and C. Zhang, Room temperature giant and linear magnetoresistance in topological insulator ${\mathrm{Bi}}_{2}{\mathrm{Te}}_{3}$ nanosheets, Phys. Rev. Lett. 108, 266806 (2012).
  * (48) Y. Sun, T. Taen, T. Yamada, S. S. Pyon, T. Nishizaki, Z. X. Shi, and T. Tamegai, Multiband effects and possible Dirac fermions in Fe1+yTe0.6Se0.4, Phys. Rev. B 89, 144512 (2014).
  * (49) A. A. Taskin, Z. Ren, S. Sasaki, K. Segawa, and Y. Ando, Observation of Dirac holes and electrons in a topological insulator, Phys. Rev. Lett. 107, 016801 (2011).
  * (50) A. A. Abrikosov, Quantum magnetoresistance, Phys. Rev. B 58, 2788 (1998).
  * (51) T. Terashima, N. Kikugawa, A. Kiswandhi, E. S. Choi, J. S. Brooks, S. Kasahara, T. Watashige, H. Ikeda, T. Shibauchi, Y. Matsuda, T. Wolf, A. E. Böhmer, F. Hardy, C. Meingast, H. V. Löhneysen, M. T. Suzuki, R. Arita, S. and Uji, Anomalous Fermi surface in FeSe seen by Shubnikov-de Haas oscillation measurements, Phys. Rev. B 90, 144517 (2014).
  * (52) C. Camerlingo, E. Bellingeri, C. Nappi, E. Sarnelli, and C. Ferdeghini, Raman investigation of Fe-based chalcogenide films, Physica B 586, 411966 (2020).
  * (53) A. M. Zhang, and Q. M. Zhang, Electron-phonon coupling in cuprate and iron-based superconductors revealed by Raman scattering, Chin. Phys. B. 22, 087103 (2013).
  * (54) K. C. Hewitt, X. K. Chen, C. Roch, J. Chrzanowski, J. C. Irwin, E. H. Altendorf, R. Liang, D. Bonn, and W. N. Hardy, Hole concentration and phonon renormalization of the 340-cm-1 B1g mode in 2% Ca-doped YBa2Cu3Oy (6.76$<$y$<$7.00), Phys. Rev. B 69, 064514 (2004).
  * (55) P. G. Klemens, Anharmonic decay of optical phonons, Phys. Rev. 148, 845 (1996).
  * (56) J. Menéndez, and M. Cardona, Temperature dependence of the first-order Raman scattering by phonons in Si, Ge, and $\alpha$-Sn: Anharmonic effects, Phys. Rev. B 29, 2051 (1984).
  * (57) S. F. Wu, A. Almoalem, I. Feldman, A. Lee, A. Kanigel, and G. Blumberg, Superconductivity and phonon self-energy effects in ${\mathrm{Fe}}_{1+y}{\mathrm{Te}}_{0.6}{\mathrm{Se}}_{0.4}$, Phys. Rev. Research 2, 013373 (2020).
  * (58) C. S. Lopes, C. E. Foerster, F. C. Serbena, P. R. Júnior, A. R. Jurelo, J. L. P. Júnior, P. Pureur, and A. L. Chinelatto, Raman spectroscopy of highly oriented FeSe0.5Te0.5 superconductor, Supercond. Sci. Technol. 25, 025014 (2012).
  * (59) A. Subedi, L. J. Zhang, D. J. Singh, and M. H. Du, Density functional study of FeS, FeSe, and FeTe: Electronic structure, magnetism, phonons, and superconductivity, Phys. Rev. B 78, 134514 (2008).
  * (60) C. W. Luo, I. H. Wu, P. C. Cheng, J. Y. Lin, K. H. Wu, T. M. Uen, J. Y. Juang, T. Kobayashi, D. A. Chareev, O. S. Volkova, and A. N. Vasiliev, Quasiparticle dynamics and phonon softening in FeSe superconductors, Phys. Rev. Lett. 108, 257006 (2012).
  * (61) N. F. Q. Yuan and X. J. Chen, Critical field measure for topological superconductivity, arXiv: 2209.00816.
  * (62) Q. S. Wang, Y. Shen, B. Y. Pan, Y. Q. Hao, M. W. Ma, F. Zhou, P. Steffens, K. Schmalzl, T. R. Forrest, M. Abdel-Hafiez, X. J. Chen, D. A. Chareev, A. N. Vasiliev, P. Bourges, Y. Sidis, H. B. Cao, and J. Zhao, Strong interplay between stripe spin fluctuations, nematicity and superconductivity in FeSe, Nat. Mater. 15, 159 (2016).
  * (63) Q. Q. Ye, K. Liu, and Z. Y. Lu, Influence of spin-phonon coupling on antiferromagnetic spin fluctuations in FeSe under pressure: First-principles calculations with van der Waals corrections, Phys. Rev. B 88, 205130 (2013).
  * (64) S. Mandal, R. E. Cohen, and K. Haule, Strong pressure-dependent electron-phonon coupling in FeSe, Phys. Rev. B 89, 220502 (2014).