# Knowledge-injected Prompt Learning for Chinese Biomedical Entity
Normalization

Songhua Yang  School of Computer and Artificial Intelligence
Zhengzhou University
Zhengzhou, China
<EMAIL_ADDRESS>Chenghao Zhang  School of Computer and Artificial
Intelligence
Zhengzhou University
Zhengzhou, China
<EMAIL_ADDRESS>Hongfei Xu  School of Computer and Artificial
Intelligence
Zhengzhou University
Zhengzhou, China
<EMAIL_ADDRESS>Yuxiang Jia* *Corresponding author. School of Computer
and Artificial Intelligence
Zhengzhou University
Zhengzhou, China
<EMAIL_ADDRESS>
###### Abstract

The Biomedical Entity Normalization (BEN) task aims to align raw, unstructured
medical entities to standard entities, thus promoting data coherence and
facilitating better downstream medical applications. Recently, prompt learning
methods have shown promising results in this task. However, existing research
falls short in tackling the more complex Chinese BEN task, especially in the
few-shot scenario with limited medical data, and the vast potential of the
external medical knowledge base has yet to be fully harnessed. To address
these challenges, we propose a novel Knowledge-injected Prompt Learning (PL-
Knowledge) method. Specifically, our approach consists of five stages:
candidate entity matching, knowledge extraction, knowledge encoding, knowledge
injection, and prediction output. By effectively encoding the knowledge items
contained in medical entities and incorporating them into our tailor-made
knowledge-injected templates, the additional knowledge enhances the model’s
ability to capture latent relationships between medical entities, thus
achieving a better match with the standard entities. We extensively evaluate
our model on a benchmark dataset in both few-shot and full-scale scenarios.
Our method outperforms existing baselines, with an average accuracy boost of
12.96% in few-shot and 0.94% in full-data cases, showcasing its excellence in
the BEN task.

###### Index Terms:

Biomedical Entity Normalization, Prompt Learning, Knowledge Enhancement, Few-
shot Learning

##  I Introduction

Biomedical Entity Normalization (BEN), also referred to as biomedical entity
linking, is integral to aligning medical and biological terms with
standardized entities. In the context of medicine, this process resolves
ambiguity, vagueness, and misspellings, promoting uniformity in domain-
specific textual terminology. With the exponential growth of medical data –
encompassing electronic health records and scholarly medical literature –
there lies a wealth of valuable knowledge for clinical decision-making,
disease diagnosis, and patient management. However, the diversity and non-
standardization of entities in medical texts, exacerbated by the intricacies
of Chinese medical terminology and language, pose challenges for downstream
tasks and applications. In response, BEN technology emerges to enhance medical
entity standardization and facilitate efficient utilization of textual medical
data.

Figure 1: An example of handling Chinese BEN task: the top left shows the non-
standard original entity, which is matched through the standard library on the
right. The correct standardized entity is output in the lower left. All
medical knowledge contained in the entity text listed alongside.

While the field of BEN has garnered extensive attention over the years, its
evolution has been shaped by advances in machine learning and natural language
processing (NLP). Initially, rule-based approaches gauged textual similarity
or curated dictionaries for entity matching, but struggled to scale. Machine
learning methods split BEN into candidate word matching and classification
stages, using classifiers and feature engineering. However, these methods
faced limitations in semantic understanding and the need for extensive
annotated data. Deep neural networks and word embedding algorithms
subsequently improved BEN through enhanced generalization and semantic
information capture. Pre-trained language models (PLMs), especially those
trained on medical corpora, brought efficiency to BEN by refining task
performance with minimal fine-tuning.

Despite notable strides, the complexity of biomedical entities, particularly
in the Chinese context, persists as a challenge for BEN. The specialized
nature of medical annotations incurs high costs, and the constant evolution of
medical categories limits available annotated data. Thus, the importance of
few-shot learning in BEN becomes evident, offering a pragmatic solution to
real-world problems.

Prompt learning, a burgeoning paradigm in natural language processing,
empowers PLMs to solve specific tasks using designed prompt templates. This
approach enhances task understanding, reduces overfitting risks, and optimizes
performance with scarce annotated data. While prompt learning has gained
traction in biomedical entity normalization, Chinese BEN remains less
explored, with untapped potential in leveraging external medical knowledge.

In this paper, we propose a novel Knowledge-injected Prompt Learning method
(PL-Knowledge) to address challenges in Chinese BEN. Our approach involves
candidate entity matching followed by prompt learning-based classification.
The model comprises four stages: knowledge extraction, encoding, injection,
and prediction. External medical knowledge refines entity embeddings,
synergizing with PLMs through an intricate prompt template. Through extensive
experiments on a benchmark Chinese BEN dataset, our PL-Knowledge method
demonstrates substantial improvements, excelling in both few-shot and full-
scale scenarios. Furthermore, our strategy underscores the crucial role of
medical domain knowledge and our infusion strategy in enhancing model
performance.

The main contributions of this work are as follows:

1) We are the first to apply prompt learning to Chinese biomedical entity
normalization task and demonstrate its effectiveness in few-shot scenarios.
2) We propose a knowledge-injected prompt learning method that leverages rich
external medical domain knowledge base to enhance the performance of our model
for BEN task.
3) Through experimental evaluation on a benchmark Chinese BEN dataset, our
method achieves significant improvement over baseline methods in both few-shot
and full-scale settings.

##  II Related Work

The evolution of BEN techniques spans several decades, adapting to
advancements in NLP and the burgeoning volume of biomedical text data. The
approaches employed fall into distinct categories, including rule-based,
machine learning-based, deep learning-based, and PLM-based methods. In earlier
stages, rule-based methods were prevalent. Examples include MetaMap [1], which
maintained dictionaries, and systems such as [2], [3], and [4], which employed
algorithms like edit distance and semantic similarity. While efficient, rule-
based methods faced challenges in covering diverse cases and capturing nuanced
information. Machine learning methods addressed these limitations by
introducing candidate word matching and classification stages [5]. Approaches
like [6] and [7] harnessed SVMs and TF-IDF for entity resolution, leveraging
Bag of Words and ranking learning. However, the insufficiency of labeled data
and the incapability to grasp word semantics remained concerns. Deep neural
network algorithms emerged next, leveraging word embedding techniques like
Word2Vec and GloVe. Notable instances include [8], [9], and [10], deploying
models such as CNNs and LSTMs to enhance entity resolution and coherence.

More recently, the advent of PLMs revolutionized BEN by enabling minimal fine-
tuning. This encompassed approaches like [11], retraining PLMs like BioBERT
and ClinicalBERT [12, 13], and optimizing models for Chinese BEN [14, 15].
These methods exhibited substantial performance gains but had limitations in
domain specificity and effective knowledge utilization. Prompt learning, a
fourth paradigm in NLP, gained traction for few-shot and zero-shot tasks [16].
While some approaches integrated prompt learning with BEN [17, 18, 19], they
overlooked the complexities of Chinese BEN and the potential of external
medical knowledge.

In summary, as BEN methods have evolved, limitations remain. Our proposed
knowledge-injected prompt learning introduces innovative strategies to address
biomedical entity normalization, bridging gaps in current methodologies.

##  III Approach

In this section, we provide a detailed explanation of our proposed model. We
begin by presenting a formal definition of the BEN task and then describe how
we address this task in two stages, along with the specific processes and
methods used in each stage.

###  III-A Problem Definition

In the biomedical domain, an entity phrase $e$ may have multiple different
expressions that are easily confused. To address this, there exists a standard
entity name repository $E=\\{e_{1},e_{2},...,e_{k}\\}$ containing the unique
correct names for all entities. Given a list of $n$ biomedical entity phrases
$O=\\{o_{1},o_{2},...,o_{n}\\}$, the objective of the BEN task is to
accurately match the correct standard term $s_{j}$ from the standard base $S$
for each original term $o_{i}$. Notably, numerous one-to-many, many-to-many,
and many-to-one relationships exist between the original term $o$ and the
standard term $s$, as shown in Table I.

Original Entity | Standard Entity | Relationship
---|---|---
| 肝动脉化疗栓塞术
---
transcatheter arterial chemoembolization
| 经导管肝动脉栓塞术##动脉化疗栓塞
---
transcatheter arterial embolization ## chemoembolization
one to many
| 左侧腮腺肿块切除##浅叶切除##面神经松解减压术
---
left parotid mass excision ## superficial lobe excision
## facial nerve decompression surgery
| 面神经减压术##腮腺病损切除术
---
facial nerve decompression surgery ## parotid lesion excision
many to many
| 宫腔镜检查##诊刮术
---
hysteroscopy ## diagnostic curettage
| 宫腔镜诊断性刮宫术
---
hysteroscopic diagnostic curettage
many to one

TABLE I: Some representative examples of the relationship between the original
entity and the standard entity.

###  III-B Preprocessing and Candidate Matching

Figure 2: Processing of representative examples during candidate term matching
in the first stage. The three English text segments in the middle-left of the
figure correspond to Case2.

Medical professionals may use irregularities when writing original terms in
real medical scenarios. Therefore, preprocessing of text data is necessary to
improve the performance of entity normalization task. We manually remove
irrelevant characters in the text, such as incorrect separators and
punctuation marks. Moreover, in many-to-many situations between original and
standard terms, delimiters between multiple entity words may be uncertain. We
standardize them to easily split and merge entity phrases. We have devised a
set of rules to flexibly handle many-to-many issues, as shown in Figure 2. For
the output of the classification model, if multiple standard terms are
predicted, we merge the predicted result words and compare them with the
standard terms.

Following the approach of previous studies [8, 20, 18], we divide the BEN task
into two stages. In the first stage, we employ a text similarity algorithm to
quickly match candidate entities. In particular, we segment all Chinese
medical entities and calculate the Jaccard similarity coefficient between each
original entity and each entity in the standard library. Based on the
relevance scores, we select the top few entity phrases as candidate entities.
The Jaccard similarity is a widely used text similarity calculation method
that is simple, efficient, scalable, and insensitive to text length.

For each original entity $o$ and its corresponding candidate entities
$C=\\{c_{1},c_{2},...,c_{m}\\}$ in the dataset, we form a triplet
$\\{o,c_{i},l\\}$ as the input for the next classification model, where
$l\in\\{0,1\\}$ is the true label between $o$ and $c_{i}$. In one-to-many and
many-to-many situations, the labels between the original entity containing
multiple sub-words and the corresponding standard entity sub-words are set to
1. In this way, our model can ingeniously solve complex many-to-many
situations through a binary classification approach.

###  III-C Prompt Learning

We will now present a detailed explanation of our second-stage classification
model based on prompt learning, as shown in Figure 3.

Figure 3: The overall architecture of our model, featuring a carefully
designed knowledge-injected prompt template in the middle. The knowledge
extraction, knowledge encoding, and knowledge injection modules are shown
moving from left to right at the bottom, while the final prediction output
process is at the top.

####  III-C1 Overview

The core idea of prompt learning is to construct a piece of natural language
text (i.e., a template) and input it into the encoder of a Masked Language
Model (MLM), converting the classification problem into a cloze-style task.
Prompt learning models consist of a template and a verbalizer. Formally, given
an original entity $o$ and its corresponding candidate entities
$C=\\{c_{1},c_{2},...,c_{m}\\}$ as input, a tailor-made template
$T(\cdot,\cdot)$ is used to create a text sequence $T(o,c)$, as shown in Table
II. The templates must include at least one [MASK] token. Let $\mathcal{M}$ be
an MLM model, and $\mathcal{M}$ outputs the probability
$P_{\mathcal{M}}\left([\mathrm{MASK}]=v\mid T(o,c)\right)\mid v\in\mathcal{V}$
of each word in the vocabulary $\mathcal{V}$ of $\mathcal{M}$ being filled in
the [MASK] token.

The mapping from the predicted masked words to the labels indicating whether
$o$ and $c$ are synonymous is called the verbalizer, which transforms the
masked prediction task into a classification task. The performance of prompt
learning is significantly influenced by the verbalizer’s configuration. A
verbalizer can be defined as $f:\mathcal{V}_{y}\mapsto\mathcal{Y}$, where
$\mathcal{V}_{y}$ is the well-designed label words, a subset of the overall
vocabulary $\mathcal{V}$, and $\mathcal{Y}$ represents the corresponding
output labels (i.e., $y_{0}:0$ and $y_{1}:1$ for BEN). The final probability
output of the classification model can be formulated as:

$P(y\in\mathcal{Y}\mid T(o,c))=g(P_{\mathcal{M}}([\mathrm{MASK}]=v\mid
T(o,c))\mid v\in\mathcal{V}_{y})$ (1)

where $g$ is the function corresponding to the verbalizer $f$, which
calculates the final label probability score by the probability of label words
in $\mathcal{V}_{y}$, thus obtaining the final classification result.

The prompt learning model’s overall architecture and a representative example
are illustrated in Figure 3. The original term ”胃静脉套扎术”(gastric variceal
ligation) and its corresponding candidate term ,”胃静脉曲张结扎术”(gastric variceal
banding) in this case, are inserted into the knowledge-injected template
provided in Table II. After converting the text into a vector representation
and feeding it into the MLM $\mathcal{M}$, the probability distribution of
label words for all candidate terms is obtained. The verbalizer decodes the
output label probability distribution, where words like ”不”, ”没” (no)
correspond to $y_{0}$, while ”是”, ”对” (yes) correspond to $y_{1}$. The
candidate term with a label probability of $P(y_{1})>P(y_{0})$ is the final
predicted standard term.

####  III-C2 Template Construction

Template | Content
---|---
Manual Template | [Original Entity] 和 [Candidate Entity] 意思相同吗？
| Is the meaning of [Original Entity] the same as [Candidate Entity]?
Mixed Template | [Original Entity] [soft] [soft:和] [soft] [Candidate Entity] [soft: 的] 意思相同吗？
| Is the meaning of [Original Entity] [soft] [soft:and] [soft] [Candidate
Entity] [soft: the] same?
Knowledgable Template | [Original Entity] [know] [soft:和] [Candidate Entity] [know] [soft: 的] 意思相同吗？
| Is the meaning of [Original Entity] [know] [soft:and] [Candidate Entity]
[know] [soft: the] same?
TABLE II: Demonstration of our three different types of prompt templates. ”[]”
denotes placeholders, where the original and candidate entities are filled in
their respective positions. ”[soft]” represents learnable soft tokens, with
the subsequent characters indicating initialization with the corresponding
vector; if not present, it is randomly initialized. ”[know]” indicates that
the vector at this position comes from knowledge injection.

The construction of templates is a critical factor in determining the
performance of prompt learning. In order to maximize the ability of PLMs to
perform classification task, we design a tailor-made knowledge-injected
template, which can incorporates knowledge effectively. In addition, we also
attempt the intuitive manual template and the automatically learnable mixed
template for comparison. These templates are detailed in Table II.

The manual template is the most straightforward type of template, containing
only human-readable natural text. It adopts a hard-encoding approach, where
the token embeddings in the template sequence are fixed to their corresponding
vector representations. On the other hand, the mixed template combines both
hard-encoding and soft-encoding approaches. Soft-encoding refers to encoding
tokens as dynamic, learnable word vectors. For example, placeholders like
[soft: 和] and [soft] in Table II represent soft tokens. The embedding of the
former token is initialized to the encoding vector corresponding to ”和” (and),
while the latter token is randomly initialized. These soft token embeddings
can be continuously optimized during the training process through gradient
calculations. Soft tokens are more flexible and adaptive compared to hard-
encoding, guiding the model to learn task-related key information and
supporting more accurate classification. Several studies [21, 16, 22] have
demonstrated that a prompt template with special learnable tokens can make
prompt learning more effective. Therefore, we incorporate some soft-tokens in
both Mixed Template and Knowledgeable Template to enhance model performance.

####  III-C3 External Knowledge Injection

In this section, we will elaborate on the detailed process of prompt learning
with knowledge injection, as shown in Figure 3. We find that although medical
entities may have some degree of irregular writing, they contain a wealth of
medical knowledge, such as diseases, surgeries, and anatomical locations. This
medical knowledge can act as crucial information to assist in matching
original entities and standard entities. For example, in the case shown in the
figure, we can see that both items contain ”胃, 部位”(stomach, site), ”静脉”(vein),
and ”静脉曲张”(varicose veins) are related, and ”套扎术”(ligation procedure) and
”结扎术”(ligation procedure) are often synonymous. Therefore, we exploit a
knowledge injection module to integrate medical knowledge from external
knowledge base into the prompt template, which includes knowledge extraction,
knowledge encoding, and knowledge injection.

We leverage the CMeKG [23] Chinese medical knowledge graph, which contains
knowledge about diseases, locations, and surgeries, to build an external
knowledge base comprising 7,249 items denoted as
$K=\\{(k_{1},r_{1}),(k_{2},r_{2}),...,(k_{n},r_{n})\\}$. To extract the
corresponding knowledge item sequences $o\rightarrow
o_{k}=\\{(k_{1},r_{1}),(k_{2},r_{2}),...,(k_{p},r_{p})\\}$ and $c\rightarrow
c_{k}=\\{(k_{1},r_{1}),(k_{2},r_{2}),...,(k_{q},r_{q})\\}$ from the knowledge
base $K$, we use the longest overlap matching method for the input original
entity $o$ and the corresponding candidate entity $c$. To encode all knowledge
items, we construct an additional vocabulary, treating each knowledge item and
relationship type as an entity that can be encoded.

After encoding the vocabulary, we concatenate the two knowledge item sequences
$o_{k}$ and $c_{k}$ to form a text sequence, which is then input into the
subsequent embedding layer. For this layer, we use the encoder of a pre-
trained medical domain PLM, MC-BERT [24], as shown below:

$\displaystyle
h_{o}=Embedding((k_{1},r_{1})\parallel(k_{2},r_{2})\parallel...\parallel(k_{p},r_{p}))$
(2) $\displaystyle
h_{c}=Embedding((k_{1},r_{1})\parallel(k_{2},r_{2})\parallel...\parallel(k_{q},r_{q}))$
(3)

To better capture the internal relationships and contextual information
between knowledge item sequences, we incorporate a BiGRU module to refine the
encoding of hidden vectors output by the Embedding layer. The BiGRU captures
both forward and backward contextual information. We add the output forward
and backward hidden state vectors $h^{\prime}_{of}$, $h^{\prime}_{ob}$,
$h^{\prime}_{cf}$, and $h^{\prime}_{cb}$, and align the dimension of the
resulting vector representation with the template through a Multi-Layer
Perceptron (MLP). The final output vectors $h^{\prime}_{ok}$ and
$h^{\prime}_{ck}$ are the knowledge encoding results to be injected into the
template. The entire process can be formalized as follows:

$\displaystyle
h^{\prime}_{of},h^{\prime}_{ob}=BiGRU(h_{o}),h^{\prime}_{cf},h^{\prime}_{cb}=BiGRU(h_{c})$
(4) $\displaystyle
h^{\prime}_{ok}=MLP(h^{\prime}_{of}+h^{\prime}_{ob}),h^{\prime}_{ck}=MLP(h^{\prime}_{cf}+h^{\prime}_{cb})$
(5)

Finally, we substitute the knowledge embedding vectors $h^{\prime}_{ok}$ and
$h^{\prime}_{ck}$ into the corresponding positions of the [know] placeholders
in the template $T(o,c)$ near the original entity and candidate entity
representations. In this way, the additional knowledge serves as a supplement
to the entity information, assisting the model in making classification
judgments.

##  IV Experiments

###  IV-A Dataset

To evaluate the effectiveness of our model, we conduct extensive experiments
on the dataset provided by the Clinical Terminology Standardization Evaluation
Task (CHIP 2019) [25]. . This publicly available BEN dataset is derived from
actual Chinese electronic medical records and manually annotated using the
”ICD9-2017 Clinical Edition” surgical standard terminology. The statistics are
shown in Table III:

| Train | Dev | Test
---|---|---|---
one to one | 3596 | 897 | 1857
one to many | 37 | 7 | 23
many to many | 162 | 43 | 76
many to one | 205 | 53 | 44
total | 4000 | 1000 | 2000
TABLE III: The statistics of CHIP2019 dataset.

To construct our external medical knowledge base, we utilize the Chinese
Medical Knowledge Graph CMeKG [23], which is a large-scale knowledge graph
containing 1.56 million conceptual relations and attribute triplets in the
medical domain. We focus on extracting disease, location, and surgery-related
knowledge items that may be relevant to the task dataset, and after filtering,
screening, and deduplication, we obtain a total of 7,249 unique items. Given
the complex relationships between the triples in the knowledge graph, we only
retain the subject and predicate of each triple in our knowledge base.

Model |  16-shot |  64-shot |  256-shot |  1024-shot |  All(3500)
---|---|---|---|---|---
Acc |  Acc |  Acc |  Acc |  Acc
SVM(TF-IDF) |  23.87 |  29.56 |  37.35 |  42.21 |  47.45
Edit-Distance |  24.87 |  30.47 |  38.05 |  44.18 |  48.36
TextCNN |  25.34 |  37.57 |  52.21 |  76.46 |  86.12
BERT-based |  29.86 |  41.98 |  61.38 |  83.20 |  85.53
BERT-Knowledge |  25.87 |  45.52 |  62.16 |  84.10 |  87.04
[14] |  — |  — |  — |  — |  89.30
[15] |  32.47 |  48.29 |  68.79 |  88.44 |  91.14
PL-Manual |  59.83(+27.36) |  64.24 |  74.79 |  88.35 |  90.67
PL-Mixed |  54.39 |  61.94 |  73.59 |  88.20 |  90.83
PL-Knowledge |  46.40 |  71.19(+22.90) |  80.21(+11.42) |  89.61(+2.17) |  92.08(+0.94)
TABLE IV: Final experimental results of our model and baseline models on the
CHIP 2019 BEN dataset. Bold in each column indicates the best result for that
sample size. 16, 64, 256, and 1024 are the sample sizes; ”All” refers to the
full-scale evaluation, with accuracy as the evaluation metric for the models.

###  IV-B Baselines

To provide a comprehensive evaluation of our model, we compare it to some
baseline methods that cover a range of representative classification methods
from machine learning, deep learning, to PLM-based models. Here is a brief
description of each method:

SVM (TF-IDF): SVM [26] is a classic machine learning classification algorithm
that is combined with the TF-IDF [27] feature extraction method to vectorize
text representation. This combination enables SVM to quickly capture key
information in medical entities and provide more distinctive feature
representations for classification task.

Edit-distance: A classic text similarity calculation method that can quickly
calculate the similarity between two medical entities.

TextCNN: A Convolutional Neural Network (CNN) [28] suitable for text
processing is used as a deep learning classification method baseline. TextCNN
captures local contextual features between entity texts and ensures strong
translation invariance.

BERT-based: A sequence classification method based on the pre-trained BERT
model [29]. Concatenating the original entity and standard entity into a
sequence input model in a specified format for ranking.

BERT-Knowledge: In classification stage, concatenating the knowledge embedding
with the two entities vectors with the last layer of BERT, and feeding this
representation into a linear classifier. This is a common fine-tuning
knowledge injection method [30] and is compared with our knowledge-injected
prompt learning model.

[14]: Adopting an end-to-end sequence generative framework with category-based
constraint decoding, model-refining mechanism, and beam search techniques,
achieving promising results in BEN task.

[15]: Using a multitask learning framework to simultaneously perform many-to-
many prediction and entity classification subtasks, it is the previous best
model to solve Chinese BEN task.

###  IV-C Experimental Settings

We employe the retrained MC-BERT111https://huggingface.co/freedomking/mc-bert
as the PLM for fine-tuning, prompt learning, and knowledge injection.
Utilizing the Adam optimizer and a 1e-5 learning rate scheduler, we set 10
epochs, a batch size of 32, a maximum sequence length of 128, and a 0.3
dropout probability. We assess the model on the validation set after each
epoch, selecting the best one for final testing on the test set. To evaluate
performance in data-scarce scenarios, we conduct few-shot experiments with 16,
64, 256, and 1024 training samples, simulating real-world few-shot issues. We
incorporate early stopping, terminating training if no significant improvement
occurred within two epochs. For reliability, each test result was
independently run five times using different random seeds, with the average
value as the final result.

Model | 16-shot | 64-shot | 256-shot | 1024-shot | All(3500)
---|---|---|---|---|---
PL-K | 46.40 | 71.19 | 80.21 | 89.61 | 92.08
PL-K(w) |  44.35(-2.05) |  65.08(-6.11) |  76.47(-3.74) |  86.54(-3.07) |  90.79(-1.29)
PL-K(r) |  42.17(-4.23) |  63.85(-7.34) |  73.60(-6.61) |  83.32(-6.29) |  88.23(-3.85)
TABLE V: Comparison of experimental results for PL-Knowledge using different
knowledge strategies.

###  IV-D Main Results

| Template
---|---
#1 | [Original Entity][know][soft:和][Candidate Entity][know][soft:的]意思相同吗？
| Is the meaning [soft:of] [Original Entity][know] [soft:and] [Candidate
Entity] [know] the same?
#2 | [Original Entity][know]和[Candidate Entity] [know]相同吗？
| Is [Original Entity] [know] the same as [Candidate Entity] [know]?
#3 | [Original Entity][know][soft:和][Candidate Entity][know][soft:是][soft:不][soft:是][soft:相][soft:同]？
| [soft:Is] [Original Entity] [know] [soft:and] [Candidate Entity] [know]
[soft:the] [soft:same] [soft:or] [soft:not]?
#4 | 在医学术语中，[Original Entity][know][soft:和][Candidate Entity][know][soft:的] 意思相同吗？
| In medical terminology, is the meaning [soft:of] [Original Entity] [know]
[soft:and] [Candidate Entity] [know] the same?
#5 | 从专业医学的角度看，[Original Entity][know]与[Candidate Entity] [know]是否指代同一概念？
| From a professional medical , Do [Original Entity] [know] [soft:and]
[Candidate Entity] [know] refer to the same concept?
TABLE VI: Five different template settings.  Template | 16-shot | 64-shot | 256-shot | 1024-shot | All(3500)
---|---|---|---|---|---
Acc | Acc | Acc | Acc | Acc
#1 | 46.40 | 71.19 | 80.21 | 89.61 | 92.08
#2 | 45.57 | 69.34 | 78.83 | 84.68 | 91.23
#3 | 52.25 | 67.53 | 78.01 | 87.48 | 91.19
#4 | 47.51 | 71.37 | 79.18 | 88.25 | 91.39
#5 | 53.73 | 72.28 | 79.35 | 89.03 | 91.61
TABLE VII: Experimental results for different templates, with numbers
corresponding to the template settings in Table VI. Bold values in each column
indicate the best experimental results.

In this section, we present the experimental results of our model and various
baseline methods on the CHIP 2019 BEN dataset, with Accuracy (Acc) used as the
evaluation metric. Our prompt learning models based on manual templates, mixed
templates containing soft tokens, and knowledge-injected templates are denoted
as PL-Mannual, PL-Mixed, and PL-Knowledge, respectively. Based on the results
presented in Table IV, the following observations can be made:

Prompt learning models significantly outperform baseline methods in few-shot
scenarios. As shown in the table, our prompt learning models consistently
outperform the baseline methods in all-scale scenarios, especially in few-shot
settings. For instance, our best prompt learning method achieves a notable
improvement of 27.36%, 22.90%, and 11.42% in the 16, 64, and 256-shot cases,
respectively, which greatly surpasses the baseline methods. This result
showcases the remarkable generalization capabilities of our prompt fine-tuning
model in the few-shot learning task.

Insufficient training data can impair the effectiveness of knowledge infusion.
We also observe that the effectiveness of knowledge infusion could be
undermined by inadequate training data. In the 16-shot case, both the PL-
Manual and BERT-based models outperformed the knowledge-injected PL-Knowledge
and BERT-Knowledge. This implies that while the knowledge infusion strategy
may enhance the model’s generalization abilities, it may not be sufficient to
counterbalance the negative effects of data scarcity when the training data is
extremely limited.

Knowledge enhancement greatly improves model performance in few-shot
scenarios. Our results demonstrate that, with the exception of the extremely
scarce 16-shot case, knowledge-injected methods achieve notable performance in
both few-shot and full-sample evaluation, indicating that the integration of
external knowledge significantly enhances the model’s understanding of the BEN
task. The most significant improvement is observed in the 64-shot and 256-shot
cases, suggesting that, with a moderately small sample size, the model can
effectively incorporate the infused knowledge items and substantially enhance
its performance. For the larger 1024-shot case, the performance improvement of
knowledge-enhanced models is less pronounced.

Our model maintains a slight advantage in all-data evaluation. The results of
the all-scale evaluation indicate that PL-Knowledge performs on par with the
best baseline method in terms of performance, with a slight advantage.

Template strategies have their pros and cons. We observed that in the
1024-shot and full-scale cases, PL-Mixed outperformed PL-Manual, while in
other cases, PL-Manual surpassed PL-Mixed. This implies that mixed templates
incorporating soft tokens can provide a more flexible learning approach for
the model, allowing it to better capture the correlation information between
entities. However, for too few samples, soft tokens may not fully exploit
their advantages, and PL-Manual may be better suited for few-shot scenarios.
Therefore, in practical applications, the choice of template strategy should
be based on factors such as sample size and data complexity.

Baseline methods still hold reference value. Among the baseline methods, [15]
achieved the highest accuracy, demonstrating their excellent performance on
the BEN task. Although the accuracy of early TF-IDF, Edit-Distance, and
TextCNN methods was relatively low, they provided an important benchmark for
evaluating the performance differences between our methods and traditional
machine learning and neural network methods.

In summary, the experimental results demonstrate that our model achieves good
performance in various scenarios, particularly in the few-shot learning task,
proving the strong generalization capabilities and practicality of our method.

###  IV-E Impact of Knowledge Injection Strategies

We further investigated the impact of different knowledge injection strategies
on model performance by modifying the embedding method of knowledge items in
the PL-Knowledge model to use Word2vec and random initialization. Med-word2vec
[31] is an early word vector table pre-trained on a moderately sized Chinese
medical corpus, with weaker representation capabilities in the medical domain
compared to MC-BERT. On the other hand, random initialization does not
introduce any actual knowledge, requiring the model to learn on its own.
Therefore, we can observe the impact on model performance when introducing
limited knowledge and not introducing it at all.

As shown in Table V, when the knowledge embedding method adopts Word2vec and
random initialization, the model performance declines in both cases,
especially with random initialization. This phenomenon confirms the
effectiveness of our knowledge injection strategy in the entity normalization
task, as external knowledge can help the model capture associations between
entities, thereby improving the model’s generalization ability in this task.

Furthermore, this result also reveals the potential negative impact of
randomly initialized knowledge embeddings on model performance. Randomly
initialized embeddings cannot provide effective knowledge information to the
model, causing a certain degree of disturbance during the learning process.
Compared to MC-BERT, word2vec has a weaker representation capability.

###  IV-F Analysis of Different Templates

In this section, we analyze and compare the impact of different template
settings in the PL-Knowledge method on the performance of the BEN task. A
well-designed template can help PLMs better understand task requirements and
improve model performance. In addition to the three token types of hard, soft,
and knowledge-injected, the length and specific statements in the template are
also essential factors in prompt learning. Appropriate template length can
significantly improve model performance, and some specific statements can
better induce PLMs to output correct results. These factors need to be
experimented with and adjusted based on specific tasks and datasets [21, 16,
32, 33].

Considering the above factors, we designed five different templates in Table
VI based on token type, template length, and specific statements. Table VII
shows the experimental results of different templates under various sample
sizes. Although each template performs well in specific scenarios, Template #1
consistently achieves the highest accuracy in the 256-shot, 1024-shot, and
full-scale scenarios. On the other hand, Template #5 performs best in the
small sample scenarios of 16-shot and 64-shot, indicating that this template
is better suited for such situations. Notably, although both #4 and #5
templates contain similar specific prefixes, their performance differences are
significant, further confirming the significant impact of specific statements
on model performance. In all scenarios, the completely manual #2 template and
the entirely soft token-based #3 template perform relatively poorly,
emphasizing the need for the appropriate incorporation of soft tokens to
improve prompt fine-tuning performance. These findings provide essential
guidance for selecting appropriate template strategies and directions in
practical applications.

##  V Conclusion

In this study, we addressed the challenges of the Chinese BEN task, focusing
on data-limited few-shot scenarios. Our proposed PL-Knowledge method combines
an external medical knowledge base with prompt learning to enhance BEN
performance. Empirical results on a benchmark Chinese BEN dataset showcase the
efficacy of our model, outperforming existing baselines in both few-shot and
full-data scenarios. Through ablation and comparison experiments, we highlight
the pivotal role of knowledge injection and template design in boosting model
performance.

Future work will delve into more effective strategies for integrating external
knowledge to further enhance task performance, and will explore maintaining
model effectiveness in zero-shot scenarios. Additionally, our focus on the
Chinese context limits our exploration. In forthcoming research, we aim to
validate our model on English datasets and bridge this gap in our analysis.

## References

  * [1] A. R. Aronson, “Effective mapping of biomedical text to the umls metathesaurus: the metamap program.” in _Proceedings of the AMIA Symposium_. American Medical Informatics Association, 2001, p. 17.
  * [2] J. Wermter, K. Tomanek, and U. Hahn, “High-performance gene name normalization with geno,” _Bioinformatics_ , vol. 25, no. 6, pp. 815–821, 2009.
  * [3] J. D’Souza and V. Ng, “Sieve-based entity linking for the biomedical domain,” in _Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 2: Short Papers)_ , 2015, pp. 297–302.
  * [4] R. J. Kate, “Normalizing clinical terms using learned edit distance patterns,” _Journal of the American Medical Informatics Association_ , vol. 23, no. 2, pp. 380–386, 2016.
  * [5] W. Zhang, J. Su, C. L. Tan, and W. T. Wang, “Entity linking leveraging automatically generated annotation,” in _Proceedings of the 23rd International Conference on Computational Linguistics (Coling 2010)_ , 2010, pp. 1290–1298.
  * [6] S. Gaudan, H. Kirsch, and D. Rebholz-Schuhmann, “Resolving abbreviations to their senses in medline,” _Bioinformatics_ , vol. 21, no. 18, pp. 3658–3664, 2005.
  * [7] R. Leaman, R. Islamaj Doğan, and Z. Lu, “Dnorm: disease name normalization with pairwise learning to rank,” _Bioinformatics_ , vol. 29, no. 22, pp. 2909–2917, 2013.
  * [8] H. Li, Q. Chen, B. Tang, X. Wang, H. Xu, B. Wang, and D. Huang, “Cnn-based ranking for biomedical entity normalization,” _BMC bioinformatics_ , vol. 18, pp. 79–86, 2017.
  * [9] D. Wright, _NormCo: Deep disease normalization for biomedical knowledge base construction_. University of California, San Diego, 2019.
  * [10] M. Zhu, B. Celikkaya, P. Bhatia, and C. K. Reddy, “Latte: Latent type modeling for biomedical entity linking,” in _Proceedings of the AAAI Conference on Artificial Intelligence_ , vol. 34, no. 05, 2020, pp. 9757–9764.
  * [11] D. Xu, Z. Zhang, and S. Bethard, “A generate-and-rank framework with semantic type regularization for biomedical concept normalization,” in _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , 2020, pp. 8452–8464.
  * [12] E. Alsentzer, J. R. Murphy, W. Boag, W.-H. Weng, D. Jin, T. Naumann, W. Redmond, and M. B. McDermott, “Publicly available clinical bert embeddings,” _NAACL HLT 2019_ , p. 72, 2019.
  * [13] J. Lee, W. Yoon, S. Kim, D. Kim, S. Kim, C. H. So, and J. Kang, “Biobert: a pre-trained biomedical language representation model for biomedical text mining,” _Bioinformatics_ , vol. 36, no. 4, pp. 1234–1240, 2020.
  * [14] J. Yan, Y. Wang, L. Xiang, Y. Zhou, and C. Zong, “A knowledge-driven generative model for multi-implication chinese medical procedure entity normalization,” in _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , 2020, pp. 1490–1499.
  * [15] X. Sui, K. Song, B. Zhou, Y. Zhang, and X. Yuan, “A multi-task learning framework for chinese medical procedure entity normalization,” in _ICASSP 2022-2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_. IEEE, 2022, pp. 8337–8341.
  * [16] P. Liu, W. Yuan, J. Fu, Z. Jiang, H. Hayashi, and G. Neubig, “Pre-train, prompt, and predict: A systematic survey of prompting methods in natural language processing,” _ACM Computing Surveys_ , vol. 55, no. 9, pp. 1–35, 2023.
  * [17] J. Zhang, Z. Wang, S. Zhang, M. M. Bhalerao, Y. Liu, D. Zhu, and S. Wang, “Graphprompt: Biomedical entity normalization using graph-based prompt templates,” _arXiv preprint arXiv:2112.03002 , year=2021_.
  * [18] T. Zhu, Y. Qin, Q. Chen, B. Hu, and Y. Xiang, “Enhancing entity representations with prompt learning for biomedical entity linking,” 2022.
  * [19] Z. Lai, B. Fu, S. Wei, and X. Shi, “Continuous prompt enhanced biomedical entity normalization,” in _Natural Language Processing and Chinese Computing: 11th CCF International Conference, NLPCC 2022, Guilin, China, September 24–25, 2022, Proceedings, Part II_. Springer, 2022, pp. 61–72.
  * [20] Z. Ji, Q. Wei, and H. Xu, “Bert-based ranking for biomedical entity normalization,” _AMIA Summits on Translational Science Proceedings_ , vol. 2020, p. 269, 2020.
  * [21] X. L. Li and P. Liang, “Prefix-tuning: Optimizing continuous prompts for generation,” in _Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)_ , 2021, pp. 4582–4597.
  * [22] X. Han, W. Zhao, N. Ding, Z. Liu, and M. Sun, “Ptr: Prompt tuning with rules for text classification,” _AI Open_ , vol. 3, pp. 182–192, 2022.
  * [23] Y. Ao and Zan, “Preliminary study on the construction of chinese medical knowledge graph,” _JOURNAL OF CHINESE INFORMATION PROCESSING_ , vol. 33, no. 10, p. 9, 2019.
  * [24] N. Zhang, Q. Jia, K. Yin, L. Dong, F. Gao, and N. Hua, “Conceptualized representation learning for chinese biomedical text mining,” _arXiv preprint arXiv:2008.10813_ , 2020.
  * [25] Huang, Jiao, Tang, Chen, and Yanjun, “Overview of the chip2019 shared task track1 : Normalizationof chinese clinical terminology,” _JOURNAL OF CHINESE INFORMATION PROCESSING_ , vol. 35, no. 3, p. 6, 2021.
  * [26] C. Cortes and V. Vapnik, “Support-vector networks,” _Machine learning_ , vol. 20, no. 3, pp. 273–297, 1995.
  * [27] G. Salton and M. J. McGill, _Introduction to modern information retrieval_. McGraw-Hill, 1983.
  * [28] Y. Chen, “Convolutional neural network for sentence classification,” Master’s thesis, University of Waterloo, 2015.
  * [29] J. D. M.-W. C. Kenton and L. K. Toutanova, “Bert: Pre-training of deep bidirectional transformers for language understanding,” in _Proceedings of NAACL-HLT_ , 2019, pp. 4171–4186.
  * [30] M. ElSherief, C. Ziems, D. Muchlinski, V. Anupindi, J. Seybolt, M. De Choudhury, and D. Yang, “Latent hatred: A benchmark for understanding implicit hate speech,” in _Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing_ , 2021, pp. 345–363.
  * [31] Y. Weng, “Chineseword2vecmedicine,” https://github.com/WENGSYX/Chinese-Word2vec-Medicine, 2021.
  * [32] B. Lester, R. Al-Rfou, and N. Constant, “The power of scale for parameter-efficient prompt tuning,” in _Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing_ , 2021, pp. 3045–3059.
  * [33] T. Gao, A. Fisch, and D. Chen, “Making pre-trained language models better few-shot learners,” in _Joint Conference of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing, ACL-IJCNLP 2021_. Association for Computational Linguistics (ACL), 2021, pp. 3816–3830.


# Revealing interactions between HVDC cross-area flows and frequency stability
with explainable AI

Sebastian Pütz<EMAIL_ADDRESS>Forschungszentrum Jülich, Institute for
Energy and Climate Research - Systems Analysis and Technology Evaluation (IEK-
STE), 52428 Jülich, Germany  Institute for Theoretical Physics, University of
Cologne, 50937 Köln, Germany  Benjamin Schäfer  Karlsruhe Institute of
Technology, Institute for Automation and Applied Informatics (IAI),76344
Eggenstein-Leopoldshafen, Germany  Dirk Witthaut  Forschungszentrum Jülich,
Institute for Energy and Climate Research - Systems Analysis and Technology
Evaluation (IEK-STE), 52428 Jülich, Germany  Institute for Theoretical
Physics, University of Cologne, 50937 Köln, Germany  Johannes Kruse
Forschungszentrum Jülich, Institute for Energy and Climate Research - Systems
Analysis and Technology Evaluation (IEK-STE), 52428 Jülich, Germany  Institute
for Theoretical Physics, University of Cologne, 50937 Köln, Germany

###### Abstract

The energy transition introduces more volatile energy sources into the power
grids. In this context, power transfer between different synchronous areas
through High Voltage Direct Current (HVDC) links becomes increasingly
important. Such links can balance volatile generation by enabling long-
distance transport or by leveraging their fast control behavior. Here, we
investigate the interaction of power imbalances - represented through the
power grid frequency - and power flows on HVDC links between synchronous areas
in Europe. We use explainable machine learning to identify key dependencies
and disentangle the interaction of critical features. Our results show that
market-based HVDC flows introduce deterministic frequency deviations, which
however can be mitigated through strict ramping limits. Moreover, varying HVDC
operation modes strongly affect the interaction with the grid. In particular,
we show that load-frequency control via HVDC links can both have control-like
or disturbance-like impacts on frequency stability.

## Introduction

The transition to a renewable energy supply challenges the operation and
stability of electric power systems witthaut2021collective . Wind and solar
power generation are determined by the weather and are thus intrinsically
fluctuating and uncertain anvariShortTermFluctuations2016 ;
collinsImpactsInterannualWind2018 . Hence it becomes increasingly difficult to
balance the generation and consumption of electric power
elsner2015flexibilitatskonzepte . Furthermore, the location of renewable power
generation is partly determined by natural conditions and not by consumer
needs. For instance, wind turbines are preferably installed near the coast,
while the centers of the load may be far away inland, leading to higher
transmission needs and grid loads peschImpactsTransformationGerman2014 . To
master these challenges, we need new infrastructures, but also new concepts
for power system control and operation poollaOptimalPlacementVirtual2017 ;
milanoFoundationsChallengesLowInertia2018 , as well as a better understanding
of the complex inter-dependencies of different parts of the energy system.
This article contributes to this understanding by a data-based analysis of the
interplay of power system control and cross-area power flows.

Load-frequency control is the central method to balance generation and load on
short time scales. Although extreme imbalances, e.g. after contingencies, are
rare, system balancing becomes a regular challenge due to large fluctuations,
unscheduled events, or forecasting errors schaferNonGaussianPowerGrid2018 ;
krusePredictabilityPowerGrid2020 ; kruse2021revealing . Any imbalance
manifests in the grid frequency, which decreases from its reference value in
case of scarcity of generation and vice versa anderson2003 ;
machowskiPowerSystemDynamics2008 . In the Central European power grid, the
number of large frequency deviations has been increasing in the last decade
such that frequency stability has become a matter of increasing importance
entso-eaisblReportDeterministicFrequency2019 . The power balance is restored
by activating different layers of reserves, which are generally activated
based on deviations of the grid frequency Primary control or frequency
containment reserve (FCR) is activated within seconds and can roughly be
described by a proportional control law. Secondary control or frequency
restoration reserve (FRR) is activated within minutes and can roughly be
described by an integral control law.

Power flows between different synchronous areas play an increasingly important
role due to the energy transition. The increasing demand for long-distance
power transmission is covered by a variety of grid extension projects
Netzentwicklungsplan . This includes in particular new high-voltage direct
current (HVDC) links within and between different synchronous areas. Within
the last decade, several new links have been established in Europe, and
further ones are planned or under construction. Links from and to the
Scandinavian power grid are particularly promising due to the large resources
of (controllable) hydropower and pumped hydro storage in the Nordic area
tellefsen2020norwegian . The operation of such cross-area HVDC links is mainly
determined in advance on the market. However, HVDC links and converter
stations can also be used in load-frequency control, either optimizing the
frequency in both areas or only on one site entso-HVDCLinksOperationReport .
Then, power flows are adjusted on short terms and thus deviate from the
previously scheduled values, which is why unscheduled cross-area flows are
inherently connected to frequency control through HVDC links. Until now, pilot
projects and simulation studies have demonstrated the additional use of
frequency control via HVDC links between synchronous areas
jingyahuangHVDCbasedFastFrequency2017 ; langwasserEnhancedGridFrequency2020 ;
dijokasFrequencyDynamicsNorthern2021 ; dehaanStabilisingSystemFrequency2016 .
The European network of transmission system operators (ENTSO-E) currently
revises the standards for the application of HVDC links within the two
implementation projects for coordination of aFRR and mFRR throughout Europe,
PICASSO and MARI picasso ; mari .

In spite of these developments, cross-area flows on HVDC links can also have
unexpected and even unfavorable effects on frequency quality, especially on
the Rate of Change of Frequency (RoCoF). Firstly, scheduled power flows on
HVDC links can be ramped up or down very fast, which can lead to deterministic
frequency deviations entso-eaisblReportDeterministicFrequency2019 . As fast
HVDC ramps cause RoCoFs beyond the systems’ control capabilities, technical
studies even suggest ramp limits entso-HVDCLinksOperationReport . While the
effect of fast generation ramps on frequency quality is well-known
weissbachHighFrequencyDeviations2009 ; kruse2021revealing , the effects of
scheduled HVDC ramps are still under investigation entso-
eaisblReportDeterministicFrequency2019 . Secondly, ramp limits and other
technical parameters limit the effect of HVDC links on the grid frequency
jingyahuangHVDCbasedFastFrequency2017 . Here the question arises, how such
constraints affect frequency deviations in reality. Thirdly, frequency control
on one side of an HVDC link can act as a power disturbance on the other side
langwasserEnhancedGridFrequency2020 , which might cause unfavorable effects on
frequency stability. Understanding expected as well as unfavorable effects in
historic operational data of HVDC links and grid stability is therefore of
great importance. However, multiple factors affect grid frequency deviations
in large synchronous areas thus making it hard to isolate the interaction with
HVDC power flows by simple data analysis, such as correlation studies
kruse2021revealing .

In this article, we use eXplainable Artificial intelligence (XAI) for a data-
based analysis of HVDC operation, frequency stability, and their
interrelations. Machine Learning (ML) allows us to model and disentangle
different effects in the data hastieElementsStatisticalLearning2016 , while
methods from XAI enable us to gain insights into the dependencies identified
by the model barredoarrietaExplainableArtificialIntelligence2020 . In
particular, we use SHapley Additive exPlanations (SHAPs), which have highly
desirable mathematical properties lundbergUnifiedApproachInterpreting2017 ;
lundbergLocalExplanationsGlobal2020a . As a case study, we apply these methods
to HVDC flows between the major synchronous areas within Europe. Using five
years of publicly available data transnetbwfreqdata ; nationalgridfreqdata ;
fingridfreqdata ; ENTSOETransparencyPlatform , we extract the interactions
between HVDC flows and the grid frequency, both for the entire grid as well as
for individual HVDC links.

The article is organized as follows. First, we describe our methodology, which
we then apply to two different models. The stability model aims to predict
indicators for frequency stability from various techno-economic features. We
focus on the impact of cross-area flows which are extracted via SHAP values.
Then, we introduce a second model, the flow model, that targets unscheduled
cross-areas flows on individual links, including frequency stability
indicators as features. This approach reflects the fact that interactions
between flows and frequency can be both-way; in particular, frequency
deviations may cause unscheduled flows due to frequency control. Finally, we
close our study with a discussion.

## Explainable machine learning for the analysis of complex energy systems

We aim to extract the relation between frequency stability and the flows on
HVDC lines, that connect different synchronous areas within the European power
system. Frequency stability depends on a variety of drivers that display
complex interactions kruse2021revealing  such that it is extremely difficult
to single out the role of one or even a few key influence factors based on
ordinary correlation analysis. Instead, we need a method that can disentangle
the contributions of different factors in a mathematically consistent way.
Machine learning provides powerful tools to model such complex dependencies.
We refer to our code github  and data zenodo  for details on our model
implementation and data preparation that go beyond the main text.

Figure 1:  (a) Indicators of frequency stability in hourly resolution. The
RoCoF is the slope of the frequency at the beginning of the hour while the
Nadir is the largest frequency deviation within one hour. We also considered
the Mean Square Deviation (MSD) and the integral for each hourly frequency
trajectory. (b) Map of northern Europe including the HVDC links we considered
in this study. The differently colored regions reflect the five synchronous
areas adjoining these HVDC connections.

### Quantifying frequency stability

Frequency stability is quantified by four indicators (Fig. 1 (panel a)), which
are evaluated on an hourly basis reflecting the basic time interval for
electricity trading and scheduling. All indicators are extracted from
frequency time series $f(t)$ with a 1-second resolution obtained from
transnetbwfreqdata ; nationalgridfreqdata ; fingridfreqdata . First, the Rate
of Change of Frequency (RoCoF) is defined as the gradient of $f(t)$ at the
beginning of the hour after the dispatch has been adapted. Second, we consider
the integral of $f(t)$ which reflects a sustained frequency deviation and thus
a sustained power imbalance. Finally, we consider the largest deviation from
the reference frequency during the hour, the nadir, and the mean square
deviation. Details are described in ref. kruse2021revealing .

### HVDC cross-area flows

This study investigates the relations of non-embedded HVDC link operation to
frequency stability. Therefore, we included the time series of scheduled
commercial exchanges and physical flows in the analysis, which was neglected
in a previous model kruse2021revealing . The ENTSO-E transparency platform
provides the in and outflows between two bidding zones, control areas, or
countries ENTSOETransparencyPlatform .

To include HVDC flows in our models, we engineer two different datasets with
different purposes.

First, we use an aggregated dataset to investigate the impact of flows on the
frequency stability indicators. For each synchronous area, we construct a time
series summarizing the net inflow from each neighboring synchronous area.

Second, we use a link-resolved dataset to investigate how the flows depend on
frequency deviations. We construct time series from the transmission data
between two bidding zones or control areas, which we can attribute to a
specific HVDC link or link group. Time periods where links are malfunctioning
or unavailable are excluded from the analysis as we want our models to explain
the day-to-day behavior. To this end, we utilized the transmission grid
unavailability data on the ENTSO-E transparency platform
ENTSOETransparencyPlatform . We found that omitting all data from listed time
periods shorter than two months yielded a good trade-off between eliminating
exceptional behavior while maintaining sufficient data for training and
testing.

In addition, we constructed time series of unscheduled flows by subtracting
physical flows from scheduled commercial exchanges for both datasets.

Overall, we included transmission data for 13 HVDC links connecting five
different synchronous areas, as illustrated in Fig. 1 (panel b). The
transmission data between Belgium and the United Kingdom was generally omitted
as the Nemo Link was just commissioned towards the end of the period
considered in this paper.

### Stability model and flow model

To investigate the relationship between frequency deviations and HVDC flows,
we used two models that differ in their inputs and targets. The stability
model, which we will look at first, targets the four frequency indicators
introduced above for the synchronous power grids of Great Britain (GB),
Northern Europe (Nordic), and Continental Europe (CE) by using multiple
techno-economic features. The set of features contains the aggregated inflows
from other synchronous areas as described above and several features
characterizing generation and load. As in ref. kruse2021revealing , we
included time series of day-ahead load forecast, day-ahead wind and solar
forecast, day-ahead electricity prices, day-ahead scheduled generation per
production type as well as the actual load and generation per type. All time
series were engineered from publicly available day-ahead and ex-post data
obtained from the ENTSO-E transparency platform ENTSOETransparencyPlatform .
As we want to model hourly frequency indicators, the time series with higher
time resolution were downsampled to hourly resolution by taking hourly
averages. We aggregated the time series for each synchronous area following
the procedure in ref. kruse2021revealing . Beyond the aggregated features we
engineered ramp features (gradients from time $t-1$ to $t$), forecast errors
(day ahead - actual), and an inertia proxy inspired by ref.
ulbigImpactLowRotational2014 .

The second model, the flow model, then targets the unscheduled flows of
individual HVDC links. We use one model class for each of the four border
regions, which differ in their input feature set. For links connecting GB and
CE as well as CE and Nordic, data from both terminal sides are available. The
feature sets contain all time series on generation, load, and prices from both
sides as described for the stability model. In addition, the feature set
includes the planned commercial exchange and the four stability indicators
from both terminal sides. For links connecting the Nordic and the Baltic grid
as well as the GB and the Irish grid, only data from one terminal side is
included due to the unavailability of data from the Irish and the Baltic grid.

### Model training, testing, and explanation

We used the LightGBM framework ke2017lightgbm  to train gradient boosted trees
to our datasets consisting of hourly time series for the years 2015-2020.
Gradient Boosted Trees are considered among the highest performing methods for
tabular datasets chenXGBoostScalableTree2016  while they also allow for fast
and efficient computation of SHAP values which enable us to explain the model
lundbergLocalExplanationsGlobal2020a . Before training, we shuffled our data
and split it into a training set (64%), a validation set (16%), and a test set
(20%). To optimize the hyperparameters of each model we conducted a grid
search combined with a 5-fold cross-validation on the training set while
applying early stopping of the boosting rounds utilizing the validation set.
Subsequently, we tested the model performance on an unseen test set.

Finally, the model is interpreted and analyzed in terms of SHAP values which
allow us to disentangle each model prediction into the contribution of the
individual features lundbergLocalExplanationsGlobal2020a . Assume that we have
a set of $n$ features. Given the feature values $x_{1},\ldots,x_{n}$, the
model yields the output $f(x_{1},\ldots,x_{n})$. Using the SHAP framework,
this prediction can be attributed additively to the individual features
$j\in\\{1,\ldots,n\\}$. That is, the output can be written as a sum

$f(x_{1},\ldots,x_{n})=\phi_{0}(f)+\sum_{j=1}^{n}\phi_{j}(f,x_{1},\ldots,x_{n}),$

where the $\phi_{j}$ is the SHAP value of the $j$th feature and the base value
$\phi_{0}$ is the expected value of $f$.

However, SHAP values are not limited to the explanation of individual inputs,
but can also be used to interpret global feature importances and model
behavior by combining many local explanations. The absolute value of a
feature’s SHAP value reflects how much the model relies on this feature for
the corresponding input. Therefore, we can quantify global feature importance
within one model by averaging over a feature’s SHAP values for all inputs. We
then obtain a normalized feature importance by dividing the feature
contribution of one feature $k$ by the total sum of all feature contributions:

$\frac{\left<|\phi_{k}(f,x_{1},\ldots,x_{n})|\right>_{\text{inputs}}}{\sum_{j=1}^{n}\left<|\phi_{j}(f,x_{1},\ldots,x_{n})|\right>_{\text{inputs}}}.$

Consequently, a feature importance of one would imply that the model solely
relies on this single feature while a zero feature importance implicates that
the model does not consider the feature at all. Moreover, feature importances
for a single model sum to one. We also utilize SHAP dependency plots, which
are able to provide much deeper insights than classical dependence plots,
especially when SHAP interactions are also taken into account. For instance,
SHAP dependence plots are capable of providing much deeper insights than
classical dependence plots, especially when SHAP interactions are also taken
into account. Nevertheless, it is important to keep in mind that SHAP in its
own right is not able to unveil any causal relationship. Therefore any results
have to be interpreted using domain knowledge to yield meaningful knowledge
discovery.

## Modeling and understanding frequency stability indicators

We first consider the stability models, which predict the four different
indicators for power systems frequency deviations. We focus on the role of the
features describing cross-area flows via HVDC links, which had been discarded
in previous models in ref. kruse2021revealing .

Figure 2:  Including HVDC transmission data improves the modeling of frequency
stability indicators. For three European synchronous areas, we present Machine
Learning (ML) models that predict frequency stability indicators from techno-
economic features such as generation per type, load, and day-ahead electricity
prices. We measure their performance by the $R^{2}$ score, which quantifies
the share of variance explained by the model (colored bars). As a benchmark,
we also provide the $R^{2}$ score for the daily profile predictor, which
predicts the targets purely based on their daily average evolution (grey
bars). The ML models outperform the benchmark by a large margin, showing the
overall importance of techno-economic features for frequency stability.
Compared to previous models without HVDC features (cf. kruse2021revealing ),
the inclusion of cross-area flows improves the performance by a factor of up
to 1.8 (indicated by the numbers above the red bars). The benefits of
including HVDC flows are particularly large in GB and the Nordic area.

### Importance of HVDC flows for frequency stability

We start our investigation by looking at the overall importance of HVDC flows
for frequency stability. The importance is quantified in terms of ML models,
comparing the performance with and without the HVDC flows in the feature set.
The performance is measured by the R2-score, which reflects the share of
variance explained by the model, and evaluated for all four frequency
indicators and three different synchronous areas (Fig. 2).

We find that the importance of cross-area flows is very different for the
three major European grids. In Great Britain, the performance of the ML models
increases strongly, up to a factor of 1.8, if cross-area flows are included.
In absolute terms, however, the performance remains mediocre with values
$R^{2}\approx 0.4$. In contrast, the performance is substantially higher for
the Central European grid and remains largely unaffected when cross-area flows
are included or not. This may be attributed to the fact that the Central
European grid is much larger (factor of approximately eight
rydingorjaoOpenDatabaseAnalysis2020 ), such that HVDC converter stations take
a much smaller relative share in generation or load.

Figure 3: Feature importances of HVDC flows vary among the different
synchronous areas. We measure the feature importances in our ML models by the
mean absolute SHAP values. The importances for each model are normalized such
that they sum to one as described in the main text. For each synchronous area
and each indicator, the eight most important features are depicted. In the
Nordic and GB areas, the HVDC features are among the most important features,
but in CE the model did not identify cross-area flows as highly important.

The general finding is confirmed by a detailed analysis of the feature
importances reported in Fig. 3. In the GB grid, unscheduled, physical, and
scheduled flows on HVDC links are among the three most important features for
different targets, while HVDC features occur in the Nordic model less
prominently. In the CE model, HVDC features are not among the eight most
important features. This underlines the importance of HVDC power flows in GB
and to a lesser extent the Nordic grid, while HVDC flows have a relatively
small impact in CE.

### The effect of scheduled HVDC flows

Some feature importances reveal relevant effects of scheduled HVDC flows,
which are related to deterministic frequency deviations kruse2021exploring .
Fig. 3 shows a strong impact of scheduled flow ramps on the RoCoF in GB, while
the other stability indicators are only weakly affected. This relates to the
market-based schedule of flows on HVDC links, which changes mostly in
intervals of one hour, thus affecting the hourly RoCoF predominately.
Schedule-based ramps on HVDC links introduce temporary power imbalances and
thus lead to deterministic deviations in the grid frequency entso-
eaisblReportDeterministicFrequency2019 . This is similar to the deterministic
effect of fast, scheduled generation ramps, which are a well-known driver of
deterministic frequency deviations weissbachHighFrequencyDeviations2009 ;
kruse2021revealing . In the Nordic grid, scheduled flows ramps are ranked as
the sixth most important feature for the RoCoF, indicating weak deterministic
effects through scheduled HVDC ramps.

Interestingly, the direction of these ramping effects varies among the grids
(Fig. 4). While increasing scheduled ramps leads to larger RoCoFs in GB, the
relation is the opposite in the Nordic grid. Following the discussion in ref.
kruse2021revealing , we thus identify the ramping effect in GB as RoCoF-
driving, while in the Nordic grid HVDC ramps are RoCoF-offsetting, i.e. larger
scheduled ramps are rather related to a RoCoF reduction.

We explain this observation with ramp speeds of HVDC converters relative to
the speed of other generation types in the respective synchronous area. We
start from typical values of the rate of change of power (RoCoP) for every
type. Then we compute the ratio with respect to the fastest RoCoP in the grid,
yielding the relative ramp speed $s\in[0,1]$ similar to the procedure in ref.
kruse2021revealing .

In GB, scheduled HVDC ramps are equally fast ($s=0.14$) as other RoCoF-driving
generation types such as pumped hydro generation ($s=0.15$), thus causing a
step-like behavior, which drives the deterministic frequency deviations. In
the Nordic grid, fast reservoir hydro ramps are the dominating RoCoF-driving
technology ($s=1$) and inflow ramps from CE are relatively slow ($s=0.04$).
This is most probably due to the strict ramping limits on HVDC links imposed
by Nordic TSOs entso-eaisblReportDeterministicFrequency2019 . In this way,
HVDC ramps rather smooth the generation curve and dampen the temporary power
imbalance, which explains the different dependencies in Fig. 4. In CE,
scheduled HVDC ramping speeds are also very slow ($s=0.03-0.09$) as large
generation ramps dominate the overall RoCoP due to the size of the area. Thus,
scheduled HVDC ramps are not strongly important for the RoCoF in CE and do not
appear in Fig. 3.

Figure 4: Different effects of scheduled HVDC ramps on the Rate of Change of
Frequency (RoCoF). We show the modeled interdependencies between the ramps of
scheduled HVDC flow to Continental Europe and the hourly RoCoF in the GB
(left) and Nordic (right) synchronous areas. The dependencies have opposite
directions, which is confirmed by the Kendall correlation coefficient $\tau$
of the scattered data. We explain these effects with different relative ramp
speeds $s$, which we calculate based on the ramp rates $r$ of the HVDC links
entso-eaisblReportDeterministicFrequency2019 . On the CE-GB border, a cable
with 1000 MW capacity is allowed to ramp 100 MW/min, i.e., the ramp rate is
$r=0.1/\rm{min}$ (share of full load per minute). On the CE-Nordic border, a
cable such as Kontek has 600 MW capacity and Nordic ramp restrictions allow
600 MW per hour, i.e., a ramp rate of $r=0.017/\rm{min}$. Using the mean
$\Delta P$ of the absolute hourly flow changes on the links, we estimate the
typical Rate of Change of Power as RoCoP$=\Delta P\cdot r$, which results in
different relative ramp speeds $s$ (see main text). These different ramping
speeds most probably explain the different effects on the hourly RoCoF.
Figure 5:  Unscheduled flows and the frequency integral show different
dependencies among the European grids. The model-independent scatter plots
(top row) of unscheduled outflows and frequency integrals do not exhibit clear
dependencies. Therefore we display SHAP dependency plots (bottom row), which
depict the relationship extracted by the stability model thus isolating the
effect of a single feature. The integral in the Nordic (a) and the GB area (b)
show a positive relation to unscheduled flows, which corresponds to the effect
of frequency control, while the CE unscheduled flows have a negative effect on
the Nordic integral (c) thus showing a disturbance-like behavior. The
scheduled flows (color code) demonstrate that Nordic-CE and GB-CE flows are
mostly uni-directional, while CE-Nordic flows exhibit both directions (see
main text for discussion).

### The effect of unscheduled HVDC flows

In addition to scheduled flows, unscheduled HVDC flows, i.e., deviations from
the market-based schedule, play an important role in frequency deviations.
Figure 3 reports CE unscheduled flows to be the most important feature for
three stability indicators in GB. In the Nordic grid, unscheduled flows and
the related physical flows are also of high importance. The importance of
unscheduled flows in frequency dynamics might relate to the effect of
unforeseen outages on the HVDC links, but these are rare events entso-
NordicBalticHVDCStatistics , which cannot strongly influence the dependencies
within our model. Another, more realistic explanation for the importance of
unscheduled flows is load-frequency control, which can be applied through HVDC
links entso-HVDCLinksOperationReport  and always introduces an unscheduled
change in the power flow on the link.

To further investigate this hypothesis, we exemplarily examine the effect of
unscheduled flows on the frequency integral for three different HVDC
connections (Fig. 5). We focus on the frequency integral, as it most closely
reflects the need for frequency control via HVDC links in our dataset. The
data only includes hourly averaged power flows, so that only net hourly
balancing actions through HVDC links are recorded. These are most closely
related to the frequency integral as it reflects the net power imbalance
within the hour. Remarkably, the scatter plots of flows and integral values
(top row Fig. 5) do not identify clear dependencies. In contrast, the SHAP
dependency plots (bottom row) isolate the effect of the individual feature and
show distinct relations, thus confirming the advantages of XAI methods over
simple correlations analysis (cf. kruse2021revealing ).

The observed effects of unscheduled HVDC flows vary among the grids, showing
either a control- or a disturbance-like behavior. A control-like effect
resembles the behavior of a frequency controller, i.e., positive frequency
deviations lead to positive outflows to balance the oversupply within the
system. Contrary, a disturbance-like effect entails a negative dependency,
where a positive frequency deviation is triggered by a sudden negative
outflow, i.e., the sudden inflow of power into the system. In Fig. 5 (bottom
row), unscheduled outflows to the Baltic area have a positive relation to the
Nordic frequency integral (panel a), which is similar to CE unscheduled flows
in GB (panel b). Thus, these effects on the Nordic and British frequency show
a control-like behavior. In contrast, unscheduled outflows from the Nordic
grid to CE (panel c) show a negative dependency, which resembles a
disturbance-like effect. Interestingly, also the physical flows (color code)
differ strongly among the three examples in Fig. 5, which we will discuss
within the next section.

Finally, we note that unscheduled HVDC flows are the result of explicit
operation strategies by the adjoining TSOs, which are in control of the DC
power flow on the links entso-HVDCLinksOperationReport . To further understand
the varying effects of unscheduled HVDC flows, we thus have to examine the
individual operation modes on different links between the synchronous areas.

## Modeling and understanding unscheduled flows between synchronous areas

Our data-based analysis shows a strong relation between unscheduled flows and
frequency stability. To further understand this interaction, we now switch the
perspective and investigate unscheduled flows on individual HVDC links as
targets. For this purpose, we use our second model, the flow model, which
predicts unscheduled flows on single HVDC links based on techno-economic
features and the frequency indicators.

Figure 6:  With our flow model, we predict the unscheduled flows on single
HVDC links between different synchronous areas using techno-economic features
such as prices, loads, or generation per type as well as frequency stability
indicators. The models successfully predict unscheduled flows with
performances similar to those of the stability model (cf. Fig. 2).

### Importance of power imbalances for unscheduled flows

The flow model can explain a large share of unscheduled flows on various HVDC
links (Fig. 6). As a recap, the flow model uses features from the stability
model, such as the load or scheduled HVDC flows, as well as the frequency
indicators from areas that are available in our data set. Based on these
features, we achieve similar performances as in the stability models
($R^{2}\sim$ 0.25…0.85), which are acceptable values given the stochastic
nature and our limited access to all influencing variables. Among the feature
set, the role of the frequency integral is particularly interesting, as it
closely relates to the control need within the hour.

The frequency integral plays a major role for some HVDC links, which can be
related to load-frequency control delivered by these links. We first focus on
the feature importance, which is indicated in Fig. 7 on the y-axis, and the
feature rank, represented by black numbers.

The Britned link is most prominent, as the British frequency integral is the
most important feature in the respective model (blue color). The Nordic
integral (orange color) is ranked among the ten most important features for
Estlink, Kontiskan, and Storebaelt. In contrast, the Nordned link and
particularly the Baltic cable show very low feature importances of the
integral.

Our findings are fully consistent with operation modes of HVDC links reported
by the transmission system operators and the ENTSO-E. Kontiskan, Storebaelt,
and Estlink NordicSOA2019-LFCannex ; NordicSOA2006  as well as Britned entso-
HVDCLinksOperationReport  are used in load-frequency control. As the time
series for physical and unscheduled flows correspond to the hourly average,
the integral is the relevant feature of the frequency time series. The
situation is very different for the Nordned link, which is not used in load-
frequency control as reported in ref. entso-HVDCLinksOperationReport .
Consistently, the frequency integral exhibits very low feature importance in
the model.

Our studies complement and augment the sparsely available public information
on HVDC operation. First, public information is entirely lacking for some of
the HVDC links. For instance, we are not aware of any official report
describing the operation of the Baltic cable. Our results show that this
connection is likely not used for load-frequency control. Second, most
available documents report only the general participation in load-frequency
control without further details. Our results allow us to quantify this
dependency as we will discuss in the following section.

### Control-like and disturbance-like effects

Turning from feature importances to dependencies, we reveal control-like and
disturbance-like interactions between unscheduled flows and frequency
stability (Fig. 7). The correlation $\tau$ between the SHAP values of the
frequency integral and the unscheduled flows quantifies the direction of this
dependency (similar to the correlation in Fig. 4). We note that we define the
direction of the unscheduled flows such that positive values correspond to an
outflow of electric energy. This holds for all connections such that a flow is
counted differently for the two terminal sides. For instance, an unscheduled
flow from CE to GB would be counted as positive for CE and as negative for GB.

In that way, control-like dependencies appear in the right half of the plot
($\tau>0$), where positive frequency deviations lead to more outflows, while
disturbance-like effects lie in the left half ($\tau<0$). We now discuss these
effects for the four links exhibiting the highest feature importances of the
integral, i.e., Britned, Estlink, Konstiskan, and Storebaelt.

Control-like effects are most pronounced for Britned and Estlink, which show
high feature importance of the GB and the Nordic integral and a strong
positive correlation. In contrast, the CE integral in the Britned model is
negatively correlated thus showing a disturbance-like effect. (Note that the
Baltic integral is not included in the Estlink model due to missing data).
These observations are consistent with reports and TSO agreements. Britned is
used only for uni-directional control, i.e. only for frequency support in GB
entso-HVDCLinksOperationReport , and Estlink is also dominantly used by the
Nordic side for load-frequency control, according to the 2019 System Operator
Agreement (SOA) NordicSOA2019-LFCannex . Thus, on the GB and Nordic sides, we
only have a control effect, which introduces a positive dependency between
frequency deviations and unscheduled outflows. On the other side of the link,
the control actions behave like a disturbance, which explains the negative
correlation of the CE integral in the Britned model.

Disturbance-like effects are most pronounced for Kontiskan and Storebaelt,
which exhibit a negative correlation for the Nordic integral, but with
relatively low feature importance. In contrast to Britned, the integral on
both sides of the Kontiskan and Storebaelt links show a negative dependency
(red and orange symbols), although the CE integral exhibits even lower feature
importance. Reports and TSO agreements suggest, that both links are used bi-
directionally for control, i.e., both sides can receive and supply frequency
support NordicSOA2019-LFCannex ; NordicSOA2006 . This might explain both the
low feature importance as well as the observed dependencies. Both areas
experience the control and the disturbance-like effect, which might cancel
each other out. This might partly explain the lower importance of the
frequency integral for both links. However, the disturbance-like effects
dominate thus yielding the observed negative correlation for both the Nordic
and the CE integral. One explanation can be the control delay, particularly if
links are used for slow tertiary control (mFRR), which is slower than primary
and secondary control. On the receiving side, a frequency deviation might
trigger a delayed control action that partly falls into the next hour. On the
supporting side, the disturbance-like effect of this action appears
immediately and thus might introduce a stronger dependency between the hourly
features and targets. However, also other effects of HVDC operation might play
a role here.

Figure 7: Relation between frequency integrals and unscheduled flows indicates
different HVDC operation modes. We show the feature importance of the
frequency integrals, which is the mean absolute SHAP value normalized by the
sum of all such values, i.e. it becomes one if the model uses only this single
feature. The numbers indicate the feature rank within the respective model.
For a specific area, the values $\tau$ depict the correlation between the SHAP
values of a frequency integral and the unscheduled outflows from this area,
i.e., disturbance-like relations appear on the left side and control-like
interactions on the right side. The strong control-like effects in the Britned
and Estlink model probably relate to their uni-directional control scheme,
while the weaker disturbance-like effects for Kontiskan and Storebaelt can be
a result of the bi-directional application of frequency control.  Figure 8:
Multiple factors affect the regulation of unscheduled flows on single HVDC
links. We show the dependency plots for the first six most important features
(measured by mean absolute SHAP values) in the flow models of Britned and
Kontiskan as examples. The reference area for unscheduled outflows is GB (for
Britned) and the Nordic area (for Kontiskan). While the frequency integral
dominates the Britned model, other features such as the scheduled HVDC flows
and actual load and generation also affect the unscheduled power flows on the
two links.

### Other effects of HVDC operation modes

The frequency integrals, i.e., systematic power imbalances, do not alone
describe the unscheduled HVDC flows as demonstrated by their low feature
importance for multiple links (Fig. 7). However, most flow models still
exhibit a high performance (Fig. 6) thus pointing to other highly predictive
features. These effects can relate to other properties of HVDC operation,
which we discuss using the Britned and Kontiskan links as examples (Fig. 8).

The scheduled flows play a major role for both Kontiskan and Britned (green
color). For Kontiskan, this feature is even the most important one, with the
integral (red color) only following at rank six. Scheduled inflow on Kontiskan
to the Nordic area is associated with an increase in the amount of unscheduled
outflow. For Britned the impact of scheduled flows is nearly zero if the flows
direct to GB, which is the dominating case for this border (cf. the physical
flows in Fig. 5). A strong negative impact on the unscheduled outflows is only
observed for a few data points with scheduled outflows from GB, i.e.,
scheduled outflows from GB systematically overestimate the physical outflow.
The different effects of scheduled flows on Britned and Kontiskan might relate
to different operation modes. On Britned the link overload capacity is used
for frequency support entso-HVDCLinksOperationReport , such that frequency
control can operate nearly independently of scheduled flows, which is
consistent with a nearly vanishing impact of scheduled flows for the majority
of time steps (Fig. 8). Only in the rare situation of strong outflows to CE,
this situation changes. In contrast, no capacity is reserved for frequency
control on Kontiskan NordicSOA2006 . Control can only be provided if the
market-based schedule leaves free capacity in the right direction, such that
scheduled inflows to the Nordic area allow for increased unscheduled outflows
as depicted by the dependency plot (Fig. 8).

If we look back at the stability models and Fig. 5, we can even see
indications for these effects using the aggregated flow data. For the
connections Nordic-Baltic and CE-GB, the scheduled flow is oriented in the
same direction for most hours of the year as indicated in the color code in
Fig. 5. GB mostly imports power via HVDC links, such that positive control
power requires a further increase of the flows beyond the commercially
scheduled values. Obviously, this is possible only if capacity is available,
which is again consistent with ref. entso-HVDCLinksOperationReport  and our
interpretation of Fig. 8. In contrast, links between the Nordic and CE areas
are used for power flows in both directions.

Other important features are the actual generation of different types, actual
load, and forecast errors (blue color). Most of these dependencies exhibit a
strong vertical dispersion, which indicates strong interactions with other
features lundbergLocalExplanationsGlobal2020a . Actual load, generation, and
forecast errors directly relate to actual power imbalances, which can explain
their importance for unscheduled HVDC flows. These features can indirectly
also reflect market situation, e.g., intra-day prices or reserve energy
prices, which are not included in the model. These market-based features can
also influence unscheduled HVDC flows, as control via these links might only
be applied if it is cheaper than other domestic operational reserves.

All in all, Britned is used for uni-directional control in GB, which in most
cases does not depend much on the market-based schedule of the link, thus
introducing a strong control-like interaction with the British grid frequency.
This strong control effect on Britned most probably explains the control-like
dependency, which we observed for the aggregated stability model in Fig. 5
(panel b). In contrast, Kontiskan exhibits disturbance-like interactions with
the grid frequency on both sides, which probably relates to a bi-directional
control setting. Control actions are further constrained by scheduled flows,
thus diminishing the importance of the grid frequency for unscheduled flows.
Similar observations can be made for other HVDC links between the Nordic and
the CE area (Fig. 7), thus explaining the disturbance-like effect observed in
our aggregated stability model in Fig. 5 (panel c).

## Conclusion and Outlook

In summary, we revealed important dependencies between non-embedded HVDC
operation and grid frequency stability using explainable machine learning.
Using our publicly available data set and model github ; zenodo , we extracted
such dependencies both for the entire synchronous areas as well as for
individual HVDC links between synchronous areas.

First, we highlighted the important role of HVDC flows to model frequency
stability indicators, particularly for the GB and Nordic synchronous areas.
Between CE and GB, flow ramps drive the British RoCoF as they are relatively
fast in the power grid compared to other generation types. In the Nordic grid,
scheduled flow ramps rather offset the hourly RoCoF, which is most probably a
result of strict ramp limits. This suggests that the ramp limits imposed by
the Nordic TSOs are successful in preventing stability problems through fast
HVDC ramps.

Second, we successfully modeled unscheduled flows on individual HVDC links
based on techno-economic features, including frequency stability indicators.
For two links in the GB and Nordic areas, we highlighted how frequency
stability needs drive unscheduled HVDC flows, which is most probably related
to their important role in load-frequency control.Meanwhile, unscheduled flows
on most other lines seem to be driven by factors not directly related to
frequency stability. Importantly, if balancing power is provided from one area
to the other through HVDC links, power is lost on the supporting side and the
frequency drops. This disturbance-like effect was particularly strong in the
Nordic grid, which supplies control power to Continental Europe. In the
British grid, the control-like effect dominated, i.e. the British side was
stabilized, which probably relates to the fact that balancing is done only on
the British side of the link.

Currently, these varying effects are a direct consequence of the differences
in operation concepts of the different HVDC lines, which follow bilateral
contracts between the respective TSOs NordicSOA2019-LFCannex ; NordicSOA2006 ;
entso-HVDCLinksOperationReport . ENTSO-E is currently developing PICASSO and
MARI to provide a unified concept for aFRR and mFRR throughout Europe,
including the application of HVDC in load-frequency control picasso ; mari .
In this context, effects such as the decrease of frequency quality due to
frequency support via HVDC are important for the evaluation of HVDC-based
load-frequency control concepts. In the future, data-driven methods, such as
our approach, can provide valuable tools for analyzing and monitoring the
changes due to new control concepts and regulations.

## Acknowledgements

The authors thank Thomas Dalgas Fechtenburg for fruitful discussions.

## Funding

J.K. and D.W. gratefully acknowledge support from the Helmholtz Association
via the Helmholtz School for Data Science in Life, Earth and Energy (HDS-LEE).
B.S. gratefully acknowledges funding from the Helmholtz Association under
grant no. VH-NG-1727.

## Availability of data and materials

Our data set, including the techno-economic features, stability indicators,
and HVDC flows as well as the results of our hyper-parameter optimization, is
available on Zenodo zenodo . The code is accessible on GitHub github .

## Author’s contributions

S.P.: Investigation, Formal analysis, Visualization. B.S.: Supervision,
Writing, Conceptualization. D.W.: Project administration, Funding acquisition,
Supervision, Writing, Conceptualization. J.K.: Project administration,
Supervision, Writing, Conceptualization, Methodology.

## Competing interests

The authors declare that they have no competing interests.

## References

  * (1) Witthaut, D. _et al._ Collective nonlinear dynamics and self-organization in decentralized power grids.  _Reviews of Modern Physics_ (2021).
  * (2) Anvari, M. _et al._ Short term fluctuations of wind and solar power systems.  _New Journal of Physics_ 18, 063027 (2016).
  * (3) Collins, S., Deane, P., Gallachóir, B. Ó., Pfenninger, S. & Staffell, I.  Impacts of Inter-annual Wind and Solar Variations on the European Power System.  _Joule_ 2, 2076–2090 (2018).
  * (4) Elsner, P., Erlach, B., Fischedick, M., Lunz, B. & Sauer, U.  _Flexibilitätskonzepte für die Stromversorgung 2050: Technologien, Szenarien, Systemzusammenhänge_ (acatech-Dt. Akad. der Technikwissenschaften, München, 2015).
  * (5) Pesch, T., Allelein, H.-J. & Hake, J.-F.  Impacts of the transformation of the German energy system on the transmission grid.  _The European Physical Journal Special Topics_ 223, 2561–2575 (2014).
  * (6) Poolla, B. K., Bolognani, S. & Dörfler, F.  Optimal Placement of Virtual Inertia in Power Grids.  _IEEE Transactions on Automatic Control_ 62, 6209–6220 (2017).
  * (7) Milano, F., Dörfler, F., Hug, G., Hill, D. J. & Verbič, G.  Foundations and Challenges of Low-Inertia Systems (Invited Paper).  In _2018 Power Systems Computation Conference (PSCC)_ , 1–25 (IEEE, Dublin, 2018).
  * (8) Schäfer, B., Beck, C., Aihara, K., Witthaut, D. & Timme, M.  Non-Gaussian power grid frequency fluctuations characterized by Lévy-stable laws and superstatistics.  _Nature Energy_ 3, 119–126 (2018).
  * (9) Kruse, J., Schäfer, B. & Witthaut, D.  Predictability of Power Grid Frequency.  _IEEE Access_ 8, 149435–149446 (2020).
  * (10) Kruse, J., Schäfer, B. & Witthaut, D.  Revealing drivers and risks for power grid frequency stability with explainable AI.  _Patterns_ 2, 100365 (2021).
  * (11) Anderson, P. M. & Fouad, A. A.  _Power system control and stability_ (IEEE Press, Piscataway, 2003).
  * (12) Machowski, J., Bialek, J., Bumby, J. & Bumby, D. J.  _Power System Dynamics: Stability and Control_ (John Wiley & Sons, Ltd., New York, 2008).
  * (13) ENTSO-E.  Report on Deterministic Frequency Deviations.  https://consultations.entsoe.eu/system-development/deterministic_frequency_deviations_report/user_uploads/report_deterministic_frequency_deviations_final-draft-for-consultation.pdf (2019).
  * (14) 50Hertz Transmission GmbH and Amprion and TenneT TSO and TransnetBW.  Netzentwicklungplan Strom (2012).  URL http://www.netzentwicklungsplan.de.
  * (15) Tellefsen, T., van Putten, J. & Gjerde, O.  Norwegian hydropower: connecting to continental europe.  _IEEE Power and Energy Magazine_ 18, 27–35 (2020).
  * (16) ENTSO-E.  Hvdc links in system operations.  https://eepublicdownloads.azureedge.net/clean-documents/SOC%20documents/20191203_HVDC%20links%20in%20system%20operations.pdf (2019).
  * (17) Jingya Huang, J. H. & Preece, R.  HVDC-based Fast Frequency Support for Low Inertia Power Systems.  In _13th IET International Conference on AC and DC Power Transmission (ACDC 2017)_ , 40 (6 .)–40 (6 .) (Institution of Engineering and Technology, Manchester, UK, 2017).
  * (18) Langwasser, M., De Carne, G., Liserre, M. & Biskoping, M.  Enhanced grid frequency support by means of HVDC-based load control.  _Electric Power Systems Research_ 189, 106552 (2020).
  * (19) Dijokas, M., Obradovic, D., Misyris, G., Weckesser, T. & Van Cutsem, T.  Frequency dynamics of the Northern European AC/DC power system: A look-ahead study.  _arXiv:2107.13890 [cs, eess]_ (2021).  eprint 2107.13890.
  * (20) de Haan, J. E. _et al._ Stabilising system frequency using HVDC between the Continental European, Nordic, and Great Britain systems.  _Sustainable Energy, Grids and Networks_ 5, 125–134 (2016).
  * (21) ENTSO-E PICASSO Network Code.  https://www.entsoe.eu/network_codes/eb/picasso/ (2017).
  * (22) ENTSO-E MARI Network Code.  https://www.entsoe.eu/network_codes/eb/mari/ (2017).
  * (23) Weissbach, T. & Welfonder, E.  High frequency deviations within the European Power System: Origins and proposals for improvement.  In _2009 IEEE/PES Power Systems Conference and Exposition_ , 1–6 (IEEE, Seattle, 2009).
  * (24) Hastie, T., Tibshirani, R. & Friedman, J.  _The Elements of Statistical Learning: Data Mining, Inference, and Prediction_ (Springer, New York, 2016), 2nd edn.
  * (25) Barredo Arrieta, A. _et al._ Explainable Artificial Intelligence (XAI): Concepts, taxonomies, opportunities and challenges toward responsible AI.  _Information Fusion_ 58, 82–115 (2020).
  * (26) Lundberg, S. M. & Lee, S.-I.  A unified approach to interpreting model predictions.  In _Proceedings of the 31st International Conference on Neural Information Processing Systems_ , NIPS’17, 4768–4777 (Curran Associates Inc., New York, 2017).
  * (27) Lundberg, S. M. _et al._ From local explanations to global understanding with explainable AI for trees.  _Nature Machine Intelligence_ 2, 56–67 (2020).
  * (28) TransnetBW GmbH.  Regelenergie bedarf + abruf.  https://www.transnetbw.de/de/strommarkt/systemdienstleistungen/regelenergie-bedarf-und-abruf (2020).
  * (29) National Grid ESO.  Historic frequency data.  https://www.nationalgrideso.com/balancing-services/frequency-response-services/historic-frequency-data (2020).
  * (30) Fingrid Oyj.  Frequency - historical data.  https://data.fingrid.fi/en/dataset/frequency-historical-data (2020).
  * (31) ENTSO-E Transparency Platform.  https://transparency.entsoe.eu/ (2020).
  * (32) Github link will be included after completion of the double blind review.  https://github.com.
  * (33) Zenodo link will be included after completion of the double blind review.  https://zenodo.org.
  * (34) Ulbig, A., Borsche, T. S. & Andersson, G.  Impact of Low Rotational Inertia on Power System Stability and Operation.  _IFAC Proceedings Volumes_ 47, 7290–7297 (2014).
  * (35) Ke, G. _et al._ Lightgbm: A highly efficient gradient boosting decision tree.  _Advances in neural information processing systems_ 30 (2017).
  * (36) Chen, T. & Guestrin, C.  XGBoost: A Scalable Tree Boosting System.  In _Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining_ , KDD ’16, 785–794 (ACM, New York, 2016).
  * (37) Rydin Gorjão, L. _et al._ Open database analysis of scaling and spatio-temporal properties of power grid frequencies.  _Nature Communications_ 11, 6362 (2020).
  * (38) Kruse, J., Schäfer, B. & Witthaut, D.  Exploring deterministic frequency deviations with explainable AI.  In _2021 IEEE International Conference on Communications, Control, and Computing Technologies for Smart Grids (SmartGridComm)_ , 133–139 (IEEE, 2021).
  * (39) ENTSO-E.  Nordic and baltic hvdc utilisation and unavailability statistics 2017.  https://eepublicdownloads.entsoe.eu/clean-documents/Publications/SOC/Nordic/Nordic-and-Blatic-HVDC-Disturbance-Statistics-2017.pdf (2018).
  * (40) Fingrid, Energinet, Svenska Kraftnät, Statnett & Kraftnet åland.  Nordic System Operation Agreement (SOA) – Annex Load-Frequency Control & Reserves (LFCR).  https://eepublicdownloads.azureedge.net/clean-documents/SOC%20documents/LFC/Appendix%20final.pdf (2020).
  * (41) Fingrid, Energinet, Svenska Kraftnät & Statnett.  AGREEMENT (Translation) regarding operation of the interconnected Nordic power system (System Operation Agreement).  https://eepublicdownloads.azureedge.net/clean-documents/SOC%20documents/LFC/Appendix%20final.pdf (2006).