## 4 Diverse Model Stacking Ensemble
### Few-Shot Learning
#### 4.1.2 Embedding Lookup  
Large language models have demonstrated their worth in addressing natural language processing tasks when there is a scarcity of labeled data [73]. The reason is that these models learn useful text representations (embeddings) that capture semantic and contextual information about the words. Mapping discrete tokens, such as words or characters, to continuous vector representations in a lower-dimensional space is called an embedding lookup [14; 15; 77].  
The embeddings of large language models can be exploited to classify text based on searching for nearest neighbors among the embeddings. This technique exploits the notion that words or tokens with similar meanings or contexts should have similar vector representations in the embedding space. There are three phases in this procedure:  
* Employing the language model to create embeddings for labeled texts.
* Performing a search for the nearest neighbors among the stored embeddings.
* Aggregating the labels of the nearest neighbors to obtain a prediction.  
The primary benefit of employing the nearest neighbor embedding lookup technique is that there is no need to train or fine-tune a model to harness the few existing labeled data [73; 78; 79]. An illustration of how one can perform nearest neighbor embedding lookup for emotion recognition is shown in Figure 3.  
It is essential to provide the proper number of neighbors to search for and retrieve in this approach since choosing too few neighbors might bring noise, while choosing too many neighbors could cause blending with nearby clusters [15]. After some pilot experiments, we opted to retrieve 15 text examples as neighbors and subsequently selected the emotion prediction that appeared at least 5 times. These parameter choices are particularly well-suited for the nuanced nature of fine-grained emotion recognition.  
Figure 3: An illustration of nearest neighbor embedding for emotion recognition.  
\begin{table}
\begin{tabular}{l l} \hline \hline
**Augmentation** & **Sentence** \\ \hline \multirow{2}{*}{None} & English glove: Proverbs are a reservoir of people’s experiences and wisdom, which are summed up in belief words in order to pass them on from one generation in the next. \\ \hline \multirow{2}{*}{Synonym replacement} & English glove: Proverbs are a reservoir of history’s experiences, and for its wisdom, it sums it up in something simple, so that it can be used by any generation in the next \\ \hline \multirow{2}{*}{Word insertion (Random)} & English glove: Proverbs are a reservoir of people’s experiences and their human wisdom, which are summed up in belief words in order to pass them on from one generation to the next. \\ \hline \multirow{2}{*}{Word swap (Random)} & English glove: Proverbs are a reservoir of people’s experiences, which summarize their wisdom in belief words that you can often often often encounter to the next \\ \hline \multirow{2}{*}{Word deletion (Random)} & English glove: It is a reservoir of people experiences and wisdom that summarizes them and transmits them from generation to generation \\ \hline \multirow{2}{*}{Back Translation (English)} & English glove: It deals are a repository of people’ experiences and wisdom, which, in short, are passed down from generation in generation. \\ \hline \hline \end{tabular}
\end{table}
Table 3: Examples of different data augmentation techniques when applied to dialectal Arabic text.