# Negation and Speculation in NLP: A Survey, Corpora, Methods, and Applications
## 3 Methods and Techniques
### Supervised Techniques
The sequence labeling task was divided into cue and scope detection, where the output of the cue detection task was an input to the CRF-based scope detection. [PERSON] et al. used two methodologies to compare their T-MexNeg (TMN) corpus to the SFU Review corpus in detecting negation phenomena in Spanish social media data [17]. The CRF-based system depends on several attributes, such as PoS and cue features. The previously explored studies prove machine learning methods' effectiveness in the scope detection task. In treating the scope detection as a sequence labeling problem, these CRF-based models outperform the other machine learning method, SVM. Nevertheless,their success depends heavily on a highly engineered feature set that needs more effort. Therefore, deep learning-based methods are the best candidates that learn latent features automatically on different NLP sequence labeling tasks. [PERSON] et al. proposed a convolutional neural network (CNN) model to capture various syntactic information between a cue and its tokens within a sentence to detect the negation and speculative scope [87]. The feature set consists of the widely used constituency, dependency parse trees, and relative position of cues and candidate tokens. These are combined to form a single vector that finally is fed into a SoftMax layer to detect the negation or speculative scope. By modeling the relationship between cues and their scope accurately rather than considering the problem as a binary classification task, this work performed better than previous studies; however, it did not capture long-distance syntactic dependency and performed poorly on the BioScope sub-corpus of full papers. [PERSON] and [PERSON] proposed the Structural Tree Recursive Neural Network (STRNN) to detect the negation scope on the SEM 2012* test corpus [97]. First, this network takes a binarized syntax tree, where a local vector represents each word, as input for the sentence's syntactic structure. After that, it recursively combines the local vectors for constituent states to form a global state vector in an upward phase. Finally, it recursively divides the global vector through the parse tree during the downward phase to obtain the output using a SoftMax layer. Other studies addressed speculation detection with attention-based deep learning architectures, proving their efficiency in many NLP tasks. These architectures mainly help the neural network to focus on the most relevant information. [PERSON] and [PERSON] proposed CNNs with external and sequence-preserving attention mechanisms to capture the most relevant features that represent the long input sequences [90]. Their CNN model includes a convolutional layer, three max-pooling layers, one hidden layer, and a logistic output ([[https://github.com/heikeadel/attention_methods](https://github.com/heikeadel/attention_methods)]([https://github.com/heikeadel/attention_methods](https://github.com/heikeadel/attention_methods)) (accessed on 9 March 2022)). [PERSON] proposed an attention-based generative adversarial networks (GAN) model to identify the speculation scope in Arabic biomedical data [95]. This model takes PoS, constituency, and dependency features to detect the speculative phrase. The experimental results show that the performance of speculation detection systems was improved by using attention-based models. As in our survey, the bidirectional long short-term memory network (BiLSTM) is the usual deep learning method for negation and speculation scope tasks. [PERSON] et al. tackled negation detection in the review domain, using various recurrent neural networks that are recurrent neural networks (RNNs)-based (LSTM, BiLSTM, and GRU) with word embedding representation [88]. The word embedding representation of tokens was automatically extracted as the only feature used in their model. The system's performance proves that RNNs with WE models are candidates to replace the rich features-dependent classifiers for negation scope detection. [PERSON] et al.