0% found this document useful (0 votes)
11 views

Project5 Fake Text Detection

Uploaded by

Abhishek Verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Project5 Fake Text Detection

Uploaded by

Abhishek Verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Project#5: Fake Text Detection

Abhishek Verma1 , Aditya Gupta2 , Aman Dixit3 , Maulik Singhal4 , Prakhar Pradhan5
1
190042 2 190061 2 190103 2 190489 3 190618
1
AE, 1 EE, 1 BSBE, 2 ME, 3 CE
{abhivrm, adigup, amandx, smaulik, prakharp}@iitk.ac.in

Abstract 2 Motivation
With the evolving complexity of AI technologies
This study investigates detecting machine- and ML algorithms, we have the opportunity to
generated text from the human-generated text.
use the same technology to find the truth. As this
This paper presents various approaches to build-
ing ML-based models, such as Graphical Neu-
is just the start of the future where every second
ral networks(GNN) and fine-tuning using the job would be done by artificial intelligence, we
pre-trained model RoBERTa. We propose the also have to start early and evolve accordingly to
BERT score as an evaluation metric along with give tight competition. Humans have evolved for
perplexity and burstiness. We present senti- 300 thousand years to reach here, so it is obvious
ment as a semantic feature to make the model any advancement in machine learning algorithms
more robust and tune the dataset to make the cannot match the complexity of human speech or
model less prone to adversarial attacks. These
actions. We take advantage of this minute differ-
findings can be an effective intervention in im-
proving the existing models. ence and use the same technology and algorithms
used by GPTs to always stay ahead in this race.

1 Introduction 3 Problem Defintion

Fake text detection refers to the process of iden- Key points:


tifying text that has been produced by artificial 1. The increasing sophistication of natural lan-
intelligence or machine learning algorithms. With guage processing (NLP) techniques and AI
the advancements in natural language processing models has led to the creation of convincing
(NLP) and deep learning algorithms, AI-generated AI-generated text, which can be used for var-
text has become increasingly sophisticated and dif- ious purposes, including spreading misinfor-
ficult to detect. mation, creating fake news, and manipulating
These texts can take many forms, such as fake public opinion. Therefore, there is a need to
news articles, chatbot conversations, product re- develop methods for detecting AI-generated
views, and even social media posts. It can be gener- text to help mitigate the potential harm this
ated with the intention of spreading misinformation, technology can cause.
manipulating public opinion, or impersonating real
2. The problem of detecting AI-generated text
individuals or entities.
can be framed as a binary classification
Detecting fake text is essential to maintain the
problem, where the goal is to determine
authenticity and trustworthiness of online informa-
whether a given text is human-generated or
tion. With the growing prevalence of AI-generated
AI-generated.
text, the development of effective detection tech-
niques has become increasingly important in en- 3. Some potential approaches to this problem in-
suring the accuracy and reliability of online con- clude analyzing the syntax and grammar of the
tent. Various approaches, including language mod- text, detecting patterns of repetition or incon-
els, anomaly detection, and machine learning algo- sistency that are characteristic of AI-generated
rithms, have been employed to detect AI-generated text, and comparing the language and style of
text, and ongoing research in this area is critical to the text to a large corpus of human-generated
combat the spread of false information. text to identify irregularities.
4 Related Work title of the topic, Wikipedia introduction, GPT
generated introduction, length of wiki intro,
Key points:
length of GPT intro, prompt given to GPT,
1. In the study by Eric Mitchel et al., empirical etc.
research revealed a curvature-based criterion
2. To generate more dataset, we have used the
for determining whether a passage is derived
arxiv dataset 2 which is a subset of the orig-
from a particular LLM. This method, called
inal ArXiv data due to its large size (1.1TB
DetectGpt, is a zero-shot method as it does
and growing). It includes a json metadata
not require training a distinct classifier or col-
file with information for each paper, such as
lecting a separate dataset of real and gener-
the ArXiv ID, submitter, authors, title, com-
ated text. It employs only the log probabilities
ments, journal-ref, DOI, abstract, categories,
computed by the model of interest and random
and version history. It contains 8686 rows
passage perturbations. These deviations were
(4343 each)
generated by an additional language model
that had been pre-trained. They discovered 3. Dataset essays generated using openAPI 3
that this method enhanced the performance of which contain 2500 rows(testing). Prompt
existing zero-shot methods for detecting fake used for generation of data was "Write an
news by an AUROC of approximately 0.1. essay about <topic> in <country> in about
<word limit> words." The data was generated
2. In another study by Yongqiang Maa, they
size wise for [10,50,100,300,500] words to
constructed a feature description framework
test the data with respect to the input size.
based on syntax, semantics, and pragmat-
ics. Then, they leveraged the proposed frame- 6 Proposed Approach
work’s characteristics, i.e., writing style, co-
herence, consistency, and argument logistics, 1. Supervised classification: In our approach, we
to analyze the two content categories. used handcrafted features which will be based
on the following categories :
3. Jawahar and others investigated the disparity
between AI-generated and human-written sci- (a) Lexical characteristics: In the input text,
entific text using the popular XGBoost model lexical features record details about cer-
with two feature extraction schemas, TF-IDF tain words. Word frequency, word length,
and a hand-crafted set of features. They and the existence of certain words or
trained their model to distinguish between phrases in the input text are a few ex-
four classes of text origin: Definitely human- amples of lexical characteristics.
written, Possibly human-written, Possibly (b) Syntax features: The sequence and re-
machine-generated and Definitely machine- lationships between words are among
generated the information that syntax features col-
lect about the structure of the input text.
4. Zellers et al. (2019) proposed the Grover Part-of-speech tags, dependency relation-
model to generate fake news samples and de- ships, or the quantity of noun or verb
tect fake news. phrases in the input text are a few exam-
ples of syntactic characteristics.
5 Corpus/Data Description
(c) Semantics: The meaning of the input
1. We are using WIKI-INTRO-DATASET pro- text, including the definitions of specific
vided in the following link 1 . to train our words and phrases and the connections
model. The dataset has been generated by between them, is referred to as seman-
extracting introductions from Wikipedia for tics. There are two dimensions such as
150k topics and generated text using GPT for coherence and consistency. The degree
the same topics. The schema of the dataset to which a text is logically related and
has 12 columns, some of which are: ID, the 2
https://www.kaggle.com/datasets/Cornell-
1 University/arxiv
https://huggingface.co/datasets/aadityaubhat/GPT-wiki-
3
intro https://www.openapis.org
understandable is called coherence. A co- 4. Cloud Training (Amazon Instance and Google
hesive paragraph transitions easily from GCP) - We have tried training our models on
one topic to the next and is structured Amazon Sagemaker and Google GCP since
logically. On the other side, consistency our training dataset was large.
relates to how devoid of inconsistencies
We will be using the following evaluation metrics
or conflicts a text is.
to evaluate and optimize our approach:
(d) Pragmatics: The input text’s context and
intended meaning are referred to as prag- 1. Perplexity: A statistical language model’s
matics. Discourse analysis, which cap- ability to anticipate a brand-new, previously
tures the coherence and flow of the input unknown sequence of tokens is known as per-
text, and sentiment analysis, which cap- plexity. It is determined by taking the test
tures the emotive tone of the input text, set’s inverse probability and normalizing it by
are two examples of pragmatic character- the number of words. Perplexity, then, gauges
istics. how startled a model is when it meets a novel
token sequence. Better performance is indi-
2. Fine Tuning: Fine-tuning entails modifying a cated by lower confusion.
previously trained language model to a new
2. Burstiness: It is a measurement of the distri-
task by training it on a particular dataset as-
bution of word frequencies within a corpus of
sociated with the task. An extra output layer
texts. It describes how some words tend to oc-
tailored to the new job is added to the pre-
cur in groups or bursts rather than uniformly
trained model, which is then adjusted, and the
dispersed across the text.
entire model is refined on the fresh dataset.
According to this method, the model can per- Metrics Values
form better on the new task by learning task- Accuracy on Validation
92.33%
specific characteristics and patterns from the Data (6000 rows)
new dataset. Accuracy on OOB Data
76.05%
(8686 rows)
7 Experiments and Results Total Perplexity Score 1985.971
We experimented various stuffs- Total Burstiness Score 84.824

8 Error Analysis
1. Logistic Regression - We have implemented
LR using all characteristic features.
(a) Text vectorization
i. BOW, CBOW
ii. TF-IDF
iii. One-hot Encoding
iv. Word2vec
(b) Word Embedding Types
(c) Frequency based
i. BOW, TF-IDF, Glove
(d) Prediction-based
i. Word2Vec

2. Parallel Training - We have tried parallel train-


ing on various systems Figure 1: Confusion Matrix

3. Ensemble Methods - Since we have used par-


9 Future Directions
allel training ensemble method was used to
stick all the model pickle files and create a 1. Adversarial Detection: As fake text generation
metafile. techniques become more sophisticated, fake
text detectors may need to incorporate adver- Detection of Machine Generated Text: A Crit-
sarial detection methods. Adversarial training, ical Survey. In Proceedings of the 28th Inter-
where models are trained on both real and arti- national Conference on Computational Lin-
ficially generated fake text samples, can help guistics, pages 2296–2309, Barcelona, Spain
improve the model’s robustness against adver- (Online). International Committee on Compu-
sarial attacks and make them more effective tational Linguistics.
in detecting advanced fake text techniques.
• Mitchell, E., Lee, Y., Khazatsky, A., Manning,
2. We need more data !! C.D. and Finn, C. (2023). DetectGPT: Zero-
Shot Machine-Generated Text Detection using
10 Individual Contribution Probability Curvature. URL: http://arxiv.
org/abs/2301.11305
Each member of our team has been assigned an
equal share of the project’s workload, with respon- • Shijaku, Rexhep Canhasi, Ercan. (2023).
sibilities thoughtfully distributed across five key ChatGPT Generated Text Detection.
10.13140/RG.2.2.21317.52960. URL:
1. Research https://www.researchgate.net/
publication/366898047_ChatGPT_
2. Data collection and preprocessing Generated_Text_Detection
3. Model development and tuning • Ma, Y., Liu, J., Yi, F., Cheng, Q., Huang, Y.,
Lu, W., Liu, X. (2023). AI vs. human – differ-
4. Implementation and integration entiation analysis of Scientific Content Gen-
eration. URL : https://arxiv.org/abs/
5. Testing and evaluation
2301.10416
11 Conclusion
Based on the experiments conducted, the team
tried logistic regression with different character-
istic features such as BOW, CBOW, TF-IDF, One-
hot encoding, Glove, and Word2Vec. They also
implemented parallel training and ensemble meth-
ods to stick all the model pickle files and create
a metafile. Additionally, they tried cloud training
on Amazon Sagemaker and Google GCP since the
training dataset was large.
To evaluate and optimize their approach, the
team used the perplexity metric to measure the
model’s ability to anticipate a brand-new, previ-
ously unknown sequence of tokens, and burstiness
to measure the distribution of word frequencies
within a corpus of texts. The results showed an
accuracy of 92.33
Overall, the team’s approach shows promise in
achieving high accuracy in classification. However,
further optimization may be necessary to improve
the model’s performance on OOB data.

References

• Ganesh Jawahar, Muhammad Abdul-Mageed,


and Laks Lakshmanan, V.S.. 2020. Automatic

You might also like