# The New Paradigm of Deepfake Detection at the Text Level
## 3 Materials and Methods
### CDFTM Description  
Based on these considerations, the model architecture is analyzed using a minimum of 3 inputs and a maximum of 4 inputs, and with a single output. The model that will classify a text as deepfake or human is called CDFTM. Multiple variants of the inputs are analyzed to confirm the combination that leads to the highest accuracy. The combinations analyzed are (_AW_, _AC_, _UR_), (_AW_, _AC_, _CL_), (_AW_, _UR_, _CL_), (_AC_, _UR_, _CL_), and (_AW_, _AC_, _UR_, _CL_). The comparative evaluation is performed using an unseen dataset and employs accuracy. The dataset is obtained using the conversion algorithm presented in Figure 2. For this unseen dataset, 100 texts were used, 50 of type \"AI\" and another 50 of type \"Human\". The labels for these data are already known, which allows comparison with the result provided by CDFTM, enabling its validation.  
The model will analyze several specific ML algorithms: SdcaMaximumEntropyMulti, LightGbmMulti, LbfgsMaximumEntropyMulti, SdcaLogisticRegressionOva, LbfgsLogisticRegressionOva, FastTreeOva, and FastForestOva. MLDFR analyzes maximum entropy-based regression algorithms (SdcaMaximumEntropyMulti and LbfgsMaximumEntropyMulti), gradient boosting algorithms (LightGBM and FastTree), and logistic regression algorithms (SdcaLogisticRegressionOva and LbfgsLogisticRegressionOva). These algorithms use ML techniques for binary classification into \"AI\" or \"Human\".  
Based on the authors' expertise, LightGBM is a binary classification algorithm superior to all others in speed. LightGBM's use of histograms for learning makes it closer to the CDFTM objective. FastTree is also a classification algorithm used to optimize problems targeting reduced latency. Additionally, based on the past experience of the authors, FastTree has a high capacity for generalization on datasets which are medium-sized but with many features. The authors avoided well-established classification models such as CatBoost, AdaBoost, and XGBoost because they did not consider them suitable for the CDFTM problem. CatBoost requires a longer training time, which does not align with CDFTM requirements. AdaBoost is sensitive to noisy data and is prone to overfitting in the case of large datasets. XGBoost is computationally expensive and requires extensive hyperparameter tuning to achieve optimal performance. Therefore, the choice of LightGBM and FastTree was determined by the balancing of performance, speed, and interpretability while avoiding the unnecessary complexity of training and validating alternative models.  
The best algorithm for text classification is identified by calculating micro-accuracy and macro-accuracy. The performance indicators micro-accuracy and macro-accuracy are analyzed as comparative analysis tools for the algorithms for the following reasons:  
* Micro-accuracy is the image of the overall accuracy for CDFTM. Its value is the accuracy reported for the entire set of 1300 records in the dataset;
* Macro-accuracy reflects the accuracy for each class individually, for the \"AI\" and the \"Human\" classes. In other words, this is an indicator of the model for each class individually.  
A new set of tests is conducted with variations of parameters and hyperparameters for the algorithm with the highest accuracy from the previous tests. This will identify the architecture with the best results in text classification.  
The quality analysis of the results for the proposed architecture is performed using standard metrics: confusion matrix, accuracy, precision, recall, and F\({}_{1}\)-Score [50]. The Section 4 analyzes the ML models' parameters, hyperparameters, and evaluation metrics.  
The results from these three types of analyses are set forth in the Section 4.