#  Enhancing Low-resource Fine-grained Named Entity Recognition by Leveraging
Coarse-grained Datasets

Su Ah Lee1 , Seokjin Oh111footnotemark: 1 Major in Bio Artificial Intelligence
Woohwan Jung1,2
1Department of Applied Artificial Intelligence, Hanyang University
2Ramply Inc.
{sue991, seokjinoh<EMAIL_ADDRESS>
###### Abstract

Named Entity Recognition (NER) frequently suffers from the problem of
insufficient labeled data, particularly in fine-grained NER scenarios.
Although $K$-shot learning techniques can be applied, their performance tends
to saturate when the number of annotations exceeds several tens of labels. To
overcome this problem, we utilize existing coarse-grained datasets that offer
a large number of annotations. A straightforward approach to address this
problem is pre-finetuning, which employs coarse-grained data for
representation learning. However, it cannot directly utilize the relationships
between fine-grained and coarse-grained entities, although a fine-grained
entity type is likely to be a subcategory of a coarse-grained entity type. We
propose a fine-grained NER model with a Fine-to-Coarse(F2C) mapping matrix to
leverage the hierarchical structure explicitly. In addition, we present an
inconsistency filtering method to eliminate coarse-grained entities that are
inconsistent with fine-grained entity types to avoid performance degradation.
Our experimental results show that our method outperforms both $K$-shot
learning and supervised learning methods when dealing with a small number of
fine-grained annotations. Code is available at
https://github.com/sue991/CoFiNER.

##  1 Introduction

Named Entity Recognition (NER) is a fundamental task in locating and
categorizing named entities in unstructured texts. Most research on NER has
been conducted on coarse-grained datasets, including CoNLL’03 Tjong Kim Sang
(2002), ACE04 Mitchell et al. (2005), ACE05 Walker et al. (2006), and
OntoNotes Weischedel et al. (2013), each of which has less than 18 categories.
As the applications of NLP broaden across diverse fields, there is increasing
demand for fine-grained NER that can provide more precise and detailed
information extraction. Nonetheless, detailed labeling required for large
datasets in the context of fine-grained NER presents several significant
challenges. It is more cost-intensive and time-consuming than coarse-grained
NER. In addition, it requires a high degree of expertise because domain-
specific NER tasks such as financial NER Loukas et al. (2022) and biomedical
NER Sung et al. (2022) require fine-grained labels. Thus, fine-grained NER
tasks typically suffer from the data scarcity problem. Few-shot NER approaches
Ding et al. (2021) can be applied to conduct fine-grained NER with scarce
fine-grained data. However, these methods do not exploit existing coarse-
grained datasets that can be leveraged to improve fine-grained NER because
fine-grained entities are usually subtypes of coarse-grained entities. For
instance, if a model knows what Organization is, it could be easier for it to
understand the concept of Government or Company. Furthermore, these methods
often experience early performance saturation, necessitating the training of a
new supervised learning model if the annotation extends beyond several tens of
labels.

A pre-finetuning strategy Aghajanyan et al. (2021); Ma et al. (2022a) was
proposed to overcome the aforementioned problem. This strategy first learns
the feature representations using a coarse-grained dataset before training the
fine-grained model on a fine-grained dataset. In this method, coarse-grained
data are solely utilized for representation learning; thus, it still does not
explicitly utilize the relationships between the coarse- and fine-grained
entities.

Our intuition for fully leveraging coarse-grained datasets comes mainly from
the hierarchy between coarse- and fine-grained entity types. Because a coarse-
grained entity type typically comprises multiple fine-grained entity types, we
can enhance low-resource fine-grained NER with abundant coarse-grained data.
To jointly utilize both datasets, we devise a method to build a mapping matrix
called F2C (short for ‘Fine-to-Coarse’), which connects fine-grained entity
types to their corresponding coarse-grained entity types and propose a novel
approach to train a fine-grained NER model with both datasets.

Some coarse-grained entities improperly match a fine-grained entity type
because datasets may be created by different annotators for different
purposes. These mismatched entities can reduce the performance of the model
during training. To mitigate this problem, coarse-grained entities that can
degrade the performance of fine-grained NER must be eliminated. Therefore, we
introduce a filtering method called ‘Inconsistency Filtering’. This approach
is designed to identify and exclude any inconsistent coarse-to-fine entity
mappings, ensuring a higher-quality training process, and ultimately, better
model performance. The main contributions of our study are as follows:

  * •

We propose an F2C mapping matrix to directly leverage the intimate relation
between coarse- and fine-grained types.

  * •

We present an inconsistency filtering method to screen out coarse-grained data
that are inconsistent with the fine-grained types.

  * •

The empirical results show that our method achieves state-of-the-art
performance by utilizing the proposed F2C mapping matrix and the inconsistency
filtering method.

##  2 Related Work

Fine-grained NER. NER is a key task in information extraction and has been
extensively studied. Traditional NER datasets Tjong Kim Sang (2002); Ritter et
al. (2011); Weischedel et al. (2013); Derczynski et al. (2017) address coarse-
grained entity types in the general domain. Recently, domain-specific NER has
been investigated in various fields Hofer et al. (2018); Loukas et al. (2022);
Sung et al. (2022). The domain-specific NER tasks typically employ fine-
grained entity types. In addition, Ding et al. (2021) proposed a general
domain fine-grained NER.

$N$-way $K$-shot learning for NER. Since labeling domain-specific data is an
expensive process, few-shot NER has gained attention. Most few-shot NER
studies are conducted using an $N$-way $K$-shot episode learning Das et al.
(2021); Huang et al. (2022); Ma et al. (2022b); Wang et al. (2022). The
objective of this approach is to train a model that can correctly classify new
examples into one of $N$ classes, using only $K$ examples per class. To
achieve this generalization performance, a large number of episodes need to be
generated. Furthermore, to sample these episodes, the training data must
contain a significantly larger number of classes than $N$. In contrast, in our
problem context, the number of fine-grained classes we aim to identify is
substantially larger than the number of coarse-grained classes in the existing
dataset. Consequently, the episode-based few-shot learning approaches are
unsuitable for addressing this problem.

Leveraging auxiliary data for information extraction. Several studies have
employed auxiliary data to overcome the data scarcity problem. Jiang et al.
(2021); Oh et al. (2023) propose NER models trained with small, strongly
labeled, and large weakly labeled data. Jung and Shim (2020) used strong and
weak labels for relation extraction. However, in the previous studies, the
main data and auxiliary data shared the same set of classes, which is not the
case for fine-grained NER with coarse-grained labels. While the approaches of
Aghajanyan et al. (2021) and Ma et al. (2022a) can be applied to our problem
setting, they utilize auxiliary data for representation learning rather than
explicitly utilizing the relationship between the two types of data.

##  3 Proposed Method

In this section, we introduce the notations and define the problem of fine-
grained NER using coarse-grained data. Then, we introduce the proposed CoFiNER
model, including the creation of the F2C mapping matrix.

###  3.1 Problem definition

Given a sequence of $n$ tokens $\mathbf{X}=\\{x_{1},x_{2},...,x_{n}\\}$, the
NER task involves assigning type $y_{i}\in E$ to each token $x_{i}$ where $E$
is a predefined set of entity types. In our problem setting, we used a fine-
grained dataset
$\mathcal{D}^{\mathcal{F}}\\!=\\!\\{(\mathbf{X}^{\mathcal{F}}_{1},\mathbf{Y}^{\mathcal{F}}_{1}),...,(\mathbf{X}^{\mathcal{F}}_{|\mathcal{D}^{\mathcal{F}}|},\mathbf{X}^{\mathcal{F}}_{|\mathcal{D}^{\mathcal{F}}|})\\}$
with a predefined entity type set $E^{\mathcal{F}}$. Additionally, we possess
a coarse-grained dataset
$\mathcal{D}^{\mathcal{C}}=\\{(\mathbf{X}^{\mathcal{C}}_{1},\mathbf{Y}^{\mathcal{C}}_{1}),...,(\mathbf{X}^{\mathcal{C}}_{|\mathcal{D}^{\mathcal{C}}|},\mathbf{X}^{\mathcal{C}}_{|\mathcal{D}^{\mathcal{C}}|})\\}$
characterized by a coarse-grained entity set $E^{\mathcal{C}}$ (i.e.
$|E^{\mathcal{F}}|>|E^{\mathcal{C}}|$). A coarse-grained dataset typically has
a smaller number of types than a fine-grained dataset. Throughout this study,
we use $\mathcal{F}$ and $\mathcal{C}$ to distinguish between these datasets.
It should be noted that our method can be readily extended to accommodate
multiple coarse-grained datasets, incorporating an intrinsic multi-level
hierarchy. However, our primary discussion revolves around a single coarse-
grained dataset for simplicity and readability.

Figure 1: Overall process of our proposed method.

###  3.2 Training CoFiNER

We aim to utilize both coarse- and fine-grained datasets directly in a single
model training. Figure 1 illustrates an overview of the fine-grained NER model
training process using both coarse- and fine-grained datasets. The CoFiNER
training process consists of the following four steps:

Step 1- Training a fine-grained model. In the first step, we train a fine-
grained model $f^{\mathcal{F}}(\theta)$ with the low-resource fine-grained
dataset $\mathcal{D}^{\mathcal{F}}$. This process follows a typical supervised
learning approach for NER. For a training example
$(\mathbf{X}^{\mathcal{F}},\mathbf{Y}^{\mathcal{F}})$,
$\mathbf{X}^{\mathcal{F}}$ is fed into a PLM (Pre-trained Language Model),
such as BERT, RoBERTa, to generate a contextual representations
$\mathbf{h}_{i}\in\mathbb{R}^{d}$ of each token $x_{i}$.

$\displaystyle\mathbf{H}=[\mathbf{h}_{1},...,\mathbf{h}_{n}]=\texttt{PLM}([x^{\mathcal{F}}_{1},...,x^{\mathcal{F}}_{n}]).$
(1)

Then, we apply a softmax layer to obtain the label probability distribution:

$\displaystyle\mathbf{p}^{\mathcal{F}}_{i}=\text{{softmax}}(\mathbf{W}\mathbf{h}_{i}+\mathbf{b})$

where $\mathbf{W}\\!\in\\!\mathbb{R}^{|E^{\mathcal{F}}|\times d}$ and
$\mathbf{b}\\!\in\\!\mathbb{R}^{|E^{\mathcal{F}}|}$ represent the weights and
bias of the classification head, respectively. To train the model using a
fine-grained dataset, we optimize the cross-entropy loss function:

$\displaystyle
L_{\mathcal{F}}=-\frac{1}{n}\sum^{n}_{i=1}\log\mathbf{p}^{\mathcal{F}}_{i}[y_{i}^{\mathcal{F}}]$
(2)

where $y_{i}\in E^{\mathcal{F}}$ is the fine-grained label for the token
$x_{i}$.

Step 2 - Generating an F2C matrix. To fully leverage the hierarchy between
coarse- and fine-grained entity types, we avoid training separate NER models
for each dataset. Instead, we utilize a single model that incorporates an F2C
mapping matrix that transforms a fine-grained output into a corresponding
coarse-grained output. The F2C mapping matrix assesses the conditional
probability of a coarse-grained entity type $s\\!\in\\!E^{\mathcal{C}}$ given
a fine-grained label $\ell\\!\in\\!E^{\mathcal{F}}$ (i.e.,
$\mathbf{M}_{\ell,s}=p(y^{\mathcal{C}}\\!=\\!s|y^{\mathcal{F}}\\!=\\!\ell)$).

Given a fine-grained probability distribution $\mathbf{p}^{\mathcal{F}}_{i}$
computed using the proposed model, the marginal probability of a coarse-
grained type $s$ can be computed as

$\mathbf{p}^{\mathcal{C}}_{i}[s]=\sum_{\ell\in
E^{\mathcal{F}}}{p(y^{\mathcal{C}}\\!=\\!s|y^{\mathcal{F}}\\!=\\!\ell)}\cdot\mathbf{p}^{\mathcal{F}}_{i}[\ell].$

Thus, the coarse-grained output probabilities are simply computed as follows:

$\displaystyle\mathbf{p}^{\mathcal{C}}_{i}=\mathbf{p}^{\mathcal{F}}_{i}\cdot\mathbf{M}$
(3)

where $\mathbf{M}\in\mathbb{R}^{|E^{\mathcal{F}}|\times|E^{\mathcal{C}}|}$ is
the F2C mapping matrix whose row-wise sum is 1. By introducing this F2C
mapping matrix, we can train a single model using multiple datasets with
different granularity levels.

Manual annotation is a straightforward approach that can be used when
hierarchical information is unavailable. However, it is not only cost-
intensive but also noisy and subjective, especially when there are multiple
coarse-grained datasets or a large number of fine-grained entity types. We
introduce an efficient method for automatically generating an F2C matrix in
section 3.3.

Step 3 - Filtering inconsistent coarse labels. Although a fine-grained entity
type is usually a subtype of a coarse-grained type, there can be some
misalignments between the coarse- and fine-grained entity types. For example,
an entity "Microsoft" in a financial document can either be tagged as Company
or Stock which are not hierarchical. This inconsistency can significantly
degrade the model’s performance.

To mitigate the effect of inconsistent labeling, we devise an inconsistency
filtering method aimed at masking less relevant coarse labels. By
automatically filtering out the inconsistent labels from the coarse-grained
dataset, we investigate the coarse-grained labels using the fine-grained NER
model trained in Step 1. For each token in the coarse-grained dataset, we
predict the coarse-grained label using the fine-grained model and the mapping
matrix as follows:

$\tilde{y}_{i}^{\mathcal{C}}=\operatorname*{arg\,max}\mathbf{p}^{\mathcal{C}}_{i}.$
(4)

If the predicted label is the same as the coarse-grained label (i.e.,
$y_{i}^{\mathcal{C}}=\tilde{y}_{i}^{\mathcal{C}}$), we assume that the coarse-
grained label is consistent with the fine-grained one and can benefit the
model. Otherwise, we regard the label as inconsistent with fine-grained types
and do not utilize the coarse-grained label in Step 4. Note that the fine-
grained NER model is frozen during this phase.

Step 4 - Jointly training CoFiNER with both datasets . The model is trained by
alternating between epochs using coarse- and fine-grained data. This is an
effective learning strategy for training models using heterogeneous datasets
Jung and Shim (2020).

For the fine-grained batches, CoFiNER is trained by minimizing the loss
function defined in Equation (2), as described in Step 1. Meanwhile, we use
the F2C mapping matrix to generate coarse-grained outputs and utilize
inconsistency filtering for coarse-grained batches. Thus, we compute the
cross-entropy loss between the coarse-grained label $y_{i}^{\mathcal{C}}$ and
the predicted probabilities $\mathbf{p}^{\mathcal{C}}_{i}$ when the coarse-
grained label is consistent with our model
(i.e.,$y_{i}^{\mathcal{C}}=\tilde{y}_{i}^{\mathcal{C}}$) as follows:

$\displaystyle
L_{\mathcal{C}}=-\frac{1}{m}\sum^{m}_{i=1}\log\mathbf{p}^{\mathcal{C}}_{i}[y_{i}^{\mathcal{C}}]\cdot\mathbb{I}[y_{i}^{\mathcal{C}}=\tilde{y}_{i}^{\mathcal{C}}]$
(5)

where $m$ is a length of $\mathbf{X}^{\mathcal{C}}$. For example, suppose that
the coarse label of token $x_{i}$ is $y_{i}^{\mathcal{C}}=$ORG. If the
estimated coarse label $\tilde{y}_{i}^{\mathcal{C}}$ is ORG, the loss for the
token is $-\log\mathbf{p}^{\mathcal{C}}_{i}[y_{i}^{\mathcal{C}}]$. Otherwise,
it is zero.

###  3.3 Construction of the F2C mapping matrix

The F2C mapping matrix assesses the conditional probability of a coarse-
grained entity type $s\\!\in\\!E^{\mathcal{C}}$ given a fine-grained label
$\ell\\!\in\\!E^{\mathcal{F}}$ (i.e.,
$\mathbf{M}_{\ell,s}=p(y^{\mathcal{C}}\\!=\\!s|y^{\mathcal{F}}\\!=\\!\ell)$).
As there are only a few identical texts with both coarse- and fine-grained
annotations simultaneously, we can not directly calculate this conditional
probability using the data alone. Thus, we approximate the probability using a
coarse-grained NER model and fine-grained labeled data as follows:

$\mathbf{M}_{\ell,s}=p(y^{\mathcal{C}}\\!=\\!s|y^{\mathcal{F}}\\!=\\!\ell)\approx
p(\tilde{y}^{\mathcal{C}}\\!=\\!s|y^{\mathcal{F}}\\!=\\!\ell)$.

To generate the mapping matrix, we first train a coarse-grained NER model
$f^{\mathcal{C}}(\theta)$ with the coarse-grained dataset
$\mathcal{D}^{\mathcal{C}}$. Then, we reannotate the fine-grained dataset
$\mathcal{D}^{\mathcal{F}}$ by using the coarse-grained model
$f^{\mathcal{C}}(\theta)$. As a result, we obtain parallel annotations for
both coarse- and fine-grained types in the fine-grained data
$\mathcal{D}^{\mathcal{F}}$. By using the parallel annotations, we can compute
the co-occurrence matrix
$\mathbf{C}\in\mathbb{N}^{|E^{\mathcal{F}}|\times|E^{\mathcal{C}}|}$ where
each cell $\mathbf{C}_{\ell,s}$ is the number of tokens that are labeled as
fine-grained type $\ell$ and coarse-grained type $s$ together.

Because some labels generated by the coarse-grained model
$f^{\mathcal{C}}(\theta)$ can be inaccurate, we refine the co-occurrence
matrix by retaining only the top-$k$ counts for each fine-grained type and
setting the rest to zero. Our experiments show that our model performs best
when $k=1$. This process effectively retains only the most frequent coarse-
grained categories for each fine-grained type, thereby improving the precision
of the resulting mapping. Finally, we compute the conditional probabilities
for all $\ell\in E^{\mathcal{F}},s\in E^{\mathcal{C}}$ by using the co-
occurrence counts as follows:

$\mathbf{M}_{\ell,s}=p(\tilde{y}^{\mathcal{C}}\\!=\\!s|y^{\mathcal{F}}\\!=\\!\ell)=\frac{\mathbf{C}_{\ell,s}}{\sum_{s^{\prime}\in
E^{\mathcal{C}}}{\mathbf{C}_{\ell,s^{\prime}}}}.$ (6)

The F2C mapping matrix $\mathbf{M}$ is used to predict the coarse-grained
labels using Equation (3).

##  4 Experiments

###  4.1 Datasets

Dataset | # Sentences | # Types
---|---|---
Train | Dev | Test
Coarse-grained datasets
CoNLL’03 | 14k | 3.3k | 3.4k | 4
OntoNotes | 59.9k | 8.5k | 8.3k | 18
Fine-grained dataset Few-NERD
10-Shot | 0.3k | 18.8k | 37.6k | 66
20-Shot | 0.6k
40-Shot | 1.1k
80-Shot | 2.2k
100-Shot | 2.7k
|  |  |  |
Table 1: Statistics of each dataset.

We conduct experiments using a fine-grained NER dataset, Few-NERD (SUP) Ding
et al. (2021), as well as two coarse-grained datasets, namely, OntoNotes
Weischedel et al. (2013) and CoNLL’03 Tjong Kim Sang (2002). The fine-grained
dataset Few-NERD comprises 66 entity types, whereas the coarse-grained
datasets CoNLL’03 and OntoNotes consist of 4 and 18 entity types,
respectively. The statistics for the datasets are listed in Table 1.

$K$-shot sampling for the fine-grained dataset. Because we assumed a small
number of examples for each label in the fine-grained dataset, we evaluated
the performance in the $K$-shot learning setting. Although Few-NERD provides
few-shot samples, they are obtained based on an $N$-way $K$-shot scenario,
where $N$ is considerably smaller than the total number of entity types.
However, our goal is to identify named entities across all possible entity
types. For this setting, we resampled $K$-shot examples to accommodate all-way
$K$-shot scenarios.

Since multiple entities exist in a single sentence, we cannot strictly
generate exact $K$-shot samples for all the entity types. Therefore, we adopt
the $K$$\sim$$(K+5)$-shot setting. In the $K$$\sim$$(K$$+$$5)$-shot setting,
there are at least $K$ examples and at most $K$$+$$5$ examples for each entity
type. See Appendix A for more details. In our experiments, we sampled fine-
grained training data for $K=10,20,40,80,$ and $100$.

Method | Model | 10-shot | 20-shot | 40-shot | 80-shot | 100-shot
---|---|---|---|---|---|---
Supervised Method |  $\text{BERT}_{\texttt{BASE}}$ Devlin et al. (2019) | 23.101 | 34.718 | 43.138 | 46.182 | 46.449
$\text{RoBERTa}_{\texttt{BASE}}$ Liu et al. (2019) | 21.073 | 34.157 | 39.226 | 45.735 | 46.942
$\text{RoBERTa}_{\texttt{LARGE}}$ Liu et al. (2019) | 29.137 | 41.425 | 51.137 | 55.057 | 54.172
PIQN Shen et al. (2022) | 21.750 | 22.007 | 28.533 | 29.339 | 38.658
PL-Marker Ye et al. (2022) | 40.902 | 48.064 | 52.395 | 53.249 | 53.061
Few-shot Method | LSFS Ma et al. (2022a) | 47.998 | 43.269 | 50.595 | 51.420 | 50.366
Proposed Method | CoFiNER | 44.951 | 51.142 | 56.409 | 56.847 | 57.178
|  |  |  |  |  |
Table 2: Results on few-shot NER. The best scores across all models are marked
bold.

###  4.2 Experimental Settings

In experiments, we use transformer-based PLM, including
$\text{BERT}_{\texttt{BASE}}$, $\text{RoBERTa}_{\texttt{BASE}}$, and
$\text{RoBERTa}_{\texttt{LARGE}}$. In CoFiNER, we follow
$\text{RoBERTa}_{\texttt{LARGE}}$ to build a baseline model. The maximum
sequence length is set to 256 tokens. The AdamW optimizer Loshchilov and
Hutter (2019) is used to train the model with a learning rate of $2e$$-$$5$
and a batch size of 16. The number of epochs is varied for each model. We
train the fine-grained model, CoFiNER, over 30 epochs. To construct the F2C
mapping matrix, the coarse-grained model is trained for 50 epochs using both
CoNLL’03 and OntoNotes. To train the inconsistency filtering model, we set
different epochs based on the number of shots: For 10, 20, 40, 80, and 100
shot settings, the epochs are 150, 150, 120, 50, and 30, respectively. We
report the results using span-level F1. The dropout with a probability of 0.1
is applied. All the models were trained on NVIDIA RTX 3090 GPUs.

###  4.3 Compared Methods

In this study, we compare the performance of CoFiNER with that of both the
supervised and few-shot methods. We modified the existing methods for our
experimental setup and re-implemented them accordingly.

Supervised method. We use $\text{BERT}_{\texttt{BASE}}$,
$\text{RoBERTa}_{\texttt{BASE}}$, and $\text{RoBERTa}_{\texttt{LARGE}}$ as the
supervised baselines, each including a fine-grained classifier on the head. In
addition, PIQN Shen et al. (2022) and PL-Marker Ye et al. (2022) are methods
that have achieved state-of-the-art performance in a supervised setting using
the full Few-NERD dataset. All models are trained using only a Few-NERD
dataset.

Few-shot method. The LSFS Ma et al. (2022a) leverages a label encoder to
utilize the semantics of label names, thereby achieving state-of-the-art
results in low-resource NER settings. The LSFS applies a pre-finetuning
strategy to learn prior knowledge from the coarse-grained dataset, OntoNotes.
For a fair comparison, we also conducted pre-finetuning on OntoNotes and
performed fine-tuning on each shot of the Few-NERD dataset.

Proposed method. We trained our CoFiNER model as proposed in section 3. In
each epoch, CoFiNER is first trained on two coarse-grained datasets: OntoNotes
and CoNLL’03. Subsequently, it is trained on the fine-grained dataset Few-
NERD. We used $\text{RoBERTa}_{\texttt{LARGE}}$ as the pre-trained language
model for CoFiNER in Equation (1).

###  4.4 Main Results

Table 2 reports the performance of CoFiNER and existing methods. The result
shows that CoFiNER outperforms both supervised learning and few-shot learning
methods. Because supervised learning typically needs a large volume of
training data, these models underperform in low-resource settings. This
demonstrates that our method effectively exploits coarse-grained datasets to
enhance the performance of the fine-grained NER model. In other words, the
proposed F2C mapping matrix significantly reduces the amount of fine-grained
dataset required to train supervised NER models. In particular, CoFiNER
achieves significant performance improvements compared to the state-of-the-art
model PL-Marker, which also utilizes the same pre-trained language model
$\text{RoBERTa}_{\texttt{LARGE}}$ as CoFiNER.

The few-shot method LSFS yields the highest F1 score for the 10-shot case.
However, this few-shot method suffers from early performance saturation,
resulting in less than a 2.4 F1 improvement with an additional 90-shot. By
contrast, the F1 score of CoFiNER increases by 12.2. Consequently, CoFiNER
outperforms all the compared methods except for the 10-shot case. In summary,
the proposed method yields promising results for a wide range of data sample
sizes by explicitly leveraging the inherent hierarchical structure.

Figure 2: The F2C mapping matrix between OntoNotes and 100-shot of the Few-
NERD dataset. During the generation of the F2C mapping matrix, some coarse-
grained types are not mapped to any fine-grained types. The 7 unmapped types
are not represented: DATE, TIME, PERCENT, MONEY, QUANTITY, ORDINAL, and
CARDINAL.

Figure 3: The F2C mapping matrix between CoNLL’03 and 100-shot of the Few-NERD
dataset.

###  4.5 Ablation Study

Model 10-shot 20-shot 40-shot 80-shot 100-shot CoFiNER 44.95 51.14 56.41 56.85
57.18 w/o filtering 41.38 43.87 53.42 54.70 55.13 w/o OntoNotes 42.63 44.51
57.18 56.97 55.54 w/o CoNLL’03 43.99 50.07 57.54 56.71 56.27 w/o coarse 29.14
41.43 51.14 55.06 54.17

Table 3: Performances of ablation study over different components.

An ablation study is conducted to validate the effectiveness of each component
of the proposed method. The results are presented in Table 3. First, we remove
the inconsistency filtering (w/o filtering) and observe a significant decrease
in the F1 score, ranging from 2.05 to 7.27. These results demonstrate the
effectiveness of our filtering method, which excludes mislabeled entities.
Second, we provide the results using a single coarse-grained dataset (w/o
OntoNotes and w/o CoNLL’03). Even with a single coarse-grained dataset, our
proposed method significantly outperforms w/o coarse, which is trained solely
on the fine-grained dataset (i.e. $\text{RoBERTa}_{\texttt{LARGE}}$ in Table
2).

This indicates the effectiveness of using a well-aligned hierarchy through the
F2C mapping matrix and inconsistency filtering. Although we achieve a
significant improvement even with a single coarse-grained dataset, we achieve
a more stable result with two coarse-grained datasets. This implies that our
approach effectively utilizes multiple coarse-grained datasets, although the
datasets contain different sets of entity types.

# | Type | Example
---|---|---
1 | predict | … they may be offshoots of the $\textbf{intifadah}_{\text{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}EVENT}}}$, the $\textbf{Palestinian rebellion}_{\text{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}EVENT}}}$ in …
target | … they may be offshoots of the intifadah, the $\textbf{Palestinian}_{\text{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}NORP}}}$ rebellion in …
2 | predict | … players heading to $\textbf{Canada}_{\text{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}GPE}}}$, particularly $\textbf{Toronto}_{\text{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}GPE}}}$ for the $\textbf{All-star}_{\text{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}EVENT}}}$ …
target | … players heading to $\textbf{Canada}_{\text{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}GPE}}}$, particularly $\textbf{Toronto}_{\text{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}GPE}}}$ for the All-star …
3 | predict | Judges at $\textbf{Flight 103 Lockerbie trial}_{\text{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}EVENT}}}$ are expected …
target | Judges at Flight 103 $\textbf{Lockerbie}_{\text{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}GPE}}}$ trial are expected …
|  |
Table 4: Inconsistent examples: The labeled sentence in the original coarse-
grained dataset is the "target" type, while the label predicted by the model
is the "predict" type. Consistent entity types are indicated in blue, while
inconsistent entity types are indicated in red.

###  4.6 Analysis

In this section, we experimentally investigate how the F2C mapping matrix and
inconsistency filtering improve the accuracy of the proposed model.

####  4.6.1 F2C Mapping Matrix

Mapping the entity types between the coarse- and fine-grained datasets
directly affects the model performance. Hence, we investigate the mapping
outcomes between the coarse- and fine-grained datasets. Figures 2 and 3 show
the F2C matrices for FewNERD-OntoNotes and FewNERD-CoNLL’03, respectively. In
both figures, the x- and y-axis represent the fine-grained and coarse-grained
entity types, respectively. The colored text indicates the corresponding
coarse-grained entity types in Few-NERD, which were not used to find the
mapping matrix. The mapping is reliable if we compare the y-axis and the
colored types (coarse-grained types in Few-NERD). Even without manual
annotation of the relationship between coarse- and fine-grained entities, our
method successfully obtains reliable mapping from fine-grained to coarse-
grained types. Our model can be effectively trained with both types of
datasets using accurate F2C mapping.

Figure 4: Impact of top-$k$ values in the F2C mapping matrix. F1 is reported
on the test data.

Figure 4 provides the F1 scores by varying the hyperparameter $k$ to refine
the F2C mapping matrix described in section 3.3. ‘all’ refers to the usage of
the complete frequency distribution when creating an F2C mapping matrix. We
observe that the highest performance is achieved when $k$ is set to 1, and as
$k$ increases, the performance gradually decreases. Although the optimal value
of $k$ can vary depending on the quality of the coarse-grained data and the
performance of the coarse-grained NER model, the results indicate that a good
F2C mapping matrix can be obtained by ignoring minor co-occurrences.

Additionally, We conducted an experiment by setting the F2C mapping matrix to
be learnable and comparing it with our non-learnable F2C matrix. The non-
learnable approach showed better performance, hence we adopted this approach
for CoFiNER. Detailed analysis and experiment results are in Appendix B.2.

####  4.6.2 Inconsistency Filtering

We aim to examine whether inconsistency filtering successfully screened out
inconsistent entities between OntoNotes and Few-NERD datasets. To conduct this
analysis, we describe three inconsistent examples. Table 4 shows the predicted
values and target labels, which correspond to the coarse-grained output of the
fine-grained NER model trained as described in section 3.2 and the golden
labels of the coarse-grained dataset.

The first example illustrates the inconsistency in entity types between
mislabeled entities. In the original coarse-grained dataset, "Palestinian" is
labeled as NORP, but the model trained on the fine-grained dataset predicts
"Palestinian rebellion" as its appropriate label, EVENT. However, annotators
of the OntoNotes labeled "Palestinian" as NORP, whereas the fine-grained NER
model correctly predicts the highly informative actual label span. The
inconsistency caused by a label mismatch between the coarse-grained and fine-
grained datasets can result in performance degradation.

In the second example, both "Canada" and "Toronto" are consistently labeled as
GPE; thus, the model is not confused when training on these two entities.
However, in the case of "All-star", we can observe a mismatch. This example in
the coarse-grained dataset is labeled O instead of the correct entity type
EVENT, indicating a mismatch. Through inconsistency filtering, unlabeled "All-
star" is masked out of the training process.

As shown in the examples, inconsistency filtering is necessary to mitigate the
potential noise arising from mismatched entities. We analyze the filtering
results for each coarse-grained label to assess its impact on model
performance. Figure 5 illustrates the correlation between the filtering
proportion and the performance improvement for each coarse-grained label
mapped to the fine-grained labels. In this figure, a higher filtering
proportion indicates a greater inconsistency between the two datasets. F1
improvements indicate the difference in performance when filtering is applied
and when it is not. Each data point refers to a fine-grained label mapped onto
a coarse-grained label. As the proportion of the filtered entities increases,
the F1 scores also increase. These improvements indicate that inconsistency
filtering effectively eliminates noisy entities, enabling the model to be
well-trained on consistent data only.

Figure 5: Performance with increasing filtering proportion between Few-NERD
and OntoNotes datasets. The correlation coefficient between filtering
proportion and performance improvement is 0.29.

##  5 Conclusion

We proposed CoFiNER, which explicitly leverages the hierarchical structure
between coarse- and fine-grained types to alleviate the low-resource problem
of fine-grained NER. We devised the F2C mapping matrix that allows for fine-
grained NER model training using additional coarse-grained datasets. However,
because not all coarse-grained entities are beneficial for the fine-grained
NER model, the proposed inconsistency filtering method is used to mask out
noisy entities from being used in the model training process. We found through
experiments that using a smaller amount of consistent data is better than
using a larger amount of data without filtering, thus demonstrating the
crucial role of inconsistency filtering. Empirical results confirmed the
superiority of CoFiNER over both the supervised and few-shot methods.

## Limitations

Despite the promising empirical results of this study, there is still a
limitation. The main drawback of CoFiNER is that the token-level F2C mapping
matrix and inconsistency filtering may not be directly applicable to nested
NER tasks. Nested NER involves identifying and classifying certain overlapping
entities that exceed the token-level scope. Because CoFiNER addresses fine-
grained NER at the token level, it may not accurately capture entities with
nested structures. Therefore, applying our token-level approach to nested NER
could pose challenges and may require further adaptations or other modeling
techniques to effectively handle the hierarchical relations between nested
entities.

## Acknowledgments

This work was supported by the National Research Foundation of Korea(NRF)
grant funded by the Korea government(MSIT) (No. NRF-2022R1G1A1013549). This
work was supported by Institute of Information & communications Technology
Planning & Evaluation(IITP) grant funded by the Korea government(MSIT) (No.
RS-2023-00261068, Development of Lightweight Multimodal Anti-Phishing Models
and Split-Learning Techniques for Privacy-Preserving Anti-Phishing) and
(No.RS-2022-00155885, Artificial Intelligence Convergence Innovation Human
Resources Development (Hanyang University ERICA)). This research was also
supported by the Ministry of Trade, Industry, and Energy (MOTIE), Korea, under
the “Project for Research and Development with Middle Markets Enterprises and
DNA(Data, Network, AI) Universities” (Smart Home Based LifeCare Service &
Solution Development)(P0024555) supervised by the Korea Institute for
Advancement of Technology (KIAT).

## References

  * Aghajanyan et al. (2021) Armen Aghajanyan, Anchit Gupta, Akshat Shrivastava, Xilun Chen, Luke Zettlemoyer, and Sonal Gupta. 2021.  Muppet: Massive multi-task representations with pre-finetuning.  In _Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing_ , pages 5799–5811, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
  * Das et al. (2021) Sarkar Snigdha Sarathi Das, Arzoo Katiyar, Rebecca J Passonneau, and Rui Zhang. 2021.  Container: Few-shot named entity recognition via contrastive learning.  _arXiv preprint arXiv:2109.07589_.
  * Derczynski et al. (2017) Leon Derczynski, Eric Nichols, Marieke van Erp, and Nut Limsopatham. 2017.  Results of the WNUT2017 shared task on novel and emerging entity recognition.  In _Proceedings of the 3rd Workshop on Noisy User-generated Text_ , pages 140–147, Copenhagen, Denmark. Association for Computational Linguistics.
  * Devlin et al. (2019) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019.  BERT: Pre-training of deep bidirectional transformers for language understanding.  In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_ , pages 4171–4186, Minneapolis, Minnesota. Association for Computational Linguistics.
  * Ding et al. (2021) Ning Ding, Guangwei Xu, Yulin Chen, Xiaobin Wang, Xu Han, Pengjun Xie, Haitao Zheng, and Zhiyuan Liu. 2021.  Few-NERD: A few-shot named entity recognition dataset.  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)_ , pages 3198–3213, Online. Association for Computational Linguistics.
  * Hofer et al. (2018) Maximilian Hofer, Andrey Kormilitzin, Paul Goldberg, and Alejo Nevado-Holgado. 2018.  Few-shot learning for named entity recognition in medical text.
  * Huang et al. (2022) Yucheng Huang, Kai He, Yige Wang, Xianli Zhang, Tieliang Gong, Rui Mao, and Chen Li. 2022.  Copner: Contrastive learning with prompt guiding for few-shot named entity recognition.  In _Proceedings of the 29th International conference on computational linguistics_ , pages 2515–2527.
  * Jiang et al. (2021) Haoming Jiang, Danqing Zhang, Tianyu Cao, Bing Yin, and Tuo Zhao. 2021.  Named entity recognition with small strongly labeled and large weakly labeled data.
  * Jung and Shim (2020) Woohwan Jung and Kyuseok Shim. 2020.  Dual supervision framework for relation extraction with distant supervision and human annotation.  In _Proceedings of the 28th International Conference on Computational Linguistics_ , pages 6411–6423, Barcelona, Spain (Online). International Committee on Computational Linguistics.
  * Liu et al. (2019) Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019.  Roberta: A robustly optimized bert pretraining approach.  _arXiv preprint arXiv:1907.11692_.
  * Loshchilov and Hutter (2019) Ilya Loshchilov and Frank Hutter. 2019.  Decoupled weight decay regularization.  In _International Conference on Learning Representations_.
  * Loukas et al. (2022) Lefteris Loukas, Manos Fergadiotis, Ilias Chalkidis, Eirini Spyropoulou, Prodromos Malakasiotis, Ion Androutsopoulos, and Georgios Paliouras. 2022.  Finer: Financial numeric entity recognition for xbrl tagging.  _arXiv preprint arXiv:2203.06482_.
  * Ma et al. (2022a) Jie Ma, Miguel Ballesteros, Srikanth Doss, Rishita Anubhai, Sunil Mallya, Yaser Al-Onaizan, and Dan Roth. 2022a.  Label semantics for few shot named entity recognition.  In _Findings of the Association for Computational Linguistics: ACL 2022_ , pages 1956–1971, Dublin, Ireland. Association for Computational Linguistics.
  * Ma et al. (2022b) Tingting Ma, Huiqiang Jiang, Qianhui Wu, Tiejun Zhao, and Chin-Yew Lin. 2022b.  Decomposed meta-learning for few-shot named entity recognition.  In _Findings of the Association for Computational Linguistics: ACL 2022_ , pages 1584–1596.
  * Mitchell et al. (2005) Alexis Mitchell, Stephanie Strassel, Shudong Huang, and Ramez Zakhary. 2005.  Ace 2004 multilingual training corpus.  _Linguistic Data Consortium, Philadelphia_ , 1:1–1.
  * Oh et al. (2023) Seongwoong Oh, Woohwan Jung, and Kyuseok Shim. 2023.  Thunder: Named entity recognition using a teacher-student model with dual classifiers for strong and weak supervisions.  In _Proceedings of 26th European Conference on Artificial Intelligence_.
  * Ritter et al. (2011) Alan Ritter, Sam Clark, Mausam, and Oren Etzioni. 2011.  Named entity recognition in tweets: An experimental study.  In _Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing_ , pages 1524–1534, Edinburgh, Scotland, UK. Association for Computational Linguistics.
  * Shen et al. (2022) Yongliang Shen, Xiaobin Wang, Zeqi Tan, Guangwei Xu, Pengjun Xie, Fei Huang, Weiming Lu, and Yueting Zhuang. 2022.  Parallel instance query network for named entity recognition.  In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 947–961, Dublin, Ireland. Association for Computational Linguistics.
  * Sung et al. (2022) Mujeen Sung, Minbyul Jeong, Yonghwa Choi, Donghyeon Kim, Jinhyuk Lee, and Jaewoo Kang. 2022.  Bern2: an advanced neural biomedical named entity recognition and normalization tool.  _Bioinformatics_ , 38(20):4837–4839.
  * Tjong Kim Sang (2002) Erik F. Tjong Kim Sang. 2002.  Introduction to the CoNLL-2002 shared task: Language-independent named entity recognition.  In _COLING-02: The 6th Conference on Natural Language Learning 2002 (CoNLL-2002)_.
  * Walker et al. (2006) Christopher Walker, Stephanie Strassel, Julie Medero, and Kazuaki Maeda. 2006.  Ace 2005 multilingual training corpus.  _Linguistic Data Consortium, Philadelphia_ , 57:45.
  * Wang et al. (2022) Peiyi Wang, Runxin Xu, Tianyu Liu, Qingyu Zhou, Yunbo Cao, Baobao Chang, and Zhifang Sui. 2022.  An enhanced span-based decomposition method for few-shot sequence labeling.  In _Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pages 5012–5024.
  * Weischedel et al. (2013) Ralph Weischedel, Martha Palmer, Mitchell Marcus, Eduard Hovy, Sameer Pradhan, Lance Ramshaw, Nianwen Xue, Ann Taylor, Jeff Kaufman, Michelle Franchini, et al. 2013.  Ontonotes release 5.0 ldc2013t19.  _Linguistic Data Consortium, Philadelphia, PA_ , 23.
  * Ye et al. (2022) Deming Ye, Yankai Lin, Peng Li, and Maosong Sun. 2022.  Packed levitated marker for entity and relation extraction.  In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 4904–4917, Dublin, Ireland. Association for Computational Linguistics.

## Appendix

##  Appendix A Sampling Algorithm

Algorithm 1 $K$$\sim$$($$K$$+$$5)$ sampling algorithm

Input: Dataset $\mathbf{X}$, labeled set $\mathbf{Y}$, $K$
Output: Fine-grained dataset $D^{\mathcal{F}}$

1:Sort classes in $\mathbf{Y}$ based on their freq. in $\mathbf{X}$

2:$D^{\mathcal{F}}\leftarrow\emptyset$; $\triangleright$ Init the train
dataset $\triangleright$ Init the count of entity classes in $D^{\mathcal{F}}$

3:for $i=1$ to $|\mathbf{Y}|$ do

4: Count $[i]=0;$

5:for $i=1$ to $|\mathbf{Y}|$ do

6: if $\forall$ Count$[i^{\prime}]\geq$ $K$ then

7: break;

8: Randomly sample $(x,y)\in\mathbf{X}$ $\sf s.t.$ $\mathbf{Y}_{i}$ $\in y;$

9: for $j=1$ $to$ $|y|$ do

10: Count${}^{\mathbf{Y}}[j]$ $+$$=1;$

11: if $\exists$ Count$[i]$ $+$ Count${}^{\mathbf{Y}}[i]$ $>K+5$ then

12: Continue;

13: else

14: $D^{\mathcal{F}}\leftarrow D^{\mathcal{F}}$ $\cup$ $\\{(x,y)\\}$;

15: Count $\leftarrow$ Count + CountY;

16:return $D^{\mathcal{F}}$

Unlike other tasks, NER involves multiple entity occurrences within a
sentence, making it too restrictive to sample an exact count. We adopt a
$K$$\sim$$($$K$$+$$5)$-shot setting to minimize differences in the number of
entity types. Additionally, we sample the entity types, starting from those
with fewer occurrences to ensure a balanced distribution of multiple entity
types within the sentences. Algorithm 1 presents the $K$-shot sampling
algorithm used in this study.

##  Appendix B Additional Experiments

###  B.1 Generalization of Inconsistency filtering in diverse dataset settings

Setting Coarse-grained datasets Few-NERD_coarse OntoNotes + CoNLL’03 w/
filtering 56.63 57.18 w/o filtering 56.46 55.13

Table 5: Results on different coarse-grained datasets. A fine-grained dataset
is 100-shot of the Few-NERD.

To assess the generalization of the proposed method, we conducted experiments
under various coarse- and fine-grained dataset settings.

First, we verified the robustness of inconsistency filtering through
experiments using different coarse-grained datasets. The fine-grained dataset,
Few-NERD, remains unchanged. Since Few-NERD has both coarse- and fine-grained
labels, we constructed a coarse-grained dataset Few-NERD_coarse using the
coarse-grained labels from Few-NERD. When compared to Few-NERD_coarse,
entities in OntoNotes and CoNLL’03 are inconsistently labeled with Few-NERD
because they were independently created. In Table 5, Few-NERD_coarse exhibits
a higher F1 score in the w/o filtering setting due to its consistency with
fine-grained labels of Few-NERD. However, the performance improvement achieved
with filtering is more substantial in the inconsistent datasets, when compared
to the consistent dataset. This result indicates that inconsistency filtering
improves performance by filtering out the mismatching labels. Therefore, we
have demonstrated the importance of using inconsistency filtering to filter
out noise when working with datasets that employ different labeling schemes.
Furthermore, by achieving effective performance improvements across various
coarse-grained datasets, we have provided evidence of the robustness of the
filtering method.

Model F1 $\text{RoBERTa}_{\texttt{LARGE}}$ 75.15 PL-Marker 74.03 CoFiNER 80.44
w/o filtering 78.20 w/o coarse 75.15

Table 6: Performances of different models and ablation studies on our model.
$\text{RoBERTa}_{\texttt{LARGE}}$ and w/o coarse are identical.

Second, we validate the generalization performance through experiments
conducted in different coarse- and fine-grained dataset settings. We set up
the CoNLL’03, which has 4 entity types, as the coarse-grained dataset, and the
100-shot OntoNotes, which has a finer label with 19 entity types, as the fine-
grained dataset. In Table 6, when compared to the two top-performing models in
the main results, $\text{RoBERTa}_{\texttt{LARGE}}$ and the state-of-the-art
PL-Marker, CoFiNER show consistently higher performance. Furthermore, as shown
in the ablation study that was conducted following the same methodology in
section 4.5, CoFiNER exhibited superior performance.

In conclusion, through above the two experiments, our method has been
demonstrated to work robustly across different coarse- and fine-grained
dataset settings.

###  B.2 Comparison with learnable F2C mapping matrix

Matrix Type F1 non-learnable 56.27 learnable 53.25

Table 7: Results on learnable and non-learnable F2C mapping matrix on 100-shot
of Few-NERD.

To find the optimal F2C mapping matrix, we conducted experiments to explore
the impact of making the F2C mapping matrix learnable. We use Few-NERD as a
fine-grained dataset and OntoNotes as a coarse-grained dataset. Table 7 shows
no performance gains when the F2C mapping matrix was set to be learnable. We
found that the learnable matrix tends to form a pattern similar to what is
shown in Figure 4 with $k$=all. This result suggests that taking minor co-
occurrences into account leads to an overall decrease in performance. Based on
this analysis, the non-learnable mapping matrix is used in our experiments.


We study a  class of semistable ordinary hyperelliptic curves over $2$-adic fields and the special fibre of their minimal regular model. We show that these curves can be controlled using `cluster pictures', similarly to the case of odd residue characteristic.

§ INTRODUCTION

Let $K$ be a finite extension of $\mathbb{Q}_p$ and $C/K:y^2=f(x)$ be a hyperelliptic curve of genus $g\geq 2$. If $p$ is odd then the reduction of $C$ can often be described explicitly in terms of the $p$-adic distances between the roots of $f(x)$ (see e.g. [6, 10, 4, 11, 20] and the references therein). By contrast, when $p=2$ these results, which all exploit the fact that the `$x$-coordinate' morphism $C\rightarrow \mathbb{P}^1_K$ has degree coprime to $p$, no longer apply.

More naively, one can already see that extra difficulties must arise upon noting that no short form Weierstrass equation ever defines a smooth curve over a field of characteristic $2$; at the very least one must instead work with   Weierstrass equations of the shape $y^2+Q(x)y=P(x)$ to have a hope of giving explicit equations for components of the reduction.

In spite of the above, for applications to global problems it is often desirable to represent a hyperelliptic curve over $\mathbb{Q}$ (or some other number field) by a short form Weierstrass equation and say something about its reduction at all primes $p$. This is the situation in [7], for example, in which the $2$-parity conjecture is proven for a broad class of Jacobians of genus $2$ curves, ultimately via a comparison of their local invariants. The principal aim of the present article is to produce a reasonable stock of examples for which such local comparisons may readily be carried out at $p=2$. As we shall see, this includes in particular all curves having good ordinary reduction.

§.§ Weierstrass equations of ordinary curves

In what follows, $K$ denotes a finite extension of $\mathbb{Q}_2$  with residue field $k$ and ring of integers $\mathcal{O}_K$. We denote by $K^{nr}$ the maximal unramified extension of $K$. Let $C/K$ be a hyperelliptic curve of genus $g\geq 2$ and consider the following property:
[Property $(\star)$]
We say a Weierstrass equation $y^2=cf(x)$ for $C$ satisfies $(\star)$ if:   $c\equiv 1\pmod 4$, $f(x)\in \mathcal{O}_K[x]$ is monic of degree $2g+2$ and squarefree, and the roots of $f(x)$ can be put into pairs $\{\alpha_1,\beta_1 \}$, ..., $\{\alpha_{g+1},\beta_{g+1}\}$ satisfying

*   $(x-\alpha_i)(x-\beta_i)\in K^{nr}[x]$ for all $i$,

*   $v(\alpha_i\!-\!\beta_i)= v(4)$ for all $i$,

*   $
$ for all $i\neq j$.

Our first result is then as follows:

If $C$ can be represented by a Weierstrass equation satisfying $(\star)$ then $C$ has good ordinary reduction. Conversely, if $|k|\geq g+1$ and $C$ has good ordinary reduction, then it can be represented by a Weierstrass equation satisfying $(\star)$.

We will prove Theorem <ref> as part of a more general statement. To describe this we introduce the following additional properties:

[Properties $(\star \star)$ and $(\dagger)$]

We say that a Weierstrass equation $y^2=cf(x)$ for $C$ satisfies $(\star\star)$ if it satisfies the property $(\star)$ above but with the second bullet point   replaced by the weaker condition

*   $v(\alpha_i-\beta_i)\geq v(4)$ for all $i$.

We say that $C$ has reduction type $(\dagger)$ if $C/K$ has semistable reduction and the geometric special fibre of its stable model   is either:

$\bullet$  irreducible   with normalisation an ordinary curve, or

$\bullet$   a union of $2$ rational curves intersecting transverally at $g+1$ points.

We then have the following result relating properties $(\star \star)$ and $(\dagger)$:

If $C$ can be represented by a Weierstrass equation satisfying $(\star \star)$ then $C$ has reduction type $(\dagger)$. Conversely, if $|k|\geq g+1$ and $C$ has reduction type $(\dagger)$, then it can be represented by a Weierstrass equation satisfying $(\star \star)$.

§.§ Special fibre of the stable and minimal regular models

When the conditions of Theorem <ref> are satisfied, one can moreover read off the precise structure of the stable and minimal regular models of $C$ in a straightforward fashion.

Suppose that $C$ is given by a Weierstrass equation satisfying $(\star \star)$. Let $\mathcal{C}/\mathcal{O}_K$ denote the stable model of $C$, and let $\mathcal{C}'=\mathcal{C}\times_{\mathcal{O}_K}\mathcal{O}_{K^{nr}}$. Then the special fibre of $\mathcal{C}'$ has one ordinary double point $P_i$ for each pair $\{\alpha_i,\beta_i\}$ with $v(\alpha_i-\beta_i)>v(4)$, and no others. Such a point $P_i$ has thickness $2(v(\alpha_i-\beta_i)-v(4))$ in $\mathcal{C}'$.

See e.g. <cit.> for the definition of the thickness of an ordinary double point. By <cit.> the minimal proper regular model of $C$ over $\mathcal{O}_{K^{nr}}$ is obtained from the stable model by replacing each ordinary double point of thickness $n$ by a chain of $n-1$ rational curves intersecting transversally.

We remark also that in the context of the above proposition, the geometric special fibre of the stable model is a union of $2$ rational curves intersecting transversally if and only if there are precisely $g+1$ pairs or roots $\{\alpha_i,\beta_i\}$ with $v(\alpha_i-\beta_i)>v(4)$.

Note that Theorem <ref> follows immediately from Theorem <ref> and Proposition <ref>.

Property $(\star \star)$ can be rephrased in the language of cluster pictures [6]. Specifically, let $y^2=cf(x)$ be a Weierstrass equation for $C$ with $c\equiv 1\pmod 4$ and $f(x)\in \mathcal{O}_K[x]$ monic. Then this equation satisfies $(\star \star)$  if and only if $f(x)$ has cluster picture

[A]  first r1;
[A]  r1 r2;
[A] 6 r2 r3;
[A]  r3 r4;
[A] 6 r4 r5;
[A]  r5 r6;
[Dot] 5 r6r7;
[Dot]  r7r8;
[Dot]  r8r9;
[A] 4 r9r10;
[A]  r10r11;
c1[][n_1][ ] = (r1)(r2);
c2[][n_2][ ] = (r3)(r4);
c3[][n_3][ ] = (r5)(r6);
c4[][n_g+1][ ] = (r10)(r11);
c4[][0][] = (c1)(c3)(c3)(r7)(r8)(r9)(c4);

with each $n_i\geq v(4)$ and with the inertia group of $K$ acting trivially on all proper clusters. Informally, Proposition <ref> then says that a qualitative description of the geometric special fibre of the minimal  regular model  can be obtained from such a cluster picture by subtracting $v(4)$ from each $n_i$, and then proceeding as one would in odd residue characteristic (i.e. as described in [1, 6], say).

It seems plausible that a similarly straightforward `cluster picture' description of the reduction of $C$ holds (at least) whenever $C$ is semistable and the special fibre of its stable model has normalisation a disjoint union of ordinary curves. Beyond that the  situation is more delicate; see [16, 12] for a discussion of the case where $f(x)$ has $2$-adically equidistant roots (i.e. when there is a single proper cluster).

Consider the genus $2$ hyperelliptic curve

\begin{equation} \label{global example}
\end{equation}

We will determine its reduction over $\mathbb{Q}_p$ for all primes $p$. Denote by $f(x)$ the right hand side of (<ref>). Computing the discriminant of $f(x)$ we see that $C$ has good reduction away from $\{2,7,11,17,29,53\}$. For odd primes in this set $f(x)$ has the following cluster picture (see <cit.>):

[A]  first r1;
[A]  r1 r2;
[A]  r2 r3;
[A]  r3 r4;
[A] 2 r4 r5;
[A]  r5 r6;
c1[][1][ ] = (r5)(r6);
c4[][0][] = (r1)(r2)(r3)(r4)(c1);
[A]  first r1;
[A]  r1 r2;
[A] 2.5 r2 r3;
[A]  r3 r4;
[A] 5 r4 r5;
[A]  r5 r6;
c1[][1][ ] = (r3)(r4);
c2[][1][ ] = (r5)(r6);
c4[][0][] = (r1)(r2)(c1)(c2);
[A]  first r1;
[A]  r1 r2;
[A] 2.5 r2 r3;
[A]  r3 r4;
[A] 5 r4 r5;
[A]  r5 r6;
c1[][12][ ] = (r3)(r4);
c2[][12][ ] = (r5)(r6);
c4[][0][] = (r1)(r2)(c1)(c2);

\[p\in \{7,17,29\}\quad\quad  \quad \qquad p=11 \qquad \quad\quad \quad \quad \qquad p=53\qquad\]

Here each  4pt[A]firstr1; represents a root of $f(x)$. With $p=7$, for example, the picture indicates that there are two roots whose difference has $7$-adic valuation $1$ — these roots form a `cluster' of size $2$ — whilst for any other pair of roots $r,r'$ of $f(x)$ we have $\textup{ord}_7(r-r')=0$. To see this is the case note that   $f(x)\pmod 7$ splits completely and has a single double root at $x=2$. This double root accounts for the cluster of size $2$, consisting of $x=2$ and the unique root of $x^2-9x+7$ congruent to $2 \pmod 7$. The valuation of the difference of these  roots is $1$ since $\textup{ord}_7(2^2-9\cdot 2 +7)=1$.

It follows e.g. from <cit.> that the  geometric special fibres of the corresponding minimal regular models take the following form:

\[p\in \{7,17,29\} \quad\quad \quad \quad\quad   p=11 \quad \quad \quad \quad \quad\quad\quad  \quad p=53\quad \quad\quad \quad \vspace{5pt}\]

That is, $C$ has Namikawa–Ueno type (as set out in [17]): $I_{2-0-0}$ when $p\in \{7,17,29\}$,  $I_{2-2-0}$ when $p=11$, and $I_{1-1-0}$ when $p=53$.

To determine the reduction at $p=2$ where the results of [6] no longer apply, note that we can rewrite $f(x)$ as

\[f(x)=\left(x^2-4\right)\left((x-\varphi_+)^2-16\right)\left((x-\varphi_-)^2-16\right)\]

where $\varphi_{\pm}=\frac{1}{2}(1\pm\sqrt{53})$. With the roots paired as in the quadratic factors above we see  that the given Weierstrass equation for $C$ satisfies $(\star \star)$ over $\mathbb{Q}_2$. From Theorem <ref> and Proposition <ref> we see that $C$ has reduction type $(\dagger)$ over $\mathbb{Q}_2$, and that the geometric special fibre of the minimal regular model has the same form as depicted for $p=11$ above, thus $C$ has Namikawa–Ueno type $I_{2-2-0}$ at $p=2$. In fact, one sees similarly that $f(x)$ has cluster picture

[A]  first r1;
[A]  r1 r2;
[A] 6 r2 r3;
[A]  r3 r4;
[A] 6 r4 r5;
[A]  r5 r6;
c1[][2][ ] = (r1)(r2);
c2[][3][ ] = (r3)(r4);
c3[][3][ ] = (r5)(r6);
c4[][0][] = (c1)(c3)(c3);

so the above is consistent with Remark <ref>: substracting $\textup{ord}_2(4)=2$ from the depths of the $3$ clusters of size $2$ yields the same cluster picture as for $p=11$.

§.§ Frobenius action on the special fibre

Suppose $C$ is given by a Weierstrass equation $y^2=cf(x)$ satisfying $(\star \star)$. One can then complement Proposition <ref> with an explicit description of the $\textup{Gal}(\bar{k}/k)$-action on the dual graph of the geometric special fibres of the stable and minimal regular models. This additional information is what is needed to determine local invariants of the Jacobian of $C$ such as its Tamagawa number and root number (see e.g. <cit.> for a recipe for computing these invariants from this data).

Recall from Proposition <ref> that to each pair of roots $\{\alpha_i,\beta_i\}$ of $f(x)$ with $v(\alpha_i-\beta_i)>4$, there corresponds an ordinary double point $P_i$ on the geometric special fibre of the stable model of $C$. In Proposition <ref> below we describe the $\textup{Gal}(\bar{k}/k)$-action on the points $P_i$, and give an explicit characterisation of when such a point is a split ordinary double point in the sense of <cit.>. This data is sufficient to determine the $\textup{Gal}(\bar{k}/k)$-action on the dual graph of stable model, as explained in e.g.  <cit.>. To obtain the corresponding action for the minimal regular model, one can then use Remark <ref>.

In what follows, for $w\in \mathcal{O}_{K^{nr}}$  we denote by $\overline{w}$ the reduction of $w$ to the residue field $\bar{k}$. With the roots $\{\alpha_1,\beta_1\}$, ..., {$\alpha_{g+1},\beta_{g+1}\}$ paired as in Notation <ref>,  define

\[\quad \quad \quad \gamma_i=\frac{\alpha_i+\beta_i}{2}\quad \textup{ and }\quad \eta_i=\big(\frac{\alpha_i-\beta_i}{4}\big)^2~~\quad \quad (1\leq i\leq g+1).\]

By assumption we have $\eta_i\in \mathcal{O}_{K^{nr}}$, and since $\alpha_i+\beta_i\equiv \alpha_i - \beta_i \equiv 0 \bmod 2$ we have $\gamma_i\in \mathcal{O}_{K^{nr}}$ also. Further, define

\[a=\frac{1}{4}(c-1)\in \mathcal{O}_K\quad \textup{ and }\quad r_i=\overline{\gamma_i}\in \bar{k}.\]

We then have the following:

In the notation above, the correspondence  $\{\alpha_i,\beta_i\} \mapsto P_i$ is equivariant for the action of $\textup{Gal}(K^{nr}/K)=\textup{Gal}(\bar{k}/k)$.  Further, $P_i$ is a split ordinary double point over $k(P_i)=k(r_i)$ if and only if

\begin{equation} \label{split_d_p_invariant_intro}
\textup{Trace}_{k(r_i)/\mathbb{F}_2}\Big(\overline{a}+\sum_{j\neq i}\overline{\eta_j}(r_i-r_j)^{-2}\Big)=0.
\end{equation}

Consider the genus $2$ hyperelliptic curve

\[C/\mathbb{Q}_2:y^2=5(x^2-8)(x^2-7x+13)(x^2+9x+21).\]

This has roots $\{\pm2\sqrt{2}, \zeta_3\pm 4, \zeta_3^2\pm 4 \}$ where $\zeta_3$ is a primitive $3$rd root of unity, and cluster picture

[A]  first r1;
[A]  r1 r2;
[A] 7 r2 r3;
[A]  r3 r4;
[A] 7 r4 r5;
[A]  r5 r6;
c1[][5/2][ ] = (r1)(r2);
c2[][3][ ] = (r3)(r4);
c3[][3][ ] = (r5)(r6);
c4[][0][] = (c1)(c2)(c3);

We see from Proposition <ref>  (cf. also Remark <ref>) that $C$ is semistable and  that the minimal proper regular model of $C$ over $\mathbb{Z}_2^{nr}$ has special fibre

where each irreducible component is a rational curve.

We can use Proposition <ref> to determine the Frobenius action on this special fibre. With the roots ordered as written, in the terminology of Notation <ref> we have $a=1$,

\[\gamma_1=0,\quad \gamma_2=\zeta_3, \quad \gamma_3=\zeta_3^2, \quad \eta_1=2,\quad \eta_2=\eta_3=4.\]

Since $\gamma_2$ and $\gamma_3$ are swapped by Frobenius, so are the two components drawn vertically. Further, since $\overline{\eta_i}=0$ for each $i$ whilst $\overline{a}=1$, we see from (<ref>) that the pair of roots $\{\pm 2\sqrt{2}\}$ corresponds to a non-split ordinary double point. Thus Frobenius swaps the two components drawn horizontally also.

We remark that in fact, as one can show using Remark <ref>, the special fibre of the stable model of $C$ over $\mathbb{Z}_2$ is given explicitly by the equation

\[\left(y+\zeta_3(x^3+x^2+x)\right)\left(y+\zeta_3^2(x^3+x^2+x)\right)=0,\]

whose two (geometric) components are visibly swapped by Frobenius.

In the above example we conclude that  $C(\mathbb{Q}_2)=\emptyset$, since each irreducible component of the special fibre has an even-sized $\textup{Gal}(\bar{\mathbb{F}}_2/\mathbb{F}_2)$-orbit.  In fact, arguing similarly, we have $C(K)=\emptyset$ for every odd degree extension $K/\mathbb{Q}_2$. Thus $C$ is deficient in the sense of <cit.>.

§.§ Reduction map on $2$-torsion

Suppose that $C$ is  given by a Weierstrass equation of the form $(\star)$, hence has good ordinary reduction by Theorem <ref>. Then the  Néron model  $\mathcal{J}/\mathcal{O}_K$ of the Jacobian $J/K$ of $C$ is an abelian scheme,  and we have an associated reduction map $J[2]\rightarrow \overline{J}(\bar{k})[2]$ on $2$-torsion points. Here $\overline{J}$ denotes the special fibre of $\mathcal{J}$. Motivated by applications to the parity conjecture (see <cit.>, for example) we record an explicit description of the kernel of this reduction map in terms of the roots of $f(x)$, the set of which we denote $\mathcal{R}$.

Recall that  $J[2]$ can be identified with the collection of even-sized subsets $S\subseteq \mathcal{R}$, with addition corresponding to symmetric difference, and along with the relations identifying $S$ with $\mathcal{R}\setminus S$ for each such $S$.  This correspondence is realised explicitly by sending $S\subseteq \mathcal{R}$ to the class of the  divisor

\begin{equation} \label{eq:2-tors_divisor_intro}
D_S=\sum_{r\in S}P_r-\frac{|S|}{2}(\infty^+ +\infty^- ),
\end{equation}

where $P_r=(r,0)$. For a proof see e.g. <cit.>. The result is now the following:

With the notation above, and with the roots of $f(x)$ paired as in Notation <ref>, the kernel of the reduction map $J[2]\rightarrow \overline{J}(\bar{k})[2]$ is generated by the subsets $\{\alpha_i,\beta_i\}$ for $1\leq i\leq g+1$.

§.§ Layout

In Section <ref> we review some properties of Weierstrass equations over fields of characteristic $2$ which will be used later.  Section <ref> then proves all results mentioned above, beginning with Theorem <ref> and Proposition <ref>. For explicit equations defining the special fibre of the stable model when $C$ is given by a Weierstrass equation satisfying $(\star \star)$, see Remark <ref>.

§.§ Notation and conventions

The following notation and conventions will be used throughout the the paper.

By a hyperelliptic curve over a field $F$ we mean a smooth proper geometrically connected curve $C/F$ equipped with a finite separable $k$-morphism $C\rightarrow \mathbb{P}_F^1$ of degree $2$.  We say that $C$ is ordinary if its Jacobian is (however `good' in Theorem <ref> refers to good reduction of the curve rather than the weaker property of good reduction of its Jacobian).

Let $R$ be a commutative ring. By a Weierstrass equation over $R$ we mean an equation

\begin{equation}  \label{eq:weierstrass}
\end{equation}

where $P(x), Q(x)\in R[x]$ are polynomials with $\max\{2\deg Q, \deg P\}\in \{2g+1,2g+2\}$ for some $g\geq 2$. By the scheme $X$ defined by this Weierstrass equation   we mean the $R$-scheme given by gluing the affine charts (<ref>) and

\begin{equation} \label{eq:chart_at_infty}
\end{equation}

via the change of variables $x=1/t$ and $t^{g+1}y=z$.

For a nonarchimedean local field $K$, ring of integers $\mathcal{O}_K$ and residue field $k$, given $w\in \mathcal{O}_K$  we denote by $\overline{w}$ the reduction of $w$ to $k$. For a polynomial $Q(x)\in \mathcal{O}_K[x]$ we denote by $\overline{Q}(x)\in k[x]$ the reduced polynomial.

§ WEIERSTRASS EQUATIONS IN CHARACTERISTIC $2$

Let $F$ be an algebraically closed field of characteristic $2$. Let $g\geq 2$ and let $C$ be the curve defined by a Weierstrass equation (<ref>) over $F$ with $\deg Q =g+1$.

Denote by $\mathcal{R}$ the set of roots of $Q(x)$ in $F$. The map $(x,y) \mapsto x$ defines  a finite separable morphism $C\rightarrow \mathbb{P}^1_F$ of degree $2$ which ramifies precisely at the points $P_r=(r,\sqrt{P(r)})$ for $r\in \mathcal{R}$. There are  $2$ points lying over the point at infinity on $\mathbb{P}^1_F$; we denote these   $\infty^\pm$.

§.§ Smooth Weierstrass equations

Suppose the curve $C$ is smooth (this can, for example, be detected by the discriminant of the Weierstrass equation; see e.g.  [15] or <cit.>). Then $C$ is a genus $g$ hyperelliptic curve over $F$. Conversely, any hyperelliptic curve $X/F$ of genus $g\geq 2$ can be given by a Weierstrass equation of the form (<ref>) with $\deg Q=g+1$ (cf. <cit.>). Denote by $J$ the Jacobian of $C$.

The group $J(F)[2]$ can be identified with the collection of even-sized subsets $S\subseteq \mathcal{R}$, with addition corresponding to symmetric difference. Explicitly, $S\subseteq \mathcal{R}$  corresponds to the class of the divisor

\[D_S=\sum_{r\in S}P_r-\frac{|S|}{2}(\infty^++\infty^-).\]

This is  well known; see, for example,  the proof of <cit.> (cf. also  work of Elkin–Pries [9]).

By Lemma <ref> we have $\dim J(F)[2]= |\mathcal{R}|-1$. In particular, $C$ is ordinary if and only if $Q(x)$ is separable. Whilst we have a running assumption that $g\geq 2$, we note that this equivalence also holds when $g=1$, i.e. for Weierstrass equations $y^2+Q(x)y=P(x)$ where $\deg Q=2$ and $\deg P\leq 4$.

§.§ Semistable Weierstrass equations

We continue to suppose that $C$ is given by a Weierstrass equation (<ref>), but do not assume that $C$ is smooth.

The curve $C$ is semistable with normalisation a disjoint union of ordinary curves if and only if $Q(x)$ is separable.

From the Jacobian criterion one sees that $C$ is smooth away from the points $P_r$ for $r\in \mathcal{R}$, and that such a point  is smooth  if and only if $P'(r)^2+P(r)Q'(r)^2\neq 0$. Moreover, when $P'(r)^2+P(r)Q'(r)^2=0$ the point $P_r$ is an ordinary double point if and only if $r$ is a simple root of $Q(x)$.   For such a point $P_r$,  consider the curve $C_1$ with  Weierstrass equation

\[w^2+\frac{Q(x)}{x-r}w=\frac{P(x)+P(r)+Q(x)\sqrt{P(r)}}{(x-r)^2} \]

(our assumptions force each side of this equation to lie in $F[x,w]$).  The  morphism $C'\rightarrow C$ defined by

\begin{equation} \label{eq:partial_normalisation}
(x,w)\longmapsto \left(x,(x-r)w+\sqrt{P(r)}\right)
\end{equation}

realises $C'$ as the partial normalisation of $C$ at the point $P_r$.

Suppose that $C$ has $t$ ordinary double points in total, corresponding to distinct roots $r_1,...,r_t$ of $Q(x)$, say. We conclude from the above that the normalisation of $C$ is given by a Weierstrass equation of the form

\[y^2+\widetilde{Q}(x)y=\widetilde{P}(x)\]
where $\widetilde{Q}(x)=Q(x)\prod_{i=1}^t(x-r_i)^{-1}$ and $\widetilde{P}(x)$ is a polynomial of degree at most $2(g-t)+2$. By Remark <ref> such a curve is ordinary if and only if $\widetilde{Q}(x)$ is separable, from which the result follows.

§ PROOFS OF THE MAIN RESULTS

Let $K$ be a finite extension of $\mathbb{Q}_2$,  $\mathcal{O}_K$ and $k$ its ring of integers and residue field respectively, and $v$ its normalised valuation.

§.§ Proofs of Theorem <ref> and Proposition <ref>

Suppose $|k|\geq g+1$ and that $C$ has reduction type $(\dagger)$. Then $C$ can be represented by a Weierstrass equation of the shape $(\star \star)$.

Let $\mathcal{C}/\mathcal{O}_K$ denote the stable model of $C$ and let $\iota$ denote the extension of the hyperelliptic involution to $\mathcal{C}$.  By  <cit.>, the quotient $\mathcal{C}/\iota$ is a semistable model of $\mathbb{P}^1_K$ whose special fibre, by assumption,  consists of a single geometrically irreducible component  (if the geometric special fibre of $\mathcal{C}$ is a union of $2$ rational curves intersecting transversally then these are necessarily be swapped by $\iota$).  We conclude that the special fibre of $\mathcal{C}/\iota$ is isomorphic to $\mathbb{P}^1_k$. Thus $\mathcal{C}$ is a Weierstrass model for $C$ in the sense of <cit.>, so can be represented by a Weierstrass equation (<ref>) over $\mathcal{O}_K$  (cf. <cit.>).
Since $|k|\geq g+1$  we can moreover assume that the reduction $\overline{Q}(x)$ has degree $g+1$, and then that $Q(x)$ is monic. Applying Lemma <ref> to the reduced Weierstrass equation we see that  $\overline{Q}(x)$ is separable.

Completing the square in (<ref>) and scaling $y$ by 2 shows that $C$ can be represented by the  Weierstrass equation  $y^2 =Q(x)^2+4P(x)$. Write $Q(x)^2+4P(x)=cf(x)$ for $f(x)$  monic of degree $2g+2$, noting that   $c\equiv 1\bmod 4$ and that $f(x)$ is in $\cO_K[x]$. Write  $\gamma_1,\ldots, \gamma_{g+1}$ for the roots of $Q(x)$, all of which lie in in $K^{nr}$ since $\overline{Q}(x)$ is separable. Since $f(x) \equiv Q(x)^2 \bmod 4$, by Hensel's lemma for lifting coprime factorisations  (see <cit.>) we can factor $f(x)$ over $K^{nr}$ as

f(x) = \prod_{i=1}^{g+1}f_i(x)

with each $f_i(x) \in \mathcal{O}_{K^{nr}}[x]$ monic quadratic satisfying $f_i(x)\equiv  (x-\gamma_i)^2 \bmod 4$. Since $f_i(x+\gamma_i)\equiv x^2 \bmod 4$ the discriminant of $f_i(x)$ is congruent to $0$ modulo $16$, so factoring $f_i(x)=(x-\alpha_i)(x-\beta_i)$ over $\bar{K}$ we find $v(\alpha_i-\beta_i)\geq v(4)$. Finally, since  $\overline{f_i}(x)=(x-\overline{\gamma_i})^2$ we have $\overline{\alpha_i}=\overline{\gamma_i}=\overline{\beta_i}$ for each $i$, hence separability of $\overline{Q}(x)$ gives $v(\alpha_i-\alpha_j)=v(\beta_i-\beta_j)=v(\alpha_i-\beta_j)=0$ for  $i\neq j$. Thus $y^2=cf(x)$ is a Weierstrass equation for $C$ of the desired form.

To complete the proof of Theorem <ref> it remains to study hyperelliptic curves $C$ given by a Weierstrass equation of the form $(\star \star)$. It will be convenient to introduce the following notation.

[cf. Notation <ref>]
Suppose that $C$ is given by a Weierstrass equation of the form $(\star \star)$.  Define

\[f_i(x)=(x-\alpha_i)(x-\beta_i),\quad \gamma_i=\frac{\alpha_i+\beta_i}{2},\quad \eta_i=\big(\frac{\alpha_i-\beta_i}{4}\big)^2.\]

As explained in Notation <ref> we have $\eta_i,\gamma_i\in \mathcal{O}_{K^{nr}}$. Further, we have

\begin{equation} \label{completed_square}
f(x)=\prod_{i=1}^{g+1}f_i(x)\quad \textup{ and }\quad f_i(x)=(x-\gamma_i)^2-4\eta_i.
\end{equation}

Next, set

\[Q(x)=\prod_{i=1}^{g+1}(x-\gamma_i)\quad \textup{ and } P(x)=\frac{1}{4}(cf(x)-Q(x)^2).\]

By (<ref>) we have $f(x)\equiv Q(x)^2 \pmod 4$ so, since $c\equiv 1\pmod 4$, we have $P(x)\in \mathcal{O}_K[x]$. Finally,  write

\[a=\frac{1}{4}(c-1)\in \mathcal{O}_K\quad \textup{ and }\quad r_i=\overline{\gamma_i}\in \bar{k}.\]

Note that  $\alpha_i-\gamma_i=\frac{\beta_i-\alpha_i}{2}\equiv 0\bmod 2$  so that $\gamma_i \equiv \alpha_i \bmod 2$. In particular, the $r_i$ are all distinct, and   $\overline{Q}(x)$ is separable.

Suppose that $C$ is given by a Weierstrass equation of the form $(\star \star)$. Then $C$ has semistable reduction and, with $P(x)$ and $Q(x)$ as defined in Notation <ref>, the stable model of $C$ is the $\mathcal{O}_K$-scheme defined by the Weierstrass equation $y^2+Q(x)y=P(x)$. Moreover, $C$ satisfies $(\dagger)$.

Reversing the change of variables described in the proof of  Lemma <ref> we see that $C/K$ is represented by the integral Weierstrass equation $y^2+Q(x)y=P(x)$. As explained in Notation <ref> above,  $\overline{Q}(x)$ has degree $g+1$ and is separable. The result now follows from Lemma <ref>.

Theorem <ref> now follows from combining Lemma <ref> and Lemma <ref>.

Let $C$ be given by a Weierstrass equation of the form $(\star \star)$. See Notation <ref> for the quantities appearing below. As in Lemma <ref>, the stable model $\mathcal{C}/\mathcal{O}_K$ of $C$  is given by the Weierstrass equation $y^2+Q(x)y=P(x)$. Denote by $\mathcal{C}'=\mathcal{C}\times_{\mathcal{O}_K}\mathcal{O}_{K^{nr}}$ the base-change of $\mathcal{C}$ to $\mathcal{O}_{K^{nr}}$. Then (as in the proof of Lemma  <ref>) $\mathcal{C}'$ is smooth away from the points
$P_{i}=(r_i,\sqrt{P(r_i)})$   ($1\leq i\leq g+1$) on its the special fibre.

For each $i$ we now compute the completed local ring $\widehat{\mathcal{O}}_{\mathcal{C}',P_{i}}$ of $\mathcal{C}'$ at $P_{i}$. Reordering the roots and translating $x$ we suppose $i=1$ and $\gamma_i=0$. Write $Q(x)=x\widetilde{Q}(x)$.  Further, write $f(x)=f_1(x)\widetilde{f}(x)$ where $\widetilde{f}(x)=\prod_{j=2}^{g+1}f_j(x)$. As in (<ref>) we have $f_1(x)=x^2-4\eta_1$, whilst $\widetilde{f}(x)\equiv \widetilde{Q}(x)^2 \pmod 4$.

There is  $G(x)\in \mathcal{O}_{K^{nr}}[[x]]^\times$ with

\[G(x)\equiv \widetilde{Q}(x)\hspace{-3pt}\pmod 2\quad \textup{ and } \quad G(x)^2=c\widetilde{f}(x).\]

Let $R=\mathcal{O}_{K^{nr}}[[x]]$,  write $c\widetilde{f}(x)=\widetilde{Q}(x)^2+4\widetilde{P}(x)$ for some $\widetilde{P}(x)\in \mathcal{O}_{K^{nr}}[x]$, and define $h(t)=t^2-t\widetilde{Q}-\widetilde{P}\in R[t]$. Since $R$ is Henselian and $\widetilde{Q}(0)$ is a unit in $\mathcal{O}_{K^{nr}}$, there is $G_0\in R$ with $h(G_0)=0$. Then $G=2G_0-\widetilde{Q}$ has the required properties.

With $G(x)$ as in the claim, set $u=G(x)^{-1}\big(y+x\cdot\frac{\widetilde{Q}(x)-G(x)}{2}\big)$. A straightforward computation gives

\[y^2+Q(x)y-P(x)=G(x)^2(u^2+ux+\eta_1).\]

It follows that $\widehat{\mathcal{O}}_{\mathcal{C}',P_{r_i}}$ is isomorphic to the completed local ring of the scheme

\begin{equation*} \label{analytic_iso_scheme}
u^2+ux+\eta_1=0 \subseteq \mathbb{A}^2_{\mathcal{O}_{K^{nr}}}
\end{equation*}

at the closed point  $x=0$, $u=\overline{\eta_1}$ on its special fibre.   If $v(\alpha_1-\beta_1)=v(4)$ then $\overline{\eta_1}\neq 0$ and this scheme is smooth. On the other hand, if $v(\alpha_1-\beta_1)>v(4)$ then $\overline{\eta_1}=0$ and, setting $v=u+x$, we see that the sought completed local ring  is  isomorphic to

\[\widehat{\mathcal{O}_{K^{nr}}}[[u,v]]/\big(uv-\eta_1\big).\]

We thus see that $P_{1}$ has thickness $v(\eta_1)=2(v(\alpha_1-\beta_1)-v(4))$ in $\mathcal{C}'$.

Suppose that $C$  is given by a Weierstrass equation of the form $(\star \star)$. By Lemma <ref> the special fibre of the stable model of $C$ is given by the Weierstrass equation $y^2+\overline{Q}(x)y=\overline{P}(x)$. With the quantities as in Notation <ref> we have $\overline{Q}(x)=\prod_{i=1}^{g+1}(x-r_i)$. The polynomial $\overline{P}(x)$ is given explicitly by the formula

\begin{equation} \label{eq:reduced_P}
\overline{P}(x)=\overline{a}\overline{Q}(x)^2+\sum_{i=1}^{g+1}\overline{\eta_i}\prod_{j\neq i}(x-r_j)^2.
\end{equation}

To see this note that from (<ref>) we have

\[cf(x)=(1+4a)\prod_{i=1}^{g+1}\big((x-\gamma_i)^2-4\eta_i \big).\]

Expanding out the righthand side, using the definition of $P(x)$, and reducing to the residue field recovers (<ref>).

§.§ Frobenius action on the special fibre

It follows readily from the explicit equations for the special fibre of the stable model given in Remark <ref>   that the Frobenius action takes the form asserted in Proposition <ref>.

As in the statement of the proposition we assume that $C$ is given by a Weierstrass equation of the shape $(\star \star)$. Let $\mathcal{C}/\mathcal{O}_K$ denote its stable model, as described explicitly in Remark <ref>.
From the proof of Proposition <ref> we see that the bijection  between ordinary double points on $\mathcal{C}_{\bar{k}}$ and pairs $\{\alpha_i,\beta_i\}$ of roots of $f(x)$ with $v(\alpha_i-\beta_i)>v(4)$  sends a pair $\{\alpha_i,\beta_i\}$ to the point $P_{i}=(r_i,\sqrt{P(r_i)})$ on the  special fibre $y^2+\overline{Q}(x)y=\overline{P}(x)$ of $\mathcal{C}$.
The $\textup{Gal}(\bar{k}/k)$-equivariance of the map $\{\alpha_i,\beta_i\}  \mapsto P_i$ is clear, and we note also that $k(P_i)=k(r_i)$.  From the explicit normalisation map (<ref>) we see that $P_{i}$ is a split ordinary double point over $k(P_i)$  if and only if the quadratic equation

\begin{eqnarray*}
&\stackrel{\eqref{eq:reduced_P}}{=}& \overline{a}Q'(r_i)^2+\sum_{j\neq i}\overline{\eta_j}\prod_{s\neq i,j}(r_i-r_s)^2
\end{eqnarray*}

is soluble over $k(r_i)$. This latter condition is equivalent to (<ref>), as can be seen by replacing $w$ by $Q'(r_i)w$ and considering the trace to $\mathbb{F}_2$ of the resulting equation.

§.§ Reduction map on $2$-torsion

Now suppose that $C$ is given by a Weierstrass equation $y^2=cf(x)$ satisfying $(\star)$. As in Section <ref> we denote by $\mathcal{R}$ the set of roots of $f(x)$ in $\bar{K}$. For each even sized subset $S\subseteq \mathcal{R}$ we let $D_S$ denote the divisor defined in (<ref>), whose class defines a $2$-torsion point on the Jacobian $J$ of $C$.

Let $P(x)$ and $Q(x)$ be as in Notation <ref>. By Lemma <ref> the $\mathcal{O}_K$-scheme $\mathcal{C}$ defined by the integral Weierstrass equation  $y^2+Q(x)y=P(x)$ realises the good reduction of $C$. In particular, by <cit.>  the Néron model of $J$ agrees with the identity component of the relative Picard functor $\textup{Pic}^0_{\mathcal{C}/\mathcal{O}_K}$. For $S\subseteq \mathcal{R}$ with $|S|$ even it follows that the reduction map $J(\bar{K})\rightarrow \overline{J}(\bar{k})$ sends (the class of) the divisor $D_S$ to the (class of the) divisor $ \sum_{r\in S}P_{\bar{r}}-\frac{|S|}{2}(\infty^+ +\infty^-)$ on $\mathcal{C}_{\bar{k}}$, where here $P_{\bar{r}}=(\bar{r},\sqrt{P(\bar{r})})$. The result now follows from Lemma <ref>.

§.§ Acknowledgments

The first author is supported by a Royal Society Research Fellowship. The second author is supported by the Engineering and Physical Sciences Research Council (EPSRC) grant EP/V006541/1 `Selmer groups, Arithmetic Statistics and Parity Conjectures'.

.6exto 0pt-.23ex "16D
1.15exto 17"1310000
1.15exto 17"7E10000

[1]
A. J. Best, L. A. Betts, M. Bisatt, R. van Bommel, V. Dokchitser, O. Faraggi,
S. Kunzweiler, C. Maistret, A. Morgan, S. Muselli, and S. Nowell.
A user's guide to the local arithmetic of hyperelliptic curves.
To appear in Bulletin of the London Mathematical Society.

[2]
Siegfried Bosch, Werner Lütkebohmert, and Michel Raynaud.
Néron models, volume 21 of Ergebnisse der Mathematik und
ihrer Grenzgebiete (3) [Results in Mathematics and Related Areas (3)].
Springer-Verlag, Berlin, 1990.

[3]
Nicolas Bourbaki.
Éléments de mathématique.
Masson, Paris, 1985.
Algèbre commutative. Chapitres 1 à 4. [Commutative algebra.
Chapters 1–4], Reprint.

[4]
Irene I. Bouw and Stefan Wewers.
Computing $L$-functions and semistable reduction of superelliptic
Glasg. Math. J., 59(1):77–108, 2017.

[5]
Wouter Castryck, Marco Streng, and Damiano Testa.
Curves in characteristic 2 with non-trivial 2-torsion.
Adv. Math. Commun., 8(4):479–495, 2014.

[6]
Tim Dokchitser, Vladimir Dokchitser, Céline Maistret, and Adam Morgan.
Arithmetic of hyperelliptic curves over local fields.
To appear in Mathematische Annalen.

[7]
Vladimir Dokchitser and Celine Maistret.
Parity conjecture for abelian surfaces.
Preprint, arxiv: 1911.04626, 2019.

[8]
Igor V. Dolgachev.
Classical algebraic geometry: a modern view.
Cambridge University Press, Cambridge, 2012.

[9]
Arsen Elkin and Rachel Pries.
Ekedahl-Oort strata of hyperelliptic curves in characteristic 2.
Algebra and Number Theory, 7(3):507–532, 2013.

[10]
Omri Faraggi and Sarah Nowell.
Models of hyperelliptic curves with tame potentially semistable
Trans. London Math. Soc., 7(1):49–95, 2020.

[11]
Ivan Kausz.
A discriminant and an upper bound for $\omega^2$ for hyperelliptic
arithmetic surfaces.
Compositio Math., 115(1):37–69, 1999.

[12]
Claus Lehr and Michel Matignon.
Wild monodromy and automorphisms of curves.
Duke Math. J., 135(3):569–586, 2006.

[13]
Qing Liu.
Modèles entiers des courbes hyperelliptiques sur un corps de
valuation discrète.
Trans. Amer. Math. Soc., 348(11):4577–4610, 1996.

[14]
Qing Liu.
Algebraic geometry and arithmetic curves, volume 6 of Oxford Graduate Texts in Mathematics.
Oxford University Press, Oxford, 2002.
Translated from the French by Reinie Erné, Oxford Science

[15]
Paul Lockhart.
On the discriminant of a hyperelliptic curve.
Trans. Amer. Math. Soc., 342(2):729–752, 1994.

[16]
Michel Matignon.
Vers un algorithme pour la réduction stable des revêtements
$p$-cycliques de la droite projective sur un corps $p$-adique.
Math. Ann., 325(2):323–354, 2003.

[17]
Yukihiko Namikawa and Kenji Ueno.
The complete classification of fibres in pencils of curves of genus
Manuscripta Math., 9:143–186, 1973.

[18]
Bjorn Poonen and Michael Stoll.
The Cassels-Tate pairing on polarized abelian varieties.
Ann. of Math. (2), 150(3):1109–1149, 1999.

[19]
Michel Raynaud.
$p$-groupes et réduction semi-stable des courbes.
In The Grothendieck Festschrift, Vol. III, volume 88 of
Progr. Math., pages 179–197. Birkhäuser Boston, Boston, MA, 1990.

[20]
Padmavathi Srinivasan.
Conductors and minimal discriminants of hyperelliptic curves: A
comparison in the tame case.
Preprint, arXiv:1910.08228, 2019.