transformer
game
Counter-Strike2
CS2
counter-strike
Cheat-detection
File size: 2,559 Bytes
1fc5608
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a4673c6
 
 
 
 
 
 
 
13bc353
 
9f0864e
 
a4673c6
 
 
 
 
 
 
 
 
 
 
 
 
9117b98
 
 
 
 
 
 
 
 
 
a4673c6
 
 
 
 
 
 
fc99a92
a4673c6
15ef59a
9117b98
fc99a92
a4673c6
15ef59a
a4673c6
fc99a92
a4673c6
fc99a92
 
a4673c6
fc99a92
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
license: cc-by-4.0
datasets:
- CS2CD/Context_window_256
metrics:
- accuracy
- roc_auc
- recall
- precision
- f1
tags:
- transformer
- game
- Counter-Strike2
- CS2
- counter-strike
- Cheat-detection
---

# AntiCheatPT_256

This Model is the best performing transformer-based model from the thesis: 
AntiCheatPT: A Transformer-Based Approach to Cheat Detection in Competitive 
Computer Games by Mille Mei Zhen Loo & Gert Luzkov.

The thesis can be found [here](https://github.com/Pinkvinus/CS2_cheat_detection/blob/main/AntiCheatPT%20A%20Transformer-Based%20Approach%20to%20Cheat%20Detection%20in%20Competitive%20Computer%20Games.pdf)

**Code:** [Here](https://github.com/Pinkvinus/CS2_cheat_detection/tree/main/Transformer)

## Results

| Metric      | Value  |
|-------------|--------|
| Accuracy    | 0.8917 |
| ROC AUC     | 0.9336 |
| Precision   | 0.8513 |
| Recall      | 0.6313 |
| Specificity | 0.9678 |
| F1          | 0.7250 |

## Model architecture

| **Component**                     | **Value**                               |
|-----------------------------------|-----------------------------------------|
| Context window size               | 256                                     |
| Transformer layers                | 4                                       |
| Attention heads                   | 1                                       |
| Transformer feedforward dimension | 176                                     |
| Loss function                     | Binary Cross Entropy (BCEWithLogitLoss) |
| Optimiser                         | AdamW (learning rate = 10<sup>-4</sup>)            |
| Scheduler                         | StepLR (gamma = 0.5, step size = 10)    |
| Batch size                        | 128                                     |

## Data

The input data used for this model was the [Context_window_256](https://huggingface.co/datasets/CS2CD/Context_window_256) dataset based on the [CS2CD](https://huggingface.co/datasets/CS2CD/CS2CD.Counter-Strike_2_Cheat_Detection) dataset.

## Model testing

Various validation metrics of training can be seen below:

![Model Training](./img/model_256_4layer_1head.png)

The model confusion matrix on test data can be seen below:

![Confusion Matrix](./img/conf_mat_threshold_07_large.png)

## Usage notes

- The dataset is formated in UTF-8 encoding.
- Researchers should cite this dataset appropriately in publications.

## Application

- Cheat detection

## Acknowledgements

A big heartfelt thanks to [Paolo Burelli](http://paoloburelli.com/) for supervising the project.