01Yassine commited on
Commit
6a7fb68
·
verified ·
1 Parent(s): 8a3ce78

Add files using upload-large-folder tool

Browse files
Files changed (7) hide show
  1. README.md +96 -0
  2. SHA256SUMS +6 -0
  3. best_model.pth +3 -0
  4. config.original.yaml +97 -0
  5. config.yaml +97 -0
  6. metrics.json +56 -0
  7. provenance.json +20 -0
README.md ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ library_name: pytorch
5
+ pipeline_tag: audio-classification
6
+ datasets:
7
+ - DeepFense/AffectDF
8
+ tags:
9
+ - deepfense
10
+ - speech-deepfake-detection
11
+ - wav2vec2
12
+ - xls-r
13
+ - mlp
14
+ - frozen-frontend
15
+ ---
16
+
17
+ # AffectDF: frozen XLS-R-300M + MLP, seed 2
18
+
19
+ DeepFense binary audio deepfake detector trained separately on the official
20
+ **AffectDF train split**, with **validation EER selecting this checkpoint**.
21
+ This is one of the seeds 2, 42 and 240; it is not an ensemble.
22
+
23
+ The frontend is frozen fairseq XLS-R-300M (wav2vec2), with 16 kHz audio,
24
+ 64,600-sample prefix cropping/repeat padding and no training augmentation.
25
+ The backend is MLP. The saved configuration is the architecture authority.
26
+ The MLP experiments use projection [256, 128] and layer normalization; AASIST
27
+ uses its own graph-attention backend. Labels are 0=spoof and 1=bonafide.
28
+
29
+ ## Files
30
+
31
+ - `best_model.pth`: original validation-selected checkpoint, byte-identical to the trained file.
32
+ - `config.original.yaml`: original resolved training configuration, retained unchanged.
33
+ - `config.yaml`: same architecture with portable relative asset/data/output paths.
34
+ - `provenance.json`, `SHA256SUMS`: source/configuration and integrity records.
35
+ - `metrics.json`: validation selection value and full ITW/ASV19 test results.
36
+
37
+ The checkpoint is a DeepFense dictionary including `model_state`, optimizer
38
+ state and training metadata. It is not a Transformers `from_pretrained` model.
39
+ The entire learned frontend and backend are retained. Intermediate epoch
40
+ snapshots are training history, rather than additional model releases.
41
+
42
+ ## Download and use
43
+
44
+ ```bash
45
+ hf download DeepFense/AffectDF_Wav2Vec2_MLP_NoAug_Seed2 --local-dir checkpoints/AffectDF_Wav2Vec2_MLP_NoAug_Seed2
46
+ ```
47
+
48
+ Use [DeepFense](https://github.com/Yaselley/deepfense-framework) master source
49
+ at commit `3f2fe1146c48ea4bacc480dd96d806b6c72c09cf`, with its supported
50
+ PyTorch environment (the evaluated cluster runtime used PyTorch 2.4.1+cu121).
51
+ Before running, edit the portable YAML's `model.frontend.args.ckpt_path` to
52
+ your local **original XLS-R-300M initializer**, and set the train/val/test
53
+ Parquet paths and output directory for your machine. The initializer is
54
+ needed by model construction; this detector's saved frontend weights are
55
+ then restored from `best_model.pth`. Do not substitute a small Wav2Vec2 encoder.
56
+
57
+ From the DeepFense checkout, after those path edits:
58
+
59
+ ```bash
60
+ python test.py --config /absolute/path/to/checkpoint/config.yaml \
61
+ --checkpoint /absolute/path/to/checkpoint/best_model.pth
62
+ ```
63
+
64
+ The framework's current CrossEntropy score is its bonafide logit. The study
65
+ also reports a separate logit-difference score, `logit_bonafide-logit_spoof`.
66
+ Those two EER definitions must not be mixed. Use strict state loading when
67
+ building a custom evaluator; every inference parameter was strictly loaded
68
+ for the test results below.
69
+
70
+ ## Results for this seed
71
+
72
+ Best **validation** EER: 9.1917%.
73
+ This is checkpoint selection, not performance on this dataset's test split.
74
+
75
+ | Full held-out target | Utterances | EER logit difference (%) | EER current-framework score (%) |
76
+ |---|---:|---:|---:|
77
+ | InTheWild | 31,779 | 25.0166 | 24.9914 |
78
+ | ASV19 | 71,237 | 31.8834 | 32.9174 |
79
+
80
+ The target test partitions were evaluated in full, without retraining,
81
+ subsampling or silently dropped audio. EER uses the closest tie-grouped
82
+ DET point; higher scores mean more likely bonafide. See `metrics.json` for
83
+ protocol hashes, AUC, accuracy, balanced accuracy and macro F1. This card
84
+ reports this seed only; it does not pool scores across seeds.
85
+
86
+ The published ASV19 DeepFense models fine-tune their SSL frontend and use
87
+ 64,000 samples, unlike these frozen 64,600-sample models. Comparisons are
88
+ between the trained recipes, not a controlled frontend-freezing ablation.
89
+
90
+ ## Attribution and use
91
+
92
+ Training data: [DeepFense/AffectDF](https://huggingface.co/datasets/DeepFense/AffectDF).
93
+ That dataset retains its source CC BY-NC 4.0 terms and attribution.
94
+ The DeepFense source code has an Apache-2.0 license. This model card does
95
+ not infer an additional weights license from the source-code license.
96
+ Use is intended for research on audio deepfake detection.
SHA256SUMS ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ b17f175af5ef441ceafb24f216193867fc418c8bb59d369efe56fcd56598942d README.md
2
+ 65f6547560289e3dc48dd3fae8a0c426407a65eac5607009d69b1a0b94863b09 best_model.pth
3
+ ad9c2942ad82bf489c681dd8414373364bc96d4e33b43d89aaadba63dc583af6 config.original.yaml
4
+ 3e000de8e23fd5ea9c2189f871f4fef39d1d96c13190a30a003b0012b0c00f3f config.yaml
5
+ a6af4de917243af6dfd5b3f4ef7ec55ff58009c9b388025ba417d20853ae3989 metrics.json
6
+ 39ea53fa7cc65c7eedb2147bbb92536165695520e9b9e7e57eae2afd1bd8d75b provenance.json
best_model.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:65f6547560289e3dc48dd3fae8a0c426407a65eac5607009d69b1a0b94863b09
3
+ size 1265498637
config.original.yaml ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ exp_name: AffectDF_XLSR_frozen_MLP_seed2
2
+ output_dir: /ds-slt/audio/yelkheir/DeepFense/outputs/EmotionalSDD
3
+ seed: 2
4
+ data:
5
+ sampling_rate: 16000
6
+ label_map:
7
+ bonafide: 1
8
+ spoof: 0
9
+ train:
10
+ dataset_type: StandardDataset
11
+ dataset_names:
12
+ - AffectDF
13
+ parquet_files:
14
+ - /ds-slt/audio/sdd/AffectDF/parquets/train.parquet
15
+ batch_size: 16
16
+ num_workers: 4
17
+ shuffle: true
18
+ base_transform:
19
+ - type: pad
20
+ max_len: 64600
21
+ random_pad: false
22
+ pad_type: repeat
23
+ val:
24
+ dataset_type: StandardDataset
25
+ dataset_names:
26
+ - AffectDF
27
+ parquet_files:
28
+ - /ds-slt/audio/sdd/AffectDF/parquets/val.parquet
29
+ batch_size: 16
30
+ num_workers: 4
31
+ shuffle: false
32
+ base_transform:
33
+ - type: pad
34
+ max_len: 64600
35
+ random_pad: false
36
+ pad_type: repeat
37
+ test:
38
+ dataset_type: StandardDataset
39
+ dataset_names:
40
+ - AffectDF
41
+ parquet_files:
42
+ - /ds-slt/audio/sdd/AffectDF/parquets/test.parquet
43
+ batch_size: 16
44
+ num_workers: 4
45
+ shuffle: false
46
+ base_transform:
47
+ - type: pad
48
+ max_len: 64600
49
+ random_pad: false
50
+ pad_type: repeat
51
+ model:
52
+ type: StandardDetector
53
+ frontend:
54
+ type: wav2vec2
55
+ args:
56
+ source: fairseq
57
+ freeze: true
58
+ ckpt_path: /ds-slt/audio/sdd-research-baseline/ssl_models/xlsr2_300m.pt
59
+ backend:
60
+ type: MLP
61
+ args:
62
+ input_dim: 1024
63
+ projection:
64
+ - 256
65
+ - 128
66
+ output_dim: 128
67
+ pool: mean
68
+ norm_type: layer
69
+ loss:
70
+ - type: CrossEntropy
71
+ weight: 1.0
72
+ embedding_dim: 128
73
+ n_classes: 2
74
+ class_weights:
75
+ - 1.0
76
+ - 1.0
77
+ training:
78
+ trainer: StandardTrainer
79
+ epochs: 10
80
+ device: cuda
81
+ batch_log_interval: 100
82
+ eval_every_epochs: 1
83
+ monitor_metric: EER
84
+ monitor_mode: min
85
+ early_stopping_patience: 3
86
+ wandb: false
87
+ optimizer:
88
+ type: adam
89
+ lr: 0.0001
90
+ weight_decay: 0.0001
91
+ scheduler:
92
+ type: exponential
93
+ gamma: 0.9
94
+ metrics:
95
+ ACC: {}
96
+ EER: {}
97
+ output_dir: /ds-slt/audio/yelkheir/DeepFense/outputs/EmotionalSDD/AffectDF_XLSR_frozen_MLP_seed2_20261106_014941
config.yaml ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ exp_name: AffectDF_XLSR_frozen_MLP_seed2
2
+ output_dir: outputs/AffectDF_Wav2Vec2_MLP_NoAug_Seed2
3
+ seed: 2
4
+ data:
5
+ sampling_rate: 16000
6
+ label_map:
7
+ bonafide: 1
8
+ spoof: 0
9
+ train:
10
+ dataset_type: StandardDataset
11
+ dataset_names:
12
+ - AffectDF
13
+ parquet_files:
14
+ - AffectDF/parquets/train.parquet
15
+ batch_size: 16
16
+ num_workers: 4
17
+ shuffle: true
18
+ base_transform:
19
+ - type: pad
20
+ max_len: 64600
21
+ random_pad: false
22
+ pad_type: repeat
23
+ val:
24
+ dataset_type: StandardDataset
25
+ dataset_names:
26
+ - AffectDF
27
+ parquet_files:
28
+ - AffectDF/parquets/val.parquet
29
+ batch_size: 16
30
+ num_workers: 4
31
+ shuffle: false
32
+ base_transform:
33
+ - type: pad
34
+ max_len: 64600
35
+ random_pad: false
36
+ pad_type: repeat
37
+ test:
38
+ dataset_type: StandardDataset
39
+ dataset_names:
40
+ - AffectDF
41
+ parquet_files:
42
+ - AffectDF/parquets/test.parquet
43
+ batch_size: 16
44
+ num_workers: 4
45
+ shuffle: false
46
+ base_transform:
47
+ - type: pad
48
+ max_len: 64600
49
+ random_pad: false
50
+ pad_type: repeat
51
+ model:
52
+ type: StandardDetector
53
+ frontend:
54
+ type: wav2vec2
55
+ args:
56
+ source: fairseq
57
+ freeze: true
58
+ ckpt_path: xlsr2_300m.pt
59
+ backend:
60
+ type: MLP
61
+ args:
62
+ input_dim: 1024
63
+ projection:
64
+ - 256
65
+ - 128
66
+ output_dim: 128
67
+ pool: mean
68
+ norm_type: layer
69
+ loss:
70
+ - type: CrossEntropy
71
+ weight: 1.0
72
+ embedding_dim: 128
73
+ n_classes: 2
74
+ class_weights:
75
+ - 1.0
76
+ - 1.0
77
+ training:
78
+ trainer: StandardTrainer
79
+ epochs: 10
80
+ device: cuda
81
+ batch_log_interval: 100
82
+ eval_every_epochs: 1
83
+ monitor_metric: EER
84
+ monitor_mode: min
85
+ early_stopping_patience: 3
86
+ wandb: false
87
+ optimizer:
88
+ type: adam
89
+ lr: 0.0001
90
+ weight_decay: 0.0001
91
+ scheduler:
92
+ type: exponential
93
+ gamma: 0.9
94
+ metrics:
95
+ ACC: {}
96
+ EER: {}
97
+ output_dir: outputs/AffectDF_Wav2Vec2_MLP_NoAug_Seed2
metrics.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "validation": {
3
+ "EER_current_training_score_percent": 9.191736350221348,
4
+ "scope": "Best validation value used for checkpoint selection, not a held-out test result."
5
+ },
6
+ "cross_dataset_test": [
7
+ {
8
+ "target": "InTheWild",
9
+ "processed_rows": 31779,
10
+ "protocol_sha256": "4a2e97362ac4b022796a6596facc6d71792b90a9bd623ff9c0e0c872ec018d66",
11
+ "metrics": {
12
+ "EER_LLR_percent": 25.016603159989515,
13
+ "EER_project_score_percent": 24.99138534080873,
14
+ "ROC_AUC_LLR_percent": 81.37413685528112,
15
+ "accuracy_percent": 62.5822083766009,
16
+ "balanced_accuracy_percent": 68.89285695632384,
17
+ "macro_F1_percent": 62.40036910840232,
18
+ "confusion_matrix_label_order_0_1": [
19
+ [
20
+ 11049,
21
+ 767
22
+ ],
23
+ [
24
+ 11124,
25
+ 8839
26
+ ]
27
+ ]
28
+ },
29
+ "score_convention": "LLR=logit_bonafide-logit_spoof; project_score is separately retained."
30
+ },
31
+ {
32
+ "target": "ASV19",
33
+ "processed_rows": 71237,
34
+ "protocol_sha256": "724a9bd43b9d35ceaa5b8b39c4e8a08bc681f823ed998c1614d140b119bc8183",
35
+ "metrics": {
36
+ "EER_LLR_percent": 31.883429234786238,
37
+ "EER_project_score_percent": 32.91744470403677,
38
+ "ROC_AUC_LLR_percent": 72.45740430962415,
39
+ "accuracy_percent": 79.02354113733033,
40
+ "balanced_accuracy_percent": 46.82199501030228,
41
+ "macro_F1_percent": 46.99283786075923,
42
+ "confusion_matrix_label_order_0_1": [
43
+ [
44
+ 55835,
45
+ 8047
46
+ ],
47
+ [
48
+ 6896,
49
+ 459
50
+ ]
51
+ ]
52
+ },
53
+ "score_convention": "LLR=logit_bonafide-logit_spoof; project_score is separately retained."
54
+ }
55
+ ]
56
+ }
provenance.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "training_dataset": "AffectDF",
3
+ "backend": "MLP",
4
+ "seed": 2,
5
+ "checkpoint_filename": "best_model.pth",
6
+ "checkpoint_bytes": 1265498637,
7
+ "checkpoint_sha256": "65f6547560289e3dc48dd3fae8a0c426407a65eac5607009d69b1a0b94863b09",
8
+ "original_config_sha256": "ad9c2942ad82bf489c681dd8414373364bc96d4e33b43d89aaadba63dc583af6",
9
+ "framework_repo": "https://github.com/Yaselley/deepfense-framework",
10
+ "framework_commit": "3f2fe1146c48ea4bacc480dd96d806b6c72c09cf",
11
+ "frontend": "fairseq XLS-R-300M / wav2vec2",
12
+ "frontend_frozen": true,
13
+ "sample_rate": 16000,
14
+ "window_samples": 64600,
15
+ "label_map": {
16
+ "bonafide": 1,
17
+ "spoof": 0
18
+ },
19
+ "scope": "Original validation-selected checkpoint, including its full saved state; no retraining or conversion."
20
+ }