# One-Class Learning for AI-Generated Essay Detection
## 2 Materials and Methods
### One-Class Models  
Once linguistic features are extracted, they are used to train and extract inferences using one-class learning models. A set of popular and diverse models is adopted in the study. Specifically:  
* **One-Class Support Machines (OCSVMs)**[43]: They conceptually operate in a similar way to Support Vector Machines, which identify a hyperplane to separate data instances from two classes. However, the one-class learning counterpart uses a hyperplane to encompass all of the background data instances (human essays). Solving the OCSVM optimization problem corresponds to solving the dual quadratic programming problem: \[\min_{\alpha}\frac{1}{2}\sum_{ij}\alpha_{i}\alpha_{j}K\big{(}x_{i},x_{j}\big{)}\] subject to the constraints \(0\leq\alpha_{i}\leq\frac{1}{\
u l}\) and \(\sum_{i}\alpha_{i}=1\), where \(\alpha_{i}\) is the weight for the instance \(i\), vectors with non-zero weights are defined as support vectors and determine the optimal hyperplane, \(\
u\) is a parameter that represents a trade-off between the distance of the hyperplane from the origin and the number of instances covered by the hyperplane, \(l\) is the number of instances in training data, and \(K\big{(}x_{i},x_{j}\big{)}\) is the kernel function. Leveraging the kernel function to project input vectors into a feature space allows for nonlinear decision boundaries. Specifically, a feature map can be defined as: \[\phi:X\rightarrow\mathbb{R}^{N},\] \begin{table}
\begin{tabular}{c c c} \hline
**Type** & **Feature** & **Example** \\ \hline \multirow{8}{*}{Readability} & Flesch Reading Ease Score & (0, 100) \\  & Flesch Kincaid Grade Score & (\(-3.40\), no limit) \\  & Smog Index Score & (1, 240) \\  & Coleman Liau Index Score & (1, 11+) \\  & Automated Readability Index & (1, 14) \\  & Dale–Chall Readability Score & (0, 10) \\  & Difficult Words Score & Varies \\  & Linear Write Formula Score & (0, 11+) \\  & Gunning Fog score & (6–17) \\  & [PERSON] Score (SPAN) & (0, 100) \\  & [PERSON] Score (SPAN) & (0, 100) \\  & [PERSON] Score (SPAN) & (0, 100) \\  & [PERSON] Score (SPAN) & (6–17) \\ \hline \multirow{8}{*}{Part-of-Speech} & ADJ (Adjective) * & current, long \\  & ADP (Adverbial Phrase) * & during the week, right there \\  & ADV (Adverb) * & hopefully, differently \\  & AUX (Auxiliary) * & “...as you **have** seen...” \\  & CCONJ (Coordinating Conjunction) * & and, but, or \\  & DET (Determiner) * & the, a, an \\  & NOUN * & teachers, adoption \\  & NUM * & two, hundreds \\  & PRON (Pronoun) * & I, you, him, hers \\  & PROPN (Proper Noun) * & Sweden, United States \\  & PUNCT (Punctuation) * &.. \\  & SCONJ (Subordinating Conjunction) * & although, because, whereas \\  & SYM (Symbol) * & symbol that is not punctuation, e.g., \$ \\  & VERB * & mirror, use, have \\  & SPACE (Number of spaces) * & count of number of spaces \\ \hline \end{tabular}
\end{table} 
Table 1: Cont. where \(\phi\) maps training vectors from the input space \(X\) to a dimensional feature space, and the kernel function is defined as: \[K(x,y)=\langle\phi(x),\phi(y)\rangle\] The adoption of kernel values \(K(x,y)\) allows to avoid the explicit computation of feature vectors, with great improvement in the computational efficiency. Common kernels include Linear, Radial Basis Function (RBF), Polynomial, and Sigmoid. Following the training phase, the OCSVM-learned hyperplane can categorize a new data instance (essay) as regular/normal (human) or different/anomaly (AI-generated) with regard to the training data distribution based on its geometric location within the decision boundary. * **Local Outlier Factor (LOF)**[44]: The method measures the deviation in local density of data instances (essays) with respect to their neighbors. The anomaly score returned by LOF is based on the ratio between the local density of the data instance and the average local density of the nearest neighbors.