# Edge Convolutional Networks for Style Change Detection in Arabic Multi-Authored Text
## 4 Proposed Solution: ECNN-ASCD
### Graph Design  
This subsection describes how the documents are formulated as graphs in this study. The preprocessing step is applied to the input documents as shown in Algorithm 1. The step includes segmenting texts into paragraphs to detect the style changes at the paragraph level. The preprocessing also verifies document consistency by checking paragraph counts with labels. Algorithm 1 returns the embeddings of the input documents. This research uses pretrained models to represent paragraphs because they have provided high results in SOTA solutions. For example, 14 pretrained-based models out of 15 participated solutions in the latest edition, PAN 2024, achieved a higher \(F_{1}\) score than a handcrafted-based model that participated in the same year [11]. The SCD task deals with each document in the input data separately. In other words, the task does not look for a common writing style between two documents. Thus, there is no direct relationship between any two documents. Therefore, each document can be treated as a disjoint subgraph. This separation helps decrease the complexity and sparsity of graphs. Every subgraph corresponds to a document in the input data. Each node in a subgraph represents a paragraph in the document. This design preserves each paragraph's individual representation, thereby preserving each one's contextual information. Edges \begin{table}
\begin{tabular}{l l} \hline \hline
**Symbol** & **Definition** \\ \hline \(\mathcal{G}(\mathcal{V},E)\) & \(\mathcal{G}\): input graph, \(\mathcal{V}\): node set, and \(E\): edge set \\ \(|\mathcal{V}|=n\) & \(n\) number of nodes \\ \(i\in\mathcal{V}\) & Nodes in \(\mathcal{G}\) \\ \(e_{ij}\in E\) & Edges in \(\mathcal{G}\) located between every two consecutive nodes \(i\) and \(j\) \\ \(j\in\mathcal{N}(i)\) & Set of one-hop neighbors of node \(i\) in \(\mathcal{G}\) \\ \(\deg(i)\) & Degree of node \(i\) \\ \(W^{k}\) & Trainable weight matrix at layer \(k\) \\ \(X\in R^{n\times f}\) & Node feature matrix for \(n\) nodes \\ \(\mathbf{x}_{i}^{k}\in R^{f}\) & \(f\)-dimensional node embedding of node \(i\) at layer \(k\) \\ \(E\in R^{n-1\times f}\) & Edge feature matrix for \(n-1\) edges \\ \(\epsilon_{ij}^{k}\in R^{f}\) & \(f\)-dimensional node embedding of edge \(ij\) at layer \(k\) \\ \(Agg(\cdot)\) & Aggregation function \\ \(\sigma(\cdot)\) & Nonlinear activation function \\ \(\oplus\) & Summation operation \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Symbol definitions. connect the preceding to succeeding paragraphs, capturing the sequential flow within the document. This subgraph can be constructed as a path graph. ```
0:\(Docs\): A dataset, \(B\): Boundaries' list as ground-truth labels Output:\(Rep_{Doc}\): Dataset representations at the paragraph level
1:\(Rep_{Doc}\leftarrow\emptyset\)
2:for all\(doc\in Docs\)do
3:\(para\leftarrow\) segmenting_paragraphs(\(doc\))
4:\(para\leftarrow\) checkConsistency(\(para\),\(B\)) //Compared to ground truth information
5:\(Rep_{para}\leftarrow\) pretrained_model(\(para\))
6:\(Rep_{Doc}\gets Rep_{Doc}\cup Rep_{para}\)
7:endfor
8:Return\(Rep_{Doc}\)
```  
**Algorithm 1** Preprocessing  
Algorithm 2 shows the main design steps of the graph \(\mathcal{G}(\mathcal{V},E)\). After applying the preprocessing step, all the nodes in a subgraph \(\mathcal{G}_{doc}\) will contain the representations of the paragraphs located in one document. Edges are added between every two consecutive nodes without initializing their representations. The ground-truth labels are assigned to edges. The edges correspond to boundaries between paragraphs. Hence, classifying these edges determines whether the writing style changes between paragraphs.