RK adiyala at S em E val-2024 Task 8: Black-Box Word-Level Text Boundary Detection in Partially Machine Generated Texts (2024)

Abstract: With increasing usage of generative models for text generation and widespread use of machine generated texts in various domains, being able to distinguish between human written and machine generated texts is a significant challenge. While existing models and proprietary systems focus on identifying whether given text is entirely human written or entirely machine generated, only a few systems provide insights at sentence or paragraph level at likelihood of being machine generated at a non reliable accuracy level, working well only for a set of domains and generators. This paper introduces few reliable approaches for the novel task of identifying which part of a given text is machine generated at a word level while comparing results from different approaches and methods. We present a comparison with proprietary systems , performance of our model on unseen domains’ and generators’ texts. The findings reveal significant improvements in detection accuracy along with comparison on other aspects of detection capabilities. Finally we discuss potential avenues for improvement and implications of our work. The proposed model is also well suited for detecting which parts of a text are machine generated in outputs of Instruct variants of many LLMs.

## introduction with rapid advancements and usage of ai models for text generation , being able to distinguish machine generated texts from human generated texts is gaining importance. while existing models and proprietary systems like gltr @xcite , zerogpt (zerogpt), gptzero @xcite , gptkit (gptkit), open ai detector , etc.. focus on detecting whether a given text is entirely ai written or entirely human written , there was less advancement in detecting which parts of a given text are ai written in a partially machine generated text. while some of the above mentioned systems provide insights into which parts of the given text are likely ai generated , these are often found to be unreliable and having an accuracy close or worse than random guessing. there is also a rise in usage of ai to spread fake news and misinformation along with using ai models to modify wikipedia articles @xcite . our proposed model focuses on detecting word level text boundary in partially machine generated texts as part of the semeval shared task : multi-generator, multi-domain, and multilingual black-box machine-generated text detection @xcite . this paper also discusses implications of findings , comparisons with different models and approaches , comparison with existing proprietary systems with relevant metrics , other findings regarding ai generated texts. the official submission is deberta-crf , several other models have been tested for comparison. with new, better, and diverse ai models coming into existence, having a model that can make accurate predictions on unseen domains and unseen generator texts can be useful for practical scenarios. the dataset used is part of m4gt-bench dataset @xcite ) consisting of texts each of which are partially human written and partially machine generated sourced from peerread reviews and outfox student essays @xcite all of which are in english. the genera-tors used were gpt-4(openai, 2024) , chatgpt , llama2 7/13/70b @xcite . ## baseline the provided baseline uses finetuned longformer over 10 epochs. the baseline classifies tokens individually as human or machine generated and then maps the tokens to words to identify the text boundary between machine generated and human written texts. the final predictions are the labels of words after whom the text boundary exists. the detection criteria is first change from 0 to 1 or vice versa. we have tried one more approach by considering the change only if consecutive tokens are the same. the baseline model achieved an mae of 3.53 on the development set which consists of same source and generator as the training data. the model had an mae of 21.535 on the test set which consists of unseen domains and generators. ## proposed model we have built several models out of which deberta-crf was used as the official submission. we have finetuned deberta @xcite , spanbert @xcite ), longformer @xcite , longformer-pos (longfomer trained only on position embeddings), each of them again along with conditional random fields (crf) @xcite with different text boundary identification logic by training on just the training dataset and after hyperparameter tuning , the predictions have been made on both development and test sets. crfs have played a vital role in improving the performance of the models due to their architecture being well suited for pattern recognition in sequential data. the primary metric used was mean average error (mae) between predicted word index of the text boundaries and the actual text boundary word index. however mean average relative error (mare) too was used for a better understanding which is the ratio of mae and text lenght in words. some of the plots and information couldn't be added due to page limits and are available here. foot_0 along with the code used. foot_1 . a hypothetical example in figure 1 demonstrates how the model works. the tokens are classified at first and mapped to words. in cases where part of a word is predicted as human and rest as machine (in case of longer words), the word as a whole is classified as machine generated. ## comparison with proprietary systems some of the proprietary systems built for the purpose of detecting machine generated text provide insights into what parts of the text input is likely machine generated at a sentence / paragraph level. many of the popular systems like gptzero, gp-tkit, etc.. are found to to less reliable for the task of detecting text boundary in partially machine generated texts. of the existing models only zerogpt was found to produce a reliable level of accuracy. for the purpose of accurate comparison percentage accuracy of classifying each sentence as human / machine generated is used as zerogpt does detection at a sentence level. ## conclusion the metrics from