## 3 The Proposed Approach  
The proposed approach consists of three components: (i) the identification of clusters for the set of documents at hand; (ii) the generation of summaries for each cluster; (iii) the generation of interpretable explanations via appropriate XAI models. The first step of the proposed pipeline is the construction of discrete clusters for the corpus of the documents at hand. Instead of handling sentences and words as categorical values, we employ an LLM to produce sentence embeddings. Specifically, we use a pre-trained _MPNet_[27] language model. _MPNet_(_Masked and Permuted Network_) is a language model designed to understand and generate text in the form of natural language. The main functionalities of _MPNet_ are the following:  
* **Masked Language Modeling (MLM)**: Similar to BERT, MPNet masks some of the words in a sentence and tries to predict them (e.g., the sentence \"The pesticides should be banned in EU\". is truncated to generate the masked version \"The pesticides should be banned in [MASK]\".) * **Permuted Language Modeling (PLM)**: The second functionality shuffles the words of a sentence, in order to predict the original order. Such permutations allow _MPNet_ to extract statistical dependencies between words. * **Generation of Sentence Embeddings**: Each sentence is represented as a real-value vector that incorporates the insights and the information extracted by the above-mentioned functionalities. By default, _MPNet_ produces a 768-dimensional embedding for each sentence. To obtain the overall document embeddings, a mean pooling operator is utilized that takes into account the embeddings of each sentence of the document. _MPNet_ was developed to overcome the negligence of _BERT_ networks, as far as the dependency of the predicted tokens is concerned. For the implementation of our approach, we utilize the \"all-mpnet-base-v2\" variation, which is publicly available at the HuggingFace ([[https://huggingface.co/sentence-transformers/all-mpnet-base-v2,accessed](https://huggingface.co/sentence-transformers/all-mpnet-base-v2,accessed)]([https://huggingface.co/sentence-transformers/all-mpnet-base-v2,accessed](https://huggingface.co/sentence-transformers/all-mpnet-base-v2,accessed)) on 5 March 2024) platform. For the assignment of documents to discrete clusters, a _K-Medoids_ algorithm is employed. As stated in Section 2.1, _K-Medoids_ create a representative data point for each cluster via an iterative process. The process commences with a random division of the documentsinto a predefined number of clusters. The data points are then utilized to generate a medoid for each cluster. In the next step, a data point \(d_{i}\) changes label (i.e., is assigned to a different cluster) if and only if  
\[dist(d_{i},m_{k})\leq dist(d_{i},m_{j})\quad\forall j\in[1,2,...,K] \tag{1}\]  
with \(m_{k}\) denoting the medoid of cluster \(C_{k}\), and with \(dist(d_{i},m_{k})\) denoting the distance of data point \(d_{i}\) from medoid \(m_{k}\). For our implementation, we utilize the cosine similarity metric. The process is terminated when equilibrium is reached (i.e., there is no change to the data points's labels). The _K-Medoids_ algorithm (Algorithm 1) is presented below:  
```
0: Dataset \(D=\{d_{1},d_{2},\ldots,d_{n}\}\), number of clusters \(k\)
0: Clusters \(C=\{C_{1},C_{2},\ldots,C_{k}\}\) and medoids \(M=\{m_{1},m_{2},\ldots,m_{k}\}\)
1: Initialize: Select \(k\) random points from \(D\) as initial medoids \(M\)
2:repeat
3: Assign each point \(d_{i}\in D\) to the cluster \(C_{j}\) with the nearest medoid \(m_{j}\)
4:for each cluster \(C_{j}\)do
5: Compute the total distance from all points in \(C_{j}\) to each point in \(C_{j}\)
6: Select the point with the minimum total distance as the new medoid \(m_{j}\)
7:endfor
8:until medoids do not change
9:return Clusters \(C\) and medoids \(M\)
```  
**Algorithm 1** K-Medoids Clustering  
Having created the clusters, we employ a _BART_ network for summarization purposes.