Team ML ab at S em E val-2024 Task 8: Analyzing Encoder Embeddings for Detecting LLM -generated Text (2024)

Abstract: This paper explores solutions to the challenges posed by the widespread use of LLMs, particularly in the context of identifying human-written versus machine-generated text. Focusing on Subtask B of SemEval 2024 Task 8, we compare the performance of RoBERTa and DeBERTa models. Subtask B involved identifying not only human or machine text but also the specific LLM responsible for generating text, where our DeBERTa model outperformed the RoBERTa baseline by over 10% in leaderboard accuracy. The results highlight the rapidly growing capabilities of LLMs and importance of keeping up with the latest advancements. Additionally, our paper presents visualizations using PCA and t-SNE that showcase the DeBERTa model’s ability to cluster different LLM outputs effectively. These findings contribute to understanding and improving AI methods for detecting machine-generated text, allowing us to build more robust and traceable AI systems in the language ecosystem.

## introduction we live in a society that currently relies heavily on the use of llms (large language models), which has followed from the explosive popularity of chatgpt when it was released in late 2022. now, with the introduction of gpt-4 and other † indicates equal contribution amongst authors more powerful llms, it has become increasingly important for us to have the ability to distinguish human-written text from machine-generated text. the fluency of recent models, paired with their tendency to hallucinate, has given rise to a very natural concern that there could be both accidental and intentional "bad actors" seeking to spread false information. research has indicated that about one in every five jobs has over half of its tasks incorporated into llms, and that statistic is positively correlated with the barrier to entry @xcite . consequently, these models have the necessary training data to spit out an immense number of plausibly correct but actually incorrect texts, which would be extremely detrimental because humans historically have been unable to distinguish between them beyond the level of random guessing. such results are supported with recent work aiming to distinguish human-written sentences from ai-generated ones, with the autextification study additionally demonstrating that cross-domain aigenerated text detection from bloomz or gpt is more difficult in non-english languages @xcite . furthermore, in efforts to facilitate unbiased dataset generation for related studies, the framework of textmachina was created, and it contains crucial post-processing abilities like removing disclosure patterns and truncation @xcite . semeval-2024's task 8 @xcite attempts to provide a working solution to the above problems by using standalone, selfoperational means to classify whether a given text was authentically written by a human or artificially generated by a machine, in hopes of eventually building toward a foolproof method of detecting misinformation. in subtask a, we were tasked with creating a binary classification model to determine if a given text was human-written or machine-generated. within this subtask, there are two different tracks: one for monolingual (only english) and another for multilingual sources (something about which track we did or if we ended up doing both). out of curiosity, we used base deberta with default hyperparameters as our submission for this subtask, but it only performed 5% worse than the roberta baseline. this specific subtask is important because llms are becoming more powerful and easily accessible, so there is a larger potential for misuse. this classification task would help catch the people who are misusing this technology to harm society. in subtask b, we trained a neural network to identify not only whether a given text was humanwritten or machine-written, but also to identify which large language model was responsible for generating that text. these language models include chatgpt, cohere, dolly, and more. this task is important for many of the same reasons as subtask a; as llms are becoming more capable and accessible, being able to distinguish between human and model is crucial. furthermore, being able to distinguish between different models allows for better enforcement of ai-safety laws and accountability. ## results the final deberta model had the following results on the validation set, with a weighted average of 0.98633 precision, 0.98599 recall, and 0.98599 f1score. in comparison, our roberta model performed worse, with each f1-score being lower than the corresponding f1-score for the deberta model. this model had weighted scores of 0.97979 precision, 0.97909 recall, and 0.97909 f1-score. although these were high, they were each still a we compared our model's predictions for the test set with the labels provided. the total accuracy was 0.8266666667. below is the confusion matrix in table form for the predicted labels versus actual labels, with the labels corresponding to their respective sources. for example, the 439 entry has predicted label 2 and actual label 3, meaning that there were 439 predictions for the cohere source that were actually from the davinci source. the results on the test set are summarized in the table below. additionally, we analyzed the pooled outputs of the trained deberta model on subtask b's data. to visualize the outputs in 2-d, pca and t-sne projection techniques were applied on the 768-d pooled outputs. the data points were colored by their corresponding text source (either human or llm model) in figures 1 and 2 on the test set. figure 2: t-sne projection of pooled outputs on the subtask b test data for both the roberta statistics and the deberta statistics in their validation results, the top two entries for precision and f1-score were bloomz and human in some order, which indicates a greater degree of identifiability from these sources. bloomz was trained on multilingual tasks and fine-tuned on english prompts @xcite , and many online texts are written by humans who are at least bilingual, so there could be a mannerism of text generation tied to multilingualism that makes it easier to pinpoint and distinguish these sources from the others. another observation is that davinci performed reasonably well across the board for the validation sets, but had abysmal scores for the deberta test set. considering that deberta is a more recent model, it is entirely possible that it has more difficulty with older data, which may explain why davinci did as poorly as it did. however, besides davinci and bloomz being outliers on either end of the spectrum for f1-score, the rest of the values fell within a generally stable range, indicating that deberta had a balanced evaluation of texts. additionally, interestingly enough, chatgpt ranks last or near last in precision and f1-score in all the tables, but makes up for that with its high recall values. this could mean that the text was detected to be ai-generated with relative ease, but was then often misclassified as being from another ai source. given that gpt-4 has greatly enhanced abilities compared to its predecessor, swapping out chatgpt for gpt-4 could yield radically different results (for a potential future direction). ## conclusion for semeval 2024 task 8, multigenerator, multidomain, and multilingual black-box machine-generated text detection, team mlab submitted models for subtasks a and b. specifically for subtask b, we used a base deberta model and significantly outperformed the provided baseline set by a base roberta model, with our model's final accuracy coming out to 0.827. in analyzing the precision, recall, and f1-score statistics, we discovered trends in the recorded values that seem to indicate that the method of training models, as well as the timeline of their training, have profound effects on the detectability of machine-generated text. finally, by creating and interpreting pca and t-sne graphs, we present visual evidence that de-berta's internal reasoning groups various llm results in separate clusters, even though davinci acted as an exception with its colored points scattered in the general vicinity of other models. therefore, visualizing ai thought processes can provide us with useful insights regarding how we can understand and improve the language ecosystem that they share with us.