of residence will be enough to get help. Rev M. Summerfield founder of Pet rescue said she is not known for always being politically correct, as a northern girl she is very direct and believes in the honesty of the people who will come for help to the pet's food bank. As a charity, we find local people very generous in donating pet foods, for which we are very grateful but those donations can also help other pet owners who are in difficulty after we have stocked our food store. So, we are asking for more food donation and we have approached pet food manufactures and supermarkets to collect, not only our rescue but for the Community pet food bank. If you wish to Volunteer to help collect or distribute food etc please give your details to the staff.


I'm interested in this Dodge Magnum '08 you are selling in Pomona CA for $6000. I'd like to know more about this vehicle and if it is still available. Thank you!
Hey! I was taking a look at this 2008 Dodge Magnum station wagon, which is on sale right now in California for less than $7000 dollars, can you please take a look at it at http://www.autopten.com/dodge/magnum/forsale/ca/16953/ and let me know what you think? thanks!


text:
\section{Introduction}
Software requirements outline the characteristics, functionalities, design and implementation constraints of a software for the development team.
These requirements are expected to be accurate, consistent and comprehensive.
Consistency of the requirements can be particularly important for the success of the software development project since contradictory and redundant requirements directly impact the project delivery time and associated costs.
These requirements are typically contained in software requirement specifications (SRS) documents.
A requirement set from SRS documents may contain requirements that are duplicates or in conflict with one another.
Specifically, a requirement pair is labeled as conflicting if the implementation of one has a detrimental effect on the other requirement~\citep{guo2021automatically,malik2022identifying}.
Duplicate requirements are those in which two requirements refer to the same objective or a paraphrased version of one another.

As the software requirements are typically structured as natural language data, many studies have applied conventional natural language processing (NLP) techniques for the automated processing of the requirements.
The research in this field has benefited from rapid advancements in the NLP domain~\citep{guo2021automatically}.
Specifically, pre-trained language models such as BERT~\citep{devlin2018bert} and RoBERTa~\citep{liu2019roberta} are shown to achieve state-of-the-art performance for a wide variety of natural language tasks ranging from sentence classification to sequence labeling.
Accordingly, it is important to take advantage of the recent progress in pre-trained language models and transfer learning techniques to further advance the state-of-the-art in conflict and duplicate identification in software requirement texts.

In this paper, we design and evaluate alternative transfer learning techniques to classify the software requirement pairs as Conflict, Duplicate, and Neutral (CDN).
This approach is similar to the problem of Natural Language Inference (NLI),
which involves determining the inference relation between two texts, with the outcome being one of Contradiction, Entailment, or Neutral \cite{maccartney2008}.
Additionally, we consider the simplified version of this problem by focusing only on the contradiction cases, which turns the problem into a binary classification task with Conflict or Neutral (CN) as the instance labels.

\paragraph{Research motivation}
The functionality and anticipated performance of software products are described in SRS documents, which inevitably has an impact on the later stages of software development. Software requirements that are difficult to understand (e.g., due to redundancy and contradicting structure) may result in reduced effectiveness of the software systems. As such, it is essential to detect conflicting and duplicate requirements in the initial phases of software development to avoid time loss and overheads in the process. We aim to develop a fully automated framework for this task by utilizing transfer learning methods and transformer models. These techniques are suitable to deal with general software requirement texts and they can capture the intricacy of natural language structure present in requirements for conflict and duplicate detection.

\paragraph{Contributions}
In this paper, we apply various transfer learning techniques for conflict identification in SRS documents.
Our proposed approaches amalgamate the strengths of sequential training in various forms in a supervised, unsupervised, and self-supervised manner. The contributions of our work can be summarized as follows:
\begin{itemize}
    \item We formulate the conflict and duplicate detection problem as a requirement pair classification task.
    To the best of our knowledge, this approach has not been adopted for our problem in previous studies.
    In our analysis, we leverage the capabilities of sequential transfer learning and cross-domain transfer learning, thereby effectively adapting pre-trained transformer models to the software requirement domain.

    \item We propose a novel transformer-based architecture, SR-BERT, for the conflict and duplicate requirement identification task.
    This architecture incorporates Sentence-BERT and Bi-encoder representations of the requirement texts and performs the requirement pair classification using an additional layer of feed-forward neural network.

    \item We provide a comprehensive numerical study with datasets obtained from various disciplines such as aerospace, automobile, healthcare, and thermodynamics software systems. We perform error analysis and examine the root causes of misclassifications. Furthermore, we employ three information extraction techniques, namely, Actor-Action Extraction, POS Tagging, and Semantic Role Labeling, to post-process the requirement pairs and understand their relationship based on the extracted entities. In this regard, our numerical study provides evidence on the capabilities of state-of-the-art NLP techniques for detecting conflicting and duplicate requirements.

\end{itemize}

\paragraph{Structure of the paper}
The rest of the paper is structured as follows. In Section~\ref{sec:background}, we briefly summarize the relevant methods for identifying conflicts and duplicates in software requirements. Furthermore, we review various transfer learning techniques in NLP tasks with special emphasis on sequential and cross-domain transfer learning. We provide formal descriptions of the employed methodology in Section~\ref{sec:methods}, along with a discussion on our datasets, sequential and cross-domain transfer learning methods, and rule-based techniques. In Section~\ref{sec:results}, we present the results from our comprehensive numerical study.
We conclude the paper in Section~\ref{sec:conclusion} with a summary of our research findings, and a discussion on the study limitations and recommendations for future research.

\section{Literature Review}\label{sec:background}
This section reviews existing studies on conflict detection techniques, sentence pair classification, and transfer learning methods for generic and software engineering-related NLP tasks.

\subsection{Transfer learning in NLP}
A single predictive model for a problem utilizing a single dataset is the foundation of the traditional supervised machine learning paradigm.
This method works well for a simple and well-defined task, however, it might require a large labeled training data.
Semi-supervised learning can reduce the need for large datasets, as it can utilize a small amount of labeled data and make extensive use of unlabeled data.
However, unlabeled instances are also difficult to find in various domain-specific problem settings \citep{pan2020transfer,zhuang2020comprehensive}.
Transfer learning remedies these issues in supervised and semi-supervised learning by using data from different tasks or domains to train a model with improved generalization capabilities \citep{ruder2019}.
Over the past years, many transfer learning approaches have been developed in the NLP field, outperforming the state-of-the-art on a range of NLP tasks \citep{devlin2018bert,reimers2019sentence,he2021deberta}.

\citet{choe2019neural} applied sequential transfer learning techniques to the grammatical error correction (GEC) task.
They initially used a realistic noising function to generate an unannotated corpus.
Then, transformer models are pre-trained using the generated corpora.
Using transfer learning in a sequential manner, they adapted these models to obtain a better fit to the domain of the test set.
Their approach achieved competitive results in both the restricted and low-resource cases when combined with a context-aware neural spellchecker.
\citet{shi2019simple} proposed simple BERT architecture for relation extraction and semantic role labeling (SRL).
They divided the task into four subtasks: predicate detection, predicate sense disambiguation, argument identification, and argument classification.
The task of predicate disambiguation is to determine the correct meaning of a predicate in a given context.
For instance, in ``Jack went to Paris'', the predicate ``went'' has sense ``motion''.
They employed sequence labeling for this task where the predicate token is tagged with the sense label.
To determine the argument identification and its spans, they employed standard NER input tagging schemes i.e., BIO (Beginning, Inside, and Outside) tagging.

\citet{xie2020distant} proposed a model for the question answering problem by combining the straightforward bag of words text passage retrieval with a BERT-based text reader for extracting answer spans.
They also presented a method for automatically annotating sentences as either positive or negative instances for data augmentation purposes for BERT fine-tuning.
\citet{meftah2021hidden} highlighted the problem of negative transfer learning when knowledge is transferred between unrelated domains.
They studied the negative transfer learning issues that occur when transferring from the news domain to the tweets domain through various NLP tasks such as Part-Of-Speech (POS) tagging, chunking, and named entity recognition (NER).
\citet{han2021robust} included adapters within each layer of a pre-trained model, then trained the adapter layers on the downstream task data using (1) task-specific unsupervised pre-training and (2) task-specific supervised training.
Their results showed that such a training strategy enhances adversarial robustness and stability in transfer learning when applied to diverse downstream tasks.

\citet{yang2017transfer} developed a transfer learning method for the sequence tagging problem.
They proposed three neural network designs for cross-application, cross-domain, and cross-lingual transfer scenarios.
Their results show performance improvements for the target task (e.g., POS tagging for microblogs) by training models on a different source task (e.g., POS tagging on Penn Treebank).
\citet{cao2021deep} proposed a deep transfer learning mechanism for fine-grained cross-domain sentiment classification.
Specifically, they employed BERT as a feature encoder for mapping text data from various domains into a shared feature space.
Then, the KL divergence is used to create a domain adaptive model that eliminates the difference in feature distribution between the source and target domains.

Very few studies, particularly in requirement engineering, use transfer learning and fine-tuning approaches for the software requirement texts.
\citet{hey2020norbert} proposed NoRBERT, a language model that improves BERT architecture for requirement classification tasks using transfer learning.
As software requirements typically differ in terminology and word structure, the efficacy of existing classification systems suffers from generalization issues.
The NoRBERT model provided significant improvement in classification results with a non-functional requirement (Promise NFR) dataset.
\citet{kici2021bert} investigated the requirement classification task performance using various fine-tuned transformer checkpoints.
They experimented with NFR and IBM-DOORS\footnote{https://www.ibm.
com/docs/en/ermd/9.7.0?topic=overview-doors} task management datasets.
\citet{ma2012transfer} studied the cross-company defect prediction task where the source and target data are obtained from various businesses.
Specifically, they used the transfer learning method with a Naive Bayes algorithm to develop a quicker and more accurate prediction model using cross-company data.

\subsection{Sentence pair classification}
Sentence pair classification involves two fragments of text (not necessarily grammatical sentences) with a target label that explains the relationship between the text pairs.
There exists a wide variety of methods proposed for different sentence pair-related tasks \citep{lan2018neural}.
By self-supervised training and fine-tuning, transformer networks provide significant improvement for sentence pair tasks.
Below we briefly describe well-known sentence pair tasks.
\begin{itemize}
    \item Semantic Textual Similarity (STS): In this task, the objective is to measure equivalence or similarity in the underlying semantics of paired text snippets \citep{agirre2016semeval}.
    \citet{reimers2019sentence} proposed Sentence-BERT (SBERT) which is a pre-trained BERT variant that uses siamese and triplet network structures to generate semantically meaningful sentence embeddings that can be compared using cosine-similarity.

    \item Paraphrase Identification (PI): This task (also known as phrase matching) involves determining whether two sentences have the same meaning \citep{xu2015semeval}.

    \item Natural Language Inference (NLI): This task is also known as recognizing textual entailment (RTE) and it involves whether a hypothesis can be inferred from a premise.
    Accordingly, a good understanding of the semantic similarity between the hypothesis and the premise is needed to perform this task \citep{maccartney2008}.
    Since the NLI dataset made puplicly available, many studies approached this problem using various deep learning-based techniques.
    \citet{song2020utilizing} investigated the possibility of training BERT intermediate layers to improve the performance of the BERT models for NLI tasks. \citet{pang2019improving} presented a novel approach for incorporating syntax into  NLI models.
    They used contextual token-level vector representations from a pre-trained dependency parser in their BERT architecture.

    \item Question Answering (QA): This task involves ranking candidate answer sentences or phrases according to their similarity to the original question \citep{yang2015wikiqa}.
\end{itemize}

\subsection{NLP-based conflict identification methods}
Identification of contradictory or similar software requirements is a challenging problem
and an automated and generalizable method for identifying conflicting and duplicate requirements has yet to be developed.
Several papers have studied conflict detection in a variety of fields \citep{malik2022identifying}.
The relevant literature for automated, semi-automated, and rule-based conflict detection methods in software engineering is reviewed in Table~\ref{tab:literature_conflict}.
We note that several studies employ rule-based and conventional NLP tasks to detect the conflicts amongst software requirements.
\citet{guo2021automatically} proposed FSARC (Finer Semantic Analysis-based Requirement Conflict Detector), which converts software requirements into an eight-valued tuple.
This tuple is subsequently run through several rule-based algorithms to identify conflicts.
\citet{ghosh2014automatically} introduced ARSENAL (Automatic Requirements Specification Extraction from Natural Language) method which combined heuristic rules on extracted NLP components utilizing Stanford's Typed Dependency Parser library (STDP), to translate natural language needs into formal software specifications.
Few studies also applied deep learning-based and transformer-based techniques to detect the conflicts in requirement engineering \citep{malik2022identifying,abeba2021identification}.
In our work, the problem of conflict and duplicate identification is further analyzed by utilizing recently developed transformer architectures and transfer learning methods to achieve a fully automated conflict detection mechanism.

\renewcommand{\arraystretch}{1.5}
\begin{table}[!ht]
    \centering
    \caption{Summary of conflict detection techniques in software engineering}
    \label{tab:literature_conflict}
    \resizebox{1.0\linewidth}{!}{
    \begin{tabular}{p{0.23\textwidth} p{0.27\textwidth} p{0.60\textwidth}}
\toprule
{\bf Approach} & {\bf Study} & {\bf Findings and Limitations} \\
\midrule
Rule-based with \\ core NLP methods & \textcolor{navyblue}{\citet{ghosh2014automatically}}  & ARSENAL: apply rule-based heuristics to tag the software requirements and then extracted the formal structural information from requirements.\\
& \textcolor{navyblue}{\citet{sabriye2017framework}}  &  Propose to build a framework to detect the requirement conflicts automatically using Parts-of-Speech (POS) tagging. \\
& \textcolor{navyblue}{\citet{aldekhail2017intelligent}}&  The strategy employs a rule-based system to identify functional requirement conflicts, followed by the use of a genetic algorithm to resolve those conflicts. \\
& \textcolor{navyblue}{\citet{guo2021automatically}}  & FSRAC: transformed the requirements into uniform structures (eight tuple) with higher accuracy. Rule-based heuristics also works well in case of various SRS testing documents. \\
\midrule
Fuzzy Logic-based & \textcolor{navyblue}{\citet{felty2003feature}} & Use linear temporal logic for conflict detection in telecom dataset in Bellcore industries.\\
& \textcolor{navyblue}{\citet{polpinij2008automatic}}  & Fuzzy decision process: (1) manual labeling, (2) training fuzzy decision tree classifier, (3) Removing the conflicts on the basis of classifier prediction\\
& \textcolor{navyblue}{\citet{viana2017identifying}} & Framework to detect and mange the conflicting requirements in an SOS. Applied three basic techniques: overlap detection, conflict detection, and conflict resolution.  \\
\midrule
Deep Learning-based     & \textcolor{navyblue}{\citet{abeba2021identification}} & Apply BiLSTM and word2vec embeddings to develop the model for identifying non-functional requirement conflicts.\\
\midrule
Transformer-based & \textcolor{navyblue}{\citet{malik2022identifying}} & Two phase approach: Phase I: identify the potential conflict set using similarity measure, Phase II: determine the degree of overlap between entities in requirements\\
\bottomrule
\end{tabular}
}
\end{table}

In this paper, we approach the conflict and duplicate identification problem in software requirements from a different perspective.
Our requirement pair classification problem mimics the NLI task and aims to detect the conflict and duplicate pairs from the requirements.
In this regard, our research contributes to the transfer learning literature in the software engineering domain in several ways.
First, to the best of our knowledge, there is no prior literature on the application of transfer learning in identifying conflicts and duplicate requirement pairs.
Second, for sentence pair tasks, few studies employ bi-encoder architectures for requirement similarity tasks to extract semantically meaningful embedding.
We combine the SBERT architecture with a multiple-stage fine-tuning transformer checkpoint for the requirement pair classification.
Third, various conflict identification methods apply POS tagging, relation extraction, ontology extraction, and rule-based techniques in an ad-hoc or isolated manner.
We apply software-specific NER, POS tagging, and SRL techniques with generic rules to extract meaningful information and utilize this knowledge to validate/improve the predictions.

\section{Methodology}\label{sec:methods}
In this section, we first describe the requirement pair datasets employed in our analysis.
Then, we discuss the transfer learning methods that we use for requirement pair classification.
Lastly, we explain various information extraction techniques and how they are used for rule-based filtering of the requirement pairs.

\subsection{Datasets}
We consider the following data collection and preprocessing steps to prepare our datasets for model training.
First, we extract the requirements present in SRS documents and create the pairs of requirements by combining each requirement with the rest of the requirements in the document.
Second, we manually label the requirement pairs as ``Conflict'', ``Neutral'', and ``Duplicate''.
We maintain the original structure of requirements, however, for consistency, we convert the complex requirements (long paragraphs) into simple sentences.
We consider two proprietary datasets (CDN and CN), and three open-source SRS datasets (UAV, WorldVista, and PURE) that belong to various domains such as software, healthcare, transportation, and hardware.
Figure~\ref{fig:text_length} shows the text length distribution of the requirements for each dataset, which shows that text length ranges between 5 to 50 tokens per requirement.
\begin{figure}[!ht]
    \centering
    \includegraphics[width=0.99\textwidth]{images/box_plot_ml_crf.pdf}
    \caption{Requirement text length distribution.}
    \label{fig:text_length}
\end{figure}

\begin{itemize}
    \item \textbf{CDN/CN}: CDN dataset consists of requirement pairs with three distinct labels: Conflict, Duplicate and Neutral.
    This dataset consists of requirements and short user stories extracted from the IBM-DOORS product~\citep{doors}.

    Table~\ref{tab:data_sample} shows sample requirement instances, exhibiting the general structure and format of the requirements pairs used in the conflict detection task.
    Figure~\ref{fig:cdn_dist} shows the class label distribution for CDN dataset.
    We consider another variant of this dataset, CN, which only includes requirement pairs with Conflict and Neutral labels.

\setlength{\tabcolsep}{7.5pt}
\begin{table}[!ht]
\centering
    \caption{Sample data instances from CDN dataset with requirement pairs and corresponding labels.}
    \label{tab:data_sample}
    \resizebox{0.85\linewidth}{!}{
\begin{tabular}{p{0.45\textwidth} p{0.45\textwidth} p{0.08\textwidth}}
\toprule
\textbf{Requirement Text 1} & \textbf{Requirement Text 2} & \textbf{Label} \\
\midrule
The UAV shall only accept commands from an authenticated Pilot controller. & The UAV shall accept commands from an authenticated remote viewing app. & Conflict\\
All UAV data transmission shall be secure against unauthorized access. &
All UAV data transmission shall be secure against all access. &
Conflict \\
\midrule
These are the client requirements for the Aviary System of Systems. & These are the customer requirements for the Aviary System. & Duplicate\\
The UAV shall send the Pilot real-time information about malfunctions that impact the mission. &
The UAV shall send the Pilot real-time data about errors that affect the mission. & Duplicate \\
\midrule
The Pilot shall be able to fly the UAV to any accessible-by-air location within 20 miles of its origin & The UAV shall charge to 75\% in less than 3 hours. & Neutral\\
The UAV shall periodically send the Pilot the power and estimated flight time remaining. &
A single adult shall be able to lift and carry the UAV. & Neutral \\
\bottomrule
\end{tabular}
}
\end{table}

\begin{figure}[!ht]
    \centering
    \subfloat[CDN dataset with 3 classes\label{fig:cdn_dist}]{\includegraphics[width=0.40\textwidth]{images/cdn_data_dist.pdf}}

    \subfloat[Datasets with 2 classes\label{fig:cn_dist}]{\includegraphics[width=0.59\textwidth]{images/othersrs_data_dist.pdf}}
    \caption{Class distribution for the requirement pair datasets.}
    \label{fig:data_dist}
\end{figure}

    \item \textbf{UAV}: The UAV (Unmanned Aerial Vehicle) dataset is released by the The University of Notre Dame and it consists of requirements that define the functions of the UAV control system \citep{guo2021automatically}. The requirement syntax follows the template of EARS (Easy Approach to Requirements Syntax)~\citep{mavin2009easy}. Figure~\ref{fig:cn_dist} shows the distribution of UAV requirement pairs. The original dataset contains very few conflicts, resulting in 18 conflict pairs and 6,652 neutral pairs.

    \item \textbf{WorldVista}: The WorldVista\footnote[2]{https://worldvista.org/Documentation} dataset includes software requirements for a health management system. This software records the patient's data such as hospital admission and discharge procedures. Requirements structure is very primitive and written in natural language with basic healthcare jargon. Figure~\ref{fig:cn_dist} shows the distribution of WorldVista requirement pairs. This dataset consists of 35 conflict and 10,843 neutral pairs.

    \item \textbf{PURE}: PURE (Public Requirements dataset) is a publicly available corpus that contains 79 SRS documents collected from the open-source software projects~\citep{pure}.
    From this corpus, we selected two SRS documents as THEMAS (Thermodynamic System) and Mashbot (web interface for social networks).
    Initially, the requirement texts were long and organized in paragraphs.
    We preprocessed the requirements into simpler structures. Figure~\ref{fig:cn_dist} shows the distribution of PURE requirement pairs. This dataset consists of 20 conflict and 2,191 neutral pairs.
\end{itemize}

\subsection{Transfer learning techniques for requirement pair classification}
Certain NLP models take a text pair as input.
For instance, the Next Sentence Prediction (NSP) pre-training objective of the vanilla BERT model training involves predicting whether two input sentences follow each other~\cite{devlin2018bert}.
Accordingly, this pre-training objective helps understanding the relationship between the two sentences.
Many other NLP tasks involve two-sentence input, e.g., NLI, question answering, predicting whether two questions are duplicates and predicting whether some headline is a good summary for a story~\cite{ bowman2015large,maccartney2008modeling}.

Our approach to conflicting/duplicate requirement identification also involves text classification models that work with sentence pairs as input.
It is important to note that the success of this approach relies on understanding the relationship between the text segments from two sequences.
That is, straightforward adoption of word vectors from the two input texts (e.g., pooling the word embeddings or bag of words representations from both segments) would not provide the necessary semantic information.
Accordingly, we consider alternative transformer models and transfer learning techniques to solve this challenging problem.

\subsubsection{Sequential transfer learning}

Sequential transfer learning is a well-known technique to leverage the knowledge obtained in the previous stage for a task in the source domain to improve the task performance in the target domain \cite{ruder2019}.
It is achieved by enhancing the language model checkpoints step by step.
The general practice is based on two-stage learning: pre-training and fine-tuning.
Pre-training is generally performed on large unlabelled textual data using large neural networks in a self-supervised manner.
In the fine-tuning step, these learned representations are adapted to a supervised downstream task using labeled text data.
While the traditional methods use two checkpoints, recent studies showed that these checkpoints can be advanced sequentially many times \cite{ruder2019}.
That is, this two-stage pipeline can be extended such that more training steps can be placed between these two stages using more unlabelled or labeled data, which is called continual pre-training.
This process can be repeated multiple times as long as a negative transfer does not occur.
In our analysis, we apply both the traditional two-stage approach and the many-stage approach utilizing multiple checkpoints mostly in a supervised fashion.
Figure~\ref{fig:method_3} shows one such many-stage approach for the CDN classification task where an unsupervised checkpoint is fine-tuned with two supervised tasks in order: MNLI downstream task and further fine-tuning with our CDN dataset.

\begin{figure}[!ht]
    \centering
    \includegraphics[width=0.95\textwidth]{images/sequential.pdf}
    \caption{Sequential transfer learning pipeline for requirement pair classification}
    \label{fig:method_3}
\end{figure}

\subsubsection{SR-BERT}

Pre-trained models can be directly used to produce sentence embeddings that can be fed into feed-forward neural networks.
This process is also called feature extraction in transfer learning where it is crucial to train strong sentence embeddings.
The bi-encoder models are appropriate for such a pipeline since they are known to provide efficient sentence embeddings \cite{reimers2019sentence}.
The main difference from the vanilla BERT model is that bi-encoders independently learn sentence embeddings by keeping the representations of a pair of sentences separate.
On the other hand, the vanilla BERT model encodes two sentences at the same time, which leads to high computational complexity for some applications (e.g., semantic search).
It also needs to be fine-tuned before inference since BERT-like (cross-encoder) models do not produce efficient sentence embeddings independently.
One of the successful bi-encoder modifications of BERT is Sentence-BERT (SBERT).
Based on siamese and triplet network structures, SBERT fine-tunes the BERT model to produce semantically meaningful and independent embeddings.
Similar to BERT, bi-encoder models offer possibilities for fine-tuning and adaptation.

We propose a novel architecture named software requirement BERT (SR-BERT) based on bi-encoders that incorporates domain adaptation to solve requirement pair classification problems.
Figure~\ref{fig:biencoder} illustrates the SR-BERT architecture.

\begin{figure}[!ht]
    \centering
    \includegraphics[width=0.7\textwidth]{images/sr_bert.pdf}
    \caption{SR-BERT model architecture combining Bi-encoders and Sentence-BERT capabilities}
    \label{fig:biencoder}
\end{figure}

In SR-BERT architecture, we adapt suitable high-quality bi-encoder checkpoints for our CDN problem.
These checkpoints are fine-tuned twice in a supervised fashion.
Specifically, the training data is used to adapt a checkpoint in a supervised manner where the label is used to fine-tune the model parameter with a three-way softmax classifier objective.
The trained model is then capable of encoding software requirement pairs in the target domain.
Once the training and testing dataset are encoded in order, the nominative forms of the requirement vectors are concatenated to each other along with the difference vector based on the formula $R_{1} \oplus R_{2} \oplus (R_{1} - R_{2}) $.
This representation is transferred to the feed-forward neural network for another supervision where the label of the training dataset is used for the supervision signal.

\subsubsection{Cross-domain transfer learning}
Transfer learning or domain adaptation involves transferring the experience obtained in one task or domain to another domain to improve the generalization capacity of a prediction model.
Cross-domain transfer learning refers to utilizing relevant knowledge in the source domain for learning the tasks in the target domain \citep{ruder2019}.
Alternatively, it can be defined as the process of using a transformer model trained on a different domain for a different source task and adapting it for another domain or target task.
For our NLP tasks, cross-domain transfer learning can be implemented in two ways.
In the first case, source and target datasets are from the same domain, however, the NLP task is different \citep{aderghal2018classification}.
In the second case, the NLP task is identical, however, the domains of source and target datasets are different \citep{cao2021deep}.

In our requirement datasets, the CDN and CN possess relatively balanced class distributions whereas and all the other requirement pair datasets have few conflict instances.
To utilize the knowledge from transformer checkpoints trained and fine-tuned over the CDN dataset, we develop cross-domain transfer learning models for the UAV, WorldVista, and PURE datasets which belongs to different domains.
Figure~\ref{fig:cross_domain} shows our cross-domain transfer learning framework.
Specifically, we use the transformer checkpoints trained and fine-tuned with the source dataset (CDN) and apply those checkpoints to target datasets (UAV, WorldVista, and PURE) to perform conflict and neutral pair classification.
\begin{figure}[!ht]
    \centering
    \includegraphics[width=0.8\textwidth]{images/cross_domain.pdf}
    \caption{Cross-domain transfer learning framework for requirement pair classification task.}
    \label{fig:cross_domain}
\end{figure}

\subsection{Rule-based techniques for requirement filtering}
One commonly faced issue in CDN/CN classification tasks is that the models might lead to high recall but low precision rates.
This implies that the models generate a high number of false positives (FPs), conflict being the positive class.
Accordingly, we design rule-based approaches to filter the FP classifications.
We employ information extraction techniques and create the rules to reclassify the positive predictions, where the objective is to preserve true positive (TP) predictions while re-classifying FPs to negative predictions.
Figure~\ref{fig:rule_based} shows the overview of the proposed rule-based techniques.
Specifically, any positive prediction is flagged as a candidate for further processing.
Then, information extraction techniques such as NER, POS tagging and semantic rule labelling are used to capture the fine details in the requirement pairs.
For instance, for a requirement pair to be a conflict, they need to have certain tags/words to be commonly available.
Our rule-based approach filters the positive predictions accordingly to identify the FP instances.
\begin{figure}[!ht]
    \centering
    \includegraphics[width=0.9\textwidth]{images/rule_based.pdf}
    \caption{Framework for filtering the positive predictions using various information extraction techniques.}
    \label{fig:rule_based}
\end{figure}

Below, we briefly describe the information extraction techniques and the rules employed for the filtering of the positive predictions.
\begin{itemize}
    \item \textbf{Actor-Action (AA) Extraction}: Named Entity Recognition (NER) can be used to extract the most relevant entities from a given input text.
    The domain-specific entities can be extracted by training machine learning models with domain-specific corpus.
    We employ software-specific NER to extract the actor and action from the requirement pairs.
    In terms of requirement structure, ``Actor'' is an entity that interacts with the software application and ``Action'' is an operation performed by an actor in a software system.
    For instance, for the requirement `` The UAV shall charge to 75\% in less than 3 hours.'', \textit{UAV} is an actor and \textit{charge} is an action performed by UAV.
    We employ transformer models trained on the software-specific corpus to extract these entities from the requirement pairs \citep{maliksoftware}.

    Algorithm~\ref{alg:aa} summarizes the process of Actor-Action extraction and rule-based filtering.
    For each requirement pair $(r_i,r_j) \in \mathcal{R}$, we extract the corresponding entities ($e_i,e_j$) using an entity extraction routine \texttt{SNERModel}. For this purpose, we adopt \citet{maliksoftware}'s approach, which relies on transformer-based models to extract the software-specific entities. Then, we determine the overlapping actors ($O_{Actor}$) and actions ($O_{Action}$) in the pairs using \texttt{SimilarActor} and \texttt{SimilarAction} routines.
    These procedures implement string comparison amongst the entities to find the same actors and actions.
    Then, we apply the rules to identify the conflict and neutral pairs.
    Specifically, we first check whether the $O_{Actor}$ and $O_{Action}$ are not empty, signifying there is a common entity present between the requirement pair, which leads to a conflict label. Otherwise, the pair is labeled as neutral and we augment the neutral set accordingly.

\begin{algorithm}[!ht]
\KwInput{Requirement pair set: $\mathcal{R} = \{ (r_i,r_j) | i \in 1,2 \hdots n, j \in 1,2 \hdots n)\}$ \text{where}  $i \neq j$ }
\KwOutput{Conflict pair set $\mathcal{C}$, neutral pair set $\mathcal{N}$}
\KwInitilisation{Conflict pair set: $\mathcal{C} = \emptyset$,
Neutral pair set: $\mathcal{N} = \emptyset$ }
\For{$(r_i,r_j)$ $\in$ $\mathcal{R}$}{
$e_i$ = \texttt{SNERModel} ($r_i$), $e_j$ = \texttt{SNERModel} ($r_j$)\\
$O_{Actor}$ = \texttt{SimilarActor}($e_i$,$e_j$), $O_{Action}$ = \texttt{SimilarAction}($e_i$,$e_j$)\\
\If{$O_{Actor} \neq \emptyset$ \textit{and} $O_{Action} \neq \emptyset$}
{
    $\mathcal{C}  \leftarrow \mathcal{C} \cup (r_i,r_j)$

}
\Else
{
	$\mathcal{N}  \leftarrow \mathcal{N} \cup (r_i,r_j)$
}

}
\caption{Actor–Action-based filtering}\label{alg:aa}
\end{algorithm}

\item \textbf{Part-of-Speech (POS) Tagging}:
POS Tagging is the process of extracting language specific Part-of-Speech tags from the given input text.
In terms of software requirement structure, we assume that ``Actors'' can be referred to as Noun and ``Actions'' as Verb.
We employ a standard POS tagger provided in NLTK documentation. Specifically, we use POS tagger trained on Penn Treebank corpus which is generic and can be used across different domains \citep{hardeniya2016natural}.
Algorithm~\ref{alg:pos} summarizes the process of POS tag extraction and rule-based filtering.
Overall, this algorithm adopts a similar approach to Algorithm~\ref{alg:aa}, except that requirement pairs are compared using the extracted nouns and verbs that are extracted using \texttt{POSTags} routine.
If both \texttt{SimilarNoun} and \texttt{SimilarVerb} routines return a match between requirements in the pair, then this pair is labeled as conflict, and it is labeled as neutral otherwise.
\begin{algorithm}[!ht]
  \KwInput{Requirement pair set: $\mathcal{R} = \{ (r_i,r_j) | i \in 1,2 \hdots n, j \in 1,2 \hdots n)\}$ \text{where}  $i \neq j$ }
  \KwOutput{Conflict pair set $\mathcal{C}$, neutral pair set $\mathcal{N}$}
  \KwInitilisation{Conflict pair set: $\mathcal{C} = \emptyset$,
  Neutral pair set: $\mathcal{N} = \emptyset$ }
  \For{$(r_i,r_j)$ $\in$ $\mathcal{R}$}{
  $t_i$ = \texttt{POSTags} ($r_i$), $t_j$ = \texttt{POSTags} ($r_j$)\\
  $S_n$ = \texttt{SimilarNoun}($t_i$,$t_j$), $S_v$ = \texttt{SimilarVerb}($t_i$,$t_j$)\\
  \If{$S_n \neq \emptyset$ and $S_v \neq \emptyset$}
    {
        $\mathcal{C}  \leftarrow \mathcal{C} \cup (r_i,r_j)$

    }
    \Else
    {
    	$\mathcal{N}  \leftarrow \mathcal{N} \cup (r_i,r_j)$
    }
  }
\caption{POS tagging-based filtering}\label{alg:pos}
\end{algorithm}

\item \textbf{Semantic Role Labeling (SRL)}: Semantic Role Labeling (SRL) is one of the fundamental tasks in natural language understanding~\citep{shi2019simple}.
In the SRL task, we extract the predicate-argument structure of a sentence, determining ``who did what to whom'', ``when'', and ``where''. Table~\ref{tab:srl_example} shows the output of SRL when applied to the sample requirement pair from the WorldVista dataset. It shows that the SRL task captures all the content verbs present in the requirements and provides the associated information as arguments. For simplicity, we have only shown ARG0 and ARG1 for each verb and we have used the same argument structure in our rule-based algorithm as well.
\renewcommand{\arraystretch}{1.5}
\begin{table}[!ht]
\centering
\caption{SRL output with sample requirement pair from WorldVista dataset}
\label{tab:srl_example}
\resizebox{0.9\linewidth}{!}{
\begin{tabular}{p{0.40\textwidth} p{0.15\textwidth} p{0.47\textwidth}}
\toprule
{\bf Requirement pair} & \multicolumn{1}{p{1.19cm}}{\raggedright \textbf{Verb}\\ \textbf{(Predicate)}} & {\bf Arguments} \\
\midrule
$r_i$ = The system shall \textbf{\textcolor{navyblue}{mimic}} traditional order entry processes where necessary to \textbf{\textcolor{navyblue}{accommodate}}  \textbf{\textcolor{navyblue}{established}} clinical practices. & mimic  & [ARG0: The system], [ARG1: traditional order entry processes] \\
& accommodate & [ARG1: established clinical practices] \\
& established & [ARG1: clinical practices] \\
\midrule
$r_j$ = The system shall \textbf{\textcolor{navyblue}{make}} the traditional order entry \textbf{\textcolor{navyblue}{processes}} more practical. & make  & [ARG0: The system], [ARG1: the traditional order entry processes more practical]\\
& processes & [ARG1: entry] \\
\bottomrule
\end{tabular}
}
\end{table}

Algorithm~\ref{alg:srl} summarizes the SRL-based filtering for requirement pairs.
For $(r_i,r_j) \in \mathcal{R}$, we extract verbs ($v_i,v_j$), i.e., predicates and corresponding arguments ($a_i,a_j$) using \texttt{SRLModel} routine.
We use \texttt{SetIntersection} check if there are any overlaps between the verbs extracted from the requirements.
If no common verbs exists in the requirement pair, we directly classify the respective pair as neutral.
Otherwise, we extend our rules to analyse the arguments.
If we encounter any overlap between the arguments, which can be identified from \texttt{OverlapArguments} method, then, we label the pair as conflict, and it is labeled as neutral otherwise.

\begin{algorithm}[!ht]
\KwInput{Requirement pair set: $\mathcal{R} = \{ (r_i,r_j) | i \in 1,2 \hdots n, j \in 1,2 \hdots n)\}$ \text{where}  $i \neq j$ }
\KwOutput{Conflict pair set $\mathcal{C}$, neutral pair set $\mathcal{N}$}
\KwInitilisation{Conflict pair set: $\mathcal{C} = \emptyset$,
Neutral pair set: $\mathcal{N} = \emptyset$ }
\For{$(r_i,r_j)$ $\in$ $\mathcal{R}$}{
$v_i, a_i$ = \texttt{SRLModel} ($r_i$), $v_j,a_j$ = \texttt{SRLModel} ($r_j$)\\
$\mathcal{V}$ = \texttt{SetIntersection}($v_i, v_j$)\\
\If{$\mathcal{V} == \emptyset$}
{
$\mathcal{N}  \leftarrow \mathcal{N} \cup (r_i,r_j)$

}
\Else{
\If{\texttt{OverlapArguments}($a_i, a_j$)}
{
$\mathcal{C}  \leftarrow \mathcal{C} \cup (r_i,r_j)$
}
\Else{
$\mathcal{N}  \leftarrow \mathcal{N} \cup (r_i,r_j)$
}
}
}
\caption{Semantic Role Identification with 2 Arguments}\label{alg:srl}
\end{algorithm}

\end{itemize}

\subsection{Experimental setup}\label{sec:experiments}
In our numerical study, we employ different BERT variants and fine-tuned model checkpoints with MNLI data.
Specifically, we experiment with \textit{distilbert-base-uncased}\footnote[3]{https://huggingface.co/distilbert-base-uncased}, \textit{roberta-large-mnli}\footnote[4]{https://huggingface.co/roberta-large-mnli}, \textit{bert-base-uncased-MNLI}\footnote[5]{https://huggingface.co/textattack/bert-base-uncased-MNLI}, and  \textit{deberta-base-mnli}\footnote[6]{https://huggingface.co/microsoft/deberta-base-mnli}. Table~\ref{tab:parameters} shows the pre-trained transformer model checkpoints architectural details and hyperparameter values used in the experiments.
\renewcommand{\arraystretch}{1.5}
\begin{table}[!ht]
\centering
\caption{Transformer model checkpoint characteristics and hyperparameter details}
\label{tab:parameters}
\resizebox{0.87\linewidth}{!}{
\begin{tabular}{lrrrrrr}
\toprule
\textbf{Model checkpoints} & \textbf{Layers} & \textbf{Hidden units} & \textbf{Heads} & \textbf{Total params} & \textbf{Batch size} & \textbf{Epochs}\\
\midrule
distilbert-base-uncased & 6 & 768 & 12 & 66M & 32 & 5\\
roberta-large-mnli & 24 & 1024 & 16 & 355M & 32 & 5 \\
bert-base-uncased-MNLI & 12 & 768 & 12 & 340M & 32 & 10\\
deberta-base-mnli & 12 & 768 & 12 & 86M & 32 & 10 \\
\bottomrule
\end{tabular}
}
\end{table}

For hyperparameter tuning of transformer models, we use an adaptive learning rate scheduler that adjusts the learning rate (\textit{lr}) during training.
We set up different combinations of training epochs (2, 10) and training batch sizes (8, 128) to obtain ideal hyperparameters for the transformer models.
We observe that model checkpoints achieve better performance with smaller batch sizes unlike common practice in deep learning, and a lower number of epochs ranging from 5 to 10.
We apply early stopping callback logic to monitor the validation loss and obtain the best fine-tuned model checkpoint for testing the datasets.

The experiments are run using NVIDIA P100 GPU with 32 GB RAM.
Transformers model training times is highly dependent on dataset size and total parameters of the models.
In general, the training times for these checkpoints for all the requirement pair datasets are as follows: \textit{roberta-large-mnli} approximately takes 1-2 hours, the light versions, \textit{deberta-base-mnli} and \textit{distilbert-base-uncased}, take 10-15 minutes, and \textit{bert-base-uncased-MNLI} takes 20-25 minutes.
For SR-BERT (Bi-encoders) model, we use \textit{distilbert-base-nli-mean-tokens} \footnote[7]{https://huggingface.co/sentence-transformers/distilbert-base-nli-mean-tokens} checkpoint to obtain the requirement encodings.
Table~\ref{tab:s_bert_parameters} shows the hyperparameter values for SR-BERT and feed forward neural network used in the experiments.
\renewcommand{\arraystretch}{1.5}
\begin{table}[!ht]
\centering
 \caption{SR-BERT hyperparameter values}
    \label{tab:s_bert_parameters}
    \resizebox{0.9\linewidth}{!}{
\begin{tabular}{crrrrr}
\toprule
& {\bf Loss function}  & {\bf Epochs (max)} & {\bf Learning rate (LR)} & {\bf LR Schedular} & {\bf Batch size}\\
\cmidrule(lr){2-6}
SR-BERT model checkpoint & Softmax loss & 5 & 1e-5 & Exponential& 16 \\
\midrule
& {\bf Dense units}  & {\bf Epochs (max)} & {\bf Activation function} & {\bf Dropout} & {\bf Batch size} \\
\cmidrule(lr){2-6}
Feed forward neural network & 1500& 50& Relu& 0.2&16 \\
\bottomrule

\end{tabular}
}
\end{table}

We implement three distinct techniques to extract the relevant entities from the requirements in the rule-based filtering.
In Actor-Action (AA) extraction, we use fine-tuned \textit{bert-large-cased} checkpoint \citep{maliksoftware}.
For POS tagging, we use standard NLTK \footnote[8]{https://www.nltk.org/api/nltk.tag.html} tagger to extract the noun and verb from the requirements.
For SRL with 2 arguments technique, we use pre-trained transformer model from AllenNLP \footnote[9]{https://allenai.org/allennlp} library.
We directly adopt \textit{bert-base-srl} \footnote[10]{https://storage.googleapis.com/allennlp-public-models/bert-base-srl-2020.03.24.tar.gz} version to extract the semantic role labels from the requirements \citep{shi2019simple}.

\section{Numerical Study}\label{sec:results}
In this section, we present the comprehensive results from our experiments for the requirement pair classification task.
We first provide the comparative results for conflict and duplicate classification using various transformer checkpoints.
Next, we provide the results for the binary conflict classification task.
We then provide the results for the cross-domain conflict prediction tasks.
Lastly, we compare various rule-based techniques to validate the conflict instances in requirement pairs.

\subsection{CDN classification results}
We compare the performance of our proposed SR-BERT model against four transformer checkpoints for the CDN classification task.
These checkpoints are obtained from multiple stages of fine-tuning in supervised and unsupervised manners.
We employ a 5-fold cross-validation strategy and consider standard text classification metrics, e.g., weighted and macro versions of precision, recall, and F1-score.
Table~\ref{tab:CDN_results} shows the performance of various transformer checkpoints over CDN dataset.
Overall, all the models perform well over the CDN dataset, and SR-BERT shows the best results with a weighted F1-score of 95.3\%.
We find that MNLI trained checkpoints (\textit{Deberta-base-mnli} and \textit{BERT-base-uncased-MNLI}) also shows promising results with weighted F1-scores of 92.6\% and 92.0\%, respectively.
Additionally, we note that low standard deviation values signify the higher consistency and low variability in transformer model performance for the CDN dataset.
\begin{table}[!ht]
\centering
    \caption{Conflict and duplicate classification results with CDN dataset. Reported values are averaged over 5 folds and results are shown as ``mean $\pm$ standard deviation''.}
    \label{tab:CDN_results}
    \resizebox{\linewidth}{!}{
\begin{tabular}{lcccccc}
\toprule
 & \multicolumn{3}{c}{\textbf{Weighted}} & \multicolumn{3}{c}{\textbf{Macro}} \\
\cmidrule(lr){2-4}\cmidrule(lr){5-7}
Models & Precision & Recall & F1-score & Precision & Recall & F1-score \\
\midrule
distilbert-base-uncased & 0.854 $\pm$ 0.006 & 0.866 $\pm$ 0.006 & 0.854 $\pm$ 0.007 & 0.813 $\pm$ 0.011 & 0.784 $\pm$ 0.012 & 0.794 $\pm$ 0.010 \\
roberta-large-mnli & 0.923 $\pm$ 0.011 & 0.916 $\pm$ 0.011 & 0.918 $\pm$ 0.011 & 0.883 $\pm$ 0.013 & 0.907 $\pm$ 0.017 & 0.892 $\pm$ 0.014 \\
bert-base-uncased-MNLI & 0.923 $\pm$ 0.011 & 0.919 $\pm$ 0.008 & 0.920 $\pm$ 0.009 & 0.890 $\pm$ 0.007 & 0.901 $\pm$ 0.020 & 0.894 $\pm$ 0.011 \\
deberta-base-mnli & 0.928 $\pm$ 0.003 & 0.924 $\pm$ 0.002 & 0.926 $\pm$ 0.002 & 0.895 $\pm$ 0.002 & 0.909 $\pm$ 0.006 & 0.901 $\pm$ 0.002 \\
SR-BERT & 0.953 $\pm$ 0.005 & 0.953 $\pm$ 0.004 & 0.953 $\pm$ 0.005 & 0.936 $\pm$ 0.003 & 0.938 $\pm$ 0.010 & \textbf{0.937 $\pm$ 0.006} \\
\bottomrule
\end{tabular}
    }
\end{table}

We select the best performing model for conflict and duplicate classification tasks and evaluate the class-specific performance in Table~\ref{tab:CDN_Class_specific}.
SR-BERT can capture all the neutral and conflict pairs effectively, however, it achieves lower performance values for the duplicate class, which can be explained by the lower support values for the duplicates.
That is, data imbalance in the CDN dataset can be considered as one of the main reasons for somewhat inconsistent performance across different classes.
Figure~\ref{fig:cdn_cf} shows the confusion matrix for the CDN dataset, which confirms the performance values listed in Table~\ref{tab:CDN_Class_specific}.
\begin{table}[!ht]
\centering
\caption{Class-specific performance with the best performing model, SR-BERT, over CDN dataset. Reported values are averaged over 5 folds and results are shown as ``mean $\pm$ standard deviation''.}
\label{tab:CDN_Class_specific}
\resizebox{0.65\linewidth}{!}{
    \begin{tabular}{l|cccr}
    \hline
     & \textbf{Precision} & \textbf{Recall} & \textbf{F1-score} & \textbf{support} \\
    \hline
    \textbf{Conflict}     & 0.956 $\pm$ 0.011 & 0.956 $\pm$ 0.003 & 0.956 $\pm$ 0.004 & 1110.60       \\
    \textbf{Duplicate}    & 0.855 $\pm$ 0.015 & 0.871 $\pm$ 0.032 & 0.862 $\pm$ 0.012 & 334.60        \\
    \textbf{Neutral}      & 0.997 $\pm$ 0.002 & 0.989 $\pm$ 0.005 & 0.993 $\pm$ 0.002 & 680.00        \\
    \hline

    \end{tabular}
}
\end{table}

\begin{figure}[!ht]
    \centering
    \includegraphics[width=0.45\textwidth]{images/IBM_3class.pdf}
    \caption{Confusion matrix for CDN classification with SR-BERT. Reported values are averaged over 5 folds. Support values for the CDN dataset are as follows: (C: 1,110.60, D: 334.60, N: 680.00 )}
    \label{fig:cdn_cf}
\end{figure}

We use the combined 5x2cv F-test~\citep{alpaydm1999combined} to perform pairwise statistical comparisons between different classification models for the CDN classification task.
We find that SR-BERT outperforms others in terms of F1-scores and recall metric with $\text{$p$-value} < 0.1$ (see Table~\ref{tab:cdn_stat} in appendix for detailed results).

\subsection{CN classification results}
We next present the results for the binary conflict classification task.
For this experiment, we employ a 3-fold cross-validation strategy as the majority of the datasets are relatively small compared to the CDN dataset and there are only a few conflict pairs available in most cases.
We consider two transformer checkpoints \textit{deberta-base-mnli} and \textit{bert-base-uncased-MNLI} obtained from multiple stage fine-tuning for this classification task.
Our preliminary analysis indicate that SR-BERT do not perform well over these datasets, hence detailed results are not provided for the SR-BERT model.
The relatively poor performance of SR-BERT for the CN task can be attributed to the small dataset sizes.
Table~\ref{tab:CN_results} shows the performance of two transformer checkpoints on four datasets based on macro precision, recall, F1-score and accuracy.
We observe that the model performances vary across the datasets and the best performance is achieved for the largest dataset, CN, which is generated from the CDN dataset.
Specifically, for the CN dataset, both models achieve F1-scores of around 99\%, and the lowest performance is observed for UAV dataset with F1-scores ranging between 84.9\% and 87.7\%.

\begin{table}[!ht]
\centering
\caption{ Performance values for conflict and neutral classification task for all the requirement pair datasets. Reported values are averaged over 3 folds and results are shown as ``mean $\pm$ standard deviation''.}
\label{tab:CN_results}
 \resizebox{0.935\linewidth}{!}{
 \begin{tabular}{llllll}
\hline
\textbf{Dataset} &  \textbf{Models} &  \textbf{Accuracy} &  \textbf{Precision} &  \textbf{Recall} &  \textbf{F1-score} \\ \hline
CN & deberta-base-mnli & 0.993 $\pm$ 0.001   & 0.994 $\pm$ 0.000    & 0.992 $\pm$ 0.001 & 0.993 $\pm$ 0.001\\
& bert-base-uncased-MNLI & 0.994 $\pm$ 0.001   & 0.995 $\pm$ 0.001    & 0.993 $\pm$ 0.001 & 0.994 $\pm$ 0.001\\
\hline
UAV  & deberta-base-mnli & 0.998 $\pm$ 0.000   & 0.924 $\pm$ 0.058    & 0.860 $\pm$ 0.078 & 0.877 $\pm$ 0.034\\
& bert-base-uncased-MNLI & 0.998 $\pm$ 0.000   & 0.876 $\pm$ 0.017    & 0.833 $\pm$ 0.067 & 0.849 $\pm$ 0.036\\
\hline
WorldVista  & deberta-base-mnli & 0.998 $\pm$ 0.000   & 0.999$\pm$ 0.000    & 0.827 $\pm$ 0.041 & 0.893 $\pm$ 0.031\\
& bert-base-uncased-MNLI       & 0.998 $\pm$ 0.000   & 0.978 $\pm$ 0.029   & 0.857 $\pm$ 0.051 & 0.908 $\pm$ 0.043\\
\hline
PURE & deberta-base-mnli & 0.998 $\pm$ 0.001   & 0.971 $\pm$ 0.039    & 0.928 $\pm$ 0.058 & 0.948 $\pm$ 0.048\\
& bert-base-uncased-MNLI       & 0.997 $\pm$ 0.000   & 0.947 $\pm$ 0.036    & 0.903 $\pm$ 0.030 & 0.919 $\pm$ 0.005\\
\hline
\end{tabular}
}
\end{table}

Figure~\ref{fig:conflict_cn} shows the conflict class-specific performance for all the datasets.
We observe that the conflict-specific recall scores is comparatively lower than the precision scores due to lower support for the conflict class in UAV, WorldVista, and PURE datasets (see Section~\ref{subsec:CN_confusion} in appendix for more detailed results).
We also employ the combined 5x2cv F-test~\citep{alpaydm1999combined} to perform pairwise statistical comparisons these two models to assess whether the performance differences are statistically significant.
For the CN classification, none of the pairwise differences in F1-scores and recall are statistically significant with $\text{$p$-value} > 0.05$ (see Table~\ref{tab:cn_stat} in appendix for more details).

\begin{figure}[!ht]
    \centering
    \subfloat[deberta-base-mnli \label{fig:deberta}]{\includegraphics[width=0.45\textwidth]{images/conflict_specific_deberta.pdf}}
    \hspace{0.5em}
    \subfloat[bert-base-uncased-MNLI \label{fig:bert-base}]{\includegraphics[width=0.45\textwidth]{images/conflict_specific_bert_mnli.pdf}}
    \caption{Conflict-label specific performance averaged over 3 folds.}
    \label{fig:conflict_cn}
\end{figure}

\subsection{Cross-domain transfer learning results}
We assess the cross-domain prediction performance of the binary conflict classification models.
Considering the structural similarities of the requirement texts and lack of available labeled datasets for the conflict detection tasks, cross-domain transfer learning can be highly useful in practice.
For this experiment, we employ 3-fold cross-validation and report the results with macro-averaged classification metrics.
Table~\ref{Tab:cross_domain_results} shows the summary performance values for the two transformer architectures under different settings.
Overall, we find that training (i.e., fine-tuning) the models on CN dataset for predicting the labels of UAV, WorldVista, and PURE datasets lead to a poor performance.
Specifically, we observe that CN trained checkpoint can capture all the conflict pairs, however, generate a lot of false positives, i.e., neutral pairs classified as conflict (see Section~\ref{subsec:cross_domain} in appendix for more details).
On the other hand, we achieve high performance when the models are fine-tuned on two of the UAV, WorldVista, and PURE datasets and tested on the remaining one.
For instance, fine-tuning \textit{bert-base-uncased-MNLI} on a combination of UAV and PURE datasets to predict the instances in the WorldVista lead to an average macro F1-score of 93.6\%, which is better than the performance achieved through standalone usage of WorldVista for training and testing (e.g., see 90.8\% F1-score reported in Table~\ref{tab:CN_results}).

\begin{table}[!ht]
\centering
    \caption{Performance values with transformer checkpoints with cross-domain settings}
    \label{Tab:cross_domain_results}
    \resizebox{\linewidth}{!}{
    \begin{tabular}{lllrrrr}
\toprule
 \textbf{Testing Data} &  \textbf{Models} &  \textbf{Training Data} &  \textbf{Accuracy} &  \textbf{Precision} &  \textbf{Recall} &  \textbf{F1-score} \\
\midrule
UAV     & deberta-base-mnli    & CN     & 0.853 $\pm$ 0.005      & 0.509 $\pm$ 0.000       & \textbf{0.926 $\pm$ 0.002}    & 0.478 $\pm$ 0.002            \\
 & bert-base-uncased-MNLI      & WorldVista + PURE    & \textbf{0.998 $\pm$ 0.000}      & \textbf{0.876 $\pm$ 0.119}       & 0.777 $\pm$ 0.103    & \textbf{0.798 $\pm$ 0.083}            \\ \midrule
WorldVista     & deberta-base-mnli    & CN     & 0.946 $\pm$ 0.004      & 0.527 $\pm$ 0.002       & \textbf{0.959 $\pm$ 0.018}    & 0.538 $\pm$ 0.005            \\
 & bert-base-uncased-MNLI      & UAV + PURE      & \textbf{0.999 $\pm$ 0.000}      & \textbf{0.946 $\pm$ 0.047}       & 0.929 $\pm$ 0.017    & \textbf{0.936 $\pm$ 0.031}            \\ \midrule
PURE    & deberta-base-mnli    & CN     & 0.810 $\pm$ 0.016      & 0.522 $\pm$ 0.002       & \textbf{0.904 $\pm$ 0.008}    & 0.491 $\pm$ 0.010            \\
 & bert-base-uncased-MNLI      & UAV + WorldVista     & \textbf{0.996 $\pm$ 0.001}      & \textbf{0.998 $\pm$ 0.000}       & 0.829 $\pm$ 0.061    & \textbf{0.893 $\pm$ 0.043}            \\ \bottomrule
\end{tabular}
}
\end{table}

\subsection{Rule-based filtering performance}
The cross-domain transfer learning experiments show that CN-trained and fine-tuned checkpoints provide higher recall and lower precision values for all the other requirement pair datasets.
To reduce the wrong predictions and improve the precision values, we employ three distinct rule-based techniques to reclassify the instances into conflict and neutral pair classes.
We employ a 3-fold cross validation strategy and report the results in the form of \# of True Positives (TP), \# of False Positives (FP), and macro-averaged precision, recall, and F1-score. Table~\ref{Tab:res_rule_based} shows the summary results for UAV, WorldVista, and PURE datasets along with the relative and absolute percentage changes in performance values when compared to the ones reported in Table~\ref{Tab:cross_domain_results}.

We find that the SRL method is able to eliminate the highest number of wrong predictions (FP for conflict class) and it provides an improvement in F1-scores by +0.26 (56.30\%), +0.23 (42.90\%), and +0.39 (80.80\%) for UAV, WorldVista, and PURE datasets, respectively.
Actor-Action and POS Tagging methods achieve smaller improvements in comparison to the SRL method.
We also note that the POS Tagging can capture conflict pairs with greater accuracy and able to retain the conflict pairs with minor reduction of only 5.67\% .
Statistical tests also confirm that the SRL outperforms POS tagging and Actor-Action with a $\text{$p$-value} < 0.01$.
However, the difference in POS Tagging and Actor-Action performances are not statistically significant with a $\text{$p$-value} > 0.05$.

\begin{table}[!ht]
\centering
\renewcommand{\arraystretch}{1.7}
    \caption{Evaluation results for the rule-based techniques applied to reclassify the conflict instances for the cross-domain models. Reported values are averaged over 3 folds and represented as `` mean $
    \pm$ standard deviation''.}
    \label{Tab:res_rule_based}
    \resizebox{\linewidth}{!}{
\begin{tabular}{llrrr}
\toprule
\textbf{Dataset} &  \textbf{Metrics} &  \textbf{Actor-Action} &  \textbf{POS Tagging} &  \textbf{SRL-2 Argument} \\ \midrule
UAV       & \# of TP    & 4.66 ($\downarrow$ 1.34 / 22.33\%)   & \textbf{5.66 ($\downarrow$ 0.34 / 5.67\%)}   & 2.66 ($\downarrow$ 3.34 / 55.70\%)  \\
   & \# of FP    & 37.66 ($\downarrow$ 287.34 / 88.40\%)     & 87.00 ($\downarrow$ 238 / 73.20\%)   & \textbf{1.66 ($\downarrow$ 323.33 / 99.50\%)}\\
   & Precision   & 0.558 $\pm$ 0.003       & 0.530 $\pm$ 0.004      & 0.790 $\pm$ 0.090      \\
   & Recall      & 0.908 $\pm$ 0.005       & 0.952 $\pm$ 0.040     & 0.721 $\pm$ 0.010      \\
   & F1-score    & 0.598 $\pm$ 0.006 ($\uparrow$ 0.12 / 25.17\%)  & 0.547 $\pm$ 0.008 ($\uparrow$ 0.06 / 14.50\%) & \textbf{0.747 $\pm$ 0.098 ($\uparrow$ 0.26 / 56.30\%)}          \\ \midrule
WorldVista       & \# of TP    & 10.00 ($\downarrow$ 1.31 / 11.50\%)   & \textbf{10.66 ($\downarrow$ 0.64 / 5.66\%)}  & 7.00 ($\downarrow$ 4.33 / 38.05\%)  \\
   & \# of FP    & 58.00 ($\downarrow$ 135.70 / 70.00\%)    & 77.00 ($\downarrow$ 116.70 / 60.20\%)   & \textbf{7.00 ($\downarrow$ 186.70 / 96.40\%)}                    \\
   & Precision   & 0.573 $\pm$ 0.005       & 0.561 $\pm$ 0.009     & 0.747 $\pm$ 0.014      \\
   & Recall      & 0.921 $\pm$ 0.037       & 0.959 $\pm$ 0.021      & 0.802 $\pm$ 0.074      \\
   & F1-score    & 0.621 $\pm$ 0.008 ($\uparrow$ 0.04 / 8.93\%)   & 0.603 $\pm$ 0.016 ($\uparrow$ 0.06 / 12.07\%)  & \textbf{0.769 $\pm$ 0.036 ($\uparrow$ 0.23 / 42.90\%)}          \\ \midrule
PURE      & \# of TP    & 5.66 ($\downarrow$ 1.10 / 16.42\%)   & \textbf{6.33 ($\downarrow$ 0.37 / 5.52\%)}  & 4.66 ($\downarrow$ 2.04 / 30.45\%)  \\
   & \# of FP    & 26.00 ($\downarrow$ 113.70 / 81.40\%)     & 75.33 ($\downarrow$ 64.37 / 46.10\%)   & \textbf{0.66 ($\downarrow$ 139.04 / 99.50\%)}\\
   & Precision   & 0.588 $\pm$ 0.008       & 0.539 $\pm$ 0.006      & 0.931 $\pm$ 0.095     \\
   & Recall      & 0.906 $\pm$ 0.006       & 0.924 $\pm$ 0.037      & 0.852 $\pm$ 0.098      \\
   & F1-score    & 0.638 $\pm$ 0.011 ($\uparrow$ 0.14 / 30.00\%)  & 0.545 $\pm$ 0.014 ($\uparrow$ 0.05 / 11.05\%)  & \textbf{0.887 $\pm$ 0.098 ($\uparrow$ 0.39 / 80.80\%)}          \\ \bottomrule
\end{tabular}
    }
\end{table}

\section{Conclusion}\label{sec:conclusion}
The problems arising in software requirements are among the most important reasons for failures in software development.
Conflicts and duplicates between requirements can be considered among these problems.
Furthermore, such issues with requirements might lead to high costs and a protracted software development period.
Numerous studies have attempted to solve the problem of detecting conflicting and similar requirements using semi-automated techniques with domain expert supervision.
However, full automation for this task has not yet been achieved.

In this study, we investigated NLP-based methods to automate the detection of conflict and duplicate software requirements.
We generated the requirement pairs from general SRS documents and labeled the pairs as conflict, duplicate, and neutral.
We applied sequential and cross-domain transfer learning to fine-tune the pre-trained models for the requirement pair classification task.
For improved domain adaptability, we also developed a novel architecture based on Sentence-BERT and in-domain requirement dataset-trained checkpoint.
Furthermore, we employed information extraction techniques and created rule-based algorithms to improve the results of cross-domain transfer learning models.

In general, the transfer learning models trained with supervised many-stage fine-tuning achieved consistently good results for the CDN dataset.
These models also performed well for the CN dataset for binary conflict classification.
However, we observed that transformer checkpoints only achieved average performance for smaller, publicly available datasets, namely, UAV, WorldVista, and PURE.
Cross-domain transfer learning experiments also showed promising results when trained with a large requirement dataset (e.g., CDN or CN) and tested over general datasets (e.g., UAV, WorldVista, and PURE).
Rule-based techniques, when applied over cross-domain models, improved the F1-scores considerably with semantic role labelling and reduced the false predictions.
Overall, our sequential transfer learning models were able to understand the intricacy of software requirement structures and apply the same knowledge in detecting conflicting and duplicate requirements with higher accuracy.

This work can be extended in numerous ways.
First, repeating our analysis with other requirement datasets can help further assess the generalizability of the transfer learning methods employed in this study.
Second, data augmentation techniques can be applied to synthetically increase the number of conflict pairs in our datasets, which might help improve the model performance.
Third, other transformer checkpoints can be considered for the requirement pair classification tasks.
Fourth, in terms of rule-based techniques, more stringent rules can be explored for the software requirements and the entities can be captured more effectively.
Lastly, our work can be extended to other domains as well.
For instance, these transformer models can be used to identify the conflicts and similarities in legal documents and contracts.

\section*{Statements and Declarations}
No potential conflict of interest was reported by the authors.

\bibliographystyle{elsarticle-num-names}

redpajama_set_name: RedPajamaArXiv


text:
Q: Given two arrays a and b .Find all pairs of elements (a1,b1) such that a1 belongs to Array A and b1 belongs to Array B whose sum a1+b1 = k  I am looking for the solution of following algorithm with minimal time and space complexity.

Given two arrays a and b, find all pairs of elements (a1,b1) such that a1 belongs to Array A and b1 belongs to Array B whose sum a1+b1 = k (any integer).

I was able to come up with O(n log n) approach where we will sort one of the array say A and for each of the element b in array B, do binary search on sorted array A for value (K-b) .
Can we improve it any further?

A: I would create a hash table containing the elements of one array, then iterate the other array looking up k - a(n), generating an output element if the lookup succeeded. This will use O(n) space and time.
In C#, it might look like this:
var bSet = new HashSet(B);
var results = from a in A
              let b = k - a
              where bSet.Contains(b)
              select new { a, b };

A: If the arrays are sorted you can do it in linear time and constant storage.

*

*Start with two pointers, one pointing at the smallest element of A, the other pointing to the largest element of B.

*Calculate the sum of the pointed to elements.

*If it is smaller than k increment the pointer into A so that it points to the next largest element.

*If it is larger than k decrement the pointer into B so that it points to the next smallest element.

*If it is exactly k you've found a pair. Move one of the pointers and keep going to find the next pair.

If the arrays are initially unsorted then you can first sort them then use the above algorithm. There a few different approaches for sorting them that you could use, depending on the type of data you expect:

*

*A comparison sort, e.g. Mergesort or Timsort.

*Counting sort.

*Radix sort.

A comparison sort will require O(n log n) time on average. The last two are faster than O(n log(n)) but can be impractical if the range of possible values in the input arrays is very large.

A: If you have a limit on the maximum possible number (let's name it M) then you can have a solution in O(M+n).
Boolean array of false and mark as true all value for element of A. Then for each element b of B check if the element number K-b is marked as true.
You can improve it if you are using an hash-map instead of a big array. But I would not consider that in this kind of questions  hash-map is kind of cheating.
Anyway it would give you O(n) for insertion and then O(n) for query, O(n) in total.
EDIT :
One case where this might be useful.

*

*You have un-sorted vectors of size 10^6, so sorting them and doing the match is in O(n log n) with n = 10^6.

*You need to do this operation 10^6 times (different vectors), complexity of O(n*n*log n).

*Maximum value is 10^9.

Using my idea not with boolean but integer (incremented at each run) gives you a complexity of :

*

*"O(10^9)" to create the array (also same complexity of space)

*O(n) at each run, so O(n*n) for the total.

You are using more space but you've increased speed by a factor log(n) ~=20 in this case !

A: template< typename T >
std::vector< std::pair< T, T > >
find_pairs(
    std::vector< T > const & a, std::vector< T > const & b, T const & k  ) {

    std::vector< std::pair< T, T > > matches;

    std::sort( a.begin(), a.end() );  // O( A * lg A )
    std::sort( b.begin(), b.end() );  // O( B * lg B )

    typename std::vector< T >::const_iterator acit = a.begin();
    typename std::vector< T >::const_reverse_iterator bcit = b.rbegin();

    for( ; acit != a.end(); /* inside */ ) {
        for( ; bcit != b.rend(); /* inside */ ) {

            const T sum = *acit + *bcit;

            if( sum == k ) {
                matches.push_back( std::pair< T, T >( *acit, *bcit ) );
                ++acit;
                ++bcit;
            }
            else if( sum < k ) {
                ++acit;
            }
            else {  // sum > k
                ++bcit;
            }
        }
    }  // O( A + B )
    return matches;
}

A: I used C++ and it seemed to give me the desired result. Hope this is what you were looking for.
using namespace std;

using data=std::pair<int,int>;

void search_pairs(std::vector<int>& A, std::vector<int>& B, const int total, std::vector<data>& output){

  std::sort(A.begin(),A.end(),[](const int i,const int j)->bool{return (i<j);});
  std::sort(B.begin(),B.end(),[](const int a,const int b)->bool{return (a<b);});
  std::vector<int>* minV(nullptr);
  std::vector<int>* maxV(nullptr);
  if(A.size()>B.size()) {minV=&B;maxV=&A;}
  else {minV=&A;maxV=&B;}
  for(auto&& itr:(*minV) ){
    auto remain(total-itr);
    if (std::binary_search (maxV->begin(), maxV->end(), remain)){
      data d{itr,remain};
      if (minV==&B) std::swap(d.first,d.second);
      output.push_back(d);
    }
  }
  if (minV==&B) std::reverse(output.begin(),output.end());
}

int main() {

    size_t nb(0);
    scanf("%lu",&nb);
    for (size_t i=0;i<nb;++i){
        size_t a,b(0);
        int total(0);
        scanf("%lu %lu %d",&a,&b,&total);
        std::vector<int> A,B;
        for (size_t i=0;i<a;++i){
            int aux;
            scanf("%d",&aux);
            A.push_back(aux);
        }
        for (size_t i=0;i<b;++i){
            int aux;
            scanf("%d",&aux);
            B.push_back(aux);
        }
        std::vector<data> output;
        search_pairs(A, B, total, output);
    auto itr=std::begin(output);
    if (itr==std::end(output)) printf("-1");
    while (itr!=std::end(output)){
      printf("%d %d",(*itr).first, (*itr).second);
      if (++itr!=std::end(output)) printf(", ");
    }
        printf("\n");
    }
    //code
    return 0;
}

redpajama_set_name: RedPajamaStackExchange


Today's red post collection includes a teaser video for content in Season 2019, including images for Kayle & Morgana and a new Support champion, details on chromas for Honor 5 players, what's new in Ranked for Season 2019, and more!
A teaser video for content coming in Season 2019 is now on the League of Legends youtube, showing off some of the coming dev blogs and includes a few images for Kayle and Morgana and the next Support champion!
Look for more as we head further into the new year and Season 2019!
"Hey everyone! Ed "SapMagic" Altorfer here to give you an update on Honor rewards for 2019. If you're an honorable player and you've been around a couple years, you probably already earned both of the exclusive Honor 5 rewards: Medieval Twitch and Grey Warwick. We don't want to leave you hanging, so this season we're adding chromas for these skins to the reward lineup as a way of recognizing the most sportsmanlike players.
With the season reset, it'll be a few months before players climb back to Honor 5, so we'll be back later in the season with a proper debut for the new chromas. If you have questions or feedback, feel free to hit us up in the comments below. Otherwise, good luck in your placements and we'll see you on the Rift!"
"Ranked 2019 kicks off with a new look and a few upgrades. New tiers, new rewards, and a position rank preview join your pursuit to the top. The competitive season begins on January 24. Here's everything you need to know.
"Esports Watch Missions Are Underway!
These achievements won't sit in your client's active mission log to avoid cluttering up the list for months on end, but any player who completes the very first mission ("Let the Games Begin") is eligible to complete them. You can check your completed missions in the missions log for now; soon, we'll show the number of watch missions you've done during Spring Split on the rewards hub as well."
ARURF+ will be hitting live in Patch 9.2! Here's Riot Wrekz with all the details on the changes from the 9.2 PBE cycle!


Whether you are an individual, or a corporation, let us meet your taxation needs.
'We prepare individual tax returns, as well as trust, partnership or company tax returns.
Flexible, tailored support for efficient, smooth business operations.
How would it feel to have a one-point contact for all your corporate secretarial needs? Make the most of the expertise we have to offer and contact us now for help and support.


text:
Saint Gheorghe Church, HinovaCod 1467
The Congregation Hinova is formed by three suburbs – Seliștea, Urziștea and Rudaria, named therefore because of the fact that is formed only from cloth, layer, spoon and skirts masters. The two suburbs Urziștea and Rudaria are separated from the suburb Saliștea from the creek named until the year 1965 when its channel was concreted, cloudy water.
The church of the congregation Hinova, built up from burned brick and stone foundation, has the shape of a cross and it is covered with plates, having the titular saint of Saint Gheorghe.
The church was built between the years 1900 and 1904 on the place of the old church from bars, which had the titular saint of Saint Nicholas. This little church was brought from the old village Calateu in the new village from the Valley of the Danube – Hinova in the year 1845 according to the document note found written on one of the foils of the old ritual and namely the "High Mass which is serviced by the priests from this village with the titular saint of saint Nicholas and which move here in the Valley of the Danube in 1845 November the 8th. Dumitru Draghici from Hinova."
The initiative of building the church was taken by the efforts of the Service priest of the congregation Ion Hinovescu deceased, helped by a committee which helped at organizing the fund raising from the church goers of the congregation and from the neighboring villages and at finishing the entire work.
The church was consecrated in the year 1904 by His Eminence the Holy Bishop of Râmnic D.D. Antim.
The church painting was the initial one in oil "Tătărescu style" and it was executed in the year 1903 by the diplomat painter from Severin Frederich Waidingher.
Saint Gheorghe Church is the church of the congregation of Hinova which has a number of 400 families.
Hinova is a commune in the county Mehedinți, Oltenia, Romania, formed by the villages Bistrița, Cârjei, Hinova (the residence) and Ostrovu Corbului.
According to the census executed in 2011, the population of the commune Hinova was up to 2.849 inhabitants, decreasing in comparison with the previous census from 2002, when there were registered 2.865 inhabitants.
The majority of the inhabitants are Romanian (97, 72%). For 2, 18% of the population, the ethnical affiliation isn't known. From the confessional point of view, the majority of the inhabitants are Orthodox (96, 49%). For 2, 18% of the population, the confessional affiliation isn't known.
Did you spend the night/ are you planning to spend the night in the region?
If yes, how many nights do you intend to/have spend in the region?
Post ID
Posted in Mehedinţi
The Mraconia Monastery, Cazanele Dunării1468
The Monastery Baia de Aramă, Baia de Aramă1499
The Strehaia Monastery, Strehaia1492
The Corcova Vignard, Corcova1429
The Water Castle, Drobeta Turnu Severin1443
The Art Museum, Drobeta Turnu Severin1452
The Porțile de Fier Museum, Porțile de Fier1471
The Anton Bibescu Mansion, Corcova1428

redpajama_set_name: RedPajamaCommonCrawl


text:
Q: How to make Windows phone 8.1 listview to open list last selecteditem after pressed windows phone back button? I Have list on images that i display in listview. When i click listview item it opens another page where it shows bigger version of current picture. When i press Windows phone back button i would like listview to scroll to the item  that was selected earlier.
Here is how I save lsitview.selectedindex:
 private void NavigationHelper_SaveState(object sender, SaveStateEventArgs e)
    {

        e.PageState.Add("id", listview.SelectedIndex);
    }

This is how i am trying set listview:
  private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
    {

        if (null != e.PageState && e.PageState.ContainsKey("id"))
        {

            int i = (int)e.PageState["id"];
            listview.ScrollIntoView(listview.Items[i]);
            System.Diagnostics.Debug.WriteLine(listview.Items.Count);

        }
    }

I also tried like this but this is not working ?
 private void listview_Loaded(object sender, RoutedEventArgs e)
 {

      listview.ScrollIntoView(listview.Items[i])
  }

But when i add normal button to my lisview page like this:
    private void Button_Click(object sender, RoutedEventArgs e)
    {
        listview.ScrollIntoView(listview.Items[i]);
    }

It scroll to selected item after button click. How i can make it work without button so that lisview scroll automatically last selected item?
`

A: If I understand correctly, when the users goes to a picture and comes back, the ListView is scrolled to the top, right? In this case, this is because the page instance is not preserved in cache so it loads again when you press the back button.
You can stop this by setting NavigationCacheMode to Enabled:
<Page x:Class="App.YourClass"
    NavigationCacheMode="Enabled"
</Page>


 Get FREE Insurance Quotes from the BEST Insurance Companies Today!
When you shop around for car insurance, you may get one or two quotes or you may compare numerous companies. However, you may not always find out the rates for every provider available. When you use a site that provides numerous insurance quotes, you can be assured that you have all of the information you need to make a sound decision.
Comparing rates allows you to save money. Whether you are purchasing liability insurance to meet the requirements of the law or selecting comprehensive and collision insurance to protect your vehicle, you want to know that you are getting the best rates. You also save time when you use a comparison site since you only have to input the information once.
Get the best rates by using our site to compare prices with insurance quotes. Pay less and have the coverage you need. No matter what happens, you need to have a policy that covers you in an accident. Paying less for that coverage is a bonus that you will appreciate.
Know what you are comparing when you shop for insurance quotes to ensure you are getting the best deal that still saves you money without having to sacrifice a good level of coverage.
Insurance quotes help you compare different companies and ensure that you are getting the best value for your money so you know you're choosing coverage that works for your budget.
Insurance quotes can increase dramatically after an accident, so it's important to protect yourself, even when you're enjoying your summer vacation travels with your kids.
Cars affect your insurance quotes, so keep your budget for insurance coverage in mind along with considering vehicle safety and other features when selecting a family vehicle.


Video games have come a long way, and so has the way we interact with them. At Cirque, our extensive history building touch solutions has enabled us to create the most unique and cutting edge input solutions for the game systems of the future.
Most touch solutions on the market are one thing - square touchpads. Cirque's technology is extremely versatile, enabling not only standard touchpads, but many other shapes and even 3D curves. Cirque specializes in rapid design and prototyping for these custom form factors.
Touch and proximity tracking on a full controller surface enables simulation of hand input while retaining tactile feedback. A full trackpad is also available, all with a single chip.
Easy to use and ready to go, off the shelf round trackpads are available in a variety of sizes with different overlay options, perfect for adding a touch surface to your game controller.
Touch sensors and gesture optimized for headphones enable many more functions then just volume up and down. Ideal for multi-function gaming headsets.
Cirque excels at tackling challenging projects with rapid design of custom solutions to fit almost any industrial design requirement.
Get two sizes of circle trackpads, complete with an easy to use Arduino-based development board. With support for haptics and additional devices, its a complete dev platform for your project.
Get a sample VR Grip controller and all the documentation and sample software needed to create your own next generation VR/AR controller.
A trackpad, overlay and haptic module compatible with Valve's industry leading Steam VR™ platform.