# Outlier Dimensions Encode Task-Specific Knowledge

William Rudman1, Catherine Chen1, Carsten Eickhoff2
Brown University1 University of Tübingen2
{william_rudman<EMAIL_ADDRESS>
<EMAIL_ADDRESS>
###### Abstract

Representations from large language models (LLMs) are known to be dominated by
a small subset of dimensions with exceedingly high variance. Previous works
have argued that although ablating these outlier dimensions in LLM
representations hurts downstream performance, outlier dimensions are
detrimental to the representational quality of embeddings. In this study, we
investigate how fine-tuning impacts outlier dimensions and show that 1)
outlier dimensions that occur in pre-training persist in fine-tuned models and
2) a single outlier dimension can complete downstream tasks with a minimal
error rate. Our results suggest that outlier dimensions can encode crucial
task-specific knowledge and that the value of a representation in a single
outlier dimension drives downstream model decisions.111Code:
https://github.com/wrudman/outlier_dimensions

##  1 Introduction

Large Language Models (LLMs) are highly over-parameterized with LLM
representations utilizing only a small portion of the available embedding
space uniformly Gordon et al. (2020); Prasanna et al. (2020); Rudman et al.
(2022). Representations of transformer-based LLMs are dominated by a few
outlier dimensions whose variance and magnitude are significantly larger than
the rest of the model’s representations Timkey and van Schijndel (2021);
Kovaleva et al. (2021). Previous studies devoted to the formation of outlier
dimensions in pre-trained LLMs suggest that imbalanced token frequency causes
an uneven distribution of variance in model representations Gao et al. (2019);
Puccetti et al. (2022). Although many argue that outlier dimensions “disrupt”
model representations, making them less interpretable and hindering model
performance, ablating outlier dimensions has been shown to cause downstream
performance to decrease dramatically Kovaleva et al. (2021); Puccetti et al.
(2022).

There currently is little understanding of how fine-tuning impacts outlier
dimensions and why ablating outlier dimensions is harmful to downstream
performance. We address this gap in the literature by investigating 1) how
fine-tuning changes the structure of outlier dimensions and 2) testing the
hypothesis that outlier dimensions contain task-specific knowledge. This study
makes the following novel contributions:

  1. 1.

We find that outlier dimensions present in pre-training remain outlier
dimensions after fine-tuning, regardless of the given downstream task or
random seed.

  2. 2.

We demonstrate that outlier dimensions in ALBERT, GPT-2, Pythia-160M, and
Pythia-410M encode task-specific knowledge and show that it is feasible to
accomplish downstream tasks by applying a linear threshold to a single outlier
dimension with only a marginal performance decline.

Figure 1: Average activation diagrams of sentence embeddings on the SST-2
validation dataset. The x-axis represents the index of the dimension, and the
y-axis is the corresponding magnitude in that given dimension. Top: pre-
trained models where no fine-tuning occurs. Bottom: models fine-tuned to
complete SST-2.

##  2 Related Works

Two seminal works discovered the presence of “outlier” Kovaleva et al. (2021)
or “rogue” Timkey and van Schijndel (2021) dimensions in pre-trained LLMs.
Following Kovaleva et al. (2021) and Puccetti et al. (2022), we define outlier
dimensions as dimensions in LLM representations whose variance is at least 5x
larger than the average variance in the global vector space. The formation of
outlier dimensions is caused by a token imbalance in the pre-training data
with more common tokens having much higher norms in the outlier dimensions
compared to rare tokens Gao et al. (2019); Puccetti et al. (2022). Although
the community agrees on the origin of outlier dimensions, their impact on the
representational quality of pre-trained LLMs has been widely contested.

The concept of isotropy (i.e., the uniformity of variance in a distribution)
is closely related to outlier dimensions. Namely, the presence of outlier
dimensions causes model representations to be highly anisotropic Rudman and
Eickhoff (2023). Many previous works have argued that mitigating the impact of
outlier dimensions by forcing LLM representations to be isotropic improves
model interpretability and performance Rajaee and Pilehvar (2021); Liang et
al. (2021); Mu et al. (2017); Zhou et al. (2020); Gao et al. (2019). Further,
Timkey and van Schijndel (2021) claim that outlier dimensions do not
meaningfully contribute to the model decision-making process and that removing
outlier dimensions aligns LLM embeddings more closely to human similarity
judgments. Although the notion that isotropy is beneficial to model
representations has been widely adopted in the literature, recent studies have
shown that many tools used to measure isotropy and the impact of outlier
dimensions in NLP are fundamentally flawed Rudman et al. (2022).

There is a growing body of literature arguing that anisotropy is a natural
consequence of stochastic gradient descent and that compressing
representations into low-dimensional manifold correlates with improved
downstream performance Zhu et al. (2018); Ansuini et al. (2019); Recanatesi et
al. (2019); Rudman and Eickhoff (2023). Recent works in NLP suggest that LLMs
store linguistic and task-specific information in a low-dimensional subspace
Coenen et al. (2019); Hernandez and Andreas (2021); Zhang et al. (2023).
Further, Rudman and Eickhoff (2023) argue that encouraging the formation of
outlier dimensions in LLM representations improves model performance on
downstream tasks. In this study, we demonstrate that certain LLMs store task-
specific knowledge in a 1-dimensional subspace and provide evidence supporting
claims that outlier dimensions are beneficial to model performance.

Figure 2: Frequency of the 7 most commonly occurring outlier dimensions across
all fine-tuning tasks and all random seeds. The x-axis plots the dimension
frequency, and the y-axis plots the dimension index.

##  3 Experiments

#### Training Details

We fine-tune 4 transformer encoder LLMs: BERT Devlin et al. (2018), ALBERT Lan
et al. (2020), DistilBERT Sanh et al. (2020), RoBERTa Liu et al. (2019) and 4
transformer decoder LLMs: GPT-2 Radford et al. (2019), Pythia-70M,
Pythia-160M, Pythia-410M Biderman et al. (2023). We fine-tune our models on 5
binary classification tasks contained in the GLUE benchmark Wang et al.
(2018): SST-2 Socher et al. (2013), QNLI Rajpurkar et al. (2016), RTE Dagan et
al. (2005), MRPC Dolan and Brockett (2005), QQP. A detailed description of
each task is available in Section A of the Appendix. A detailed description of
our hyperparameter search, exact hyperparameters, and random seeds is given in
Section B. We follow the common practice of reporting results on GLUE tasks
using the hidden validation dataset.

###  3.1 Persistence of Outlier Dimensions

#### Methods

After training the model, we calculate the variance of sentence embeddings on
the validation data on each task and each random seed and count the number of
times a given dimension has a variance 5x larger than the overall average. We
visualize outlier dimensions by creating “activation diagrams” where the
x-axis is the index of a given dimension, and the y-axis is the magnitude of a
sentence embedding in that dimension. We report the average sentence
embeddings across 4 random seeds for all activation diagrams.

Task BERT ALBERT DistilBERT RoBERTa GPT-2 Pythia-70M Pythia-160M Pythia-410M
SST-2 91.86/77.58 $\Delta$15.54 91.90/84.32 $\Delta$8.25 90.14/54.39
$\Delta$39.66 94.35/63.85 $\Delta$ 32.33 91.77/91.69 $\Delta$0.09 87.30/72.62
$\Delta$16.82 89.25/86.64 $\Delta$ 2.95 94.53/92.19 $\Delta$ 2.48 QNLI
90.11/69.69 $\Delta$22.66 91.28/88.16 $\Delta$3.42 86.48/66.12 $\Delta$23.54
92.78/59.69 $\Delta$ 35.67 87.80/85.90 $\Delta$2.16 80.14/62.93 $\Delta$21.47
85.41/82.87 $\Delta$2.97 91.41/91.41 $\Delta$0.0 RTE 61.01/55.60 $\Delta$8.87
66.70/63.09 $\Delta$5.41 55.14/52.44 $\Delta$4.90 76.56/70.31$\Delta$ 8.16
61.64/59.74 $\Delta$3.08 55.14/53.97 $\Delta$ 2.12 61.82/50.00 $\Delta$ 19.12
71.88/ 47.66$\Delta$33.69 MRPC 84.80/76.04 $\Delta$10.33 87.01/79.72
$\Delta$8.38 81.56/75.06 $\Delta$7.97 86.15/80.70 $\Delta$ 6.33 78.92/74.08
$\Delta$6.13 70.71/68.75 $\Delta$ 4.12 74.69/68.26 $\Delta$ 8.38 79.68/
63.28$\Delta$ 20.58 QQP 90.13/68.27 $\Delta$24.25 90.01/85.37 $\Delta$5.15
89.12/71.70 $\Delta$19.55 90.99/81.53 $\Delta$ 10.40 89.38/86.91 $\Delta$2.76
86.88/70.93 $\Delta$ 18.36 89.12/85.77 $\Delta$ 3.76 85.94/80.47 $\Delta$6.36
Avg. 83.58/69.43 $\Delta$16.33 85.38/80.13 $\Delta$6.12 80.48/63.94
$\Delta$19.12 88.17/71.21 $\Delta$ 19.23 81.90/79.66 $\Delta$2.85 76.23/65.84
$\Delta$ 12.58 80.06/74.71 $\Delta$ 7.48 84.69/75.02 $\Delta$11.44

Table 1: Comparing the performance of the fully fine-tuned model to our brute-
force algorithm on the principal outlier dimension, $\rho$ (Equation 1). We
compute the percent decrease between the full model performance and the 1-D
performance using Equation 1 as full-performance minus 1D-performance divided
by full-performance. The reported performance is an average over 4 random
seeds.

#### Results

Figure 1 demonstrates how fine-tuning impacts model representations of
sentence embeddings by plotting activation diagrams from BERT, ALBERT,
DistilBERT, and GPT-2 on the SST-2 validation data before (top row) and after
(bottom row) fine-tuning. Activation diagrams for the remaining four models
are available in Section E in the Appendix. The magnitudes of outlier
dimensions in GPT-2 are far larger than any of the models considered in this
study. The outlier dimension with the largest variance in GPT-2 has an average
variance value of 3511.82 compared to 4.87, 9.30, and 4.68 for BERT, ALBERT,
and DistilBERT (see Section C for full results). For GPT-2, fine-tuning
exacerbates the variance of existing outlier dimensions but decreases the mean
value of outlier dimensions. Notably, in GPT-2, the exact set of top 3 outlier
dimensions in pre-training persist when fine-tuning models to complete
downstream tasks. Figure 2 demonstrates that a small subset of outlier
dimensions emerge for a given model regardless of the downstream
classification tasks or the random seed. In particular, in GPT-2 and RoBERTa,
there are dimensions that qualify as outlier dimensions for every fine-tuning
task and random seed. Outlier dimensions in the Pythia models have a far lower
occurrence rate than any of the models in the paper. This finding is
especially pronounced in Pythia-70M and Pythia-160M, where no dimensions have
an occurrence rate higher than 70%.

Not only do the outlier dimensions in Pythia models have low occurrence rates,
but the Pythia models have far fewer outlier dimensions present in the
embedding space compared to BERT, ALBERT, DistilBERT, and RoBERTa. In general,
far more outlier dimensions emerge in the encoder models considered in this
study compared to the decoder models. In particular, GPT-2 and Pythia-70M only
have 8 and 4 unique outlier dimensions that appear across all fine-tuning
tasks and random seeds compared to 62, 60, 24, and 64 for BERT, ALBERT,
DistilBERT, and RoBERTa, respectively. Interestingly, Figure 2 shows that the
4 most common outlier dimensions in BERT and DistilBERT are the same,
indicating that outlier dimensions persist even when distilling larger models.
Further discussion of the persistence of outlier dimensions is available in
Section C.

###  3.2 Testing Outlier Dimensions for Task-Specific Knowledge

#### Methods

In order to test the hypothesis that outlier dimensions contain task-specific
knowledge, we attempt to complete an inference task using only the outlier
dimension in the fine-tuned model with the highest variance. For the remainder
of this paper, we refer to the outlier dimension with the highest variance as
the principal outlier dimension, which we denote as $\rho$. After fine-tuning
our model, we use a simple brute-force algorithm to find a linear decision
rule to complete the downstream GLUE task using only the principal outlier
dimension. We first collect a small sample of 500 sentence embeddings from the
training data to find $\rho$ and calculate its mean value, which we denote as
$\mu_{\rho}$. Equation 1 describes the classification decision rule for an
input sentence using only $\rho$:

$x_{\textrm{label}}=\begin{cases}0&\textrm{if}\
x_{\rho}\leq\mu_{\rho}+\epsilon\\\ 1&\textrm{if}\
x_{\rho}>\mu_{\rho}+\epsilon\end{cases}$ (1)

where $x_{\rho}$ denotes the principal outlier dimension for an input sentence
$x$, $\epsilon\in\\{\text{-}50,\text{-}49.5,...,49.5,50\\}$. Let
$\bar{X}_{\text{label}}$ denote the training accuracy of Equation 1. If
$1-\bar{X}_{\text{label}}>\bar{X}_{\text{label}}$ we flip the inequalities in
Equation 1:

$x_{\textrm{label}}=\begin{cases}0&\textrm{if}\
x_{\rho}\geq\mu_{\rho}+\epsilon\\\ 1&\textrm{if}\
x_{\rho}<\mu_{\rho}+\epsilon\end{cases}_{.}$

After finding both the value of $\epsilon$ that maximizes accuracy on the
training data and the correct direction of the inequality, we measure the
ability of $\rho$ to complete downstream tasks using Equation 1 on the hidden
validation data.

#### Results

In GPT-2, using the principal outlier dimension results in only a 3%
performance drop compared to using the full model representations for most
tasks (Table 1). Further, there are several tasks in ALBERT, Pythia-160M, and
Pythia-410M where there is little to no change in performance when using only
the principal outlier dimension. Although outlier dimensions encode task-
specific knowledge in some models, outlier dimensions in BERT, DistilBERT,
RoBERTa, and Pythia-70M are insufficient for completing most downstream tasks.
In particular, for QNLI, using our brute-force algorithm on a single outlier
dimension in GPT-2, ALBERT, Pythia-160M, and Pythia-410M only results in a
2.16%, 3.42%, 2.97%, and 0% performance decrease, where performance on QNLI
drops by 22.66%, 23.54%, 33.67% and 21.47% for BERT, DistilBERT, RoBERTa, and
Pythia-70M respectively. Additionally, the average percent decrease in
performance is significantly lower for GPT-2 (2.85%), ALBERT (6.12%),
Pythia-160M (7.48%) compared to BERT (16.33%), DistilBERT (19.12%) and RoBERTa
(19.23%).

Figure 3: Comparing the downstream performance of all 1-D subspaces of
sentence embedding activations on QNLI against the variance in that given
dimension. Results for all tasks are available in Section D in the Appendix.
The red dashed line indicates the threshold for whether a dimension qualifies
as an “outlier dimension” (i.e., 5x the average variance in vector space).

###  3.3 Variance vs. 1D-Performance

#### Methods

In this section, we extend our experiment in Section 3.2 by testing each 1-D
subspace in model activations for task-specific knowledge. Namely, we use our
brute-force algorithm in Equation 1 to learn a linear threshold for each
dimension of the model’s sentence embeddings.

#### Results

Figure 3 shows multiple 1-D subspaces in model sentence embeddings that
contain task-specific information. Importantly, the downstream performance of
a single dimension is strongly correlated with the variance in that given
dimension. Even in cases where the principal outlier dimension does not
contain enough task-specific information to complete the downstream task,
there are several non-principal outlier dimensions that are capable of
completing the downstream task with a high degree of accuracy. For instance,
applying Equation 1 to the largest outlier dimension in BERT on QNLI results
in a 22.26% decrease in performance, whereas using Equation 1 on the 5th
largest outlier dimension only leads to a 0.56% reduction in performance. We
even find a few cases where applying Equation 1 results in improved
performance over feeding the full representations into a classification head.
For full results and further discussion, see Table 3 and Section D in the
Appendix.

##  4 Discussion

Previous studies investigating the role of outlier dimensions tend to only
focus on BERT or RoBERTa, yet make broad claims about the role of outlier
dimensions for LLMs as a whole Kovaleva et al. (2021); Puccetti et al. (2022).
Our results demonstrate that outlier dimensions have different functions for
different models and tasks. In particular, outlier dimensions contain task-
specific knowledge that can complete downstream fine-tuning tasks for some
models (GPT-2, ALBERT, Pythia-160M, and Pythia-410M) but not for others (BERT,
DistilBERT, RoBERTa, and Pythia-70M). Future work should avoid generalizing
results from one observation to all other models.

Although numerous studies have argued that outlier dimensions are harmful to
model representations Gao et al. (2019); Timkey and van Schijndel (2021); Cai
et al. (2021), we quantitatively show that the single principal outlier
dimension can store enough task-specific knowledge in GPT-2, ALBERT,
Pythia-160M, and Pythia-410M to complete downstream tasks. In cases where the
principal outlier dimension does not contain sufficient task-specific
knowledge to complete downstream tasks, we find that there are often non-
principal outlier dimensions that retain high 1-D performance. In particular,
Figure 3 shows that there are non-principal outlier dimensions in BERT and
RoBERTa that can complete QNLI using Equation 1 with only a 0.56% and 1.01%
performance decrease compared to using full model representations and a
classification head. These findings help explain recent results showing that
_encouraging_ even larger variance in outlier dimensions is beneficial to LLM
fine-tuning performance Rudman and Eickhoff (2023).

Additionally, our finding that 1-D subspaces contain task-specific knowledge
strengthens the arguments that LLMs store linguistic knowledge in a low-
dimensional subspace Hernandez and Andreas (2021); Coenen et al. (2019); Zhang
et al. (2023). The persistence of the same small set of outlier dimensions in
pre-training and fine-tuning across various classification tasks and random
seeds provides strong evidence that the low-dimensional subspaces learned for
different tasks are highly similar. Namely, when fine-tuning, certain LLMs
adapt the same small set of outlier dimensions to store task-specific
knowledge.

##  5 Conclusions & Future Works

This study challenges the dominant belief in the literature that outlier
dimensions are detrimental to model performance by demonstrating that 1) the
exact outlier dimensions that emerge in pre-training persist when fine-tuning
models regardless of the classification task or random seed and 2) in some
LLMs, outlier dimensions contain enough task-specific knowledge to linearly
separate points by class label. However, it is still unclear why the principal
outlier dimension contains task-specific knowledge in some models and not
others. Future work should investigate the specifics of these occurrences and
how this finding is affected by model scale, architectural choices, and
training objectives. Ultimately, understanding the mechanisms and implications
of outlier dimensions in LLMs can contribute to advancements in transfer
learning, model interpretability, and optimizing performance in several NLP
tasks.

##  6 Limitations

Our study follows the common practice of only considering binary
classification tasks. Studies have yet to investigate how changing outlier
dimensions behave when fine-tuning for alternative tasks such as question-
answering or generative tasks. We limit our analysis to smaller models that
are easy to fine-tune. We do not consider how model size impacts the presence
of outlier dimensions and whether outlier dimensions store task-specific
information with very large LLMs. However, outlier dimensions will likely
continue to play a role in larger models, given that outlier dimensions are
persistent in GPT-2 and that most of the largest models in NLP are transformer
decoders.

## References

  * Ansuini et al. (2019) Alessio Ansuini, Alessandro Laio, Jakob H. Macke, and Davide Zoccolan. 2019.  _Intrinsic Dimension of Data Representations in Deep Neural Networks_. Curran Associates Inc., Red Hook, NY, USA.
  * Biderman et al. (2023) Stella Biderman, Hailey Schoelkopf, Quentin Anthony, Herbie Bradley, Kyle O’Brien, Eric Hallahan, Mohammad Aflah Khan, Shivanshu Purohit, USVSN Sai Prashanth, Edward Raff, Aviya Skowron, Lintang Sutawika, and Oskar van der Wal. 2023.  Pythia: A suite for analyzing large language models across training and scaling.
  * Cai et al. (2021) Xingyu Cai, Jiaji Huang, Yuchen Bian, and Kenneth Church. 2021.  Isotropy in the contextual embedding space: Clusters and manifolds.  In _International Conference on Learning Representations_.
  * Coenen et al. (2019) Andy Coenen, Emily Reif, Ann Yuan, Been Kim, Adam Pearce, Fernanda Viégas, and Martin Wattenberg. 2019.  Visualizing and measuring the geometry of bert.
  * Dagan et al. (2005) Ido Dagan, Oren Glickman, and Bernardo Magnini. 2005.  The pascal recognising textual entailment challenge.  In _Proceedings of the First International Conference on Machine Learning Challenges: Evaluating Predictive Uncertainty Visual Object Classification, and Recognizing Textual Entailment_ , MLCW’05, page 177–190, Berlin, Heidelberg. Springer-Verlag.
  * Devlin et al. (2018) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018.  BERT: pre-training of deep bidirectional transformers for language understanding.  _CoRR_ , abs/1810.04805.
  * Dolan and Brockett (2005) William B. Dolan and Chris Brockett. 2005.  Automatically constructing a corpus of sentential paraphrases.  In _Proceedings of the Third International Workshop on Paraphrasing (IWP2005)_.
  * Gao et al. (2019) Jun Gao, Di He, Xu Tan, Tao Qin, Liwei Wang, and Tie-Yan Liu. 2019.  Representation degeneration problem in training natural language generation models.  _CoRR_ , abs/1907.12009.
  * Geiping and Goldstein (2022) Jonas Geiping and Tom Goldstein. 2022.  Cramming: Training a language model on a single gpu in one day.
  * Gordon et al. (2020) Mitchell Gordon, Kevin Duh, and Nicholas Andrews. 2020.  Compressing BERT: Studying the effects of weight pruning on transfer learning.  In _Proceedings of the 5th Workshop on Representation Learning for NLP_ , pages 143–155, Online. Association for Computational Linguistics.
  * Hernandez and Andreas (2021) Evan Hernandez and Jacob Andreas. 2021.  The low-dimensional linear geometry of contextualized word representations.  _CoRR_ , abs/2105.07109.
  * Kovaleva et al. (2021) Olga Kovaleva, Saurabh Kulshreshtha, Anna Rogers, and Anna Rumshisky. 2021.  BERT busters: Outlier dimensions that disrupt transformers.  In _Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021_ , pages 3392–3405, Online. Association for Computational Linguistics.
  * Lan et al. (2020) Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. 2020.  Albert: A lite bert for self-supervised learning of language representations.
  * Liang et al. (2021) Yuxin Liang, Rui Cao, Jie Zheng, Jie Ren, and Ling Gao. 2021.  Learning to remove: Towards isotropic pre-trained BERT embedding.  _CoRR_ , abs/2104.05274.
  * 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.  _CoRR_ , abs/1907.11692.
  * Mu et al. (2017) Jiaqi Mu, Suma Bhat, and Pramod Viswanath. 2017.  All-but-the-top: Simple and effective postprocessing for word representations.  _CoRR_ , abs/1702.01417.
  * Prasanna et al. (2020) Sai Prasanna, Anna Rogers, and Anna Rumshisky. 2020.  When BERT Plays the Lottery, All Tickets Are Winning.  In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pages 3208–3229, Online. Association for Computational Linguistics.
  * Puccetti et al. (2022) Giovanni Puccetti, Anna Rogers, Aleksandr Drozd, and Felice Dell’Orletta. 2022\.  Outlier dimensions that disrupt transformers are driven by frequency.  In _Findings of the Association for Computational Linguistics: EMNLP 2022_ , pages 1286–1304, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
  * Radford et al. (2019) Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019.  Language models are unsupervised multitask learners.  _OpenAI blog_ , 1(8):9.
  * Rajaee and Pilehvar (2021) Sara Rajaee and Mohammad Taher Pilehvar. 2021.  A cluster-based approach for improving isotropy in contextual embedding space.  In _Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 2: Short Papers)_ , pages 575–584, Online. Association for Computational Linguistics.
  * Rajpurkar et al. (2016) Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016.  SQuAD: 100,000+ questions for machine comprehension of text.  In _Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing_ , pages 2383–2392, Austin, Texas. Association for Computational Linguistics.
  * Recanatesi et al. (2019) Stefano Recanatesi, Matthew Farrell, Madhu Advani, Timothy Moore, Guillaume Lajoie, and Eric Shea-Brown. 2019.  Dimensionality compression and expansion in deep neural networks.  _CoRR_ , abs/1906.00443.
  * Rudman and Eickhoff (2023) William Rudman and Carsten Eickhoff. 2023.  Stable anisotropic regularization.
  * Rudman et al. (2022) William Rudman, Nate Gillman, Taylor Rayne, and Carsten Eickhoff. 2022.  IsoScore: Measuring the uniformity of embedding space utilization.  In _Findings of the Association for Computational Linguistics: ACL 2022_ , pages 3325–3339, Dublin, Ireland. Association for Computational Linguistics.
  * Sanh et al. (2020) Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf. 2020.  Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter.
  * Socher et al. (2013) Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Ng, and Christopher Potts. 2013.  Recursive deep models for semantic compositionality over a sentiment treebank.  In _Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing_ , pages 1631–1642, Seattle, Washington, USA. Association for Computational Linguistics.
  * Timkey and van Schijndel (2021) William Timkey and Marten van Schijndel. 2021.  All bark and no bite: Rogue dimensions in transformer language models obscure representational quality.  _CoRR_ , abs/2109.04404.
  * Wang et al. (2018) Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2018.  GLUE: A multi-task benchmark and analysis platform for natural language understanding.  In _Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP_ , pages 353–355, Brussels, Belgium. Association for Computational Linguistics.
  * Warstadt et al. (2019) Alex Warstadt, Amanpreet Singh, and Samuel R. Bowman. 2019.  Neural network acceptability judgments.  _Transactions of the Association for Computational Linguistics_ , 7:625–641.
  * Zhang et al. (2023) Zhong Zhang, Bang Liu, and Junming Shao. 2023.  Fine-tuning happens in tiny subspaces: Exploring intrinsic task-specific subspaces of pre-trained language models.
  * Zhou et al. (2020) Wenxuan Zhou, Bill Yuchen Lin, and Xiang Ren. 2020.  Isobn: Fine-tuning BERT with isotropic batch normalization.  _CoRR_ , abs/2005.02178.
  * Zhu et al. (2018) Zhanxing Zhu, Jingfeng Wu, Bing Yu, Lei Wu, and Jinwen Ma. 2018.  The anisotropic noise in stochastic gradient descent: Its behavior of escaping from sharp minima and regularization effects.

##  Appendix A Dataset Details

Stanford Sentiment Treebank with 2 classes (SST-2) is a binary classification
task where models must determine whether a short movie review is positive or
negative in sentiment Socher et al. (2013). Question-answering Natural
Language Inference (QNLI) is a binary natural language inference task where
models must decide whether or not a given answer is entailed from a specified
question Rajpurkar et al. (2016). Recognizing Textual Entailment (RTE) is a
binary classification task where a model must determine if a given sentence
logically follows a preceding sentence. The Microsoft Research Paraphrase
Corpus (MRPC) tasks models with determining if a pair of sentences are
paraphrases of each other (i.e., semantically equivalent). The Quora Question
Pairs (QQP) dataset consists of question pairs from Quora. Models must
determine if the sentence pairs are semantically equivalent. Note that all
tasks are datasets in the GLUE benchmark Wang et al. (2018).

Model L.R. Batch Size Epoch BERT 3e-5 32 2 ALBERT 1e-5 32 3 DistilBERT 1e-5 64
5 RoBERTa 1e-5 64 3 GPT-2 1e-5 32 3 Pythia-70M 1e-5 32 4 Pythia-160M 1e-5 32 4
Pythia-410M 1e-5 32 4

Table 2: Detailed model hyperparameters.

BERT ALBERT DistilBERT RoBERTa GPT-2 Pythia-70M Pythia-160M Pythia-410M Task
Acc Var % Acc Var % Acc Var % Acc Var % Acc Var % Acc Var % Acc Var % Acc Var
% SST-2 91.37 $\Delta$ 0.53 96 91.69$\Delta$0.23 99 89.42$\Delta$0.80 99
93.26$\Delta$1.15 96 91.43$\Delta$0.37 99 76.03$\Delta$12.91 64
87.23$\Delta$2.22 96 94.53 $\Delta$ 0.00 88 QNLI 89.66 $\Delta$ 0.56 99
90.23$\Delta$1.15 99 82.65$\Delta$4.43 98 91.84 $\Delta$ 1.01 94
85.73$\Delta$2.36 99 67.46$\Delta$15.82 56 85.00$\Delta$0.47 99 93.75
$\Delta$+2.56 92 RTE 61.73$\Delta$+1.18 88 67.68$\Delta$+1.48 98
55.69$\Delta$+0.99 31 79.69$\Delta$+4.09 95 60.29$\Delta$2.19 100
55.59$\Delta$+0.83 38 55.32$\Delta$10.50 19 60.94$\Delta$15.23 70 MRPC
80.69$\Delta$4.83 98 82.97$\Delta$4.65 92 74.08$\Delta$9.17 95
84.38$\Delta$2.1 93 75.06$\Delta$4.89 99 68.38$\Delta$4.64 13
68.44$\Delta$8.36 96 70.31$\Delta$11.76 87 QQP 87.59$\Delta$2.81 93
85.56$\Delta$5.94 94 81.29$\Delta$8.78 97 89.14$\Delta$2.03 90
87.07$\Delta$2.59 99 70.54$\Delta$18.80 66 85.17 $\Delta$ 4.43 70
89.84$\Delta$+4.54 98 Avg. 82.21 $\Delta$ 1.50 97 83.67$\Delta$1.90 97
76.62$\Delta$4.44 85 87.66$\Delta$0.43 94 79.91$\Delta$2.48 99
67.60$\Delta$10.27 58 76.24$\Delta$5.20 76 81.88$\Delta$3.9 87

Table 3: Maximum value of applying our brute force algorithm to all 1D
subspaces in the last layer sentence embedding to the full model performance.
$\Delta$ represents the percent change between the maximum 1D value and the
full model performance. Note that bold entries are those where the best 1D
subspace performs better than the full model representations. Our brute force
algorithm on the best 1D subspace. Variance % is the percentile of the
variance of the dimension that corresponds to the maximum brute-force
classification accuracy. The reported performance is an average over 4 random
seeds.

##  Appendix B Hyperparameter Details

Following Geiping and Goldstein (2022), we hyperparameter-tune each model on a
single task to learn a set of global hyperparameters. We then use the set of
global hyperparameters to fine-tune each model on the remaining tasks. For
this study, we learn global hyperparameters from QNLI and train our models
using 4 random seeds. Note that we exclude COLA Warstadt et al. (2019) from
analysis as Geiping and Goldstein (2022) find COLA is highly sensitive to
hyperparameter tuning and performs poorly with a global set of parameters. For
each model, we search for the optimal combination of learning rate {1e-5,
3e-5, 5e-5, 1e-4}, batch size {16, 32, 64} and the number of training epochs
{1,2,3,4,5}. To correctly perform the hyperparameter tuning, we randomly
remove 5% of the training data and use it as hyperparameter-tuning evaluation
data since we report performance results on the GLUE validation data. Table 2
details the complete set of hyperparameters used for each task in this paper.
Note: we train all of our models using mixed-precision training, except for
Pythia-70M and Pythia-160M. For Pythia-70M and Pythia-160M, we use full
precision since we received NaN values in our loss function when using mixed-
point precision training. Once we learn the global hyperparameters set in
Table 2, we fine-tune the models on random seeds 1,2,3,4.

Figure 4: Average activation diagrams of sentence embeddings on the SST-2
validation dataset. The x-axis represents the index of the dimension, and the
y-axis is the corresponding magnitude in that given dimension. Top: pre-
trained models where no fine-tuning occurs. Bottom: models fine-tuned to
complete SST-2.

##  Appendix C Persistence of Outlier Dimensions Continued

First, note that the dimension of Pythia-70M’s activation space is 512, and
the dimension of Pythia-410M’s activation space is 1028. All other models have
activation spaces with 768 dimensions.Table 4 lists the number of outlier
dimensions and the average maximum variance value of all models on all tasks.
Fine-tuning models increases both the number of outlier dimensions present in
embedding space as well as the average maximum variance value. This trend is
the strongest for the encoder models considered in this paper as well as GPT-2
and Pythia-70M.

Pre-Trained Fine-Tuned Model Num Outliers Avg. Var($\rho$) Num Outliers Avg.
Var($\rho$) BERT 2 0.10 62 4.87 ALBERT 3 3.74 60 9.30 DistilBERT 3 0.04 25
4.68 RoBERTa 4 0.02 64 13.45 GPT-2 6 619.18 8 3511.82 Pythia-70M∗ 2 13.49 4
61.54 Pythia-160M 35 32.71 27 9.85 Pythia-410M∗ 11 12.15 129 6.48

Table 4: Counts of the number of outlier dimensions that appear across all
tasks and the average variance value of the principal outline dimensions,
$\rho$.

##  Appendix D All 1-D Results

#### Variance vs. Performance

In this Section, we provide full results for the experiment in Section 3.3.
Namely, we apply Equation 1 to all 1-dimensional subspaces in the sentence
embeddings of each model on every task. For nearly every model and every task,
we find the same strong correlation between a dimension variance and the
ability to encode task-specific information. There are very few exceptions to
this trend. However, there are two tasks (RTE& MRPC) where there is no strong
correlation between performance and variance for some of the models considered
in this paper. Note that in MRPC, a correlation between high variance value
and performance does not emerge as Pythia-70M and Pythia-160M barely perform
above predicting the class majority label of 68.38%. In fact, no 1-D subspace
of Pythia-70M fine-tuned on MRPC performs above “random” performance of
68.38%. For RTE, there is only a mild correlation between variance and
performance for BERT, ALBERT, and RoBERTa. For DistilBERT and the Pythia
models, the correlation between variance and performance degrades even
further. We hypothesize this is in part due to RTE being a difficult task
where models tend to perform poorly. An interesting direction of future work
would be to see if there are types of tasks, such as question-answering or
textual entailment, that impact an outlier dimension’s ability to store task-
specific information.

#### Maximal 1-D Subspaces

Figures 3 and 5 demonstrate that oftentimes the principal outlier dimension is
not the best performing 1-D subspace. In Table 3, we report the maximum
performance of a 1-D subspace after applying Equation 1 to complete the
downstream task along with the percentile of the variance of the maximal 1-D
subspace. Trends in Table 3 provide further evidence for our finding that the
variance of the activation value correlates with 1-D performance. With the
exception of Pythia-70M, the average performance decrease between the maximum
1-D performance and the full model performance is less than $\approx$5% for
all models considered in this paper. Surprisingly, we find 7 cases where the
maximum 1-D subspace performs better than feeding the full representations
into a classification head. This finding is the most pronounced on RoBERTa-
RTE, Pythia-410M-QQP, and Pythia-410M-QNLI, where the best 1-D subspace
improves upon full model performance by 4.09%, 4.54%, and 2.56%, respectively.

Figure 5: Comparing the downstream performance of all 1-D subspace of sentence
embedding activations on SST-2, RTE, MRPC, and QQP against the variance in
that given dimension. Results for all tasks are available in Section D in the
Appendix. The red dashed line indicates the threshold for whether a dimension
qualifies as an “outlier dimension” (i.e. 5x the average variance in vector
space).

##  Appendix E All Activation Diagrams

In this section, we report the remaining models’ (RoBERTa, Pythia-70M,
Pythia-160M, and Pythia-410M) activation diagrams on SST-2. Trends on SST-2
are representative of all of the tasks considered in this paper. We report a
similar phenomenon of variance drastically increasing in RoBERTa and
Pythia-70M after fine-tuning, particularly in outlier dimensions. The Pythia
models, however, exhibit different trends. In Pythia-160M and Pythia-410M, the
average variance in the principal outlier dimension decreases after fine-
tuning. Table 4 shows that the average max variance decreases from 32.71 to
9.85 in Pythia-160M and decreases from 12.15 to 6.48 in Pythia-410M.
Interestingly, in Pythia-70M and Pythia-160M, the embedding dimensions are
much further from the origin compared to every other model considered in this
paper. Our results highlight how, even for models with similar architectures
(Pythia models and GPT-2), the structure of embedding space can be very
dissimilar. Further research is needed to understand how model architecture
and training objectives impact the structure of model embeddings.


# Practical quantum key distribution with non-phase-randomized coherent states

Li Liu  State Key Laboratory of Networking and Switching Technology, Beijing
University of Posts and Telecommunications, Beijing, 100876, China  School of
Science, Beijing University of Posts and Telecommunications, Beijing, 100876,
China  Department of Electrical & Computer Engineering, National University of
Singapore, Singapore  Yukun Wang<EMAIL_ADDRESS>Department of Electrical
& Computer Engineering, National University of Singapore, Singapore  Emilien
Lavie  Department of Electrical & Computer Engineering, National University of
Singapore, Singapore  Arno Ricou  Centre for Quantum Technologies, National
University of Singapore, Singapore  Chao Wang  Department of Electrical &
Computer Engineering, National University of Singapore, Singapore  Fen Zhuo
Guo  State Key Laboratory of Networking and Switching Technology, Beijing
University of Posts and Telecommunications, Beijing, 100876, China  School of
Science, Beijing University of Posts and Telecommunications, Beijing, 100876,
China  Charles Ci Wen Lim<EMAIL_ADDRESS>Department of Electrical &
Computer Engineering, National University of Singapore, Singapore  Centre for
Quantum Technologies, National University of Singapore, Singapore

###### Abstract

Quantum key distribution (QKD) based on coherent states is well known for its
implementation simplicity, but it suffers from loss-dependent attacks based on
optimal unambiguous state discrimination. Crucially, previous research has
suggested that coherent-state QKD is limited to short distances, typically
below 100 km assuming standard optical fiber loss and system parameters. In
this work, we propose a six-coherent-state phase-encoding QKD protocol that is
able to tolerate the total loss of up to 38 dB assuming realistic system
parameters, and up to 56 dB loss assuming zero noise. The security of the
protocol is calculated using a recently developed security proof technique
based on semi-definite programming, which assumes only the inner-product
information of the encoded coherent states, the expected statistics, and that
the measurement is basis-independent. Our results thus suggest that coherent-
state QKD could be a promising candidate for high-speed provably-secure QKD.

††preprint: APS/123-QED

##  I Introduction

Quantum key distribution (QKD) Bennett and Brassard (1984) is one of the most
established quantum information technologies to date. Its basic goal is to
distribute secret keys between two remote users (called Alice and Bob)
embedded in an untrusted network. Importantly, unlike conventional key
distribution methods, QKD is provably-secure and can be safely used with any
cryptographic protocol that requires long-term security assurance. For an
overview of QKD and its recent developments, we refer the interested reader to
Refs. Gisin  _et al._ (2001); Scarani  _et al._ (2009); Lo  _et al._ (2014).

In prepare-and-measure QKD, there are generally two classes of coherent-state
protocols, namely those that are based on phase randomization and those that
give the phase reference information to Eve (the adversary). In the former,
one first uniformly randomizes the phase of the coherent state
${\lvert\sqrt{\mu}e^{i\theta}\rangle}$ to create a mixture of photon number
states, i.e.,

$\rho_{\mu}=\int_{0}^{2\pi}\frac{d\theta}{2\pi}{\lvert\sqrt{\mu}e^{i\theta}\rangle\\!\langle\sqrt{\mu}e^{i\theta}\rvert}=e^{-\mu}\sum_{n\geq
0}\frac{\mu^{n}}{n!}{\lvert n\rangle\\!\langle n\rvert}.$ (1)

This mixture follows a Poisson distribution and emits a single-photon state
with probability $\mu e^{-\mu}$ and multi-photon states with probability
$1-e^{-\mu}(1+\mu)$, where $\mu$ is the mean photon number of the signal.
Then, by using a statistical technique called the decoy-state method to bound
the fraction of detected single-photon states, one can get secret key rates
that are comparable to that with a true single-photon source Hwang (2003); Lo
_et al._ (2005); Wang (2005). In the following, we shall refer to phase-
randomized coherent-state QKD as decoy-state QKD since they often mean the
same protocol in practice.

In the case that the phase reference is given to Eve, she no longer sees a
mixture of photon number states, but a coherent state
${\lvert\alpha_{x}\rangle}$ that is randomly drawn from a set of possible
preparations $\\{{\lvert\alpha_{x}\rangle}\\}_{x}$, which is necessarily
linearly independent. Crucially, based on this phase information, Eve can
optimize her attack strategy to distinguish between different subsets of the
preparation set Dus̆ek  _et al._ (2000); Sun  _et al._ (2012); Tang  _et al._
(2013). In the worst case scenario (given the channel loss is sufficiently
high), she can determine the exact value of $x$ by performing unambiguous
state discrimination. For this reason, most existing security analyses of non-
phase-randomized coherent-state QKD show that the tolerable channel loss is
significantly below that of decoy-state QKD Yuen (1996); Lo and Preskill
(2007). For example, assuming standard experimental settings, we find that the
maximum distance (fiber length) of the phase-encoding coherent-state QKD
protocol is generally shorter than 100 km, while decoy-state QKD can achieve
up to about 250 km (see the simulation results below).

However, in practice, it may be more attractive to consider non-phase-
randomized coherent-state QKD. The main reason is that the set of security
assumptions for non-phase-randomized coherent-state QKD is typically less
stringent than that of decoy-state QKD. To appreciate this point, we note that
it is very important for decoy-state QKD systems to completely randomize the
phase of their quantum signals. If this assumption is not met, then there
could be serious security loopholes Sun  _et al._ (2012); Tang  _et al._
(2013). Recently, it has been pointed out that the requirement of ideal
continuous phase randomization can be replaced by discrete phase randomization
Cao  _et al._ (2015). This work represents an important step towards making
decoy-state QKD more practical, however it introduces additional complexity
into the security analysis, which can be tricky when considering finite-length
keys. Thus, for practical reasons, it may still be of interest to investigate
new coherent-state QKD protocols that can distribute secret keys over longer
distances.

In order to achieve good secret key rates using non-phase-randomized coherent
states, it is important to have a tight estimation of Eve’s information about
the secret key. While in principle one could obtain a tight estimation of
Eve’s information by considering all the possible eavesdropping strategies, it
is computationally intractable to fully characterize them, especially if the
underlying Hilbert space dimension is unknown. To resolve this technical
difficulty, here we employ the numerical tool introduced in Ref. Wang  _et
al._ (2019) to bound Eve’s information, which roughly speaking, converts the
characterization problem of Eve’s strategies into a tractable hierarchy of
semi-definite programs (SDP). It has been shown in Ref. Wang  _et al._ (2019)
that the SDP method provides a tighter bound on Eve’s information as compared
to existing methods that use the so-called quantum coin method Lo and Preskill
(2007). Additionally, the SDP method is semi-device-independent (SDI)
Pawłowski and Brunner (2011); Bowles  _et al._ (2014); Wang  _et al._ (2015);
Woodhead and Pironio (2015); Himbeeck  _et al._ (2017); Rusca  _et al._
(2019), namely the detailed characterization of Bob’s measurements is no
longer necessary, but different to previous SDI which based on dimension or
energy assumption, the analysis here is made based on the known inner product
information of the coherent states. As such, the security certified by this
method is robust against a large class of quantum device flaws and
imperfections.

In this work, we propose a six-coherent-state protocol and show that it offers
significant advantages in both secret key rate and transmission distance over
existing coherent-state QKD protocols Lo and Preskill (2007); Wang  _et al._
(2019). The organization of the paper is as follows: in Sec. II, for
pedagogical reasons, we first review a standard coherent-state QKD protocol
that encodes the secret key into the relative phase of the coherent states. In
Sec. III, we first introduce a six-coherent-state protocol which allows the
test coherent states to use different mean photon number from that of the key
states. Then, we use the method introduced in Ref. Wang  _et al._ (2019) to
derive the secret key rate of the protocol and simulate its expected
performance using standard experimental parameters. Finally, we conclude our
findings in Sec. IV.

##  II Phase-encoding BB84 coherent-state QKD

In this section, we first review a popular coherent-state QKD protocol, which
is inspired by the celebrated Bennett & Brassard 1984 (BB84) QKD Bennett and
Brassard (1984). Here, the protocol encodes the secret bit into the relative
phase of two coherent states, where the first coherent state is the signal
state (the modulated signal) and the second coherent state is the reference
state (fixed and whose phase reference is given to Eve). More specifically,
Alice sends one of four states randomly:

$\displaystyle{\lvert\tilde{0}_{\rm{key}}\rangle}={\lvert\alpha\rangle}_{R}\otimes{\lvert\alpha\rangle}_{S},$
$\displaystyle{\lvert\tilde{1}_{\rm{key}}\rangle}={\lvert\alpha\rangle}_{R}\otimes{\lvert-\alpha\rangle}_{S},$
$\displaystyle{\lvert\tilde{0}_{\rm{test}}\rangle}={\lvert\alpha\rangle}_{R}\otimes{\lvert
i\alpha\rangle}_{S},$
$\displaystyle{\lvert\tilde{1}_{\rm{test}}\rangle}={\lvert\alpha\rangle}_{R}\otimes{\lvert-i\alpha\rangle}_{S},$
(2)

where the phase of $\alpha$ is relative to a fixed classical phase reference
frame that Eve can access. Here, the subscript $S$ and $R$ denote the signal
state and reference state, respectively. Then, Bob measures the signal he
receives in either key basis or test basis. When Bob measures the signal in
key basis, he combines the two modes in an interferometer, and directs modes
$a_{0,\rm{key}}$, $a_{1,\rm{key}}$ to two different threshold photon
detectors, where

$\displaystyle a_{0,\rm{key}}=(a_{R}+a_{S})/\sqrt{2},$ $\displaystyle
a_{1,\rm{key}}=(a_{R}-a_{S})/\sqrt{2}.$ (3)

In ideal case, if Alice sends ${\lvert\tilde{0}_{\rm{key}}\rangle}$ to Bob and
he measures in the key basis, detector $D_{0}$ (model $a_{0,\rm{key}}$) will
click (with some probability depending on the channel loss ) and detector
$D_{1}$ (model $a_{1,\rm{key}}$) will not click. Likewise, if Alice sends
${\lvert\tilde{1}_{\rm{key}}\rangle}$, then detector $D_{0}$ will not click
and detector $D_{1}$ will click with some probability. Hence, Bob can
determine the bit value that Alice encodes in key basis. When Bob measures in
the test basis, he directs modes $a_{0,\rm{test}}$, $a_{1,\rm{test}}$ to the
detectors, where

$\displaystyle a_{0,\rm{test}}=(a_{R}+ia_{S})/\sqrt{2},$ $\displaystyle
a_{1,\rm{test}}=(a_{R}-ia_{S})/\sqrt{2}.$ (4)

Similarly, Bob can determine the bit value that Alice encodes in test basis.
Then, Alice and Bob retain only the successful events in which they choose the
same basis through public communication. After performing error correction
step and privacy amplification step, Alice and Bob obtain the final secure
key.

To prove the security of the protocol, one can either use the quantum coin
method Lo and Preskill (2007) or the SDP method proposed in Ref. Wang  _et
al._ (2019). It has been demonstrated in the latter that the SDP method
provides a tighter security analysis. Interestingly, Ref. Wang  _et al._
(2019) also suggested that it may be useful to vary the test coherent states.
In particular, the authors demonstrated that, in the case of coherent-one-way
QKD, it is possible to significantly extend the key distribution distance by
varying the intensity of the test coherent state in the protocol. In light of
this observation, we propose the following phase-encoding QKD protocol.

##  III Six-coherent-state QKD

Here, we detail our proposed six-coherent-state protocol, and illustrate one
of its possible implementation schemes in Fig. 1.

Figure 1:  Schematic of the six-coherent-state QKD protocol. The intensity
modulator (IM) and phase modulator 1 (PM1) is positioned in Alice’s site to
prepare the intended coherent states, ${\lvert\psi_{z}\rangle}$. Phase
modulator 2 (PM2) in Bob’s site is used to randomly rotate the phase of the
signal signal by 0 or $\pi$. To avoid reducing the intensities of the coherent
states, we can either use polarization multiplexing method as shown in the
figure, or deploy active optical switches.

_Preparation_.-Alice randomly prepares one of those six quantum code states
$\\{{\lvert\psi_{z}\rangle}\\}_{z=1}^{6}$:
${\lvert\psi_{1}\rangle}={\lvert\sqrt{\mu_{1}}\rangle}_{R}{\lvert\sqrt{\mu_{1}}\rangle}_{S}$,
${\lvert\psi_{2}\rangle}={\lvert\sqrt{\mu_{1}}\rangle}_{R}{\lvert-\sqrt{\mu_{1}}\rangle}_{S}$,
${\lvert\psi_{3}\rangle}={\lvert\sqrt{\mu_{2}}\rangle}_{R}{\lvert
i\sqrt{\mu_{2}}\rangle}_{S}$,
${\lvert\psi_{4}\rangle}={\lvert\sqrt{\mu_{2}}\rangle}_{R}{\lvert-i\sqrt{\mu_{2}}\rangle}_{S}$,
${\lvert\psi_{5}\rangle}={\lvert\sqrt{\mu_{3}}\rangle}_{R}{\lvert
e^{i\theta_{1}}\sqrt{\mu_{4}}\rangle}_{S}$,
${\lvert\psi_{6}\rangle}={\lvert\sqrt{\mu_{3}}\rangle}_{R}{\lvert
e^{-i\theta_{2}}\sqrt{\mu_{4}}\rangle}_{S}$, shown in Fig. 2. Then, she sends
it to Bob via the quantum channel. The states ${\lvert\psi_{1}\rangle}$ and
${\lvert\psi_{2}\rangle}$ are used to extract keys, while the rest are used to
estimate Eve’s information about the secret key. In this case, the key bit is
encoded in the relative phase of the signal state and reference state. Here,
the intensities and phases are free parameters, which will be used to optimize
the secret key rate.

Figure 2:  Distribution of coherent states in phase space. The key basis
represents the real part of the space. Here, the intensities and phases
$\\{\theta_{1},\theta_{2}\\}$ are given by the optimization: in fact, the
optimization suggests that the optimal encoding scheme is given by
$\mu_{1}=\mu_{2}=\mu_{3}$ and $\theta_{1}=\theta_{2}=\pi/2$.

_Measurement_.-Upon receiving the state, Bob directs it to the interferometer
to recover the bit information. We use positive-operator valued measures
(POVMs) to describe Bob’s interference operations: Bob randomly performs one
of two possible POVMs denoted by $\\{B_{y}^{b}\\}$, where $y\in\\{0,1\\}$
represents basis choice. Taking signal loss and detection inefficiency into
account, each measurement has three possible outcomes
$b\in\\{0,1,\emptyset\\}$, where $\emptyset$ represents the empty detection
event. In the event that both detectors click, Bob assigns a random bit to it.
Additionally, we require that Bob’s measurements satisfy basis-independent
assumption: measurement operators corresponding to detection loss are the same
for both measurement settings, i.e. ${B_{0}^{\emptyset}}={B_{1}^{\emptyset}}$.
This is to ensure that the probability of detecting a signal is independent of
Bob’s measurement choice, which is necessary to rule out detection side-
channel attacks exploiting the channel loss Lydersen  _et al._ (2010). Thus
Bob’s three-outcome POVM is equivalent to a two-outcome POVM that determines
the key bit, preceded by a basis-independent “filter”.

_Parameter estimation and key distillation_.-Alice and Bob announce their
basis choices through the public channel and decide if the error rates fulfill
certain thresholds. If the test is successful, then Alice and Bob proceed with
error correction and privacy amplification to extract a secret key.

To compute the security of the protocol, we can use a certain entropic
uncertainty relation for quantum memories Berta  _et al._ (2010) and Fano’s
inequality Cover and Thomas (2006). Using these, it can be shown that the
asymptotic secret key rate of QKD against collective attacks is

$\displaystyle
R^{\infty}_{\rm{key}}\geq\max\\{0,p_{\rm{det}}(1-h_{2}(e_{\rm{bit}})-h_{2}(e_{\rm{ph}}))\\},$
(5)

where $e_{\rm{bit}}$ and $e_{\rm{ph}}$ are the bit error rate and phase error
rate of the key basis, $p_{\rm{det}}$ is the probability of detection in key
basis, and $h_{2}(\cdot)$ is the binary entropy function. The extension to
general attacks is then achieved by using proof techniques like the post-
selection technique Christandl  _et al._ (2009) or entropy accumulation
theorem Dupuis  _et al._ (2016). These results imply that it is sufficient to
consider security against collective attacks.

###  III.1 SDP optimization problem for bounding Eve’s information

From Eq. (5), we see that the secret key rate is obtained once we know the
detection probability, bit error rate, and the phase error rate. To obtain
these values, we first consider that Alice, Bob and Eve share a purified
tripartite state ${\lvert\Phi\rangle}$ after the transmission,

${\lvert\Phi\rangle}=\frac{{\lvert+\rangle}_{A}{\lvert\phi_{1}\rangle}_{BE}+{\lvert-\rangle}_{A}{\lvert\phi_{2}\rangle}_{BE}}{\sqrt{2}}.$
(6)

where Eve’s set of possible operations has been considered in
${\lvert\phi_{1}\rangle}_{BE}$ and ${\lvert\phi_{2}\rangle}_{BE}$. Conditioned
on Bob observing a successful detection, the bit error rate of the key basis
is then given by

$\displaystyle e_{\rm{bit}}$ $\displaystyle=$
$\displaystyle\frac{{\langle\Phi\rvert}({\lvert+\rangle\\!\langle+\rvert}\otimes
B_{0}^{1}+{\lvert-\rangle\\!\langle-\rvert}\otimes
B_{0}^{0}){\lvert\Phi\rangle}}{p_{\rm{det}}}$ (7) $\displaystyle=$
$\displaystyle\frac{{\langle\phi_{1}\rvert}B_{0}^{1}{\lvert\phi_{1}\rangle}+{\langle\phi_{2}\rvert}B_{0}^{0}{\lvert\phi_{2}\rangle}}{2p_{\rm{det}}}.$

The phase error rate in this case is the bit error rate that Alice and Bob
would have observed if ${\lvert\Phi\rangle}$ has been measured in the
$\\{{\lvert+i\rangle\\!\langle+i\rvert},{\lvert-i\rangle\\!\langle-i\rvert}\\}$
basis by Alice and $B_{1}$ basis by Bob. Mathematically, this is given by

$\displaystyle e_{\rm{ph}}$ $\displaystyle=$
$\displaystyle\frac{{\langle\Phi\rvert}({\lvert+i\rangle\\!\langle+i\rvert}\otimes
B_{1}^{0}+{\lvert-i\rangle\\!\langle-i\rvert}\otimes
B_{1}^{1}){\lvert\Phi\rangle}}{2p_{det}}$ (8) $\displaystyle=$
$\displaystyle\frac{1}{2}-{\rm{Im}}\left\\{\frac{{\langle\phi_{1}\rvert}B_{1}^{0}{\lvert\phi_{2}\rangle}-{\langle\phi_{1}\rvert}B_{1}^{1}{\lvert\phi_{2}\rangle}}{2p_{\rm{det}}}\right\\}.$

One can see that $p_{\rm{det}}$ and $e_{\rm{bit}}$ are experimentally
accessible, while the phase error rate $e_{\rm{ph}}$, which related to Eve’s
information about the secret bit is not. To get a tight estimation of
$e_{\rm{ph}}$, in principle one should optimize over Eve’s set of possible
operations, namely captured in the transformed states
${\lvert\phi_{1}\rangle}_{BE}$ and ${\lvert\phi_{2}\rangle}_{BE}$ under the
constraints imposed by the expected statistics. However, as we mentioned
earlier, this type of characterization problem is often intractable or
impossible to solve directly.

Here, we employ the numerical tool introduced in Ref. Wang  _et al._ (2019) to
estimate the phase error rate, which converts the initial characterization
problem into a hierarchy of semi-definite programs. More specifically, each
hierarchy forms a convex set which outer-approximates the quantum set.
Importantly, by going to higher hierarchies, the approximation becomes
tighter. The quantum set here means the set of measurement statistics
compatible with the set of prepared quantum signals and Bob’s measurements.
Thus, in using this method, we can optimize over the various convex sets to
bound Eve’s information, which in turn, provides a lower bound on the secret
key rate of the protocol.

With this SDP method, the detailed characterization of the quantum signals and
measurements, including their dimension, is no longer required in the
analysis. Therefore, the transmission channel can be seen as an isometric
evolution in higher dimension that takes the initial quantum signal state
$\lvert\psi_{z}\rangle$ to some pure output signal state
$\lvert\phi_{z}\rangle$, which is shared between the receivers Bob and the
network environment (possibly Eve). The inner product of the output states is
preserved after the transmission, i.e.
${\langle\phi_{z}\rvert\phi_{z}^{\prime}\rangle}={\langle\psi_{z}\rvert\psi_{z}^{\prime}\rangle}=\lambda_{zz^{\prime}}$.
In the same way, the POVMs $\\{B_{y}^{b}\\}$ can be assumed as projective
measurements in higher dimension. Then, we say that the probabilities of
observing outcomes $b$ given setting $y$ and $z$ admits a quantum system, if
there exist a quantum state ${\lvert\phi_{z}\rangle}$ and operators
$B_{y}^{b}$ such that

$\displaystyle
p(b|y,z)={\langle\phi_{z}\rvert}B_{y}^{b}{\lvert\phi_{z}\rangle}.$ (9)

where the operators $\\{B_{y}^{b}\\}$ follow the properties:

$\begin{split}&(\emph{i})\;\;\text{for}\;\text{any}\;y,B_{y}^{b}B_{y}^{b^{\prime}}=0,\forall\;b\neq
b^{\prime},\\\ &(\emph{ii})\;\Sigma_{b}{B_{y}^{b}}=\mathbb{I},\\\
&(\emph{iii})\;(B_{y}^{b})^{2}=B_{y}^{b}=(B_{y}^{b})^{\dagger}.\end{split}$

Figure 3:  The Gram matrix under six quantum states and the operators set of
$\mathcal{S}=\\{\mathbb{I},B_{0}^{0},B_{1}^{0},B^{\emptyset}\\}$. We have
assumed that ${B_{0}^{\emptyset}}={B_{1}^{\emptyset}}={B^{\emptyset}}$.
Actually this matrix is equivalent to the Gram matrix formed by the set
$\\{B_{0}^{0},B_{0}^{1},B_{1}^{0},B_{1}^{1},B^{\emptyset}\\}$, since the
correlations related to $B_{y}^{1}$ can be represented by
$\mathbb{I}-B_{y}^{0}-B^{\emptyset}$. The reason we consider $\mathcal{S}$ is
that it can reduce the matrix dimension.

A family of necessary conditions satisfied by the quantum observed
probabilities thus can be introduced. Denote
$\mathcal{S}=\\{S_{1},...,S_{m}\\}$ as a finite set of $m$ operators, where
each element is a linear combination of products of $\\{B_{y}^{b}\\}$. We
define the $nm\times nm$ block Gram matrix ${G}$:

$\displaystyle\begin{aligned}
&{G}=\Sigma_{z,z^{\prime}=1}^{n}G^{zz^{\prime}}\otimes{\lvert
e_{z}\rangle}{\langle e_{z^{\prime}}\rvert},\\\
&\text{with,}\;{G}_{(i,j)}^{zz^{\prime}}={\langle\phi_{z}\rvert}S_{i}^{\dagger}\cdot
S_{j}{\lvert\phi_{z^{\prime}}\rangle}\\\ \end{aligned}$ (10)

in which ${G}_{(i,j)}^{zz^{\prime}}$ is defined as the inner-product of the
vectors ${\langle\phi_{z}\rvert}S_{i}^{\dagger}$ and
$S_{j}{\lvert\phi_{z^{\prime}}\rangle}$, for all $z,z^{\prime}\in[n]$,
$i,j\in[m]$. ${G}_{(i,j)}^{zz^{\prime}}$ is the $ij$-entry of the matrix
${G}^{zz^{\prime}}$ and $\\{{\lvert e_{z}\rangle}\\}_{z=1}^{n}$ represents the
standard orthonormal basis of $\mathbb{R}^{n}$. Evidently, the matrix ${G}$ is
Hermitian and positive-semi-definite (PSD) Horn and Johnson (2013) by
definition.

Taking $\mathcal{S}=\\{\mathbb{I},B_{0}^{0},B_{1}^{0},B^{\emptyset}\\}$ for
example, the matrix ${G}$ is depicted in Fig. 3. The whole matrix ${G}$ is
partitioned into $6\times 6$ sub-blocks
$\\{{G}^{zz^{\prime}}\\}_{zz^{\prime}}$ by the classifier $z$, where each sub-
block has size $4\times 4$ and is illustrated in Fig. 4.

Figure 4:  The sub-block of the Gram matrix.

The entries of every sub-block ${G}^{zz^{\prime}}$ partly reflect the
properties of $(\emph{i})$ \- $(\emph{iii})$ satisfied by the operators and
the overlaps of the signal states. For instance, property (ii) implies that we
can introduce the identity operator $\mathbb{I}$ and remove one of the
operators; property (i) implies
${G}^{zz^{\prime}}_{2,2}={\langle\phi_{z}\rvert}B_{0}^{0}B_{0}^{0}{\lvert\phi_{z^{\prime}}\rangle}={\langle\phi_{z}\rvert}B_{0}^{0}{\lvert\phi_{z^{\prime}}\rangle}$
and
${G}^{zz^{\prime}}_{2,4}={\langle\phi_{z}\rvert}B_{0}^{0}B^{\emptyset}{\lvert\phi_{z^{\prime}}\rangle}=0$;
meanwhile the property (iii) implies
${\langle\phi_{z}\rvert}B_{y}^{b}B_{y}^{b^{\prime}}{\lvert\phi_{z}\rangle}=({\langle\phi_{z}\rvert}B_{y}^{b^{\prime}}B_{y}^{b}{\lvert\phi_{z}\rangle})^{\dagger}$.
In addition, since the overlaps of the code states are known, we have
${\langle\phi_{z}\rvert}\mathbb{I}{\lvert\phi_{z^{\prime}}\rangle}=\lambda_{zz^{\prime}}$.

From the definition, each set $\mathcal{S}$ of operators yields a different
Gram matrix ${G}$ and different linear constraints. The choice of a particular
$\mathcal{S}$ may seem arbitrary, but not all operators in $\mathcal{S}$ are
independent. Moreover, they can be organized in a hierarchical structure, such
that $\mathcal{S}$ can be defined inductively,

$\displaystyle\begin{aligned} &\mathcal{S}_{1}=\\{\mathbb{I},B_{y}^{b}\\}\\\
&\mathcal{S}_{2}=\mathcal{S}_{1}\bigcup\\{B^{b}_{y}B^{b^{\prime}}_{y^{\prime}}\\}\\\
&\mathcal{S}_{3}=\mathcal{S}_{2}\bigcup\\{B^{b}_{y}B^{b^{\prime}}_{y^{\prime}}B^{b}_{y}\\}\\\
&\mathcal{S}_{4}=\dots\\\ \end{aligned}$ (11)

Thus, with each increase of the hierarchy, not only the dimension of the Gram
matrix becomes larger, but also more new linear constraints are introduced.
For example,

$\begin{split}\text{for}\;\;\mathcal{S}_{2}\;\;:&\;{\langle\phi_{z}\rvert}B_{0}^{0}B_{1}^{0}{\lvert\phi_{z^{\prime}}\rangle}={\langle\phi_{z}\rvert}B_{0}^{0}\cdot
B_{0}^{0}B_{1}^{0}{\lvert\phi_{z^{\prime}}\rangle},\\\
&{\langle\phi_{z}\rvert}B_{0}^{0}B_{1}^{0}\cdot
B_{0}^{0}{\lvert\phi_{z^{\prime}}\rangle}={\langle\phi_{z}\rvert}B_{0}^{0}\cdot
B_{1}^{0}B_{0}^{0}{\lvert\phi_{z^{\prime}}\rangle},\\\
&{\langle\phi_{z}\rvert}B_{0}^{0}B_{1}^{0}\cdot
B_{1}^{0}B_{0}^{0}{\lvert\phi_{z^{\prime}}\rangle}={\langle\phi_{z}\rvert}B_{0}^{0}B_{1}^{0}B_{0}^{0}{\lvert\phi_{z^{\prime}}\rangle},\dots\\\
\text{for}\;\;\mathcal{S}_{3}\;\;:&\;{\langle\phi_{z}\rvert}B_{0}^{0}B_{1}^{0}\cdot
B_{0}^{0}B_{1}^{0}{\lvert\phi_{z^{\prime}}\rangle}\\\
&={\langle\phi_{z}\rvert}B_{0}^{0}\cdot
B_{1}^{0}B_{0}^{0}B_{1}^{0}{\lvert\phi_{z^{\prime}}\rangle}\\\
&={\langle\phi_{z}\rvert}B_{0}^{0}B_{1}^{0}B_{0}^{0}\cdot
B_{1}^{0}{\lvert\phi_{z^{\prime}}\rangle},\\\
&{\langle\phi_{z}\rvert}B_{0}^{0}B_{1}^{0}\cdot
B_{0}^{0}B_{1}^{0}B_{0}^{0}{\lvert\phi_{z^{\prime}}\rangle}\\\
&={\langle\phi_{z}\rvert}B_{0}^{0}B_{1}^{0}B_{0}^{0}\cdot
B_{1}^{0}B_{0}^{0}{\lvert\phi_{z^{\prime}}\rangle},\dots\\\ \end{split}$

We denote the quantum set by $\mathsf{Q(\lambda)}$, which is formed by the
probability distributions admitting a quantum system and the overlaps of the
code states. Moreover, let the set of probability distributions defined by
hierarchy of step $n$ be denoted as $\mathsf{Q(\lambda)_{n}}$. Then, we have
that $\mathsf{Q(\lambda)}\subseteq\mathsf{Q(\lambda)_{n}}$. In fact, it has
been demonstrated in Ref. Wang  _et al._ (2019) that in the limit of $n$
(i.e., $n\rightarrow\infty$), $\mathsf{Q(\lambda)_{n}}$ converges to
$\mathsf{Q(\lambda)}$. Ultimately, this means that the secret key rate
obtained by the SDP can only be tighter when considering higher hierarchies.

To compute Eq. (5), we thus only need to maximize $e_{\rm{ph}}$ using SDP
under the conditions that $p_{\rm{det}}$ and $e_{\rm{bit}}$ are fixed to some
experimental model. In particular, the SDP problem for maximizing the phase
error rate is:

$\begin{split}\text{maximize}:&\;e_{\rm{ph}}\\\ \text{subject
to}:&\;{\langle\phi_{z}\rvert\phi_{z^{\prime}}\rangle}=\lambda_{zz^{\prime}},{\forall
z,z^{\prime}}\\\ &\;{G}\geq 0,\;\\\ &\;\mathrm{Tr}(F_{k}{G})=p_{k},\\\
&\;\mathrm{Tr}(R_{k}{G})=g_{k},\\\ &\;e_{\rm{bit}},p_{\rm{det}}\ \text{fixed
to experimental model}\\\ \end{split}$ (12)

where $F_{k}$’s and $R_{k}$’s are constant matrices. Note that $F_{k}$’s are
used to pick up the terms in ${G}$ which are associated with the observed
distributions $p(b|x,y)$; meanwhile $R_{k}$’s are used to pick up the terms in
${G}$ which are associated with the linear constraints induced by the quantum
operators and states.

###  III.2 Numerical simulation

We simulate the secret key rate of the protocol using a realistic model, which
includes total loss (including channel loss and detection efficiency),
misalignment error of the optics, and the dark counts of single photon
detectors. As Bob uses two threshold detectors, there are four possible
outcomes when he measures a signal. By mapping double clicks randomly into 0
or 1, Bob’s measurement realizes a POVM with three outcomes: 0, 1 and
inconclusive. Note that the double clicks are interpreted as key bits Inamori
_et al._ (2007); Lo and Preskill (2007). In order to obtain a realistic
detection model, we consider the error model illustrated in Fig. 5.

Figure 5: Statistical model considering dark count and misalignment error.
Where $y\in\\{0,1\\}$ represents the basis choice, $C_{0}$ and $C_{1}$
($N_{0}$ and $N_{1}$) denote the event of detection $D_{0}$ and $D_{1}$ click
(do not click), respectively. The notation
$\mathtt{\mathdblquotechar}b\mathtt{\mathdblquotechar}\in\\{\mathtt{\mathdblquotechar}0\mathtt{\mathdblquotechar},\mathtt{\mathdblquotechar}1\mathtt{\mathdblquotechar},\mathtt{\mathdblquotechar}\emptyset\mathtt{\mathdblquotechar}\\}$
represents the outcome without considering the misalignment error, while
$b\in\\{0,1,\emptyset\\}$ denotes the outcome considering the misalignment
error.

We assume that the detector dark count rate is $p_{\rm{dc}}=10^{-7}$ and
misalignment error rate is $\varepsilon=2\%$. For a given total loss $1-\eta$,
the probability of detectors clicking and not clicking without misalignment
error are

$\begin{split}N_{j}(z,y)=&(1-p_{\rm{dc}})[\frac{{\langle\sqrt{\eta}\phi_{z}\rvert}_{R}+(-1)^{j}e^{-iy\frac{\pi}{2}}{\langle\sqrt{\eta}\phi_{z}\rvert}_{S}}{\sqrt{2}}{\lvert
0\rangle}\\\ &{\langle
0\rvert}\frac{{\lvert\sqrt{\eta}\phi_{z}\rangle}_{R}+(-1)^{j}e^{iy\frac{\pi}{2}}{\lvert\sqrt{\eta}\phi_{z}\rangle}_{S}}{\sqrt{2}}],\\\
C_{j}(z,y)=&1-N_{j}(z,y),\end{split}$ (13)

where $j\in\\{0,1\\}$ represents detector $D_{0}$ and $D_{1}$, $y\in\\{0,1\\}$
is Bob’s basis choice, ${\lvert\phi_{z}\rangle}_{S}$ and
${\lvert\phi_{z}\rangle}_{R}$ denote the signal and reference portion of the
state ${\lvert\phi_{z}\rangle}$ respectively.

Let $T(\mathtt{\mathdblquotechar}b\mathtt{\mathdblquotechar},z,y)$ denotes the
probability of getting the outcome
$\mathtt{\mathdblquotechar}b\mathtt{\mathdblquotechar}$. We have that

$\begin{split}&T(\mathtt{\mathdblquotechar}0\mathtt{\mathdblquotechar},z,y)=C_{0}(z,y)N_{1}(z,y)+\frac{C_{0}(z,y)C_{1}(z,y)}{2},\\\
&T(\mathtt{\mathdblquotechar}1\mathtt{\mathdblquotechar},z,y)=C_{1}(z,y)N_{0}(z,y)+\frac{C_{0}(z,y)C_{1}(z,y)}{2},\\\
&T(\mathtt{\mathdblquotechar}\emptyset\mathtt{\mathdblquotechar},z,y)=N_{0}(z,y)N_{1}(z,y).\end{split}$
(14)

Considering the misalignment error $\varepsilon$, the probabilities of
$B_{y}^{b}$ are

Figure 6:  For the key rate simulation, we assume a detector dark count rate
of $p_{\rm{dc}}=10^{-7}$ and a misalignment error rate of $\varepsilon=2\%$.
The comparison is based on the same error model and same experiment
parameters. The protocol of BB84 plus decoy technology we considered here
comes from Ref. Boaron  _et al._ (2018). The one-decoy scenario of Ref. Boaron
_et al._ (2018) and our six-coherent-state protocol both have two key states,
and four test states. And we have less test states compared to more-decoy
states BB84 protocol. The optimization is carried out with the MATLAB packages
YALMIP Löfberg (2004) and the SDP solvers SEDUMI Sturm (1999).

$\begin{split}&P(0,z,y)=(1-\varepsilon)T(\mathtt{\mathdblquotechar}0\mathtt{\mathdblquotechar},z,y)+\varepsilon
T(\mathtt{\mathdblquotechar}1\mathtt{\mathdblquotechar},z,y),\\\
&P(1,z,y)=(1-\varepsilon)T(\mathtt{\mathdblquotechar}1\mathtt{\mathdblquotechar},z,y)+\varepsilon
T(\mathtt{\mathdblquotechar}0\mathtt{\mathdblquotechar},z,y),\\\
&P(\emptyset,z,y)=T(\mathtt{\mathdblquotechar}\emptyset\mathtt{\mathdblquotechar},z,y).\end{split}$
(15)

Table 1:  The statistics of each POVM for each coming states.  | $B_{0}^{0}$ | $B_{0}^{1}$ | $B_{y}^{\emptyset}$ | $B_{1}^{0}$ | $B_{1}^{1}$
---|---|---|---|---|---
${\lvert\phi_{1}\rangle}$ | $P(0,1,0)$ | $P(1,1,0)$ | $P(\emptyset,1,y)$ | $P(0,1,1)$ | $P(1,1,1)$
${\lvert\phi_{2}\rangle}$ | $P(0,2,0)$ | $P(1,2,0)$ | $P(\emptyset,2,y)$ | $P(0,2,1)$ | $P(1,2,1)$
${\lvert\phi_{3}\rangle}$ | $P(0,3,0)$ | $P(1,3,0)$ | $P(\emptyset,3,y)$ | $P(0,3,1)$ | $P(1,3,1)$
${\lvert\phi_{4}\rangle}$ | $P(0,4,0)$ | $P(1,4,0)$ | $P(\emptyset,4,y)$ | $P(0,4,1)$ | $P(1,4,1)$
${\lvert\phi_{5}\rangle}$ | $P(0,5,0)$ | $P(1,5,0)$ | $P(\emptyset,5,y)$ | $P(0,5,1)$ | $P(1,5,1)$
${\lvert\phi_{6}\rangle}$ | $P(0,6,0)$ | $P(1,6,0)$ | $P(\emptyset,6,y)$ | $P(0,6,1)$ | $P(1,6,1)$

Thus, the statistics of each POVM measurement on each coming states can be
evaluated, as shown in Tab. 1. Accordingly, the probability of detecting a
signal $p_{\rm{det}}$ for key basis and the corresponding bit error rate
$e_{\rm{bit}}$ are then given by

$\begin{split}p_{det}&=T(\mathtt{\mathdblquotechar}0\mathtt{\mathdblquotechar},1,0)+T(\mathtt{\mathdblquotechar}1\mathtt{\mathdblquotechar},1,0)\\\
&=1-(1-p_{\rm{dc}})^{2}e^{-2\eta|\alpha|^{2}},\\\ e_{bit}&=\frac{\varepsilon
T(\mathtt{\mathdblquotechar}0\mathtt{\mathdblquotechar},1,0)+(1-\varepsilon)T(\mathtt{\mathdblquotechar}1\mathtt{\mathdblquotechar},1,0)}{p_{det}}\\\
&=\frac{\frac{p_{dc}}{2}+\varepsilon(1-p_{dc})+(\frac{p_{dc}}{2}-\varepsilon)(1-p_{dc})e^{-2\eta|\alpha|^{2}}}{p_{det}}.\end{split}$
(16)

Subsequently, we maximize $e_{\rm{ph}}$ over the set of compatible
probabilities using the first level of the hierarchy and the results of the
numerical optimization with errors (blue curve) and without errors (rose
curve) are shown in Fig. 6. In the absence of errors, the tolerable total loss
is extended to more than 55 dB, which is extremely close to the collective
beam-splitting attack bound (an upper bound on the secret key rate). This
suggests that the six-coherent-state QKD protocol is pretty robust against the
total loss in the absence of errors. Taking into account practical errors, the
tolerable total loss reaches up to 38 dB, which is significantly higher than
previous results Lo and Preskill (2007); Wang  _et al._ (2019) (around 23, 25
dB respectively) assuming the same error model specified in Fig. 5. As
compared with the protocol in Ref. Wang  _et al._ (2019), additional two test
states are included in our protocol to give better characterization of the
quantum system between Alice and Bob. Thus, a tighter bound on Eve’s
information could be obtained.

Moreover, through the optimization, we observe that the secret key rate is
optimized when $\mu_{1}=\mu_{2}=\mu_{3}$ and $\theta_{1}=\theta_{2}=\pi/2$.
This is expected since $\mu_{1}=\mu_{2}=\mu_{3}$ corresponds to larger
overlaps between the six coherent states, which imply that it will be more
challenging for Eve to distinguish them, meanwhile
$\theta_{1}=\theta_{2}=\pi/2$ provides more characterization of the test basis
($B_{1}$), and thus, resulting in a higher secret key rate. Therefore, in
practice, one has to only modulate the amplitude between two levels ($\mu_{1}$
and $\mu_{4}$) which makes our protocol highly practical and suitable for
high-speed implementation.

For completeness, we also plot the secret key rate, obtained using decoy-state
method, of the protocol in Ref. Boaron  _et al._ (2018) that is based on time-
bin encoding of phase-randomised coherent states. The asymptotic secret key
rate is estimated using the formula given in Ref. Ma  _et al._ (2005), without
taking into account of the statistical corrections of finite-length keys.
Considering the same simulation parameters (i.e., total loss , misalignment
error and dark count rate), the plot of secret key rate against loss of the
decoy-state QKD protocol is shown in Fig. 6. The comparison shows that secret
key rate of our protocol is comparable to that of the one-decoy-state protocol
in low loss regime. Specifically, the key rates differ by only one order of
magnitude in the region when the loss is less than 25 dB. For further
comparison, we also simulated the optimized secret key rates of BB84 protocol
with 2 decoy states and infinite number of decoy states, and our protocol
still shows appreciable performance in the short distance regime.

##  IV Conclusion

In conclusion, on the one hand, phase randomization is a critical assumption
made in the analysis of most coherent state QKD protocols and any deviation
from preparing perfectly phase-randomized coherent states may pose serious
threats of a security breach. On the other hand, existing analysis on non-
phase-randomized coherent states are overly pessimistic and yield secret key
rates that are inferior to alternative protocols based on the decoy-state
method. In this paper, we presented and analyzed the security of a six-
coherent-state phase encoding QKD protocol based on non-phase-randomized
coherent states. Our analysis requires fewer assumptions on both the quantum
state preparation and measurement processes as it relies solely on the
overlaps of the code states as well as the observed statistics. Simulating
with realistic experimental model (dark count rate of $10^{-7}$ and
misalignment error of $2\%$), our protocol can tolerate a total loss of up to
38 dB, which is much higher than previous works. Moreover, we observed that
the secure key rates of our protocol are comparable with the BB84 decoy-state
protocol in the low loss regime. In addition to the improved key rates, our
protocol only requires the modulation of six relative phases and two
amplitudes, which is easy to implement. Hence, we have shown that one could
implement coherent state QKD without performing phase randomization and yield
comparable key rates with other known protocols.

###### Acknowledgements.

We would like to thank Hugo Zbinden and Goh Koon Tong for the valuable
comments and careful reading of the manuscript. This research is supported by
the National Research Foundation (Singapore), the Ministry of Education
(Singapore), the National University of Singapore, the Asian Office of
Aerospace Research and Development, and the National Natural Science
Foundation of China (Grant No.61572081 and No.61672110). Li Liu kindly
acknowledges support from the China Scholarship Council.

## References

  * Bennett and Brassard (1984) C. H. Bennett and G. Brassard, in  _Proceedings of the IEEE International Conference on Computers, Systems and Signal Processing_ (IEEE Press, New York, 1984) pp. 175–179.
  * Gisin  _et al._ (2001) N. Gisin, G. Ribordy, W. Tittel, and H. Zbinden, Rev. Mod. Phys. 74, 145 (2001).
  * Scarani  _et al._ (2009) V. Scarani, H. Bechmann-Pasquinucci, N. J. Cerf, M. Dus̆ek, N. Lütkenhaus, and M. Peev, Rev. Mod. Phys. 81, 1301 (2009).
  * Lo  _et al._ (2014) H. K. Lo, M. Curty, and K. Tamaki, Nat. Photon. 8, 595 (2014).
  * Hwang (2003) W. Y. Hwang, Phys. Rev. Lett. 91, 057901 (2003).
  * Lo  _et al._ (2005) H. K. Lo, X. Ma, and K. Chen, Phys. Rev. Lett. 94, 230504 (2005).
  * Wang (2005) X. B. Wang, Phys. Rev. Lett. 94, 230503 (2005).
  * Dus̆ek  _et al._ (2000) M. Dus̆ek, M. Jahma, and N. Lütkenhaus, Phys. Rev. A 62, 022306 (2000).
  * Sun  _et al._ (2012) S. H. Sun, M. Gao, M. S. Jiang, C. Y. Li, and L. M. Liang, Phy. Rev. A 85, 032304 (2012).
  * Tang  _et al._ (2013) Y. L. Tang, H. L. Yin, X. Ma, C. H. F. Fung, Y. Liu, H. L. Yong, T. Y. Chen, C. Z. Peng, Z. B. Chen, and J. W. Pan, Phy. Rev. A 88, 022308 (2013).
  * Yuen (1996) H. P. Yuen, Quantum Semiclassic. Opt. 8, 939 (1996).
  * Lo and Preskill (2007) H. K. Lo and J. Preskill, Quant. Inf. Comput. 7, 431 (2007).
  * Cao  _et al._ (2015) Z. Cao, Z. Zhang, H. K. Lo, and X. Ma, New J. Phys. 17, 053014 (2015).
  * Wang  _et al._ (2019) Y. Wang, I. W. Primaatmaja, E. Lavie, A. Varvitsiotis, and C. C. W. Lim, npj Quantum Information 5, 17 (2019).
  * Pawłowski and Brunner (2011) M. Pawłowski and N. Brunner, Phy. Rev. A 84, 010302(R) (2011).
  * Bowles  _et al._ (2014) J. Bowles, M. T. Quintino, and N. Brunner, Phys. Rev. Lett. 112, 140407 (2014).
  * Wang  _et al._ (2015) Y. Wang, S. J. Qin, X. Wu, F. Gao, and Q. Y. Wen, Phys. Rev. A 92, 052321 (2015).
  * Woodhead and Pironio (2015) E. Woodhead and S. Pironio, Phys. Rev. Lett. 115, 150501 (2015).
  * Himbeeck  _et al._ (2017) T. V. Himbeeck, E. Woodhead, N. J. Cerf, R. García-Patron, and S. Pironio, Quantum 1, 33 (2017).
  * Rusca  _et al._ (2019) D. Rusca, T. V. Himbeeck, A. Martin, J. B. Brask, W. Shi, S. Pironio, N. Brunner, and H. Zbinden, available on line https://arXiv.org/abs/1904.04819 (2019).
  * Lydersen  _et al._ (2010) L. Lydersen, C. Wiechers, C. Wittmann, D. Elser, J. Skaar, and V. Makarov, Nat. Photonics 4, 686 (2010).
  * Berta  _et al._ (2010) M. Berta, M. Christandl, R. Colbeck, J. M. Renes, and R. Renner, Nat. Phys. 6, 659 (2010).
  * Cover and Thomas (2006) T. M. Cover and J. A. Thomas,  _Elements of Information Theory_ (2nd Edition (John Wiley and Sons, New York), 2006).
  * Christandl  _et al._ (2009) M. Christandl, R. König, and R. Renner, Phys. Rev. Lett. 102, 020504 (2009).
  * Dupuis  _et al._ (2016) F. Dupuis, O. Fawzi, and R. Renner, available on line https://arxiv.org/abs/1607.01796. (2016).
  * Horn and Johnson (2013) R. A. Horn and C. R. Johnson, in  _Matrix Analysis_ (Cambridge Univ. Press, Cambridge, 2013) Chap. 7, pp. 654–662, 5th ed.
  * Inamori  _et al._ (2007) H. Inamori, N. Lütkenhaus, and D. Mayers, Eur. Phys. J. D 41, 599 (2007).
  * Boaron  _et al._ (2018) A. Boaron, G. Boso, D. Rusca, C. Vulliez, C. Autebert, M. Caloz, M. Perrenoud, G. Gras, F. Bussières, M. J. Li, D. Nolan, A. Martin, and H. Zbinden, Phys. Rev. Lett. 121, 190502 (2018).
  * Löfberg (2004) J. Löfberg, in  _IEEE International Conference on Robotics and Automation (IEEE Cat. No.04CH37508)_ (IEEE, Taipei, Taiwan, 2004) pp. 284–289.
  * Sturm (1999) J. F. Sturm, Optim. Mthod Softw. 11, 625 (1999).
  * Ma  _et al._ (2005) X. Ma, B. Qi, Y. Zhao, and H. K. Lo, Phys. Rev. A 72, 012326 (2005).