# RumorLLM: A Rumor Large Language Model-Based Fake-News-Detection Data-Augmentation Approach
## 3 Methodology
### Finetune  
To enhance the performance of our target rumor generation language model (RumorLLM), we utilize a set of preprocessing and finetuning procedures outlined in Algorithm 1. In this section, we detail the process of constructing the corresponding prompt and response as a finetuned dataset using the Porter Stemming algorithm and the TF-IDF algorithm. The Porter Stemming algorithm is a classical algorithm for stemming extraction that aims to reduce words to their original stemmed form. By removing affixes and word endings, we can obtain more concise key information, which helps to reduce the complexity of the vocabulary. The steps of the Porter Stemming algorithm include regular substitution, applying a series of regular substitution operations to reduce the affixes and endings of words; conditional rule application, applying rules based on specific conditions to ensure that the word is processed correctly; and suffix processing: processing the suffixes of words to eliminate redundant endings. The regular substitution of the Porter Stemming algorithm can be expressed by the following equation:  
\[NewWords=ApplyRules(OldWords) \tag{1}\]  
For ApplyRules, in conjunction with the Porter Stemming algorithm, this paper sets the following rules:  
1. Common suffix deletion: delete common suffixes at the end of words, such as '-ed' and '-ing';
2. Form conversion: such as converting the plural form of a noun to the singular form;
3. Noun and verb suffix deletion: delete specific suffixes at the end of a noun or a verb, such as '-ness' and '-ize'. 4. Deletion of terminating suffixes: delete terminative suffixes at the end of a word if certain conditions are met, such as '-ant' and '-ent'. Figure 1: The methodology flow proposed in this paper. ```
1:Input: Raw news text segmentation data OldWords, \(OriginalPrompt\), vocabulary \(t\), current document \(d\), the entire set of documents \(D\), Base large language model BaseLLM Output: RumorLLM
2:\(NewWords\leftarrow\) Apply a series of systematic replacement operations to OldWords. 3:Porter Stemming Formula Representation: \[NewWords=ApplyRules(OldWords)\]
4:Calculate Term Frequency (TF): Compute the frequency of each word in the current document. 5:Calculate Inverse Document Frequency (IDF): Compute the inverse document frequency of each word in the entire document collection. 6:Calculate TF-IDF Value: Multiply term frequency and inverse document frequency to obtain the final TF-IDF value. 7:TF-IDF Formula Representation: \[\text{TF-IDF}(t,d,D)=\text{TF}(t,d)\times\text{IDF}(t,D)\]
8:Based on the NewWords and TF-IDF values, the keywords are reconstructed from largest to smallest according to the TF-IDF values to create prompts and responses for RumorLLM training. 9:prompt_finetune Formula: \[prompt_{finetune}=Reconstruct(OriginalPrompt,NewWords,\text{TF-IDF})\]
10:Using the raw rumor text as the response, the final finetuning of the Base large language model yields the RumorLLM \[RumorLLM=finetune(BaseLLM,prompt_{finetune},response)\]
```  
**Algorithm 1** Fine-tuning Process with Porter Stemming and TF-IDF  
The TF-IDF (Term Frequency-Inverse Document Frequency) algorithm is used to measure the importance of a word in the entire document collection. Words with high TF-IDF values usually indicate that the word is significantly informative in the current document. The steps of the TF-IDF algorithm include calculating the word frequency (TF), calculating the frequency of each word in the current document, calculating the inverse document frequency (IDF): calculating the frequency of the inverse document for each word in the whole set of documents; calculating the TF-IDF value: multiplying the word frequency and the inverse document frequency, to obtain the final TF-IDF value. The calculation of the TF-IDF algorithm can be represented by the following equation:  
\[\text{TF-IDF}(t,d,D)=TF(t,d)\times IDF(t,D) \tag{2}\]  
where \(t\) is the vocabulary, \(d\) is the current document, and \(D\) is the entire set of documents.