# Lack of Fluency is Hurting Your Translation Model

Jaehyo Yoo
Korea University
<EMAIL_ADDRESS>
&Jaewoo Kang
Korea University
<EMAIL_ADDRESS>

###### Abstract

Many machine translation models are trained on bilingual corpus, which consist
of aligned sentence pairs from two different languages with same semantic.
However, there is a qualitative discrepancy between train and test set in
bilingual corpus. While the most train sentences are created via automatic
techniques such as crawling and sentence-alignment methods, the test sentences
are annotated with the consideration of fluency by human. We suppose this
discrepancy in training corpus will yield performance drop of translation
model. In this work, we define fluency noise to determine which parts of train
sentences cause them to seem unnatural. We show that fluency noise can be
detected by simple gradient-based method with pre-trained classifier. By
removing fluency noise in train sentences, our final model outperforms the
baseline on WMT-14 DE$\rightarrow$EN and RU$\rightarrow$EN. We also show the
compatibility with back-translation augmentation, which has been commonly used
to improve the fluency of the translation model. At last, the qualitative
analysis of fluency noise provides the insight of what points we should focus
on.

##  1 Introduction

Machine translation is a task of generating translated sentences from given
language to other. The final goal of the task is to create the fluent
sentences which are hard to distinguish from golden translations. Since the
translation model needs huge language prior, many studies utilized the
specific pipeline to generate the large bilingual benchmark through crawling,
sentence-alignment, and many other filtering methods Koehn (2005); Cettolo et
al. (2012); Bañón et al. (2020). However, these automatically produced
benchmark may not completely follow our intrinsic desire since we usually
evaluate our translation model on human-annotated sentences, whose quality is
guaranteed by human evaluation. Since the cost of human evaluation on the
entire training data is extremely expensive, we cannot be convinced that the
discrepancy between train and test distribution would not hurt our translation
model.

Figure 1: An example from WMT-14 DE$\rightarrow$EN test set. We translate the
given source sentence with the baseline and our final model for each, then
compare them to the golden answer. For convenience, we marked the tokens with
same color if their meanings are equal.

We suppose this discrepancy appears by the strict and inflexible alignment of
sentences, causing the lack of fluency to processed train data. Since the most
heuristic rules are not perfect, the processed data could suffer from the
alignment error issue (Goutte et al., 2012). Although the alignment is done
successfully, the translation of given sentence may seem awkward since the
purpose of translation in the most websites focus on the transfer of semantic,
not its naturalness.

Since numerous factors could be the reason of fluency lack, it is hard to
define the concept of naturalness. In Figure 1, for example, we compare the
translation of baseline model to its human-annotated golden answer. As we can
see, the baseline model gets low BLEU score for too strict alignment of word-
order, simplification by omission (for noch), and explicitation of determiner
(for die). Nonetheless, we can’t say that this translation is wrong due to its
correct factual consistency. Since the standard of evaluation is ambiguous and
different for each individual annotator, human evaluation also suffers from
the difficulty of measuring the fluency without any guideline (Clark et al.,
2021). Then how can we define the range of unnatural points in the given
sentence without human evaluation?

One of the solution is to use the language model prior, which is the
probability of generating the next word without seeing the source sentence for
translation. Baziotis et al. (2020) defines Kullback-Leibler divergence using
language model prior to regularize the posterior of translation model on low-
resource setting. On the other hand, Miao et al. (2021) claims that the
language model prior could be overconfident due to the excessive attention
towards the partial translation. However, these methods are still abstract to
catch the explicit evidence distracting the fluency.

In our work, we utilize the prior of monolingual data to determine whether the
given sentence is native-like or not. We first train the classifier to check
if it is easy to distinguish train or test sentences from bilingual corpus and
sentences from monolingual corpus. From the experiment, we find that human-
annotated test set is much harder to classify from monolingual corpus, while
the classifier distinguishes the train set with much higher accuracy.

Recent work (Wu and Ong, 2021) examined that a few tokens which play an
important role in sequence classification problems can be found by gradient-
based methods. Following the previous work, we show that we can mark which
parts of the given target sentence seem awkward compared to monolingual texts.
We define these marked tokens as fluency noise. Eventually, we mask fluency
noise during train time, and outperform the baseline model by up to 1.0 BLEU
score. We validate the compatibility with the back translation augmentation
method (Sennrich et al., 2016a), since the method has also been used to
improve the fluency of the model. We lastly analyze fluency noise compared to
frequently appeared phrases in train corpus using simple statistics. Through
the analysis, we show that fluency noise can not be defined by just
frequentist approach.

Our main contributions are summarized as follows:

  * •

We directly show the existence of fluency noise in the translation benchmark
against the monolingual corpus.

  * •

Without any additional parameter or data augmentation, we outperform the
baseline translation model by just masking the input sentences partially.

  * •

We provides the qualitative analysis of fluency noise in our final model. We
expect the analysis can be a fine milestone to the studies in data-centric
translation field.

##  2 Related Works

Visualizing and understanding the composition of deep learning model has been
a big challenge regardless of its field. In NLP, Li et al. (2016) tried to
explain the importance of each word embedding with its gradient. Layer-wise
relevance propagation (LRP) (Binder et al., 2016), which is a measure to
compute the contribution of neurons, is also a good choice to analyze the
composition of the model (Voita et al., 2019). Recently, Wu and Ong (2021)
proves that the first-derivatives or LRP of the word embedding are both
excellent to extract the important words in sequence classification problem
using BERT (Devlin et al., 2019). Following the work, we extract fleuncy noise
from traind classifier by just calculating the norm of gradient for each
token.

Back-translation augmentation (Sennrich et al., 2016a) is a popular method
utilizing the monolingual data as the target sentences of translation model.
Since the decoder could learn to generate the monolingual sentences during the
training, the method has been used in many studies Edunov et al. (2018); Hoang
et al. (2018); Caswell et al. (2019) to compare or improve the fluency of the
model. Cai et al. (2021) also used the monolingual corpus as its translation
memory to retrieve the aligned target sentences. In our work, we only utilize
the monolingual data to modify the train data for masking, and detach it
during the translation process. We also show that our proposed method is
complementary to back-translation.

Figure 2: Overall framework for masking the given target sentence. The corpus
classifier is firstly trained on English sentences from both monolingual and
bilingual corpus. After the training is finished, we could get the gradient
norm of each token embedding in the target sentence as regard to the output
logit of the classifier. During the inference time, we mask the content words
and get the logit by only attending to function words. Lastly, we mask the
tokens whose gradient norm is over the average and use the masked target for
translation task instead of the original target.

Translationese can also be the topic related to our works. It refers to the
remaining artifact caused by translation process, including lexical difference
and more explicit or simpler representation (Baker et al., 1993). There has
been challenges to detect translationese by distinguishing the translated
sentences (Kurokawa et al., 2009), or predicting the source language from
given translations (Koppel and Ordan, 2011). Following the previous works,
Pylypenko et al. (2021) showed that BERT could catch the feature of
translationese with high correlation to the traditional hand-crafted features.
Riley et al. (2020) also trained the translationese classifier to tag the
sentences in training data to control the output translation. Our work is
quite similar to the detection of translationese. However, we exclude the
content words(adjectives, adverbs, nouns, and verbs) for masking since the
deletion of content words could cause the hallucination problem (Raunak et
al., 2021). We only focus on syntactic and function words in experiments,
without the consideration of lexical objects.

##  3 Experimental Setup

###  3.1 Data

We mainly conduct our experiments on WMT-14 German$\rightarrow$English
(DE$\rightarrow$EN), and WMT-14 Russian$\rightarrow$English
(RU$\rightarrow$EN) translation benchmarks. The dataset consists of 4.5M
sentence pairs for DE$\rightarrow$EN, and 2.5M sentence pairs for
RU$\rightarrow$EN.

For classification, we use the entire English sentences of bilingual corpus by
dividing 5K sentences for dev, and another 5K sentences for test. Then, we
sample the monolingual English sentences with the same ratio from News Crawl
2014. The number of tokens of each sampled sentence is set to be equal to each
sentence’s in bilingual corpus to avoid the length bias.

We also collect human-annotated test set generally used in translation task to
compare the difficulty of classification. The collection consists of 14K
English sentences from newstest2009-2013. We divide this set by each 1K
sentences for dev and test, and use the same strategy to build the benchmark
for classification.

Lastly, we evaluate our translation models on newstest2013 for dev, and
newstest2014 for test.

###  3.2 Corpus Classification

Training of the classifier is proceeded by binary classification, predicting
whether the given sentence comes from monolingual corpus or bilingual corpus.
For the use of huge linguistic prior, we select BERT (Devlin et al., 2019) for
our classification model. Similar to the works using BERT for sequence
classification (Pylypenko et al., 2021), the embedding of [CLS] token in last
layer is pooled and fed into linear projection. Since our final goal is to
find and mask the awkward tokens in the training data for translation, we have
a concern that masking content words would yield the misalignment of semantic,
which can cause the hallucination problem (Raunak et al., 2021). So we avoid
the problem by masking the content words111In our work, we define noun, verb,
adjective, and adverb as the content words. Others are defined as the function
words. during the inference of classifier. We have an expectation that the
model can distinguish the native-likeliness with only function words and its
position since they learn the semantic role during train time. The equation of
inference is summarized as follows :

$\displaystyle L_{t}^{m},\>L_{t}^{b}=f(X_{t},C_{t})$ (1)

$X_{t}$ refers to the token sequence of the target sentence, and $C_{t}$
refers to the content words in $X_{t}$. The classifier $f$ masks $C_{t}$
during the inference and calculates two output logits, $L_{t}^{m}$ and
$L_{t}^{b}$ for the prediction of monolingual and bilingual corpus. We will
use only $L_{t}^{b}$ for the extraction of noise in next section.

###  3.3 Noise Extraction

Following the prior work by Wu and Ong (2021), we can sort the input tokens by
their contributions to the output classification logit. Namely, the words with
high contribution to the prediction of bilingual text refer to the words seem
awkward compared to the monolingual text. We calculate the contribution score
by getting the first derivative of token embedding for bilingual logit
$L_{t}^{b}$, and taking the L2 norm on it. We denotes $G_{t}=\\{x\mid x\in
X_{t}\text{ and }x\notin C_{t}\\}$ is the candidate set consisting of tokens
which are substantially used for classification. Then, our selection is
defined as follows:

$\displaystyle F_{t}=\\{x\mid x\in G_{t}\text{ and
}\lVert{\partial{L_{t}^{b}}\over\partial{x}}\rVert\geq\bar{g_{t}}\\}$ (2)
$\displaystyle where\quad\bar{g_{t}}={1\over N}\sum_{x\in
G_{t}}\lVert{\partial{L_{t}^{b}}\over\partial{x}}\rVert$

We define fluency noise, which are the tokens distracting the given sentence
from being native-like, by denoting it as $F_{t}$. We only select the tokens
with higher gradient norm than its average to be included in $F_{t}$. We
exclud the symbol tokens for calculation such as [CLS] or [SEP].

###  3.4 Masked Translation

Finally, our translation model is trained with masked target sentence by
replacing the tokens in $F_{t}$ to <mask> symbol. The model doesn’t learn to
generate or attend to <mask> during train time. We also consider that fluency
noise can be not reliable if the corpus classifier lacks the confidence on its
result. So we set the confidence threshold $\gamma$ ranging from 0 to 1, to
mask only the sentences with higher classification likelihood than $\gamma$.
The likelihood is calculated via applying softmax to Equation (1). We
evaluated our final models using SacreBLEU Papineni et al. (2002); Post
(2018), with identification string on
footnote222nrefs:1—case:mixed—eff:no—tok:13a—smooth:exp—version:2.0.0”.

###  3.5 Implementation Details

For corpus classification, we use cased BERT-base model with a batch size of
128 on WMT-14 DE$\rightarrow$EN & RU$\rightarrow$EN, and a small batch size of
32 on newstest. We trained the large sets with 3 epochs, and the small sets
with 5 epochs. Since we does not consider the content words, we excludes Wiki-
Headlines data in WMT-14 RU$\rightarrow$EN, which is the set consisting of
phrase translations.

We use Transformer-Base (Vaswani et al., 2017) architecture for our
translation model, implemented in OpenNMT-
py333https://github.com/OpenNMT/OpenNMT-py. Byte-pair encodings (BPE)
(Sennrich et al., 2016b) is used as our tokenization strategy with 32K vocab
size, sharing the source and target dictionary. Following the previous work
(Sennrich et al., 2016b), we transliterate Russian texts into Latin with
ISO-9.

Note that since our methodology is model-agnostic, we can use other recent
models as our classifier (Liu et al., 2019) or translator Raffel et al.
(2019); Liu et al. (2020).

##  4 Results

###  4.1 Corpus Classification

Since the performance of corpus classification determines the difficulty of
distinguishing the sentences from bilingual corpus, we could directly compare
the train (DE$\rightarrow$EN or RU$\rightarrow$EN) set to the human-annotated
test (newstest) set of translation task. Table 1 shows the accuracy of corpus
classifier. The result shows that sentences from bilingual corpus are quite
distinguishable, which is complementary to prior works of translationese
Koppel and Ordan (2011); Pylypenko et al. (2021). For fair comparison, we also
conduct the experiment on the shrunk set of DE$\rightarrow$EN and
RU$\rightarrow$EN of which the size is equal to newstest. We could check that
the shrunk settings outperform the model trained on newstest by 4.8-7.7%. In
other words, the sentences in newstest are much harder to distinguish from
monolingual texts although the experimental setting is equal.

From | Trained on | # sents | Accuracy
---|---|---|---
DE$\rightarrow$EN | Full | 8,997,570 | 95.8
Small | 24,040 | 90.1
RU$\rightarrow$EN | Full | 4,069,180 | 92.0
Small | 24,040 | 87.2
newstest | Full | 24,040 | 82.4

Table 1:  Accuracy of corpus classifier. Each train set consists of mixed
sentences from bilingual corpus and monolingual corpus with the same ratio.
Full : Full sentences used. Small : Number of sentences in the train data gets
smaller to be equal to the size of newstest.

###  4.2 Masked Translation

Our main results on translation task are reported in Table 2. As we discussed
in Section 3.4, the confidence threshold $\gamma$ is used to filter the
sentences to mask fleuncy noise or not. We search $\gamma$ in range of
{$0.5,0.7,0.8,0.9,1.0$}. $\gamma=1.0$ means that no masking is used for
translation, and we deal with this setting as our baseline. We derive the
classification likelihood for each sentence from the classifier trained in
Section 4.1.

For DE$\rightarrow$EN, we show that all masking strategies are effective to
outperform the baseline. BLEU is generally proportional to $\gamma$ before it
reaches to $1.0$. However, we confirm that excessive filtering is not helpful
since the maximum score is acquired at $\gamma=0.8$.

For RU$\rightarrow$EN, the model with $\gamma=0.5$ gets lower score than the
baseline. Since the classification model is more calibrated than
DE$\rightarrow$EN’s, it leads to much higher ratio of masking. However, this
degradation disappears by raising the threshold. Interestingly, the model
keeps the score of its baseline despite the deletion of up to 8.8% of entire
tokens. The score reaches at its peak when $\gamma$ equals to $0.9$.

We could notice that the adjustment of $\gamma$ is required and the proper
value depends on the confidence of trained classifier. Since finding $\gamma$
is somewhat exhaustive, it is worthy to define which parts of our benchmark is
harmful to translation model. We also discuss about fluency noise of our final
models in Section 5.3.

|  $\gamma$ | Mask Ratio | BLEU
---|---|---|---
Sentence | Token
DE$\rightarrow$EN | 1.0 | 0.0 % | 0.0 % | 30.0
0.9 | 12.6 % | 1.8 % | 30.8
0.8 | 17.6 % | 2.9 % | 31.0
0.7 | 25.4 % | 4.6 % | 30.6
0.5 | 58.6 % | 4.7 % | 30.5
RU$\rightarrow$EN | 1.0 | 0.0 % | 0.0 % | 32.2
0.9 | 17.1 % | 3.6 % | 33.2
0.8 | 28.6 % | 6.3 % | 32.6
0.7 | 41.2 % | 8.8 % | 32.2
0.5 | 71.8 % | 13.2 % | 31.5
Table 2:  BLEU score for models trained on WMT-14 DE$\rightarrow$EN and
RU$\rightarrow$EN. $\bm{\gamma}$ : confidence threshold defined in Section
3.4. Mask Ratio (Sentence) : the ratio of sentences with higher classification
likelihood than $\gamma$. Mask Ratio (Token) : the ratio of masked tokens to
the entire tokens in train data.

##  5 Analysis

###  5.1 Compatibility with Back Translation

Back-translation method (Sennrich et al., 2016a) deals with several points
similar to our work. By utilizing the monolingual data as target sentences, it
improves the general fluency of translation model. Our method is the deletion
of fluency noise which is the awkward point in given sentence compared to
monolingual corpus. We can suppose if fluency noise is far away from the
distribution of monolingual prior, it can disturb the regularization of back-
translation method and debiasing it would be helpful.

In Table 2, we conduct the experiments with the augmentation of back-
translated data to the original benchmark and our masked benchmark. We use the
data444https://data.statmt.org/rsennrich/wmt16_backtranslations published by
Sennrich et al. (2016a). Surprisingly, our masked benchmarks could also
harness the effectiveness of back-translation. The performance improvement is
equal to the original baseline on RU$\rightarrow$EN, and even amplified from
$1.4$ to $1.9$ BLEU on DE$\rightarrow$EN. The results show that our masking
and back-translation data focus on each different factor during train time,
and both of them are also complementary.

Trained on | DE-EN | RU-EN
---|---|---
Original | 30.0 | 32.2
\+ back translation | 31.4 | 33.3
Masked | 31.0 | 33.2
\+ back translation | 32.9 | 34.2
Table 3:  BLEU score for models trained with additional back-translation data.
Masked : benchmark with our masking strategy whose performance in Table 2 is
the best.

###  5.2 Ablation of Content Words

| Trained on | # sents | Accuracy
---|---|---|---
DE$\rightarrow$EN | w/o content | 8,997,570 | 86.2
$\llcorner$ Small | 24,040 | 79.9
RU$\rightarrow$EN | w/o content | 4,069,180 | 81.1
$\llcorner$ Small | 24,040 | 78.6
newstest | w/o content | 24,040 | 68.9

Table 4:  Accuracy of corpus classifier trained on the data with masking on its content words. The composition of corpus is equal to the setting in Table 1.  DE-EN | RU-EN
---|---
phrase | $I$ | Mask Ratio | phrase | $I$ | Mask Ratio
. - ( NOUN | 2.63 | 98.2% | you by NOUN - | 3.41 | 0.9%
the NOUN ’ s | 2.63 | 43.6% | them to us . | 3.41 | 0.1%
$[$ $[$ NOUN NOUN | 2.62 | 17.4 % | as ADJ as ADJ | 3.40 | 0.2%
I should VERB to | 2.61 | 5.1% | Above you can VERB | 3.40 | 0.1%
When would you VERB | 2.60 | 0.00% | to you by NOUN | 3.40 | 0.4%
– | 1.43 | 99.9% | – | 1.54 | 99.6%
‘ | 1.89 | 99.9% | ‘ | 0.98 | 99.6%
“ | 1.13 | 98.7% | ” | 2.02 | 98.2%
« | 0.55 | 98.5% | “ | 1.96 | 96.5%
» | 0.95 | 97.5% | « | 2.71 | 95.8%
Table 5:  Comparison between the frequently appeared phrases and fluency noise
in our best model. Mask Ratio : the percentage of how many tokens in given
phrase pattern is used as fluency noise in our masked benchmark. POS tag is
ignored for calculation. Upper the mid-line, we sorted 4-gram phrases by its
importance score $I$, defined in Equation 3. Below, we sorted uni-gram phrases
by its Mask Ratio.

There could be a concern that the classification model is biased on the
content words, and the function words would not have much influence on its
accuracy. We can’t deny that content words are important factors to
distinguish sentences, however we also prove that the model can predict the
source of sentence with only the function words to some extent.

Table 4 shows the accuracy of classifiers trained with masking on content
words of training data. We also report the result on the shrunk set to compare
with newstest, too. Despite the lower performance than the result in Table 1,
we could notice that our corpus classifier also benefits from the syntactic
order of function words or their positions with the accuracy of 81.1-86.2%.
Interestingly, the performance drop on newstest is the biggest compared to
Table 1, meaning that the evidence of classification in newstest is relatively
concentrated on the semantic of sentence, not its structure.

###  5.3 Fluency Noise

In this section, we discuss about fluency noise to visually analyze what
tokens disturb the training of translation. We demonstrate the specifically
frequent n-gram phrases in each translation benchmark, and confirm which
phrases are substantially selected as fluency noise.

We may define fluency noise as several patterns appearing in training corpus.
Then can we catch the patterns with only heuristic statistics? We prepare the
answer by using simple frequent-based method to detect the unique and specific
patterns in each benchmark. Therefore, we define the importance score of given
n-gram phrase $p$ in corpus $C$ as follows :

$\displaystyle P(p\mid C)={\\#p\text{ }in\text{ }C\over\sum_{p^{\prime}\in
C}\\#p^{\prime}\text{ }in\text{ }C}$ (3) $\displaystyle I(p\mid C)={P(p\mid
C)\over P(p)}$

For given all benchmarks, we can get the probability of $P(p\mid C)$ by taking
the sum of the counts of all n-gram $p^{\prime}$ in C as the denominator. We
also get the prior of n-gram feature without the consideration of corpus, and
this would be $P(p)$. We define the importance score $I(p\mid C)$ by just
dividing the n-gram probability of given corpus by its prior. The term is
similar to Pointwise Mutual Information (PMI), but we don’t consider the size
of each corpus (e.g. $P(C)$) since we set them equal.

phrase | From | Mask Ratio
---|---|---
And it VERB to | DE-EN | 40.2%
towards a ADJ NOUN | DE-EN | 15.4%
its NOUN of NOUN | RU-EN | 28.4%
NOUN shall be VERB | RU-EN | 43.0%
Table 6:  Examples of 4-gram phrases not including special tokens. The
experimental setting is the same as Table 5.

Source | „Die Stadt ist definitiv in der Comedy-DNA von Larrys gesamter Arbeit“, sagte Steinberg.
---|---
Baseline | “The city is definitely in Larry’s Comedy DNA,” said Steinberg.
Ours | "The city is definitely in the comedy DNA of Larry’s entire work," said Steinberg.
Source | Nathaniel P. Morris ist Student im zweiten Jahr an der Harvard Medical School.
Baseline | Nathaniel P. Morris is a student at Harvard Medical School in the second year.
Ours | Nathaniel P. Morris is a second-year student at Harvard Medical School.

Table 7:  Examples of translation output in WMT-14 DE$\rightarrow$EN test set.

We extract 1M sentences from each 3 corpus : two bilingual corpus from WMT-14
DE$\rightarrow$EN & WMT-14 RU$\rightarrow$EN, and one monolingual corpus from
News Crawl 2014. We select uni-gram and 4-gram phrases to calculate the
importance score respectively. For convenience to visualize, we replace the
content words with its POS tag. We filtered the phrases which appeared less
than 1K times. Lastly, we measure the percentage of how many times the phrases
are substantially masked by our methodology, considering the entire examples
as the population. The result of analysis is demonstrated in Table 5. To begin
with the conclusion, we find that fluency noise is not directly correlated to
the frequency of phrases in given corpus. Each of top-5 results with almost
same importance score has polarized chance to be masked. However, the uni-gram
tokens sorted by their mask percentage consist of almost special characters
including dash or left-right quotation marks. We guess this phenomenon occurs
due to the monolingual prior of BERT. Since BERT is already pre-trained on
huge monolingual corpus, the common English words such as would or us are hard
to be the evidence of the classification. On the other hand, special
characters like right-single quotation mark tends to be the evidence since the
quotation marks are generally written as neutral in English texts.

Of course, it doesn’t mean that only special tokens are harmful for
translation. In Table 6, various phrases which are not including special
tokens are masked with 15-40% of ratio. Although the same pattern of specific
phrase can be used to several different sentences, the awkwardness determined
by our corpus classifier could differ. The point to focus on is that masking
fluency noise helps the translation model not to strictly align the function
words, which may not follow the prior of monolingual corpus.

##  6 Case Study

In Table 7, we bring the examples that our final model gets better score than
the baseline. Upper example shows the effect of automatic regularization that
our model is not affected by special tokens frequently used in source
language, such as low- or left- quotation marks. Another example demonstrates
our model is free from the strict alignment of function words which may be
uncommon in monolingual English texts.

##  7 Reliability of BLEU

BLEU (Papineni et al., 2002) has been widely used as the standard evaluation
metric in translation task. However, the metric calls many researchers in
doubt since it isn’t often correlated to human evaluation Mathur et al.
(2020); Riley et al. (2020). There has also been studies about the replacement
of current metric Sellam et al. (2020); Rei et al. (2020).

Nonetheless, the request of human evaluation for each work of translation is
not efficient and coherent due to its implicit standard and the variance of
annotators. For that reason, we claim that we should need to consider the
ability of what BLEU could measure and the uncertainty of what BLUE could not
detect, respectively. The case studies in Table 7 shows that the semantic of
target samples is not much different from the source sentence’s. If the
purpose of evaluation is just focused on the transfer of semantic, we may give
them the almost equal score. However, the final goal of machine translation is
to make the output sentence as close as possible to the distribution of test
benchmark. The distribution would diverge by its text domain, nationality, and
other relative factors.

Back to the beginning, it is the fact that BLEU has the lack of ability to
evaluate the equality of semantic. Apart from the flaw of the metric, we
should also talk about if BLUE can judge whether the generated sentence of
translation model is well adapted to the test distribution. Data-centric
approach would be one of the solution to suit our desire. As Freitag et al.
(2020) reported, the correlation between BLEU and human evaluation is enhanced
by increasing the variance of the reference text in the test set. In our work,
we instead regulate the train set to be similar to the monolingual prior which
is closer to the test distribution. We argue that BLEU is still effective for
evaluating the degree of this adaptation, such as neutral quotation marks or
second-year student in Table 7.

##  8 Conclusion and Discussion

In this work, we tackle the bias hurting the fluency of model in training
corpus. The bias would be uncountable and differ by its source language, the
purpose of translation, the nationality of speaker, etc. However, we train the
classifier and automatically detect the bias of fluency comparing to
monolingual texts. The extracted bias with high confidence of classifier are
masked during the translation, and it is effective enough to enhance the
quality of our translation model. Throughout the analysis, we prove that the
bias is concentrated on the representations which may be uncommon in
monoligual English texts including special characters. We also discuss about
the topic that our methodology could be applied to.

#### Low-Resource Setting

As our work only targets rich-resource benchmarks, we can conduct the same
experiment on low-resource setting. Since utilizing monolingual data (Currey
et al., 2017) or language model prior (Baziotis et al., 2020) to regularize
the low-resource translation model has been worked, our method can also follow
the prior knowledge of them. However, our corpus classifier needs enough
training data to distinguish and it would be the main challenge whether the
classifier can properly be trained on the small amount of low-resource
benchmarks.

#### Domain Adaptation

As the studies of using out-of-domain data in translation task have been
worked Aharoni and Goldberg (2020); Müller et al. (2020), our method would be
used to find the domain bias in augmented train sentences. Since fluency noise
is only defined in the range of function words against the monolingual data,
we could expand it to find the tokens which are uncommon in the target domain.
If the range of definition starts to include the content words, preventing the
hallucination problem would be the main concern to solve.

## Acknowledgements

This research was supported by (1) National Research Foundation of Korea (NRF-
2020R1A2C3010638), (2) the MSIT (Ministry of Science and ICT), Korea, under
the ICT Creative Consilience program (IITP-2021-2020-0-01819) supervised by
the IITP (Institute for Information & communications Technology Planning &
Evalua- tion).

## References

  * Aharoni and Goldberg (2020) Roee Aharoni and Yoav Goldberg. 2020.  Unsupervised domain clusters in pretrained language models.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 7747–7763.
  * Baker et al. (1993) Mona Baker, Gill Francis, and Elena Tognini-Bonelli. 1993.  Corpus linguistics and translation studies: Implications and applications.  _Text and Technology: In Honour of John Sinclair_ , pages 233–250.
  * Bañón et al. (2020) Marta Bañón, Pinzhen Chen, Barry Haddow, Kenneth Heafield, Hieu Hoang, Miquel Esplà-Gomis, Mikel L. Forcada, Amir Kamran, Faheem Kirefu, Philipp Koehn, Sergio Ortiz Rojas, Leopoldo Pla Sempere, Gema Ramírez-Sánchez, Elsa Sarrías, Marek Strelec, Brian Thompson, William Waites, Dion Wiggins, and Jaume Zaragoza. 2020.  ParaCrawl: Web-scale acquisition of parallel corpora.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 4555–4567.
  * Baziotis et al. (2020) Christos Baziotis, Barry Haddow, and Alexandra Birch. 2020.  Language model prior for low-resource neural machine translation.  In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pages 7622–7634.
  * Binder et al. (2016) Alexander Binder, Grégoire Montavon, Sebastian Bach, Klaus-Robert Müller, and Wojciech Samek. 2016.  Layer-wise relevance propagation for neural networks with local renormalization layers.  In _International Conference on Artificial Neural Networks_ , pages 63–71.
  * Cai et al. (2021) Deng Cai, Yan Wang, Huayang Li, Wai Lam, and Lemao Liu. 2021.  Neural machine translation with monolingual translation memory.  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 7307–7318.
  * Caswell et al. (2019) Isaac Caswell, Ciprian Chelba, and David Grangier. 2019.  Tagged back-translation.  In _Proceedings of the Fourth Conference on Machine Translation (Volume 1: Research Papers)_ , pages 53–63.
  * Cettolo et al. (2012) Mauro Cettolo, Christian Girardi, and Marcello Federico. 2012.  WIT3: Web inventory of transcribed and translated talks.  In _Proceedings of the 16th Annual conference of the European Association for Machine Translation_ , pages 261–268.
  * Clark et al. (2021) Elizabeth Clark, Tal August, Sofia Serrano, Nikita Haduong, Suchin Gururangan, and Noah A. Smith. 2021.  All that’s ‘human’ is not gold: Evaluating human evaluation of generated text.  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 7282–7296.
  * Currey et al. (2017) Anna Currey, Antonio Valerio Miceli Barone, and Kenneth Heafield. 2017.  Copied monolingual data improves low-resource neural machine translation.  In _Proceedings of the Second Conference on Machine Translation_ , pages 148–156.
  * 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.
  * Edunov et al. (2018) Sergey Edunov, Myle Ott, Michael Auli, and David Grangier. 2018.  Understanding back-translation at scale.  In _Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing_ , pages 489–500.
  * Freitag et al. (2020) Markus Freitag, David Grangier, and Isaac Caswell. 2020.  BLEU might be guilty but references are not innocent.  In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pages 61–71.
  * Goutte et al. (2012) Cyril Goutte, Marine Carpuat, and George Foster. 2012.  The impact of sentence alignment errors on phrase-based machine translation performance.  In _Proceedings of the 10th Conference of the Association for Machine Translation in the Americas: Research Papers_.
  * Hoang et al. (2018) Vu Cong Duy Hoang, Philipp Koehn, Gholamreza Haffari, and Trevor Cohn. 2018.  Iterative back-translation for neural machine translation.  In _Proceedings of the 2nd Workshop on Neural Machine Translation and Generation_ , pages 18–24.
  * Koehn (2005) Philipp Koehn. 2005.  Europarl: A parallel corpus for statistical machine translation.  In _Conference Proceedings: the tenth Machine Translation Summit_ , pages 79–86.
  * Koppel and Ordan (2011) Moshe Koppel and Noam Ordan. 2011.  Translationese and its dialects.  In _Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies_ , pages 1318–1326.
  * Kurokawa et al. (2009) David Kurokawa, Cyril Goutte, and Pierre Isabelle. 2009.  Automatic detection of translated text and its impact on machine translation.  In _Proceedings of Machine Translation Summit XII: Papers_.
  * Li et al. (2016) Jiwei Li, Xinlei Chen, Eduard Hovy, and Dan Jurafsky. 2016.  Visualizing and understanding neural models in NLP.  In _Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pages 681–691.
  * Liu et al. (2020) Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov, Marjan Ghazvininejad, Mike Lewis, and Luke Zettlemoyer. 2020.  Multilingual denoising pre-training for neural machine translation.  _Transactions of the Association for Computational Linguistics_ , 8:726–742.
  * 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_.
  * Mathur et al. (2020) Nitika Mathur, Timothy Baldwin, and Trevor Cohn. 2020.  Tangled up in BLEU: Reevaluating the evaluation of automatic machine translation evaluation metrics.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 4984–4997.
  * Miao et al. (2021) Mengqi Miao, Fandong Meng, Yijin Liu, Xiao-Hua Zhou, and Jie Zhou. 2021.  Prevent the language model from being overconfident in neural machine translation.  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 3456–3468.
  * Müller et al. (2020) Mathias Müller, Annette Rios, and Rico Sennrich. 2020.  Domain robustness in neural machine translation.  In _Proceedings of the 14th Conference of the Association for Machine Translation in the Americas (Volume 1: Research Track)_ , pages 151–164.
  * Papineni et al. (2002) Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002.  Bleu: a method for automatic evaluation of machine translation.  In _Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics_ , pages 311–318.
  * Post (2018) Matt Post. 2018.  A call for clarity in reporting BLEU scores.  In _Proceedings of the Third Conference on Machine Translation: Research Papers_ , pages 186–191.
  * Pylypenko et al. (2021) Daria Pylypenko, Kwabena Amponsah-Kaakyire, Koel Dutta Chowdhury, Josef van Genabith, and Cristina España-Bonet. 2021.  Comparing feature-engineering and feature-learning approaches for multilingual translationese classification.  In _Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing_ , pages 8596–8611.
  * Raffel et al. (2019) Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2019.  Exploring the limits of transfer learning with a unified text-to-text.  _arXiv preprint arXiv:1910.10683_.
  * Raunak et al. (2021) Vikas Raunak, Arul Menezes, and Marcin Junczys-Dowmunt. 2021.  The curious case of hallucinations in neural machine translation.  In _Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pages 1172–1183.
  * Rei et al. (2020) Ricardo Rei, Craig Stewart, Ana C Farinha, and Alon Lavie. 2020.  COMET: A neural framework for MT evaluation.  In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pages 2685–2702.
  * Riley et al. (2020) Parker Riley, Isaac Caswell, Markus Freitag, and David Grangier. 2020.  Translationese as a language in “multilingual” NMT.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 7737–7746.
  * Sellam et al. (2020) Thibault Sellam, Dipanjan Das, and Ankur Parikh. 2020.  BLEURT: Learning robust metrics for text generation.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 7881–7892.
  * Sennrich et al. (2016a) Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016a.  Improving neural machine translation models with monolingual data.  In _Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 86–96.
  * Sennrich et al. (2016b) Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016b.  Neural machine translation of rare words with subword units.  In _Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 1715–1725.
  * Vaswani et al. (2017) Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017.  Attention is all you need.  In _Advances in Neural Information Processing Systems_ , pages 5998–6008.
  * Voita et al. (2019) Elena Voita, David Talbot, Fedor Moiseev, Rico Sennrich, and Ivan Titov. 2019.  Analyzing multi-head self-attention: Specialized heads do the heavy lifting, the rest can be pruned.  In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_ , pages 5797–5808.
  * Wu and Ong (2021) Zhengxuan Wu and Desmond C. Ong. 2021.  On explaining your explanations of BERT: an empirical study with sequence classification.  _arXiv preprint arXiv:2101.00196_.


[figure]subcapbesideposition=top

# Nonlinear response of telecom-wavelength superconducting single-photon
detectors

Patrick Mark<EMAIL_ADDRESS>Sebastian Gstir  Julian Münzberg
Gregor Weihs  Robert Keil  Department of Experimental Physics, University of
Innsbruck, Technikerstraße 25, 6020 Innsbruck, Austria<EMAIL_ADDRESS>
###### Abstract

We measure the nonlinearity of a telecom-wavelength superconducting nanowire
single-photon detector via incoherent beam combination. At typical photon
count rates and detector bias current, the observed relative deviation from a
perfectly linear response is in the order of $0.1\text{\,}\mathrm{\char
37\relax}$ when the flux is doubled. This arises from a balance between the
counteracting nonlinearities of deadtime-induced detector saturation and of
multi-photon detections. The observed behaviour is modelled empirically, which
suffices for a correction of measured data. In addition, statistical
simulations, taking into account the measured recovery of the detection
efficiency, provide insight into possible mechanisms of multi-photon
detection.

††preprint: AIP/123-QED

SNSPD

    superconducting nanowire single-photon detector
PD

    photo diode
NL

    nonlinearity
ND

    neutral density
SLED

    super-luminescent light emitting diode
TPD

    two-photon detection
SDE

    system detection efficency
SEM

    standard error of mean
ACEM

    autocorrelation corrected error of mean
DMM

    digital multi-meter
FWHM

    full width half maximum

##  I Introduction

The efficient detection and counting of single photons is an enabling
technology for experiments testing the fundamental principles of quantum
mechanics Christensen  _et al._ (2013); Shadbolt  _et al._ (2014), for
photonic quantum information processing Prevedel  _et al._ (2007); Kok (2016);
Flamini, Spagnolo, and Sciarrino (2018), as well as for specific applications
such as correlated photon-pair spectroscopy Whittaker  _et al._ (2017); Losero
_et al._ (2018). Superconducting nanowire single-photon detectors (SNSPDs)
have revolutionised this process by providing efficient and highly time-
resolved detection at a wide range of optical wavelengths Gol’tsman  _et al._
(2001); Eisaman  _et al._ (2011); Hadfield and Johansson (2016). These include
the infrared optical telecom bands around $1550\text{\,}\mathrm{nm}$, which
are preferentially used in fiber-based quantum communication and quantum
networks due to their minimal loss at these wavelengths Maring  _et al._
(2017); Chen  _et al._ (2020); Wei  _et al._ (2022); van Leent  _et al._
(2022). SNSPDs work via a phase transition between the superconducting and
normal conducting state triggered by the absorption of a photon, which can be
measured as a voltage pulse across the nanowire.

Linearity is a working assumption of any ideal photodetector, i.e., one
assumes that the number of incident photons is proportional to the number of
detection events. This is clearly an idealisation as real detectors exhibit
nonlinearities. As a consequence, real detectors suffer from a systematic,
count-rate dependent deviation from the ideal linear behaviour, which biases
all photon-counting measurements. This can be particularly harmful in
comparative measurements with countrates varying over a large dynamic range,
as arising in quantum state tomography James  _et al._ (2001); Altepeter,
Jeffrey, and Kwiat (2005) or in experimental tests of quantum physics Söllner
_et al._ (2011); Kauten  _et al._ (2017); Rozema  _et al._ (2021); Vogl  _et
al._ (2021); Gstir  _et al._ (2021); Gstir (2023). Therefore, a precise
characterisation of nonlinearities as a function of the incident photon rate
is essential to allow for a calibration or compensation of this effect.

For SNSPDs two processes can be expected to produce substantial nonlinear
contributions: Dead-time and multi-photon detection. The former arises from
the finite recovery time of the supercurrent in the nanowire after a
transition Kerman  _et al._ (2006). This leads to a saturation characteristic,
which manifests in a sublinear growth of the detection rate for increasing
input photon flux, see Fig. 1. The corresponding effect in avalanche detectors
has been widely investigated Ware  _et al._ (2007); Kornilov (2014); Kauten
_et al._ (2014); Hloušek, Straka, and Ježek (2023). Multi-photon detection, on
the other hand, can arise when a single photon fails to trigger a detection,
but multiple arriving photons suffice to cause a phase transition Zhou  _et
al._ (2013); Marsili  _et al._ (2016). The likelihood of such multi-photon
detection events grows polynomially with the input flux, such that this effect
will lead to a supralinear behaviour, see Fig. 1 for an exemplary
illustration.

The nonlinearity of detectors is often studied via the superposition method,
which operates on the principle of additive intensities in incoherent beam-
combination setups Coslovi and Righini (1980). These studies have allowed for
a quantitative analysis of the detector dead-time and the associated
saturation in avalanche photodiodes, modelling this effect by a simple step-
like detector recovery Kauten  _et al._ (2014); Hloušek, Straka, and Ježek
(2023). The superposition method was also used to investigate SNSPDs at near-
infrared wavelengths (around $800\text{\,}\mathrm{nm}$), revealing intricate
dynamics containing both, sub- and supralinear behaviour as a function of
photon flux and detector bias current Hloušek, Straka, and Ježek (2023). The
origin of these dynamics could, so far, not be determined.

In this work, we investigate the nonlinearity of an SNSPD at telecom
wavelengths via the superposition method. For the default bias current, which
sets a good compromise between detection efficiency and dark count rate, we
observe a slight supralinear trend for low-to-intermediate count rates (up to
$300\text{\,}\mathrm{k}\mathrm{H}\mathrm{z}$), whereas sublinear saturation
dynamics takes over for larger count rates. Via a variation of the bias
current, we can attribute these nonlinearities to an interplay of detector
dead time and multi-photon detection, in particular two-photon detection. In
addition, we go beyond a simple step-function model of the dead time by
directly measuring the detector’s temporal recovery profile Autebert  _et al._
(2020). Taking into account this measured recovery profile, we model the
multi-photon detections via the temporal dynamics of overlapping resistive hot
spots in Monte-Carlo simulations. We also consider the rate-dependent
detection efficiency induced by AC-biasing Kerman  _et al._ (2013); Ferrari
_et al._ (2019) and show that this effect has only a minor influence in our
setting.

##  II Experimental procedure

This experiment is based on the superposition method Coslovi and Righini
(1980); Kauten  _et al._ (2014); Hloušek, Straka, and Ježek (2023) and
schematically illustrated in Fig. 1. Light from a superluminescent diode
(SLED; central wavelength $1528\text{\,}\mathrm{nm}$, FWHM bandwidth
$90\text{\,}\mathrm{nm}$) is equally split into two paths $1$ and $2$, which
can be individually blocked by shutters $S_{1(2)}$. One of the output modes of
the recombining beam splitter is then fiber-coupled and detected by the device
under test. In order to avoid any interference effects, the two beam paths
have a length difference of $\Delta l=$26\text{\,}\mathrm{cm}$$ much greater
than the coherence length of the light source
($26\text{\,}\mathrm{\SIUnitSymbolMicro}\mathrm{m}$). Then the photon fluxes
of the two paths $\phi_{1(2)}$, which are incident on the detector, add up
incoherently as $\phi_{1}+\phi_{2}=\phi_{1+2}$, with $\phi_{1+2}$ denoting the
combined photon flux for both shutters being open.

Let the detected photon flux be $\hat{\nu_{i}}=f(\phi_{i})$, with the
(unknown) detector transfer function $f$ and shutter setting $i=1,2,1+2$. We
subtract the background $\nu_{0}$, i.e. the registered flux for both shutters
being closed, from the raw measured signal to obtain the background-corrected
detected flux $\nu_{i}=\hat{\nu_{i}}-\nu_{0}$. Following the superposition
method, one can obtain the residuum $r$ 111Note that the sign of the residuum
$r$ in Eq. 1 is here chosen opposite to Ref. Kauten  _et al._ , 2014.

$r=\nu_{1}+\nu_{2}-\nu_{1+2},$ (1)

as a measure for the nonlinearity of the detector setup. Additionally, Eq. (1)
can be divided by $\nu_{1+2}$ to obtain a dimensionless expression $\Delta$
for the nonlinearity Hloušek, Straka, and Ježek (2023):

$\Delta=\frac{r}{\nu_{1+2}}=\frac{\nu_{1}+\nu_{2}}{\nu_{1+2}}-1.$ (2)

A perfectly linear detector response would give $\Delta=0$ at all photon flux
levels, whereas $\Delta>0$ and $\Delta<0$ would indicate a sub- and
supralinear response, respectively.

To measure the nonlinearity for different values of the combined photon flux
$\phi_{1+2}$, we use a half-wave plate (HWP) set at angle $\alpha_{i}$ and a
linear polariser (see left side in Fig. 1) to realise equidistant power steps
$P_{i}=P_{0}\cdot\cos^{2}(2\alpha_{i})$.

[] []

[]

Figure 1: Linear vs. nonlinear detector response functions and schematic of
the measurement setup. (a) A sublinear detector response (red) as arising via
saturation effects. (b) A supralinear response (blue), as produced by multi-
photon detection. (c) Layout of the experimental setup implementing the
superposition method. To maintain constant polarisation, polarisation-
maintaining (PM) fibers are used to couple light in and out of the setup. BS:
beam splitter, HWP: half-wave plate. ND: Neutral density filter

The HWP is mounted on a motorised rotation stage to automatically set
different power levels for the measurement. The two shutter mechanisms are
realised via metal plates on motorised stages, which rotate the plates into
and out of their respective beam path. The polarisation of the fiber-coupled
output signal is controlled via a 3-paddle fiber polarisation controller (not
shown in the figure) maximising the detected signal of the polarisation-
sensitive SNSPDs.

As detector we investigate a commercially available SNSPD with a NbTiN
nanowire in a closed-cycle cryostat operating at $2.9\text{\,}\mathrm{K}$
(Single Quantum EOS 720 CS) optimised for telecom wavelengths around
$1550\text{\,}\mathrm{nm}$, together with a time tagger device (Swabian
instruments). Neutral density (ND) filters are used to attenuate the SLED
signal to a power level compatible with the SNSPD, in particular keeping the
detected count rate below $600\text{\,}\mathrm{k}\mathrm{H}\mathrm{z}$ to
prevent latching. The default bias current for this detector is
$I_{\mathrm{b}}=$22\text{\,}\mathrm{\SIUnitSymbolMicro A}$$, which is used in
all measurements, unless otherwise stated. For each input flux level set by
the HWP rotation angle, we measure the nonlinearity repeatedly over $60$
cycles of shutter settings ($i=0,1,2,1+2$) with an integration time of
$10\text{\,}\mathrm{s}$ per setting.

##  III Analysis of Results

Within this section a detailed analysis of the experimental data is given. The
results are displayed in Fig. 2 as a function of the measured background-
corrected countrate with both paths open $\nu_{1+2}$. The grey dots show the
obtained residual $\Delta$ for each of the $60$ cycles and demonstrate the
spread of the individual measurements due to shot noise. The average for each
countrate (red dots) reveals a systematic trend of these residuals, initially
slightly towards negative values (where the sum of the single-path signals is
smaller than the combined signal), reversing to positive values (vice versa)
for countrates above $300\text{\,}\mathrm{k}\mathrm{H}\mathrm{z}$. In the next
subsection, we model the observed dynamics via the known nonlinear processes
of detector dead time and two-photon detection.

Figure 2:  Nonlinearity measurement (Residuum $\Delta$) of the SNSPD for
default detector settings. The gray dots indicate single measurements whereas
the red dots show the average for each countrate. The uncertainty bars are
given by the standard error of mean. The blue lines are two different analytic
transfer function models [Eq. (3), dotted line, and Eq. (6), dashed line]
fitted and applied to the residuum. The black solid line shows the dead time
model transfer function [Eq. (3)] with a dead time of
$30\text{\,}\mathrm{ns}$.

###  III.1 Analytic transfer function models

A commonly used model for describing the nonlinearity of a single-photon
detector considers the dead time $\tau$ after successfull registration of a
photon. Such dead times are naturally present in all avalanche detectors, but
are also unavoidable in superconducting nanowires, as the recovery of the
supercurrent after a detection event requires a finite time, which is
specified by the manufacturer for our system as
$\tau\approx$30\text{\,}\mathrm{ns}$$. The dead time leads to an effective
saturation of the detector and can, in its simplest form, be modelled by a
step-like recovery, leading to a detector transfer function Kauten  _et al._
(2014)

$\hat{\nu_{i}}=f(\phi)\approx\nu=\frac{\phi}{1+\tau\phi}.$ (3)

We make here the approximation that the background event rate $\nu_{0}$ is
much smaller than the photon fluxes in the range of interest, such that their
contribution to the detector saturation can be neglected. This assumption is
well satisfied in our case, where $\nu_{0}\lesssim$350\text{\,}\mathrm{Hz}$$
(arising mostly from detector dark counts) and $\phi$ is in the order of tens
to hundreds of $\mathrm{kHz}$. We have also tested more elaborate transfer
functions taking into account the background contribution, similar to Eq. (2)
in Ref. Hloušek, Straka, and Ježek, 2023, but found no significant influence
on the fits to the experimental data of Fig. 2. Assuming equal photon fluxes
from both paths $\phi_{1}=\phi_{2}$ and $\phi_{1}+\phi_{2}=\phi_{1+2}$ (i.e.
the fluxes do superimpose in reality) leads to the following explicit function
for the normalised residuum (see appendix A for a derivation)

$\Delta=\frac{2}{2-\tau\nu_{1+2}}-1.$ (4)

We use this equation to fit the dead time model to the measured data as shown
in Fig. 2 (blue dotted line). This theoretical prediction does not match our
data and, thus, the fitted parameter $\tau=$2.10(7)\text{\,}\mathrm{ns}$$
cannot be representative for the real dead time in our system. Also a dead
time model with the expected parameter $\tau=$30\text{\,}\mathrm{ns}$$ (black
line) does not match our data. In fact, it would predict a much steeper rise
of the residuum. This implies that in our system the observed nonlinearity is
much smaller than expected from a dead time in the order of tens of
$\mathrm{n}\mathrm{s}$. This suggests that the count rate saturation due to
detector dead time is counteracted by another nonlinear effect with opposite
sign.

One explanation for a second nonlinear phenomenon is the occurrence of two-
photon detection (TPD) events Marsili  _et al._ (2016). Empirically, this
effect can be modelled as

$f(\phi)\approx\nu=\phi+\epsilon\phi^{2},$ (5)

where again the detector saturation due to dark counts is neglected and
$\epsilon$ describes an effective time interval within which two incident
photons trigger a detection. This effect on its own would lead to purely
negative values for $\Delta$. Combining the two transfer functions of the dead
time model Eq. (3) and the TPD model Eq. (5) results in a new transfer
function

$f(\phi)\approx\nu=\left(\frac{\phi}{1+\tau\phi}\right)+\epsilon\left(\frac{\phi}{1+\tau\phi}\right)^{2},$
(6)

The resulting fit function (see appendix A for an analytic expression) for the
residuum together with its fitting parameters $\tau$ and $\epsilon$ is shown
in Fig. 2 as a blue dashed line. This combined dead time-TPD model fits the
measured data well with a normalised $\chi^{2}=$0.81$$. This may be an
indication for the presence of TPD-related effects. Despite the well matching
model, the fitted dead time $\tau=$118\text{\,}\mathrm{ns}$$ is significantly
higher than expected. This leads to the conclusion that neither of these basic
analytic models delivers a realistic representation of the detector physics.
In order to develop a more substantiated understanding, we first corroborate
the influence of two-photon detections on the nonlinearity via a variation of
the bias current supplied to the nanowire (see Sec. III.2), then directly
measure the recovery of the detector efficiency (Sec. III.3), and finally
simulate the detection statistics taking all these observations into account
(Sec. III.4).

###  III.2 Bias current dependence

The balance between single-photon and two-photon detection events in an SNSPD
depends strongly on the applied bias current Marsili  _et al._ (2016). In
particular, a decrease of bias current is known to increase the relative
contribution of TPD-events, which in turn should lead to a more pronounced
negative trend in the residuum $\Delta$. We perform several measurements with
bias current settings in the range from $12\text{\,}\mathrm{\SIUnitSymbolMicro
A}$ to $22.5\text{\,}\mathrm{\SIUnitSymbolMicro A}$. To compare these
measurements, we plot one residuum value $\Delta($400\text{\,}\mathrm{kHz}$)$
for each bias current at the same countrate (see Fig. 3) 222A
$5^{(\text{th})}$-order polynomial interpolation of the data was used to
extract $\Delta$ at exactly the same countrate for all bias currents..

Figure 3: Extracted nonlinearity at a given countrate from measurements at
different bias current values. The red point indicates the weakest NL for this
countrate with $I_{\mathrm{b}}=$22\text{\,}\mathrm{\SIUnitSymbolMicro A}$$.
The insert plot shows residuum curves with different bias currents. The
measurement with $I_{\mathrm{b}}=$22.5\text{\,}\mathrm{\SIUnitSymbolMicro A}$$
(purple dots) is fitted with the deadtime model of equation Eq. (3) (dotted
line).

An insert plot shows several nonlinearity measurements, around the default
bias current ($I_{\mathrm{b}}=$22\text{\,}\mathrm{\SIUnitSymbolMicro A}$$, i.e
red dots, corresponding to the average data in Fig. 2). One can observe a
transition from a purely positive residual
($I_{\mathrm{b}}=$22.2\text{\,}\mathrm{\SIUnitSymbolMicro A}$$, blue dots) to
a negative one ($I_{\mathrm{b}}=$21.8\text{\,}\mathrm{\SIUnitSymbolMicro A}$$,
green dots). For even lower bias currents, the nonlinearity becomes even more
negative, which matches the expectation of an increasing contribution from TPD
events. In the opposite direction, for increasing bias currents, the TPD
contribution should diminish and the dead time effects dominate. A measurement
with $I_{\mathrm{b}}=$22.5\text{\,}\mathrm{\SIUnitSymbolMicro A}$$ shown in
Fig. 3, fitted with the dead time model with
$\tau=$23.3(1)\text{\,}\mathrm{ns}$$ (dotted line), which approaches the
manufacturer specification of $30\text{\,}\mathrm{ns}$, enforces this
observation. The nonlinearity with smallest magnitude at this particular
countrate indeed occurs at the default bias current
($I_{\mathrm{b}}=$22\text{\,}\mathrm{\SIUnitSymbolMicro A}$$).

###  III.3 Direct measurement of recovery time

One key limitation of the dead time model [Eqs. (3) and (6)] is the assumed
step-like detector recovery, while in reality the detection efficiency reaches
its nominal values only gradually after a photon detection Autebert  _et al._
(2020). This results in incorrect dead time estimations. To overcome this
limitation we directly measure the detector recovery via the autocorrelation
of detection times. Specifically, we measure the distribution of time-
differences $\Delta t$ between all (not only subsequent) detection events via
a multiple start - multiple stop - histogram measurement (see Fig. 4). The
first peak at about $9\text{\,}\mathrm{ns}$ in this plot arises from noise in
the voltage pulse of a detection signal333a noise spike in the trailing edge
of the pulse can trigger the counting electronics a second time and, thus, can
be disregarded. The distribution of the remaining clicks is directly
proportional to the temporal recovery of the system detection efficency (SDE).
Evidently, there are no time differences smaller than about
$30\text{\,}\mathrm{ns}$ visible in the data, in accordance to the dead time
specified by the manufacturer. However, the efficiency does only gradually
recover, with a $90\text{\,}\mathrm{\char 37\relax}$-recovery in the order of
$100\text{\,}\mathrm{ns}$ (see normalised curve in Fig. 4). We followed the
procedure described in Ref. Autebert  _et al._ , 2020 to fit the SDE $\eta$ as
a function of $\Delta t$. This requires two steps:

First we determine the dependence of the (steady-state) SDE on the bias
current via measuring the countrate as a function of $I_{\mathrm{b}}$, see
appendix B. This dependence can be modelled with an error function

$\eta(I_{\mathrm{b}})=0.5\eta_{\mathrm{max}}\left(1+\erf{\left(\frac{I_{\mathrm{b}}-I_{0}}{\Delta
I}\right)}\right),$ (7)

with parameters $\eta_{\mathrm{max}}=0.680(1)$,
$I_{0}=$19.962(4)\text{\,}\mathrm{\SIUnitSymbolMicro A}$$ and $\Delta
I=$2.343(7)\text{\,}\mathrm{\SIUnitSymbolMicro A}$$. In a second step, the
recovery dynamics of the SDE $\eta(\Delta t)$ is modelled by substituting the
steady-state $I_{\mathrm{b}}$ in Eq. (7) by a time-dependent bias current
$I(\Delta t)$, with the following temporal profile:

$I(\Delta t)=\left(I_{\mathrm{b}}-I_{\text{drop}}\right)\left(1-e^{-\Delta
t/\tau}\right)+I_{\text{drop}},$ (8)

with fit parameters $I_{\text{drop}}$ and $\tau$. This profile follows from
the analog circuit model of the SNSPD Autebert  _et al._ (2020): After a
detection, the current drops very rapidly from the steady-state bias current
$I_{\text{b}}$ to a lower current $I_{\text{drop}}$ (enabling the nanowire to
cool down, also very rapidly). As soon as the superconductivity gets restored,
the current rises again with a characteristic time $\tau$ (set by the load
resistance of the readout electronics and the kinetic inductance of the
nanowire) and, thus, also the detection efficiency rises according to Eq. (7).
Fig. 4 shows the fitted SDE, normalised to the efficiency at infinite delay,
as dashed lines for different $I_{\mathrm{b}}$, which agrees well with the
data. The resulting fit parameters are given in Table 1.

[] []

Figure 4: Start-stop histogram measurements. Count rates are within the range $300\text{\,}\mathrm{k}\mathrm{H}\mathrm{z}400\text{\,}\mathrm{k}\mathrm{H}\mathrm{z}$ for all $I_{\mathrm{b}}$. (a) Raw data for a single bias current value. The first initial peak is the result of noise in the voltage spike of the detector around the trigger voltage. Thus, counts below $20\text{\,}\mathrm{ns}$ delay are ignored. (b) Normalised histogram (scaled to 1 for counts with $\Delta t=$800\text{\,}\mathrm{ns}$$ and counts with $\Delta t<$20\text{\,}\mathrm{ns}$$ are removed). This can be interpreted as a normalised system detection efficiency. All three data sets are fitted with (7) and the resulting fit parameters are given in Table 1. The fitted curves are shown as dashed lines. Table 1: Fit parameters of Fig. 4 and measured $90\%$-recovery time $t_{0.9}$. $I_{\mathrm{b}}$ | $\tau$ | $I_{\text{drop}}$ | $\chi^{2}/\text{d.o.f.}$ | $t_{0.9}$
---|---|---|---|---
$22.5\text{\,}\mathrm{\SIUnitSymbolMicro A}$ | $33(4)\text{\,}\mathrm{ns}$ | $5.23(1)\text{\,}\mathrm{\SIUnitSymbolMicro A}$ | $1.49$ | $99\text{\,}\mathrm{ns}$
$22.0\text{\,}\mathrm{\SIUnitSymbolMicro A}$ | $34(4)\text{\,}\mathrm{ns}$ | $5.57(1)\text{\,}\mathrm{\SIUnitSymbolMicro A}$ | $1.77$ | $109\text{\,}\mathrm{ns}$
$21.5\text{\,}\mathrm{\SIUnitSymbolMicro A}$ | $34(4)\text{\,}\mathrm{ns}$ | $6.06(2)\text{\,}\mathrm{\SIUnitSymbolMicro A}$ | $2.12$ | $121\text{\,}\mathrm{ns}$

With this method one can define and determine the dead time of the detector as
the recovery time constant $\tau$, which matches well with the specified value
of $30\text{\,}\mathrm{ns}$ for all investigated bias currents. Fig. 4 further
shows that the time required for a full recovery of the detector increases for
lower bias current values, see also the $90\text{\,}\mathrm{\char
37\relax}$-recovery times listed in the rightmost column in Table 1. This is
due to the steepest part of the SDE vs. bias current curve being located
around $I_{0}\approx$20\text{\,}\mathrm{\SIUnitSymbolMicro A}$$ (see appendix
B), which is reached later for lower steady-state bias currents. In the
context of nonlinearity, such changes in the total recovery time also have an
impact on the residuum. Lowering $I_{\mathrm{b}}$ increases the effective
recovery time, therefore strengthening the sublinear contribution and leading
to an increase in $\Delta$. In practice, however, Fig. 3 shows the opposite
trend. This indicates that other effects influencing the nonlinearity, like
TPD as discussed in the previous section, must exhibit a stronger bias
current-dependence than the recovery time.

The fitted model of the detector-recovery can now be used to predict the
detection probability of subsequent photons in the context of a Monte-Carlo
simulation, which will the starting point of the next section.

###  III.4 Statistical simulation of detector response

We now aim to gain some insight into the physics underlying the TPD and its
contribution to the detector nonlinearity via a statistical modelling of the
photon absorption processes and recovery dynamics. To this end, we perform a
Monte-Carlo simulation with randomly distributed photon arrivals, taking into
account the measured detector efficiency recovery $\eta(\Delta t)$ from the
previous section Autebert  _et al._ (2020). In a second step, we incorporate
to the model the formation and decay of resistive hotspots in the nanowire
Marsili  _et al._ (2016). In particular, we consider a sequence of $N+1$
photons with a given incidence rate $\phi$ and Poissonian count statistics
with exponentially distributed arrival time differences $\Delta t_{i}$ ,
$i\in\\{1,...,N\\}$. Note that we always start with a photon detection at
$t=0$, which starts the clock for the detector recovery. The first random
photon ($i=1$) then arrives at the detector at time $\Delta t_{1}$. For each
photon $i$ the detection probability $p_{i}$ can be calculated as

$p_{i}=A\eta(\Delta t_{i}+\delta t),$ (9)

where $A=0.604$ is the measured steady-state SDE of the detector and $\delta
t$ is the time between the last successfully detected photon and the arrival
of the previous photon $i-1$, i.e. it accounts for the continued recovery if a
photon is not detected. By definition $\delta t=0$, if photon $i-1$ was
detected. If then photon $i$ does not trigger a click, the following photon
has the detection probability $p_{i+1}=A\eta(\Delta t_{i}+\Delta t_{i+1})$. In
contrast, the recovery starts anew, if photon $i$ is detected
($p_{i+1}=A\eta(\Delta t_{i+1})$). This Monte-Carlo simulation can be repeated
for different photon rates $\phi_{1+2}^{\text{sim}}$ and respectively
$\phi_{1(2)}^{\text{sim}}=\phi_{1+2}^{\text{sim}}/2$ to simulate the single-
and two-path measurements of the experiment. The outcome of these simulations
is then used to calculate the simulated residuum

$\Delta^{\text{sim}}=\frac{2\nu_{1,2}^{\text{sim}}}{\nu_{1+2}^{\text{sim}}}-1.$
(10)

Running this Monte-Carlo simulation as described always yields a purely
positive nonlinearity $\Delta$, similar to the standard dead time model.

To incorporate the effect of TPD, we consider the hotspot relaxation dynamics
in an SNSPD. A photoabsorption in the superconducting nanowire leads to a
local breakdown of Cooper pairs, inducing a resistive hotspot. Consequently,
the current concentrates in the remaining superconducting regions, surpassing
the critical current density and resulting in a growing hotspot. This growth
is counteracted by cooling. Depending on the balance between the two
processes, either a resistive barrier forms over the entire cross-section of
the nanowire, resulting in a sudden, detectable voltage rise, or the hotspot
diminishes over time and nothing is detected. But even in the latter case the
presence of the hotspot will render the nanowire more likely to transition to
the normal conducting state when a subsequent photon is absorbed. For
sufficiently low bias currents, the system can even be forced into a TPD
regime, where single absorptions are almost never detected, while two
subsequent absorptions can trigger a detection Marsili  _et al._ (2016). To
model this process, we modify the probability function of Eq. (9) as

$p_{i}=A\eta(\Delta t_{i}+\delta t)+B_{i},$ (11)

where $B_{i}$ implements a boost term for the detection of photon $i$ that
accounts for temporally and spatially overlapping hotspots. If a single
incident photon does not trigger a detection in the simulation, the detection
probability of the following photon (within the mean hotspot lifetime) gets
increased by the boost term.

[] []

Figure 5: (a) Flowchart of the simulation concept. (b) Exemplary timeline of
random photon arrivals. Photons are either detected (red vertical lines),
restarting the detector recovery from zero or not detected (grey line),
causing a boost of the detection probability from the standard recovery (red
dashed curve), here to unity, until the next photon is detected or a maximal
time $T_{\mathrm{boost}}$ is reached.

Fig. 5 shows a block diagram of the simulation. The boost term is implemented
by

$B_{i+1}=\begin{cases}B_{0}\cdot b(\Delta t_{i+1},T_{\text{boost}})&\text{if
$i$ not successful},\\\ 0&\text{otherwise},\end{cases}$ (12)

with amplitude $B_{0}$, time evolution $b(\Delta t_{i+1},T_{\text{boost}})$
and characteristic time scale of the boost process $T_{\text{boost}}$. For the
sake of simplicity we assume that each simulated photon hits the nanowire,
creates a hotspot and results in either a click or a boost for the next photon
within the characteristic time $T_{\text{boost}}$. Therefore, this procedure
can serve as an upper-bound estimate of the influence of TPD effects.

The simplest implementation for the boost is a step-function, that increases
the detection probability for subsequent photons to one. This implies that
after an unsuccessful detection the next photon arriving within
$T_{\text{boost}}$ will be detected with certainty. We can realise this
scenario with $B_{0}=1-A\eta(\Delta t_{i}+\delta t)$ and $b(\Delta
t_{i+1})=u(T_{\text{boost}}-\Delta t_{i+1})$, with step-function $u(x)=1$ for
$x>0$ and $u(x)=0$, otherwise. We repeated the simulation for various values
of the characteristic time $T_{\text{boost}}$. The simulation result, which
optimally fits to the measured data is shown in Fig. 6, where
$T_{\text{boost}}=$172(1)\text{\,}\mathrm{ns}$$. Note that the uncertainty of
$T_{\text{boost}}$ is the variation stepsize.

Figure 6: Simulated detector residuum with boost implementation accounting for
the hotspot relaxation dynamics in the nanowire. Simulation parameters are
$N=$2\text{\cdot}{10}^{8}$$, $T_{\text{boost}}=$172(1)\text{\,}\mathrm{ns}$$
and $A=$0.604$$.

The simulated residuum of Fig. 6 does not match the data exactly but lies
within the same range. The physical interpretation of this simulation result
is, however, rather surprising, as the required time constant
$T_{\text{boost}}$ is much larger than the known hotspot relaxation times in
the TPD regime, i.e., at low bias currents, which are in the order of
$100\text{\,}\mathrm{ps}$ and below Ferrari  _et al._ (2017). A further issue
of this simulation is the assumption that all photons get absorbed and the
boost effect is maximal, which is certainly an overestimation. Making more
realistic assumptions would result in even longer $T_{\text{boost}}$. On the
other hand, no experimental data for the hotspot relaxation in the single-
photon detection regime, in which our system operates at the default
$I_{\text{b}}$, are available, and the TPD-data shows a clear trend towards
longer relaxation times for increasing bias currents Marsili  _et al._ (2016).

##  IV Discussion

Our experimental results clearly show that the relative nonlinearity of the
SNSPD under test, as measured by the residuum $\Delta$ is below
$\left|\Delta\right|=$1\text{\cdot}{10}^{-3}$$ for count rates up to
$500\text{\,}\mathrm{k}\mathrm{H}\mathrm{z}$, when the detector is operated at
its default bias current of
$I_{\mathrm{b}}=$22\text{\,}\mathrm{\SIUnitSymbolMicro A}$$. From a dead-time
induced detector saturation alone, however, much larger (sublinear)
nonlinearities would be expected. This indicates the presence of another,
(supralinear) counteracting effect, which can be empirically modelled via TPD-
events. The agreement between the data and the empirical model is very good
(cf. dashed curve in Fig. 2), such that this model can in principle be used to
compensate the nonlinearity bias in comparative measurements Kauten  _et al._
(2017). The balance between the nonlinear contributions of dead time and TPD
can be adjusted by varying the detector bias current, with dead time
dominating at larger currents and TPD at lower ones. Remarkably, the optimal
balance with minimal nonlinearity at typical fluxes of a few
$100\text{\,}\mathrm{kHz}$, occurs here indeed at the default setting, which
is recommended by the manufacturer to achieve a good compromise between
detector efficiency and dark counts.

Our statistical simulations, which took into account the measured detector
recovery and modelled the TPD via the generation and relaxation of resistive
hot spots in the nanowire, could reproduce the observed nonlinearity data.
Only the resulting time scales of hot spot relaxation seem unexpectedly large
and call for a deeper investigation of their physical origin. A definite
determination of the time scale would also be important to correctly set the
repetition rate of a single-photon source, if one wishes to avoid
nonlinearities altogether Vogl  _et al._ (2021).

As one possible cause for the apparent large $T_{\mathrm{boost}}$, we
considered the effect of count-rate dependent detection efficiency, known as
AC-biasing Kerman  _et al._ (2013). This effect arises in SNSPDs due to
charges from a detection pulse accumulating at a capacitor in the AC-coupled
readout electronics. As a consequence, the effective bias current through the
nanowire, and with it the detection efficiency, increase for increasing count
rates Ferrari  _et al._ (2019), giving rise to a supralinear dynamics and
decreasing the residuum $\Delta$. We estimated the impact of this effect by
repeating the measurement of the detector recovery (cf. Sec. III.3) at two
different flux levels and incorporating the measured efficiency curves into
the Monte-Carlo simulation at these particular levels. The observed reduction
of $\Delta$ yields a lower optimal
$T_{\text{boost}}=$161\text{\,}\mathrm{ns}$$, that is a reduction of the hot-
spot relaxation time by approximately $6\text{\,}\mathrm{\char 37\relax}$ (see
appendix C). This is consistent with the AC-biasing contribution to $\Delta$
being one order of magnitude smaller than the individual contributions of the
two main effects of dead time and TPD. We further considered photon bunching
on short time scales arising from the thermal photon number statistics of the
SLED Blazek and Elsäßer (2011). However, this had a negligible impact on the
simulation due to the very short coherence time of the light source
($<$100\text{\,}\mathrm{fs}$$).

From a broader perspective, our results highlight the necessity to precisely
and systematically characterise photon detector nonlinearities, as they can
influence the results of comparative measurements on the $10^{-3}$-level of
relative accuracy, even when the dynamic range of the measurement is only at
the modest factor of two. For SNSPDs, the results suggest that the amount and
sign of this nonlinearity can crucially depend on the applied bias current, so
a careful calibration might be needed for each individual detector and its
setting. It would be very interesting to develop a deeper understanding of the
multi-photon detection contribution to the nonlinearity and its involved time
scale to allow the formulation of a quantitative predictive model.

###### Acknowledgements.

The authors thank Simone Ferrari, Josef Hloušek and Philipp Zolotov for
fruitful discussions and Stefanie Morhenn for help in setting up the
experiment. This research was funded by the Austrian Science Fund (FWF),
grants no. 10.55776/FG 5, 10.55776/F71 and 10.55776/P30459.

## Data Availability Statement

The data that support the findings of this study are openly available in
Zenodo at https://doi.org/10.5281/zenodo.12773197.

##  Appendix A Analytic transfer functions

For the basic dead time model, the detector transfer function of Eq. (3) can
be inverted to

$\phi=f^{-1}(\nu)=\frac{\nu}{1-\nu\tau}.$ (13)

Under the assumptions of equal fluxes along both paths and absence of
interference, i.e., $\phi_{1}=\phi_{2}=\phi_{1+2}/2$, which implies also
$\nu_{1}=\nu_{2}$, one obtains for the normalised residuum

$\Delta=\frac{\nu_{1}+\nu_{2}}{\nu_{1+2}}-1=\frac{2\nu_{1}}{\nu_{1+2}}-1=\frac{2f\left[\frac{1}{2}f^{-1}(\nu_{1+2})\right]}{\nu_{1+2}}-1.$
(14)

Substituting Eq. (13) into (14) then yields the fit function of Eq. (4) from
the main text.

In an analog fashion, the transfer function Eq. 6 combining dead time
saturation and TPD can be inverted to

$\phi=f^{-1}(\nu)=\frac{2\nu}{1+\sqrt{1+4\epsilon\nu}-2\nu\tau}.$ (15)

Substituting this expression into Eq. (14) yields the following analytic
expression for the residuum:

$\displaystyle\Delta(\nu)=-1+\frac{2(-1+\sqrt{1+4\epsilon\nu}+2\tau\nu)}{\nu(4\epsilon+\tau(3+\sqrt{1+4\epsilon\nu}-2\tau\nu))^{2}}\times$
$\displaystyle\left[\tau(3+\sqrt{1+4\epsilon\nu}-2\tau\nu)+\epsilon(3+\sqrt{1+4\epsilon\nu}+2\tau\nu)\right],$

which is used as a fit function in Fig. 2 with $\nu=\nu_{1+2}$ and fit
parameters $\tau$ and $\epsilon$.

##  Appendix B System detection efficiency

We measured the count rate for different values of the bias current
$I_{\mathrm{b}}$ at a detected flux of about $300\text{\,}\mathrm{kHz}$ at
$I_{\mathrm{b}}=$22\text{\,}\mathrm{\SIUnitSymbolMicro A}$$, see Fig. 7. The
data was scaled to the manufacturer-specified efficiency of $0.64$ at the
largest possible bias current
$I_{\mathrm{b}}=$22.6\text{\,}\mathrm{\SIUnitSymbolMicro A}$$ before the count
rate dropped due to latching. Note that the specific value of this scaling
constant is irrelevant, as the SDE curves in Fig. 4 in the main text are
normalised to the count rate at infinite delay.

Figure 7: System Detection Efficiency (SDE) as a function of bias current
$I_{b}$. Additionally, dark counts in units of $\mathrm{s}^{-1}$ are plotted
in red. Fit parameters of Eq. (7) in the main text are
$I_{0}=$19.962(4)\text{\,}\mathrm{\SIUnitSymbolMicro A}$$, $\Delta
I=$2.343(7)\text{\,}\mathrm{\SIUnitSymbolMicro A}$$ and $\eta_{max}=0.680(1)$.

##  Appendix C AC-Biasing

To estimate the magnitude of AC-biasing in our detector, we investigate the
detector recovery at the default
$I_{\mathrm{b}}=$22\text{\,}\mathrm{\SIUnitSymbolMicro A}$$ via start-stop
histogram measurements (see Sec. III.3) at two different flux levels:
$\nu_{\text{A}}\approx$250\text{\,}\mathrm{kHz}$$ and
$\nu_{\text{B}}\approx$500\text{\,}\mathrm{kHz}$$. The measured recovery
curves $\eta_{\text{A}}$ and $\eta_{\text{B}}$ are plotted in Fig. 8 and the
resulting fit parameters are given in Table 2. As expected for AC-biasing, a
faster recovery is observed at higher flux levels, thus raising the average
detection efficiency. We then repeat the Monte-Carlo simulation of Sec. III.4
for the fixed count rates $\nu_{1+2}=\nu_{\text{B}}$ and
$\nu_{1}\approx\nu_{2}\approx\nu_{1+2}/2=\nu_{\text{A}}$, using the recovery
curves of Fig. 8 for each of them. This leads to a lower residuum $\Delta$,
due to the AC-biasing having a larger influence on $\nu_{1+2}$ than on the
lower rates $\nu_{1}=\nu_{2}$, counteracting the deadtime-induced
nonlinearity. Repeating the simulation with
$T_{\mathrm{boost}}=$172\text{\,}\mathrm{ns}$$, as in Sec. III.4, yields a
reduction in $\Delta$ by about $0.001$ in comparison to a simulation without
the AC-biasing effect, i.e., with a flux-independent recovery curve, see the
green data points in Fig. 8. The best match of the simulation with AC-biasing
to the experimental data (at $\nu_{\mathrm{1+2}}=$500\text{\,}\mathrm{kHz}$$)
is instead obtained for a slightly lower hotspot relaxation time
$T_{\mathrm{boost}}=$161\text{\,}\mathrm{ns}$$ (red data point).

[]  []

Figure 8: Impact of AC-biasing. (a) Normalised start-stop histogram at $I_{\text{b}}=$22\text{\,}\mathrm{\SIUnitSymbolMicro A}$$ for two different flux levels $\nu_{\text{A}}$ and $\nu_{\text{B}}$. (b) Simulated detector residuum at $\nu_{1+2}=\nu_{\text{B}}\approx$500\text{\,}\mathrm{kHz}$$ without the AC-biasing effect (green diamond, equivalent to the simulation in Fig. 6) and with AC-biasing (green triangle), both at $T_{\text{boost}}=$172\text{\,}\mathrm{ns}$$. Decreasing the boost time to $T_{\mathrm{boost}}=$161\text{\,}\mathrm{ns}$$ for the model with AC-biasing then yields the best fit to the experimental data (red triangle). Table 2: SDE fit parameters at different flux levels. $\nu$ | $\tau$ | $I_{\text{drop}}$ | $\chi^{2}/\text{d.o.f.}$ | $t_{0.9}$
---|---|---|---|---
$250\text{\,}\mathrm{kHz}$ | $35(4)\text{\,}\mathrm{ns}$ | $6.09(2)\text{\,}\mathrm{\SIUnitSymbolMicro A}$ | $1.43$ | $112.5\text{\,}\mathrm{ns}$
$500\text{\,}\mathrm{kHz}$ | $33(4)\text{\,}\mathrm{ns}$ | $5.256(9)\text{\,}\mathrm{\SIUnitSymbolMicro A}$ | $1.97$ | $108.0\text{\,}\mathrm{ns}$

## References

  * Christensen  _et al._ (2013) B. G. Christensen, K. T. McCusker, J. B. Altepeter, B. Calkins, T. Gerrits, A. E. Lita, A. Miller, L. K. Shalm, Y. Zhang, S. W. Nam, N. Brunner, C. C. W. Lim, N. Gisin, and P. G. Kwiat, “Detection-loophole-free test of quantum nonlocality, and applications,” Phys. Rev. Lett. 111, 130406 (2013).
  * Shadbolt  _et al._ (2014) P. Shadbolt, J. C. F. Mathews, A. Laing, and J. L. O’Brien, “Testing foundations of quantum mechanics with photons,” Nature Physics 10, 278–286 (2014).
  * Prevedel  _et al._ (2007) R. Prevedel, P. Walther, F. Tiefenbacher, P. Böhi, R. Kaltenbaek, T. Jennewein, and A. Zeilinger, “High-speed linear optics quantum computing using active feed-forward,” Nature 445, 65–69 (2007).
  * Kok (2016) P. Kok, “Photonic quantum information processing,” Contemporary Physics 57, 526–544 (2016).
  * Flamini, Spagnolo, and Sciarrino (2018) F. Flamini, N. Spagnolo, and F. Sciarrino, “Photonic quantum information processing: a review,” Reports on Progress in Physics 82, 016001 (2018).
  * Whittaker  _et al._ (2017) R. Whittaker, C. Erven, A. Neville, M. Berry, J. L. O’Brien, H. Cable, and J. C. F. Matthews, “Absorption spectroscopy at the ultimate quantum limit from single-photon states,” New Journal of Physics 19, 023013 (2017).
  * Losero  _et al._ (2018) E. Losero, I. Ruo-Berchera, A. Meda, A. Avella, and M. Genovese, “Unbiased estimation of an optical loss at the ultimate quantum limit with twin-beams,” Scientific Reports 8, 7431 (2018).
  * Gol’tsman  _et al._ (2001) G. N. Gol’tsman, O. Okunev, G. Chulkova, A. Lipatov, A. Semenov, K. Smirnov, B. Voronov, A. Dzardanov, C. Williams, and R. Sobolewski, “Picosecond superconducting single-photon optical detector,” Applied Physics Letters 79, 705–707 (2001).
  * Eisaman  _et al._ (2011) M. D. Eisaman, J. Fan, A. Migdall, and S. V. Polyakov, “Invited review article: Single-photon sources and detectors,” Review of Scientific Instruments 82, 071101 (2011).
  * Hadfield and Johansson (2016) R. H. Hadfield and G. Johansson,  _Superconducting Devices in Quantum Optics_ (Springer Cham, 2016).
  * Maring  _et al._ (2017) N. Maring, P. Farrera, K. Kutluer, M. Mazzera, G. Heinze, and H. de Riedmatten, “Photonic quantum state transfer between a cold atomic gas and a crystal,” Nature 551, 485–488 (2017).
  * Chen  _et al._ (2020) J.-P. Chen, C. Zhang, Y. Liu, C. Jiang, W. Zhang, X.-L. Hu, J.-Y. Guan, Z.-W. Yu, H. Xu, J. Lin, M.-J. Li, H. Chen, H. Li, L. You, Z. Wang, X.-B. Wang, Q. Zhang, and J.-W. Pan, “Sending-or-not-sending with independent lasers: Secure twin-field quantum key distribution over 509 km,” Phys. Rev. Lett. 124, 070501 (2020).
  * Wei  _et al._ (2022) S.-H. Wei, B. Jing, X.-Y. Zhang, J.-Y. Liao, C.-Z. Yuan, B.-Y. Fan, C. Lyu, D.-L. Zhou, Y. Wang, G.-W. Deng, H.-Z. Song, D. Oblak, G.-C. Guo, and Q. Zhou, “Towards real-world quantum networks: A review,” Laser & Photonics Reviews 16, 2100219 (2022).
  * van Leent  _et al._ (2022) T. van Leent, M. Bock, F. Fertig, R. Garthoff, S. Eppelt, Y. Zhou, P. Malik, M. Seubert, T. Bauer, W. Rosenfeld, W. Zhang, C. Becher, and H. Weinfurter, “Entangling single atoms over 33 km telecom fibre,” Nature 607, 69–73 (2022).
  * James  _et al._ (2001) D. F. V. James, P. G. Kwiat, W. J. Munro, and A. G. White, “Measurement of qubits,” Phys. Rev. A 64, 052312 (2001).
  * Altepeter, Jeffrey, and Kwiat (2005) J. Altepeter, E. Jeffrey, and P. Kwiat, “Photonic state tomography,” (Academic Press, 2005) pp. 105–159.
  * Söllner  _et al._ (2011) I. Söllner, B. Gschösser, P. Mai, B. Pressl, Z. Vörös, and G. Weihs, “Testing born’s rule in quantum mechanics for three mutually exclusive events,” Foundations of Physics 42, 742–751 (2011).
  * Kauten  _et al._ (2017) T. Kauten, R. Keil, T. Kaufmann, B. Pressl, Č . Brukner, and G. Weihs, “Obtaining tight bounds on higher-order interferences with a 5-path interferometer,” New Journal of Physics 19, 033017 (2017).
  * Rozema  _et al._ (2021) L. A. Rozema, Z. Zhuo, T. Paterek, and B. Dakić, “Higher-order interference between multiple quantum particles interacting nonlinearly,” Phys. Rev. A 103, 052204 (2021).
  * Vogl  _et al._ (2021) T. Vogl, H. Knopf, M. Weissflog, P. K. Lam, and F. Eilenberger, “Sensitive single-photon test of extended quantum theory with two-dimensional hexagonal boron nitride,” Phys. Rev. Res. 3, 013296 (2021).
  * Gstir  _et al._ (2021) S. Gstir, E. Chan, T. Eichelkraut, A. Szameit, R. Keil, and G. Weihs, “Towards probing for hypercomplex quantum mechanics in a waveguide interferometer,” New Journal of Physics 23, 093038 (2021).
  * Gstir (2023) S. Gstir,  _Waveguide Interferometers for Fundamental Investigation of Quantum Mechanics_ , Ph.D. thesis, University of Innsbruck (2023).
  * Kerman  _et al._ (2006) A. J. Kerman, E. A. Dauler, W. E. Keicher, J. K. W. Yang, K. K. Berggren, G. Gol’tsman, and B. Voronov, “Kinetic-inductance-limited reset time of superconducting nanowire photon counters,” Applied Physics Letters 88, 111116 (2006).
  * Ware  _et al._ (2007) M. Ware, A. Migdall, J. C. Bienfang, and S. V. Polyakov, “Calibrating photon-counting detectors to high accuracy: background and deadtime issues,” Journal of Modern Optics 54, 361–372 (2007).
  * Kornilov (2014) V. Kornilov, “Effects of dead time and afterpulses in photon detector on measured statistics of stochastic radiation,” J. Opt. Soc. Am. A 31, 7–15 (2014).
  * Kauten  _et al._ (2014) T. Kauten, B. Pressl, T. Kaufmann, and G. Weihs, “Measurement and modeling of the nonlinearity of photovoltaic and geiger-mode photodiodes,” Review of Scientific Instruments 85, 063102 (2014).
  * Hloušek, Straka, and Ježek (2023) J. Hloušek, I. Straka, and M. Ježek, “Experimental observation of anomalous supralinear response of single-photon detectors,” Applied Physics Reviews 10, 011412 (2023).
  * Zhou  _et al._ (2013) Z. Zhou, G. Frucci, F. Mattioli, A. Gaggero, R. Leoni, S. Jahanmirinejad, T. B. Hoang, and A. Fiore, “Ultrasensitive n-photon interferometric autocorrelator,” Phys. Rev. Lett. 110, 133605 (2013).
  * Marsili  _et al._ (2016) F. Marsili, M. J. Stevens, A. Kozorezov, V. B. Verma, C. Lambert, J. A. Stern, R. D. Horansky, S. Dyer, S. Duff, D. P. Pappas, A. E. Lita, M. D. Shaw, R. P. Mirin, and S. W. Nam, “Hotspot relaxation dynamics in a current-carrying superconductor,” Phys. Rev. B 93, 094518 (2016).
  * Coslovi and Righini (1980) L. Coslovi and F. Righini, “Fast determination of the nonlinearity of photodetectors,” Appl. Opt. 19, 3200–3203 (1980).
  * Autebert  _et al._ (2020) C. Autebert, G. Gras, E. Amri, M. Perrenoud, M. Caloz, H. Zbinden, and F. Bussières, “Direct measurement of the recovery time of superconducting nanowire single-photon detectors,” Journal of Applied Physics 128, 074504 (2020).
  * Kerman  _et al._ (2013) A. J. Kerman, D. Rosenberg, R. J. Molnar, and E. A. Dauler, “Readout of superconducting nanowire single-photon detectors at high count rates,” Journal of Applied Physics 113, 144511 (2013).
  * Ferrari  _et al._ (2019) S. Ferrari, V. Kovalyuk, A. Vetter, C. Lee, C. Rockstuhl, A. Semenov, G. Gol’tsman, and W. Pernice, “Analysis of the detection response of waveguide-integrated superconducting nanowire single-photon detectors at high count rate,” Applied Physics Letters 115, 101104 (2019).
  * Note (1) Note that the sign of the residuum $r$ in Eq. 1 is here chosen opposite to Ref. kautenNonlin.
  * Note (2) A $5^{(\text{th})}$-order polynomial interpolation of the data was used to extract $\Delta$ at exactly the same countrate for all bias currents.
  * Note (3) A noise spike in the trailing edge of the pulse can trigger the counting electronics a second time.
  * Ferrari  _et al._ (2017) S. Ferrari, V. Kovalyuk, W. Hartmann, A. Vetter, O. Kahl, C. Lee, A. Korneev, C. Rockstuhl, G. Gol’tsman, and W. Pernice, “Hot-spot relaxation time current dependence in niobium nitride waveguide-integrated superconducting nanowire single-photon detectors,” Opt. Express 25, 8739–8750 (2017).
  * Blazek and Elsäßer (2011) M. Blazek and W. Elsäßer, “Coherent and thermal light: Tunable hybrid states with second-order coherence without first-order coherence,” Phys. Rev. A 84, 063840 (2011).

  *[TPD]: two-photon detection
  *[SDE]: system detection efficency