# Beyond Lexical Boundaries: LLM-Generated Text Detection for Romanian Digital Libraries
## 3 Method
### Corpus  
The corpus for this study consists of multiple datasets of comparable text lengths, both machine-generated and human-written. Experiments were performed against all datasets iteratively for a comprehensive overview. For a detector that generalizes well on several domains and writing styles, the human dataset comprises texts acquired from different domains such as Romanian literature (i.e., books), news, medical, legal, and scientific articles, obtaining a human corpus of 7387 documents across five domains, from which,  
1. A total of 1401 books: 841 manually written abstracts provided by the Central University Library of Bucharest, representing descriptions of Romanian old documents (literary magazines and books dated between the 19 th century and the present), and 560 books descriptions ([[https://cartigratis.com/](https://cartigratis.com/)]([https://cartigratis.com/](https://cartigratis.com/)), accessed on 8 January 2024);
2. A total of 4320 news articles crawled from DigiNews ([[https://www.digi24.ro/](https://www.digi24.ro/)]([https://www.digi24.ro/](https://www.digi24.ro/)), accessed on 8 January 2024);
3. A total of 557 medical texts acquired from several specialized publications: 71 texts from medical scientific journals ([[https://srumb.ro/index.php?page=revista&spage=numere&id=9](https://srumb.ro/index.php?page=revista&spage=numere&id=9)]([https://srumb.ro/index.php?page=revista&spage=numere&id=9](https://srumb.ro/index.php?page=revista&spage=numere&id=9)), accessed on 8 January 2024), 372 texts from scientific magazines ([[https://www.medichub.ro](https://www.medichub.ro)]([https://www.medichub.ro](https://www.medichub.ro)), accessed on 8 January 2024), and 114 texts from glossary of diseases ([[https://www.sfatulmedicului.ro/boli-si-afectiuni](https://www.sfatulmedicului.ro/boli-si-afectiuni)]([https://www.sfatulmedicului.ro/boli-si-afectiuni](https://www.sfatulmedicului.ro/boli-si-afectiuni)), accessed on 8 January 2024);
4. A total of 1000 juridical/legal texts representing Romanian law texts from Monitorval Oficial ([[https://monitoruloficial.ro/](https://monitoruloficial.ro/)]([https://monitoruloficial.ro/](https://monitoruloficial.ro/)), accessed on 8 January 2024);
5. A total of 109 scientific articles from the Romanian Journal of Human-Computer Interaction (RoCHI) ([[http://rochi.utcluj.ro/](http://rochi.utcluj.ro/)]([http://rochi.utcluj.ro/](http://rochi.utcluj.ro/)), accessed on 8 January 2024).  
Our primary focus when generating the artificial corpus was to create human-machine text pairs for analyzing the linguistic similarity and comparing the employed LLMs. Specifically, we were interested in capturing model-specific patterns, which resulted in the global dataset imbalance having a ratio of 1:7 for human-machine texts.  
With respect to enhancing readability of the conducted experiments, we refer to the readerbench/RoGPT2-medium model from HuggingFace as RoGPT2, dumitrescustefan/gpt-neo-romanian-780m is denoted as GPT-Neo-Ro, flam-t5-small-paraphrase-ro is referred to as Flan-T5, while OpenAI's text-davinci-003 accessible via their API is referred to as davinci-003. We maintain the original names for Opus-MT and mBART.