# Understanding the Challenges of Deploying Live-Traceability Solutions

Katherine R. Dearstyne  Alberto Daniel Rodriguez  Jane Cleland-Huang
University of Notre Dame
Notre Dame, IN
{kdearsty, arodri39<EMAIL_ADDRESS>
###### Abstract

Software traceability is the process of establishing and maintaining
relationships between artifacts in a software system. This process is crucial
to many engineering processes, particularly for safety critical projects;
however, it is labor-intensive and error-prone. Automated traceability has
been a long awaited tool for project managers of these systems, and due to the
semantic similarities between linked artifacts, NLP techniques, such as
transformer models, may be leveraged to accomplish this task. SAFA.ai is a
startup focusing on fine-tuning project-specific models that deliver automated
traceability in a near real-time environment. The following paper describes
the challenges that characterize commercializing software traceability and
highlights possible future directions.

Name (domain) |  Description |  Candidates Links |  True Links
---|---|---|---
CM1 (Embedded System) |  Requirements for a data processing unit for the then NASA metrics data program. Contains high (22) and low level requirements(53) and prepared by researchers at the University of Kentucky Hayes et al. (2006a). |  1,166 |  45
Medical Infusion Pump (Healthcare) |  Software system implementing a medical infusion pump extracted from Larson et al. (2013). Contains trace links between system components (21) and regulatory requirements (126). |  2,778 |  132
iTrust (Healthcare) |  An electronic health record (EHR) system created as part of a course at North Carolina State University Meneely et al. (2011). Contains requirements (131) and JSP code modules (226). |  29,606 |  534
Dronology (UAV) |  A system for managing the navigation of UAVs and their communication to the ground control station. Contains requirements (55), designs (99), and java code (458). Prepared by researchers at the University of Notre Dame Cleland-Huang et al. (2018). |  |
D-NL |  Subset containing only requirements to designs. |  5,445 |  58
D-PL |  Subset containing only designs and java code. |  45,342 |  232
Table 1: Descriptions of the datasets evaluated in study. Candidate links
represent all the potential combinations between the source and target
artifacts. True links represent the number of those combinations that are
positively linked, the remaining ones are considered unlinked. All datasets
were extracted from coest.org

##  1 Introduction

Software traceability is a critical task for many software systems and entails
linking high-level software artifacts (e.g. requirements or safety-goals) to
their fulfillment, often in the form of design definitions, source code or
test-cases Gotel and Finkelstein (1994); Cleland-Huang et al. (2014); Torkar
et al. (2012). By creating accurate trace links in a project, engineers can
analyze how the introduction of a change in the system might impact existing
components Hamilton and Beeby (1991). These links also aid in verifying the
completeness of a project and provide clarity onto the rationale of an
artifact’s inception Ramesh and Edwards (1992). Specifically, trace links
might demonstrate that all requirements have been fulfilled or highlight which
requirements are addressed by specific design decisions. In many safety-
critical systems, traceability is required to assure their safety by governing
bodies.

Unfortunately, creating and maintaining trace links is an effort-intensive,
time-consuming, error-prone task which may impede the development process
Hayes et al. (2006b). As a result, many projects are left with incomplete and
inaccurate trace links Mahmoud et al. (2012). Since most linked artifacts
share semantic similarities, natural language processing techniques may be
leveraged to support engineers in identifying missing trace links, reducing
both the time and cost required for the task Antoniol et al. (2002); Dekhtyar
et al. (2007); Guo et al. (2017b); Lin et al. (2021).

Figure 1: Example sub-tree from the SAFA platform, linking high-level
requirements to low-level requirements in the CM1 dataset. The solid blue line
is an established relationship as determined by the project engineers. The
yellow lines are relationships predicted by SAFA, where the dotted line
represents a prediction that has not yet been manually approved while the
solid line is an approved link.

Inspired by this goal, SAFA (“Software Artifact Forest Analysis”) Rodriguez et
al. (2022) is an emerging traceability tool that was based on recent research
showing the achievement of BERT and other bi-directional transformers at
predicting trace links. Lin et al. (2021). Despite the promising results of
these models in the research setting, we have encountered challenges in
deploying SAFA on commercial projects. These challenges have included the lack
of data-availability, necessity of domain-specific knowledge, poor quality of
many datasets, and expectations of immediate results from engineers.
Furthermore, many safety-critical domains require near-perfect recall when
using NLP techniques to automatically generate links, which can not be
consistently achieved by the current models. Therefore, for the focus of this
paper, we explore each of these problems in depth within the area of
traceability and highlight insights into future directions.

Although there remain challenges that must still be overcome, SAFA shows
promise in bringing the vision of “ubiquitous traceability” to fulfillment at
last Cleland-Huang et al. (2014). In this vision, traceability will occur
automatically alongside the engineering processes, incurring little cost and
allowing engineers to focus on those tasks that are most significant to them.
By integrating the latest advances in NLP into the platform, SAFA can reduce
the burden of traceability and accelerate engineering processes.

Name |  Model Id |  Description
---|---|---
nl-bert |  _ANONYMOUS/nl-bert_ |  Bert-base-uncased model pre-trained on tracing commit messages to related issues. Traces between two sets of natural language artifacts. Lin et al. (2021).
pl-bert |  _ANONYMOUS/pl-bert_ |  Robert-base model pre-trained on docstring to code snippets and git commit to commit code. Traces between natural language and programming language artifacts
bert-base-uncased |  _bert-base-uncased_ |  The original BERT model released by Google in 2019 Devlin et al. (2019a).
VSM |  N/A |  Uses the scikit-learn Tf-Idf vectorizer and related utilities for calculating similarity scores Pedregosa et al. (2011).
Table 2: Description of deep learning and classical models used in evaluation.
Model id is the name of the model in the HuggingFace model repository
(_https://huggingface.co_).

##  2 NLP for Automated Traceability

There has long been a need for developer tools focusing on the traceability of
software artifacts Hamilton and Beeby (1991), and this need has only grown as
these systems have become more complex, distributed, and collaborative.
Previous approaches to automated traceability included vector and topic based
information retrieval techniques such as vector-space model (VSM), latent
semantic indexing (LSI), and latent dirichlet allocation (LDA) Antoniol et al.
(2002); Asuncion et al. (2010). However, these approaches have many short-
comings. For example, VSM fails to correctly link artifacts that relate to one
through synonyms rather than identical terms, referred to as the _term-
mismatch problem_ Guo et al. (2017c). Although topic based techniques can
overcome instances of the term-mismatch problem by translating artifacts into
their latent space, this translation looses some of the necessary information
required for tracing, resulting in VSM generally out-performing these
approaches Hamilton and Beeby (1991); Asuncion et al. (2010). Interestingly,
VSM and topic-based techniques were shown to bring orthogonal information
about the trace links as combining their similarity scores helped to mitigate
their individual problems Gethers et al. (2011). Nevertheless, performance
still fell short of the accuracy needed for commercial applications, and it
became evident that a model would have to understand synonyms, the
relationships between the words in a sentence, and be tuned to best understand
the specific vocabulary of a project. Classical statistical methods were not
equipped to overcome these challenges; however, deep learning models, like
word2vec Mikolov et al. (2013), re-invigorated the community by showing that
models could create contextualized embedding for sentences, hinting that it
could be possible to capture all this information.

The advances in deep learning caused researchers to re-think what was possible
for software traceability. First, the use of RNNs (recurrent neural networks)
and Bi-GRU (Bidirectional Gated Recurrent Unit) were explored and shown to
outperform previous baselines like VSM or LSI Guo et al. (2017a). As exciting
as these results were, these models were data hungry and required large
amounts of data to be able to out-perform the baselines. Finally, the
introduction of transformer based models, such as Google’s BERT model and
OpenAI’s GPT models, resulted in an additional performance leap, showing the
potential for breaking through the previous glass ceiling Feng et al. (2020);
Lin et al. (2021, 2022). One particular strength of these models was their
ability to be fine-tuned to specific projects and domains, finally enabling
achievement of highly accurate results. Lin et al. (2021, 2022). This is the
focus of SAFA, fine-tuning state-of-the-art traceability models to create a
real-time project-management environment with live-traceability Rodriguez et
al. (2022).

##  3 Current Performance Demonstration

Dataset |  Model |  MAP |  F2 |  Train Time
---|---|---|---|---
CM1 |  VSM |  71.4 |  46.4 |  <1s
CM1 |  BERT-BASE |  60.8 |  45.8 |  12.1m
CM1 |  NL-BERT |  72.3 |  57.2 |  12.2m
MIP |  VSM |  100 |  38.9 |  <1s
MIP |  BERT-BASE |  100 |  100 |  28m
MIP |  NL-BERT |  100 |  100 |  27.7m
D-NL |  VSM |  78.0 |  58.7 |  <1s
D-NL |  BERT-BASE |  68.4 |  51.8 |  55.5m
D-NL |  NL-BERT |  86.5 |  64.9 |  55.9m
D-PL |  VSM |  21.6 |  14.4 |  <1s
D-PL |  BERT-BASE |  39.4 |  39.2 |  8h
D-PL |  PL-BERT |  51.6 |  46.7 |  8.5h
iTrust |  VSM |  28.4 |  24.7 |  <1s
iTrust |  BERT-BASE |  72.1 |  65.6 |  4.5h
iTrust |  PL-BERT |  78.7 |  69.3 |  4.7h
Table 3: The average performance across three random seeds for each of models
on all dataset. These results are calculated on the evaluation dataset.

In order to demonstrate the current performance of NLP techniques across
traceability datasets, we utilize 5 different datasets, spanning four domains
as shown in Table 1. To these datasets, we apply VSM Salton et al. (1975), an
un-pretrain bert-base-uncased model Devlin et al. (2019b) and one of two pre-
trained bert models Lin et al. (2021, 2022) depending on whether the dataset
trace between natural language artifacts or between natural language artifacts
and source code. A detailed description of each model can be found in Table 2.

All candidate travel links in dataset are randomly split into three parts. 35%
of the data was used for training (train), 10% was used for validation (e.g.
performing early stopping), and 55% was used for the final evaluation. We run
each dataset-model combination across three different random seeds to obtain
three unique combinations of the data splits. We trained all transformer
models for 20 epochs and with a batch size of 4, performing gradient
accumulation for 16 steps. All the models produce similarity scores between
source-target artifact combinations ranging from 0 to 1. We selected to train
with less than 50% of the data to simulate project’s that need to produce
trace links during the development process.

To evaluate model performance, we calculate the Mean Average Precision (MAP)
and max F2 scores as described in Lin et al. (2022). These metrics are
commonly used in the traceability community and were selected because MAP
helps favor the precision of the model while F2 favors recall. All results are
displayed in Table 3, and an example of the pre-trained model predictions in
the SAFA platform is shown in Figure 1.

Figure 2: Explanation of trace link from CM1 slice.

##  4 Problems Encountered

###  4.1 Data-Availability

As with many research areas within software engineering, automated
traceability suffers from the lack of available data to train models. The
ideal dataset would contain a complete software project across multiple layers
of artifacts with high quality trace links, but few such datasets are open
source. This problem is only intensified when focusing on safety-critical
systems, where accurate traceability is often required by regulatory bodies.
Due to protecting proprietary data, many potential industry partners are only
willing to provide example projects under the condition that the data remains
on their premises, requiring that all models be trained using the companies
own computing resources. This unfortunately limits the resources which can be
dedicated to model training and predicting, inhibiting a traceability tool
from being able to guarantee real-time results as described in Section 4.3.
Furthermore, many industry projects in non safety-critical domains do not
contain any trace links at all due to the additional time required to trace
artifacts throughout the development process. However, these companies often
desire traceability after project completion to validate that all requirements
have been met. This presented a challenge as fine-tuning models on example
links from the target project is important in allowing the models to reach
satisfactory performance levels Lin et al. (2021). Previous research has
achieved some degree of success by performing transfer learning using commits
linked to issues in git-repositories, allowing the model to better learn the
task of traceability Lin et al. (2022). However, the performance of such
models in a few- or zero-shot task is highly variable and can not reach the
level of performance of the fine-tuned models.

One possible approach to increase the available links for fine-tuning is to
use VSM to make predictions over a subset of the data. Since VSM is able to
obtain competitive MAP scores on many natural language datasets, its
predictions would likely capture a significant number of true trace links.
Afterwards, an engineer could manually review predictions with the highest
similarity scores, and the resulting trace-links could be fed to the model as
training data, hopefully boosting model performance on the remaining links. We
plan to explore this approach with a pilot customer in the upcoming months.

Recently, the NLP community has seen great improvements in few-shot learning
problems, as demonstrated by GPT3 Brown et al. (2020). There have also been
some encouraging examples of few-shot learning within requirements engineering
Alhoshan et al. (2023). In the future, we are eager to see how these recent
advancements might improve trace link predictions in projects where there is
insufficient training data.

###  4.2 Domain-Specific Knowledge

Since requirements and other software artifacts tend to include highly
technical, domain-specific jargon, models pre-trained on only a general corpus
of text are often unable to perform well on traceability tasks Lin et al.
(2021). For this reason, domain-specific pre-training and/or transfer-learning
are especially important to these models.

Due to the similarity of git-hub repositories to the task of tracing, domain-
specific projects make particularly good transfer-learning material. This
motivated us to explore open-source repositories within one of the domains
most in need of traceability, namely robotics. Unfortunately, our search
turned up only 8,790 public repositories on the topic of ’robotics’. This
contrasted starkly with Keras, one of the datasets on which the model was
shown to perform best Lin et al. (2022) Keras included tags for ‘data-science’
and ‘machine-learning’, which each contain over 30K search results. This
suggests that supplemental training strategies and data may be required for
domains that are not as well-represented by open-source public repositories.

To better highlight the problem of domain-specific vocabulary, we provide an
examination of a trace link (Figure 2) from the data slice of CM1 presented in
the Section 1. The high level requirement details that the _DPU-TMALI_ , a
telescope module access library, should utilize the status register,
_SCM_DCI_SR_ , to decode errors and place them on a queue for another
component, _DPU-CCM_. The lower level requirement describes how the _DPU-CCM_
module checks its queue for errors and how those errors are forwarded to the
control unit, _DPU-SCUI_ , before being sent to the ground station. The
explanation was generated by reading the specification for the requirements
noa (2003) and took about one hour for a knowledgeable traceability researcher
to sufficiently understand. While constructing or vetting trace links would
likely take domain-experts far less time, and be simpler in less-complex
projects, this example highlights the complexity of reviewing a single
candidate trace link. In future work, we plan on exploring how to make this
process more efficient by leveraging different trace link explanation
techniques based on either knowledge graphs Liu et al. (2020), GradCAM
equivalents Górski et al. (2020), or through interactive visualizations of the
model’s attention Vig (2022).

###  4.3 Training and Prediction Time

As mentioned earlier, many companies require that models are trained on the
companies’ own resources so as to ensure that the data is kept private. This
limits the amount of computing resources which might be dedicated to the task,
thus emphasizing the importance of efficient training and prediction times for
a model. Previously, Google’s bert-base-uncased showed the most promise for
the traceability task Lin et al. (2022), but a model of this size can take up
to days to train on large industrial-sized datasets. For example, it took an
average of 8 hours to train a bert-base model with 4 NVIDIA T4 GPUs on the
largest dataset (cf. Section 3 for more details). Although much of the pre-
training and transfer-learning can be completed prior to handing off a model
to a company, the fine-tuning and prediction times can still be quite lengthy
and many companies expect immediate results.

Interestingly, VSM, which scales linearly with an increasing number of trace-
links, is able to achieve high MAP scores for many natural language datasets.
Due to its efficiency, there may be benefits to using VSM in domains where
high accuracy is less critical and fast-predictions are prioritized.

In addition, using knowledge distillation or smaller transformer architectures
has been shown to reduce required computational resources while still
providing quality results Tay et al. (2022). We are actively exploring how
these can be applied to traceability.

Figure 3: The range of scores across three random seeds for each dataset.

###  4.4 Model Performance

Although models have been shown to reach high F2 and MAP scores in some
instances, the results are highly variable across datasets. For example,
within our experiment results in Table 3, there is a difference of 48.4% MAP
between the lowest (D-PL) and highest (MIP) performing datasets . This has
several likely root causes, including the lack of quality trace links and the
domain specific jargon, as discussed in Sections 4.1-4.2. Additionally, there
is a variable level of quality across datasets, and automated traceability can
be a difficult, if not impossible, task on lower quality datasets. For
example, requirements that are ambiguous or source code that contains poorly
named variables and methods can cause a model to fail. Furthermore, during
fine-tuning of the model, all artifacts which are not explicitly linked in the
project are assumed to be negative links (not traced). In reality, however,
these may be true, yet missing links, and a large number of mis-labeled
negative labels may prohibit the model from being able to learn correct
patterns in the data.

We can clearly see the effects of mis-classified negative labels on the
results of CM1. Across random splits of the data, CM1 has the most significant
variance with regard to the pre-trained model performance, ranging from an MAP
as low as 63% all the way up to 82%. It also under-performs in comparison to
all other datasets aside from D-PL. Upon further inspection, we found 26
artifacts in the dataset which had no ground truth links, hereby referred to
as orphan artifacts. Since the expectation of the CM1 project is for all
higher-level requirements to be fulfilled by lower-level requirements, orphan
artifacts are likely a sign of forgotten links. When we removed them,
performance was boosted to 79% MAP. Noteably, this new average is quite close
to the highest MAP previously seen across random seeds. We speculate that this
variance was due to the number of orphans falling into the training set, where
a large number of mis-labeled links made it difficult for the model to pick up
on meaningful patterns. Indeed, the run of the model without orphans, resulted
in more consistency across dataset splits as can be seen in Figure 3. Inspired
by this finding, we also discovered that D-PL, the dataset with the lowest
MAP, had over 300 orphan artifacts. Due to time constraints, we were unable to
re-run this experiment on the dataset, but we plan to explore how this might
improve performance in the future.

Although we can detect some forgotten links in the dataset by identifying
orphan artifacts, there are likely other missing links that might be
challenging to identify. We are presently investigating how we might
automatically prune links that are likely mis-labeled Pleiss et al. (2020) or
make the models more invariant to noise Abdar et al. (2021).

##  5 Conclusions

Clearly, automated traceability continues to present challenges that must be
faced during the commercialization of the SAFA platform. Nevertheless, there
are many potential advancements that might be made by employing state-of-the-
art NLP techniques, some of which have been identified in this paper. By
collaborating with researchers within NLP, automated traceability tools, such
as SAFA, have the potential to reach new levels of performance. Ultimately,
this may facilitate a transformation of engineering processes into the long-
awaited ideal of ubiquitous traceability.

## Limitations

The main limitation of our paper is the low number of datasets used throughout
our evaluations. This was primarily chosen due to time constraints, but
limited data availability is a problem as described Section 4.1. To improve
the breadth of our analysis, we attempted to use projects with diverse
artifacts across four domains. The artifact types encompass requirements,
design definitions, use cases, java code, and jsb code. However, to make more
definite conclusions, we hope to utilize additional data in future works.

Further limitations include the the lack of reproducibility of our experiment,
as our code is intellectual property of SAFA and cannot be released to the
public. The datasets used are, however, open source and can be found at
http://coest.org.

## Ethics Statement

Ethical considerations for the lack of open source code must consider that
successful commercialization projects are a viable path for impacting the
current practice of safety critical systems. As SAFA is still a pre-seed
company, our go-to-market plan does not (at least initially) include open
sourcing our code base. We plan on releasing different domain-specific models
that the community can benefit from. Currently, we have published two models
used in this paper https://huggingface.co/ANONYMOUS/nl-bert and
https://huggingface.co/ANONYMOUS/pl-bert.

## References

  * noa (2003) 2003\.  Software Requirements Specification for the Instrument A Data Processing Unit for the Company X Gamma Ray Detector Explorer.
  * Abdar et al. (2021) Moloud Abdar, Farhad Pourpanah, Sadiq Hussain, Dana Rezazadegan, Li Liu, Mohammad Ghavamzadeh, Paul Fieguth, Xiaochun Cao, Abbas Khosravi, U. Rajendra Acharya, Vladimir Makarenkov, and Saeid Nahavandi. 2021.  A review of uncertainty quantification in deep learning: Techniques, applications and challenges.  _Information Fusion_ , 76:243–297.
  * Alhoshan et al. (2023) Waad Alhoshan, Alessio Ferrari, and Liping Zhao. 2023.  Zero-Shot Learning for Requirements Classification: An Exploratory Study.  ArXiv:2302.04723 [cs].
  * Antoniol et al. (2002) G. Antoniol, G. Canfora, G. Casazza, A. De Lucia, and E. Merlo. 2002.  Recovering traceability links between code and documentation.  _IEEE Transactions on Software Engineering_ , 28(10):970–983.
  * Asuncion et al. (2010) Hazeline U. Asuncion, Arthur U. Asuncion, and Richard N. Taylor. 2010.  Software traceability with topic modeling.  In _Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering - ICSE ’10_ , volume 1, page 95, Cape Town, South Africa. ACM Press.
  * Brown et al. (2020) Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020.  Language Models are Few-Shot Learners.  ArXiv:2005.14165 [cs] version: 4.
  * Cleland-Huang et al. (2014) Jane Cleland-Huang, Orlena C. Z. Gotel, Jane Huffman Hayes, Patrick Mäder, and Andrea Zisman. 2014.  Software traceability: Trends and future directions.  In _Future of Software Engineering Proceedings_ , FOSE 2014, page 55–69, New York, NY, USA. Association for Computing Machinery.
  * Cleland-Huang et al. (2018) Jane Cleland-Huang, Michael Vierhauser, and Sean Bayley. 2018.  Dronology: An incubator for cyber-physical system research.  _CoRR_ , abs/1804.02423.
  * Dekhtyar et al. (2007) Alex Dekhtyar, Jane Hayes, Senthil Sundaram, Elizabeth Holbrook, and Olga Dekhtyar. 2007.  Technique Integration for Requirements Assessment.  pages 141–150.
  * Devlin et al. (2019a) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019a.  Bert: Pre-training of deep bidirectional transformers for language understanding.  (arXiv:1810.04805).  ArXiv:1810.04805 [cs].
  * Devlin et al. (2019b) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019b.  BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding.  ArXiv:1810.04805 [cs].
  * Feng et al. (2020) Zhangyin Feng, Daya Guo, Duyu Tang, Nan Duan, Xiaocheng Feng, Ming Gong, Linjun Shou, Bing Qin, Ting Liu, Daxin Jiang, and Ming Zhou. 2020.  Codebert: A pre-trained model for programming and natural languages.  _arXiv:2002.08155 [cs]_.  ArXiv: 2002.08155.
  * Gethers et al. (2011) Malcom Gethers, Rocco Oliveto, Denys Poshyvanyk, and Andrea De Lucia. 2011.  On integrating orthogonal information retrieval methods to improve traceability recovery.  In _2011 27th IEEE International Conference on Software Maintenance (ICSM)_ , page 133–142, Williamsburg, VA, USA. IEEE.
  * Górski et al. (2020) Lukasz Górski, Shashishekar Ramakrishna, and Jedrzej M. Nowosielski. 2020\.  Towards grad-cam based explainability in a legal text processing pipeline.  _CoRR_ , abs/2012.09603.
  * Gotel and Finkelstein (1994) O.C.Z. Gotel and C.W. Finkelstein. 1994.  An analysis of the requirements traceability problem.  In _Proceedings of IEEE International Conference on Requirements Engineering_ , page 94–101, Colorado Springs, CO, USA. IEEE Comput. Soc. Press.
  * Guo et al. (2017a) Jin Guo, Jinghui Cheng, and Jane Cleland-Huang. 2017a.  Semantically enhanced software traceability using deep learning techniques.  In _2017 IEEE/ACM 39th International Conference on Software Engineering (ICSE)_ , page 3–14, Buenos Aires. IEEE.
  * Guo et al. (2017b) Jin Guo, Marek Gibiec, and Jane Cleland-Huang. 2017b.  Tackling the term-mismatch problem in automated trace retrieval.  _Empir Software Eng_ , 22(3):1103–1142.
  * Guo et al. (2017c) Jin Guo, Marek Gibiec, and Jane Cleland-Huang. 2017c.  Tackling the term-mismatch problem in automated trace retrieval.  _Empirical Software Engineering_ , 22(3):1103–1142.
  * Hamilton and Beeby (1991) V.L. Hamilton and M.L. Beeby. 1991.  Issues of traceability in integrating tools.  In _IEE Colloquium on Tools and Techniques for Maintaining Traceability During Design_ , pages 4/1–4/3.
  * Hayes et al. (2006a) Jane Huffman Hayes, Alex Dekhtyar, and Senthil Karthikeyan Sundaram. 2006a.  Advancing candidate link generation for requirements tracing: The study of methods.  _IEEE Trans. Software Eng._ , 32(1):4–19.
  * Hayes et al. (2006b) J.H. Hayes, A. Dekhtyar, and S.K. Sundaram. 2006b.  Advancing candidate link generation for requirements tracing: the study of methods.  _IEEE Transactions on Software Engineering_ , 32(1):4–19.  Conference Name: IEEE Transactions on Software Engineering.
  * Larson et al. (2013) Brian R Larson, John Hatcliff, and Patrice Chalin. 2013.  Open source Patient-Controlled analgesic pump requirements documentation.  In _2013 5th International Workshop on Software Engineering in Health Care (SEHC)_. IEEE.
  * Lin et al. (2021) Jinfeng Lin, Yalin Liu, Qingkai Zeng, Meng Jiang, and Jane Cleland-Huang. 2021.  Traceability transformed: Generating more accurate links with pre-trained bert models.  _arXiv:2102.04411 [cs]_.  ArXiv: 2102.04411.
  * Lin et al. (2022) Jinfeng Lin, Amrit Poudel, Wenhao Yu, Qingkai Zeng, Meng Jiang, and Jane Cleland-Huang. 2022.  Enhancing automated software traceability by transfer learning from open-world data.  (arXiv:2207.01084).  ArXiv:2207.01084 [cs].
  * Liu et al. (2020) Yalin Liu, Jinfeng Lin, Qingkai Zeng, Meng Jiang, and Jane Cleland-Huang. 2020.  Towards semantically guided traceability.  In _2020 IEEE 28th International Requirements Engineering Conference (RE)_ , page 328–333, Zurich, Switzerland. IEEE.
  * Mahmoud et al. (2012) Anas Mahmoud, Nan Niu, and Songhua Xu. 2012.  A semantic relatedness approach for traceability link recovery.  In _2012 20th IEEE International Conference on Program Comprehension (ICPC)_ , pages 183–192.  ISSN: 1092-8138.
  * Meneely et al. (2011) Andrew Meneely, Ben Smith, and Laurie Williams. 2011.  _iTrust Electronic Health Care System: A Case Study_.  Springer.
  * Mikolov et al. (2013) Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013.  Efficient estimation of word representations in vector space.  (arXiv:1301.3781).  ArXiv:1301.3781 [cs].
  * Pedregosa et al. (2011) F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. 2011.  Scikit-learn: Machine learning in Python.  _Journal of Machine Learning Research_ , 12:2825–2830.
  * Pleiss et al. (2020) Geoff Pleiss, Tianyi Zhang, Ethan Elenberg, and Kilian Q Weinberger. 2020.  Identifying Mislabeled Data using the Area Under the Margin Ranking.  In _Advances in Neural Information Processing Systems_ , volume 33, pages 17044–17056. Curran Associates, Inc.
  * Ramesh and Edwards (1992) B. Ramesh and M. Edwards. 1992.  Issues in the development of a requirements traceability model.  In _[1993] Proceedings of the IEEE International Symposium on Requirements Engineering_ , page 256–259, San Diego, CA, USA. IEEE Comput. Soc. Press.
  * Rodriguez et al. (2022) Alberto D. Rodriguez, Timothy Newman, Katherine R. Dearstyne, and Jane Cleland-Huang. 2022.  SAFA: A Tool for Supporting Safety Analysis in Evolving Software Systems.  Publisher: ACM (Association for Computing Machinery).
  * Salton et al. (1975) G. Salton, A. Wong, and C. S. Yang. 1975.  A vector space model for automatic indexing.  _Commun. ACM_ , 18(11):613–620.
  * Tay et al. (2022) Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. 2022.  Efficient Transformers: A Survey.  _ACM Comput. Surv._ , 55(6):109:1–109:28.
  * Torkar et al. (2012) Richard Torkar, Tony Gorschek, Robert Feldt, Mikael Svahnberg, Uzair Akbar Raja, and Kashif Kamran. 2012.  Requirements traceability: a systematic review and industry case study.  _Int. J. Soft. Eng. Knowl. Eng._ , 22(03):385–433.  Publisher: World Scientific Publishing Co.
  * Vig (2022) Jesse Vig. 2022.  Deconstructing BERT, Part 2: Visualizing the Inner Workings of Attention.


# Cell-free Terahertz Networks: A Spatial-spectral Approach

Zesheng Zhu, Lifeng Wang, Xin Wang, Bo Tan, and Shi Jin Z. Zhu, L. Wang, and
X. Wang are with the School of Information Science and Engineering, Fudan
University, Shanghai 200433, China (e-mail:
$\rm\\{lifengwang,xwang11\\}@fudan.edu.cn$).Bo Tan is with the Faculty of
Information Technology and Communication Sciences, Tampere University, 33100
Tampere, Finland (e-mail: bo.tan@tuni.fi).Shi Jin is with the National Mobile
Communications Research Laboratory, Southeast University, Nanjing 210096,
China (e-mail: jinshi@seu.edu.cn).

###### Abstract

Cell-free network architecture plays a promising role in the terahertz (THz)
networks since it provides better link reliability and uniformly good services
for all the users compared to the co-located massive MIMO counterpart, and the
spatial-spectral THz link has the advantages of lower initial access latency
and fast beam operations. To this end, this work studies cell-free spatial-
spectral THz networks with leaky-wave antennas, to exploit the benefits of
leveraging both cell-free and spatial-spectral THz technologies. By addressing
the coupling effects between propagation angles and frequencies, we propose
novel frequency-dependent THz transmit antenna selection schemes to maximize
the transmission rate. Numerical results confirm that the proposed antenna
selection schemes can achieve much larger transmission rate than the maximal
ratio transmission of using all the transmit antennas with equal subchannel
bandwidth allocation in higher THz frequencies.

###### Index Terms:

 Cell-free terahertz network, spatial-spectral coupling, terahertz transmit
antenna selection.

##  I Introduction

Immersive communications that support various extend reality (XR) applications
are envisioned as one of 6G use cases [1, 2], which demand very large
frequency bandwidths and low-latency transmissions. To enable those use cases,
terahertz (THz) is the key radio technology to provide multi-GHz bandwidth
above 100 GHz [3]. However, the drawbacks of using conventional phased array
for THz links are magnified in light of initial access latency [4], link
budget [5], and beam management [6, 7]. Some THz antenna solutions are studied
including true-time delay (TTD) based phased array [8], phased subarray
selection [9] and leaky-wave antennas [10, 11], etc.

In millimeter wave networks with conventional phased arrays, beam management
is time-consuming [4, 6, 7]. Existing access procedure may lead to large
initial access delay in THz links [4], which is further worsened by the high
mobility of users [6]. As such, spatial-spectral THz transmission seeks to
reduce time consumption for beam management. The rationale behind it is that
the propagation angles and frequencies are coupled and thus extensive beam
training is unnecessary [12, 13]. TTD based phased arrays and leaky-wave
antennas are two important alternatives for achieving spatial-spectral THz
transmissions [11]. While the former introduces variable delay lines to enable
that classical phased arrays can also result in frequency-dependent beams [8],
the latter is a cost-effective waveguide approach whose radiation efficiency
is better than the phased array [10]. In practice, TTD based phased arrays may
have to overcome issues of making efficient THz phase shifters, feed network
designs, and stringent requirement on the delay range of the circuit blocks
[10, 7]. As a low-cost and easy-to-manufacture traveling-wave antenna for
making narrow beams, leaky-wave antenna has been applied in many areas such as
frequency-division multiplexing THz communications [14, 13], channel sounding
[15], sensing [16, 17], and physical layer security enhancement [18, 19].

The coverage for an outdoor THz network involves not only antenna solution but
also network architecture. Traditional cellular architecture adopts co-located
MIMO/massive MIMO antennas at base stations and users at the cell edge are
subject to lower signal strengths, which may become much severer in THz
frequencies due to blockages and molecular absorption losses [3, 13]. Cell-
free architecture deploys massive distributed single-antenna access points
(APs), in which large numbers of APs are connected to a central processing
unit [20, 21]. Such a network architecture enables uniformly good services for
all the users [20, 21] and better link reliability [22] compared to the
cellular one. Moreover, cell-free THz links with shorter communication
distances undergo lower atmospheric attenuation over distance (See Fig. 6 in
[3] and Fig. 5 in [13]). On the other hand, antenna solution in cell-free THz
network needs to be delicately designed, since AP with single omnidirectional
antenna is unable to support THz downlink transmission and directional
beamforming is required to counteract the severe path loss. In fact, antenna
solutions based on the channel state information of each transmit antenna
element in conventional antenna arrays are not applicable in THz networks
[12]. Hence, existing works such as [9] study the subarray-based channel
estimation and signal processing schemes in the THz systems where each AP has
multiple antenna subarrays, and each antenna subarray utilizes the analog
beamforming to make narrow beam for large antenna gain.

Motivated by the advantages of spatial-spectral transmission and cell-free
network architecture in THz networks, we advocate the cell-free THz networks
with leaky-wave antennas. To the best of our knowledge, this is the first work
to establish the cell-free THz networks with spatial-spectral coupling
awareness. Novel frequency-dependent THz antenna selection schemes are
designed to enhance the transmission rate and reduce the system overhead. In
addition, optimal THz subchannel allocation algorithm is proposed to maximize
the transmission rate, which has better performance than the equal allocation
[18] and co-located counterparts.

##  II System Model

In the large-scale cell-free THz downlink network with dense distributed APs,
each AP is equipped with a TE1 (lowest transverse-electric) mode leaky-wave
antenna and user equipment (UE) has one omnidirectional receive antenna. Let
$N$ denote the number of active APs that can serve the UE, and
$x_{n}\left(f_{i},\theta_{n}\right)$ ($n=1,\cdots,N$) is the binary indicator
that the $n$-th AP is selected for downlink transmission at the $i$-th
subchannel with the center frequency $f_{i}$; here, $\theta_{n}$ is the line-
of-sight (LoS) propagation angle (transmission direction). The frequency
$f_{\rm max}^{n}$ for obtaining maximum level of radiation by using a leaky-
wave antenna at the $n$-th AP is [12]

$\displaystyle f_{\rm max}^{n}=\frac{f_{\rm co}}{\sin(\theta_{n})},$ (1)

where $f_{\rm co}=\frac{c}{2\nu}$ is the cutoff frequency with the speed of
light $c$ and leaky-wave antenna’s inter-plate distance $\nu$. Therefore, the
received signal strength (RSS) at the $i$-th subchannel by leveraging optimal
coherent (matched filter) beamforming under equal power allocation in such a
network is written as

$\displaystyle{\small\widetilde{\gamma}\left(f_{i}\right)=\sum\limits_{n=1}^{N}{x_{n}\left(f_{i},\theta_{n}\right)\gamma\left(f_{i},\theta_{n}\right)\mathbf{1}\left(\gamma\left(f_{i},\theta_{n}\right)\geq\gamma_{\rm
th}\right)}},$ (2)

where $\gamma\left(f_{i},\theta_{n}\right)$ is the RSS at the $i$-th
subchannel for the selected AP $n$, the indicator function
$\mathbf{1}\left(\cdot\right)$ reflects that the THz link can be interrupted
due to the lower signal strength conditions including higher pathloss and
blockage effects, $\gamma_{\rm th}$ is the minimum RSS level (namely receiver
sensitivity), and $\gamma\left(f_{i},\theta_{n}\right)$ is given by

$\displaystyle\gamma\left(f_{i},\theta_{n}\right)=p\tilde{G}\left(f_{i},\theta_{n}\right)\left|{{\hbar_{i,n}}}\right|^{2},$
(3)

where $p$ is each AP’s transmit power spectral density (PSD),
$\tilde{G}\left(f_{i},\theta_{n}\right)=\xi
L{\rm{sinc}}\left[{\left({-\mathrm{j}\varrho-{k_{0}}\left(f_{i}\right)\cos\theta_{n}+\beta\left(f_{i}\right)}\right)\frac{L}{2}}\right]$
is the effective leaky-wave antenna gain with the radiation efficiency factor
$\xi$. Here, $L$ is the aperture length, $\mathrm{j}=\sqrt{-1}$, $\varrho$ is
the attenuation coefficient, $k_{0}\left(f_{i}\right)=2\pi f_{i}/c$,
$\beta\left(f_{i}\right)=k_{0}\left(f_{i}\right)\sqrt{1-\left(\frac{f_{\rm
co}}{f_{i}}\right)^{2}}$, and $\left|{{\hbar_{i,n}}}\right|^{2}$ is the
channel power gain of the $i$-th subchannel between the $n$-th AP and the UE.
As such, the frequency-dependent THz antenna selection with subchannel
allocation is designed to maximize the transmission rate, accordingly, the
problem is formulated as

$\displaystyle{\mathop{\max}\limits_{{\bf{x,B,f}}}\sum\limits_{i}B_{i}\log_{2}\left(1+\frac{\widetilde{\gamma}\left(f_{i}\right)}{\sigma^{2}}\right)}$
(4) $\displaystyle\mathrm{s.t.}\leavevmode\nobreak\
\mathrm{C1:}\leavevmode\nobreak\ \sum\limits_{i}{B_{i}}\leq B_{\rm total},$
$\displaystyle\mathrm{C2:}\leavevmode\nobreak\
\bigcap\limits_{i}{\left\\{{f\left|{f\in\left[{f_{i}-\frac{{B_{i}}}{2},f_{i}+\frac{{B_{i}}}{2}}\right]}\right.}\right\\}}=\emptyset,$
$\displaystyle\mathrm{C3:}\leavevmode\nobreak\
\left\|{\widetilde{\gamma}\left({f_{i}-\frac{{B_{i}}}{2}}\right)\left|{{}_{\rm
dB}}\right.-\widetilde{\gamma}\left({f_{i}+\frac{{B_{i}}}{2}}\right)}\left|{{}_{\rm
dB}}\right.\right\|<\varepsilon,$
$\displaystyle\mathrm{C4:}\leavevmode\nobreak\
x_{n}\left(f_{i},\theta_{n}\right)\in\\{0,1\\},\;B_{i}\geq
0,\;\leavevmode\nobreak\ f_{i}\geq 0,\;\,\;\forall i,\forall n,$

where $\mathbf{x}=[x_{n}\left(f_{i},\theta_{n}\right)]$, $\mathbf{f}=[f_{i}]$,
$\mathbf{B}=[B_{i}]$ is the subchannel bandwidth vector, and $\sigma^{2}$ is
the noise’s PSD. Constraint $\mathrm{C1}$ is the frequency bandwidth
limitation with the maximum value $B_{\rm total}$; $\mathrm{C2}$ ensures that
there is no overlap between subchannels; $\mathrm{C3}$ guarantees that the RSS
difference in the frequencies of a subchannel is less than a small value
$\varepsilon$, which is also referred to as the coherence bandwidth of a
subchannel. As seen in (4), each AP has the same subchannels with the same
center frequencies.

The problem (4) is combinatorial and highly non-linear, which is difficult to
solve. As such, we design the low-cost and efficient antenna selection schemes
for determining $\\{x_{n}\\}$, and then propose a subchannel allocation
algorithm for optimizing the center frequencies $\\{f_{i}\\}$ and bandwidths
$\\{B_{i}\\}$ of the subchannels in the following section.

##  III Terahertz Transmit Antenna Selection with Subchannel Allocation

From (4), it is intuitive that all the active APs need to be selected for
maximizing the transmission rate, namely
$x_{n}\left(f_{i},\theta_{n}\right)=1,\forall i,\forall n$, which is referred
to as maximal ratio transmission (MRT) scheme. However, the number of APs for
maximal combining needs to be controlled in large-scale cell-free networks, in
order to curtail the system overhead including the fronthaul/backhaul costs.
In this section, four types of antenna selection schemes are investigated: 1)
MRT; 2) Best $N_{\rm sel}$ transmit antennas; 3) Best transmit antenna; and 4)
Nearest neighbor.

###  III-A Maximal Ratio Transmission

In the considered network, MRT can achieve the best performance but suffer the
highest computational complexity. In this case,
$\\{x_{n}\left(f_{i},\theta_{n}\right)=1\\}$ is deterministic, and problem (4)
reduces to a subchannel allocation problem, which is still combinatorial and
non-convex. Moreover, subchannel bandwidth $B_{i}$ and its center frequency
$f_{i}$ are coupled. To solve it, we develop a cross-entropy (CE) based
algorithm to find optimal $\\{f_{i}^{*}\\}$ and $\\{B_{i}^{*}\\}$, which is
detailed in Algorithm 1. CE method is an efficient approach to locate an
optimal or near-optimal solution of combinatorial problems [23], which
transforms the combinatorial problem as a rare-event estimation problem. In
Algorithm 1, subchannels’ center frequencies $\\{f_{i}\\}$ are deemed to be
Gaussian distributions’ parameters, and they are optimally evaluated by using
maximum likelihood estimation (MLE). Specifically, the Gaussian distributions’
parameters should be initialized to cover all the frequencies of interest
$\left[f_{\rm co},f^{\rm upper}\right]$, where $f^{\rm upper}$ is the upper
bound of available THz frequency. Given a center frequency sample, calculating
its corresponding subchannel bandwidth is still hard, due to the non-overlap
constraint $\mathrm{C2}$ and highly non-linear constraint $\mathrm{C3}$ in
(4). Prior work [13] linearizes the leaky-wave antenna gain function
$\tilde{G}\left(f_{i},\theta_{n}\right)$ and approximately derives the
subchannel bandwidths in the scenarios where the free-space path loss is
dominant. As such, we compute the exact subchannel bandwidths $\\{B_{i}\\}$ by
adopting the widely-used one-dimensional search to satisfy the constraints
$\mathrm{C1}$–$\mathrm{C3}$ in (4). When there exists frequency overlap
between adjacent subchannels, the overlapped frequency band is allocated to
the subchannel with larger RSS at its center frequency.

1 Initialize Gaussian distributions’ parameters
$\left\\{\mathcal{N}\left(\mu_{i}=f_{\rm co}+(i-\frac{1}{2})\frac{f^{\rm
upper}-f_{\rm co}}{I},\delta_{i}^{2}=16\frac{\left(f^{\rm upper}-f_{\rm
co}\right)^{2}}{I^{2}}\right)\right\\}_{i=1}^{I}$ with the total number of
subchannels $I$; the number of samples $m$, and the number of elite samples
$m_{\rm elite}$ that have better objective values than other samples; the
iteration index $t=0$

2 while  _$t <t^{\rm max}$_ do

3 i) Generate $\mathbf{S}_{i}\in\mathbb{R}^{m\times 1}$ samples according to
$\mathbf{S}_{i}\sim\mathcal{N}\left(\mu_{i},\delta_{i}^{2}\right)$, then,
given $\mathbf{S}_{i}$, obtain each sample’s corresponding subchannel
bandwidth according to one-dimensional search under the constraints
$\mathrm{C1}$–$\mathrm{C3}$;

4 ii) Select $\mathbf{\widehat{S}}_{i}\in\mathbb{R}^{m_{\rm elite}\times 1}$
elite samples from $\mathbf{S}_{i}$ that have better objective values of (4)
than other samples, then, update the estimated parameters via MLE in a
smoothing manner as follows:
$\displaystyle\bar{\mu}_{i}=\frac{\sum\limits_{s=1}^{m_{\rm
elite}}\mathbf{\widehat{S}}_{i}\left(s\right)}{m_{\rm
elite}},\bar{\delta}_{i}^{2}=\frac{\sum\limits_{s=1}^{m_{\rm
elite}}\left(\mathbf{\widehat{S}}_{i}\left(s\right)-\bar{\mu}_{i}\right)^{2}}{m_{\rm
elite}},$
$\displaystyle\mu_{i}(t+1)=\alpha\bar{\mu}_{i}+\left(1-\alpha\right)\mu_{i}(t),$
$\displaystyle\delta_{i}^{2}(t+1)=\beta_{t}\bar{\delta}_{i}^{2}+\left(1-\beta_{t}\right)\delta_{i}^{2}(t),$
where $\alpha$ and $\beta_{t}=\beta-\beta\left(1-1/(t+1)\right)^{q}$ are
smoothing parameters;

5 iii) $t=t+1$;

6 end while

Optimal $\\{f_{i}^{*}=\mu_{i}(t^{\rm max}),B_{i}^{*}(t^{\rm max})\\}$ is
obtained

Algorithm 1 CE based Algorithm for Subchannel Allocation

###  III-B Best $N_{\rm sel}$ Transmit Antennas

The MRT antenna solution with all the active APs in subsection III-A creates
high computational complexity and power consumption. To cut the system costs,
we only select some of the best transmit antennas based on the RSS, i.e.,
$N_{\rm sel}\left(N_{\rm sel}<N\right)$ transmit antennas are selected
according to the following rule:

$\displaystyle
x_{n}\left(f_{i},\theta_{n}\right)=1,\;\mathrm{if}\;\gamma\left(f_{\max}^{n},\theta_{n}\right)=\gamma^{(n_{\rm
sel})},$ (5)

where $n_{\rm sel}=1,\cdots,N_{\rm sel}$, $f_{\max}^{n}$ is given by (1) and
$\gamma^{(n_{\rm sel})}$ is referred to as the $n_{\rm sel}$-th largest level
of radiation among all the APs. Based on (5), we adopt the Algorithm 1 with
less numbers of APs to obtain the desired subchannel allocation.

###  III-C Best Transmit Antenna

The best transmit antenna solution dictates that each subchannel only uses its
best AP with the maximum RSS, to further cut the system overhead. As such, its
antenna selection rule is

$\displaystyle
x_{n}\left(f_{i},\theta_{n}\right)=1,\;\mathrm{if}\;\gamma\left(f_{i},\theta_{n}\right)=\gamma_{\rm
max}\left(f_{i}\right),$ (6)

where $\gamma_{\rm max}\left(f_{i}\right)$ is the maximum RSS value at the
$i$-th subchannel. In this case, the RSS of the $i$-th subchannel at the UE
becomes

$\displaystyle\widetilde{\gamma}\left(f_{i}\right)=\mathop{\max}\limits_{n=1,\cdots,N}x_{n}\left(f_{i},\theta_{n}\right)\gamma\left(f_{i},\theta_{n}\right)\mathbf{1}\left(\gamma\left(f_{i},\theta_{n}\right)\geq\gamma_{\rm
th}\right).$ (7)

Based on (6) and (7), Algorithm 1 is applied to attain the desired subchannel
allocation.

###  III-D Nearest Neighbor

Compared to the prior antenna selection solutions, the nearest neighbor has
the lowest system overhead since AP with the shortest communication distance
is selected, namely

$\displaystyle
x_{n}\left(f_{i},\theta_{n}\right)=1,\;\mathrm{if}\;d_{n}=\mathop{\min}\limits_{n=1,\cdots,N}d_{n},$
(8)

where $d_{n}$ is the communication distance between AP $n$ and the UE. Based
on (8), the desired subchannel allocation is produced by using Algorithm 1. It
is noted that in the conventional cellular/cell-free networks without spatial-
spectral coupling effects, the nearest neighbor and the best transmit antenna
solutions are almost identical since the antenna gain is independent of THz
frequencies and the received signal strength is dominated by the pathloss.

The aforementioned four antenna selection schemes have the same computational
complexity order when determining the optimal subchannels, since they all need
to leverage Algorithm 1 for solving the problem (4), and MRT scheme has no
comparison operations since it employs all the APs. However, different antenna
selection schemes lead to distinct fronthaul/backhaul costs, which depend on
the scale of active APs in each antenna selection scheme. Therefore, MRT
scheme has the highest fronthaul/backhaul costs.

##  IV Numerical Results

This section presents numerical results to demonstrate the efficiency of the
proposed antenna selection solutions. In the simulations, the basic system
parameters are shown in Table I; the communication distance is uniformly
distributed within the coverage radius of 50m and the propagation angle from
an AP to the UE is uniformly distributed, i.e, $\theta_{n}\in
U(0,\frac{\pi}{2})$, and free-space path loss model is applied [13]; the
leaky-wave antenna’s attenuation coefficient is $\varrho=130$rad/m, aperture
length is $L=0.09$m, and $\xi=1$; the smoothing parameters are set as
$\alpha=0.8$, $\beta=0.7$, $q=5$, $I=40$, and the maximum number of iterations
is $t^{\rm max}=30$ in Algorithm 1. Simulation results are obtained by
averaging over 2000 trials.

Table I: Simulation parameters Noise’s PSD |  ${\sigma}^{2}=-168$dBm/Hz
---|---
Threshold for the minimum RSS |  ${\gamma}_{\rm th}=-174.5$dBm/Hz
RSS gap in the frequencies of a subchannel |  $\varepsilon=0.5$dB
Upper bound of available THz frequency |  $f^{\rm upper}=300$GHz
Total transmit power |  $p_{\rm total}=p*B_{\rm total}=1$W

(a) The cutoff frequency $f_{\rm co}=100$GHz.

(b) The cutoff frequency $f_{\rm co}=200$GHz.

Figure 1: The average transmission rate versus number of APs under different
cutoff frequency conditions with $B_{\rm total}=16$GHz and $N_{\rm sel}=2$.

Fig. 1 shows the average transmission rates achieved by the proposed antenna
selections versus the number of APs under different cutoff frequency
conditions. As mentioned before, the proposed MRT has the best performance,
and outperforms the baseline MRT with equal subchannel bandwidth allocation.
The best two transmit antennas scheme performs better than the best transmit
antenna due to its larger antenna gain. Moreover, the performance of the low-
complexity best transmit antenna scheme can be better than that of MRT with
equal subchannel bandwidth allocation in higher THz frequencies as seen in
Fig. 1(b), since the RSS becomes very dynamic and significantly varies in
higher THz frequencies, thus the subchannels need to be properly allocated,
which further confirms the efficacy of the proposed subchannel allocation
method in Algorithm 1. The best transmit antenna scheme outperforms nearest
neighbor since it has larger RSS. Adding more APs in cell-free THz networks
can significantly improve the transmission rate due to the large diversity
gains, and using same bandwidth in lower THz frequencies (i.e., lower cutoff
frequency is employed in Fig. 1(a) than Fig. 1(b)) has better performance due
to the lower path loss. The co-located MRT transmission achieves the lowest
average transmission rate since it undergoes severe pathloss.

(a) The cutoff frequency $f_{\rm co}=100$GHz.

(b) The cutoff frequency $f_{\rm co}=200$GHz.

Figure 2: The average transmission rate versus total frequency bandwidth under
different cutoff frequency conditions with $N=20$ and $N_{\rm sel}=2$.

Fig. 2 shows the average transmission rates achieved by the proposed antenna
selections versus total frequency bandwidth under different cutoff frequency
conditions. As seen in Fig. 2(a), in lower THz frequencies around $f_{\rm
co}=100$GHz, the performance difference between the best transmit antenna and
nearest neighbor is minimal since the path loss is dominant, and MRT of using
all the APs with equal subchannel bandwidth allocation only performs better
than the proposed best two (i.e., $N_{\rm sel}=2$) transmit antenna selection
at very large frequency bandwidth values ($>16$ GHz in Fig. 2(a)). In Fig.
2(b), MRT of using all the APs with equal subchannel bandwidth allocation only
performs better than the proposed nearest neighbor in higher THz frequencies
around $f_{\rm co}=200$GHz with very large frequency bandwidth ($>16$ GHz in
Fig. 2(b)), due to the fact that the levels of RSS in higher THz frequencies
fluctuate dramatically, in this case, subchannel allocation must be optimized
by using the proposed Algorithm 1. Again, we see that all the proposed antenna
selection schemes in the cell-free THz networks perform much better than the
co-located MRT.

##  V Conclusion

Cell-free THz network with spatial-spectral coupling effects is a brand new
network architecture with unique features, which could significantly reduce
the complexity of beam management and system overhead. This letter proposed a
cell-free THz network with leaky-wave antennas, in which four antenna
selection schemes were developed to obtain efficient subchannel allocations
with decreasing system costs, and their merits were confirmed by numerical
results.

## References

  * [1] X. Shen, J. Gao, M. Li, C. Zhou, S. Hu, M. He, and W. Zhuang, “Toward immersive communications in 6G,” _Front. Comput. Sci._ , vol. 4, 2023.
  * [2] M. Hu, L. Wang, B. Tan, and S. Jin, “Two-tier 360-degree video delivery control in multiuser immersive communications systems,” _IEEE Trans. Veh. Technol._ , vol. 72, no. 3, pp. 4119–4123, Mar. 2023.
  * [3] T. S. Rappaport _et al._ , “Wireless communications and applications above 100 GHz: Opportunities and challenges for 6G and beyond,” _IEEE Access_ , vol. 7, pp. 78 729–78 757, June 2019.
  * [4] M. Polese, J. M. Jornet, T. Melodia, and M. Zorzi, “Toward end-to-end, full-stack 6G terahertz networks,” _IEEE Commun. Mag._ , vol. 58, no. 11, pp. 48–54, Nov. 2020.
  * [5] K. Rikkinen, P. Kyöti, M. E. Leinonen, M. Berg, and A. Pärssinen, “THz radio communication: Link budget analysis toward 6G,” _IEEE Commun. Mag._ , vol. 58, no. 11, pp. 22–27, Nov. 2020.
  * [6] Y. Heng, J. G. Andrews, J. Mo, V. Va, A. Ali, B. L. Ng, and J. C. Zhang, “Six key challenges for beam management in 5.5G and 6G systems,” _IEEE Commun. Mag._ , vol. 59, no. 7, pp. 74–79, July 2021.
  * [7] R. Li, H. Yan, and D. Cabric, “Rainbow-link: Beam-alignment-free and grant-free mmW multiple access using true-time-delay array,” _IEEE J. Sel. Areas Commun._ , vol. 40, no. 5, pp. 1692–1705, May 2022.
  * [8] I. Frigyes and A. J. Seeds, “Optically generated true-time delay in phased-array antennas,” _IEEE Trans. Microw. Theory Techn._ , vol. 43, no. 9, pp. 2378–2386, Sept. 1995.
  * [9] C. Lin and G. Y. Li, “Adaptive beamforming with resource allocation for distance-aware multi-user indoor terahertz communications,” _IEEE Trans. Commun._ , vol. 63, no. 8, pp. 2985–2995, Aug. 2015.
  * [10] D. Headland, Y. Monnai, D. Abbott, C. Fumeaux, and W. Withayachumnankul, “Tutorial: Terahertz beamforming, from concepts to realizations,” _APL Photonics_ , vol. 3, no. 5, pp. 1–32, 2018.
  * [11] J. M. Jornet, E. W. Knightly, and D. M. Mittleman, “Wireless communications sensing and security above 100 GHz,” _Nat. Commun._ , vol. 14, 841, pp. 1-10, Feb. 2023.
  * [12] Y. Ghasempour, C. Yeh, R. Shrestha, D. Mittleman, and E. Knightly, “Single shot single antenna path discovery in THz networks,” in _Proc. MobiCom_ , 2020, pp. 1–13.
  * [13] Z. Lin, L. Wang, B. Tan, and X. Li, “Spatial-spectral terahertz networks,” _IEEE Trans. Wireless Commun._ , vol. 21, no. 6, pp. 3881–3892, June 2022\.
  * [14] N. J. Karl, R. W. McKinney, Y. Monnai, R. Mendis, and D. M. Mittleman, “Frequency-division multiplexing in the terahertz range using a leaky-wave antenna,” _Nature Photonics_ , vol. 9, pp. 717–721, Sept. 2015.
  * [15] Z. Lin, L. Wang, J. Ding, B. Tan, and S. Jin, “Channel power gain estimation for terahertz vehicle-to-infrastructure networks,” _IEEE Commun. Lett._ , vol. 27, no. 1, pp. 155–159, Jan. 2023.
  * [16] H. Saeidi, S. Venkatesh, X. Lu, and K. Sengupta, “THz prism: One-shot simultaneous localization of multiple wireless nodes with leaky-wave THz antennas and transceivers in CMOS,” _IEEE J. Solid-State Circuits_ , vol. 56, no. 12, pp. 3840–3854, Dec. 2021.
  * [17] Z. Lin, L. Wang, J. Ding, Y. Xu, and B. Tan, “Tracking and transmission design in terahertz V2I networks,” _IEEE Trans. Wireless Commun._ , vol. 22, no. 6, pp. 3586–3598, June 2023.
  * [18] C.-Y. Yeh, Y. Ghasempour, Y. Amarasinghe, D. M. Mittleman, and E. W. Knightly, “Security in terahertz WLANs with leaky wave antennas,” in _Proc. ACM WiSec_ , 2020, pp. 1–11.
  * [19] C.-Y. Yeh, A. Cohen, R. G. L. D’ Oliveira, M. Médard, D. M. Mittleman, and E. W. Knightly, “Securing angularly dispersive terahertz links with coding,” _IEEE Trans. Inf. Forensics Security_ , vol. 18, pp. 3546–3560, Apr. 2023.
  * [20] H. Q. Ngo, A. Ashikhmin, H. Yang, E. G. Larsson, and T. L. Marzetta, “Cell-free massive MIMO versus small cells,” _IEEE Trans. Wireless Commun._ , vol. 16, no. 3, pp. 1834–1850, 2017.
  * [21] E. Björnson and L. Sanguinetti, “Making cell-free massive MIMO competitive with MMSE processing and centralized implementation,” _IEEE Trans. Wireless Commun._ , vol. 19, no. 1, pp. 77–90, Jan. 2020.
  * [22] M. Arnold, P. Baracca, T. Wild, F. Schaich, and S. t. Brink, “Measured distributed vs co-located massive MIMO in industry 4.0 environments,” in _Proc. EuCNC/6G Summit_ , 2021, pp. 306–310.
  * [23] Z. I. Botev, D. P. Kroese, R. Y. Rubinstein, and P. L. Ecuyer, “Chapter 3-the cross-entropy method for optimization,” _Handbook of Statistics_. Elsevier, 2013, vol. 31, pp. 35-59.