RootAccess4Life commited on
Commit
3364668
Β·
verified Β·
1 Parent(s): dbdbc56

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +87 -46
README.md CHANGED
@@ -1,5 +1,7 @@
1
  ---
2
  license: mit
 
 
3
  tags:
4
  - audio
5
  - audio-classification
@@ -8,6 +10,10 @@ tags:
8
  - open-set-recognition
9
  - wavlm
10
  - encodec
 
 
 
 
11
  ---
12
 
13
  # sourcetrace β€” fitted heads for open-set audio deepfake source tracing
@@ -21,16 +27,65 @@ generator is not one it has seen.
21
  They hold the small trained head plus the fitted scoring stack (class anchors,
22
  relative-Mahalanobis density, z-norm constants, conformal calibration, per-block
23
  whitening). The front-ends β€” `microsoft/wavlm-large` and `facebook/encodec_24khz` β€” are
24
- frozen, are **not** included here, and are fetched separately by
25
- `scripts/download_models.py`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
  ## Input
28
 
29
  Not audio. A **2133-d** feature vector per clip, laid out as
30
  `[ SSL 0:2048 | signature 2048:2100 | codec residual 2100:2133 ]`, produced by
31
- `scripts/extract_features.py`. There is no way to run these weights without the
32
  repository and an extracted feature cache.
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  ## `mlaad_v5.pt`
35
 
36
  MLAAD v5, family-level open-set protocol: 65 known generator families, 9,620 evaluation
@@ -38,24 +93,16 @@ trials, split seed 42, fit seed 0.
38
 
39
  | Metric | Value | Published SOTA |
40
  |---|---|---|
41
- | FPR95 (lower better) | **1.14 %** | 3.36 % |
42
- | OOD-EER (lower better) | 3.66 % | β€” |
43
- | Closed-set accuracy | 99.34 % | β€” |
44
 
45
  Conformal abstention: measured coverage 96.11 % against a 95 % nominal level.
46
 
47
  **Reproducible, not just reported.** Refitting from the public code at these seeds
48
  reproduces `results/ablation/full.json` bit-for-bit β€” FPR95 1.1428571428571428, OOD-EER
49
  3.6571428571428575, closed-set 99.33714285714285, under exact equality rather than a
50
- tolerance. This file is that fit. Downloading it saves the ~35-40 min fit and nothing
51
- else: evaluation still reads the feature cache, so MLAAD v5 must be downloaded and
52
- extracted first.
53
-
54
- ```bash
55
- huggingface-cli download RootAccess4Life/ood-source-tracing mlaad_v5.pt \
56
- --local-dir checkpoints
57
- python scripts/evaluate.py --task mlaad_v5 --checkpoint checkpoints/mlaad_v5.pt
58
- ```
59
 
60
  **Single-seed.** One split seed, one fit seed. These are point estimates with no
61
  variance attached; do not read the margin over 3.36 % as a measured effect size.
@@ -63,39 +110,37 @@ variance attached; do not read the margin over 3.36 % as a measured effect size.
63
  ## `stopa.pt`
64
 
65
  STOPA cross-corpus open-set protocol: 3 EET attacks fitted, 5 known enrolled, 5 unknown
66
- held out; 33,200 enrolment and 629,800 trial clips, conditions pooled, split seed 42 /
67
- fit seed 0.
68
 
69
- | Metric | Value | Published SOTA |
70
  |---|---|---|
71
- | Unknown-attack EER (lower better) | **9.33 %** | 16.43 % |
72
- | Known-attack EER | 10.79 % | β€” |
73
 
74
- Measured by the released code on 2026-08-18; raw numbers in `results/stopa_measured.json`.
 
75
 
76
- A lost earlier implementation had recorded 9.38 % and the paper declines to print it,
77
- because no identified run stood behind it. The figure above is **not** a recovery of that
78
- run β€” different implementation, and the reference head's seeded initialisation is
79
- unrecoverable. It is an independent measurement that happens to land 0.05 points away,
80
- with a protocol, seeds and a results file behind it. Cite this one, not 9.38.
81
 
82
  **Single-seed**, like the MLAAD numbers above.
83
 
84
- ```bash
85
- huggingface-cli download RootAccess4Life/ood-source-tracing stopa.pt --local-dir checkpoints
86
- python scripts/evaluate.py --task stopa --checkpoint checkpoints/stopa.pt
87
- ```
88
-
89
  ## Limitations
90
 
91
  - Trained on MLAAD v5 only. Attribution across other corpora, languages, codecs or
92
  recording conditions is untested.
93
- - The head in the public code is a reconstruction from `docs/METHOD.md`. It does not
94
- reproduce an earlier reference implementation's FPR95 = 0.7543 % / OOD-EER = 2.81 %;
95
- that head's seeded initialisation is unrecoverable and those figures are retired.
96
- - For research on open-set attribution. Not validated for forensic, legal or moderation
97
- use; the abstention rule is calibrated on this protocol and its coverage guarantee
98
- does not transfer off it.
 
 
99
 
100
  ## Licence
101
 
@@ -104,12 +149,8 @@ redistributed here.
104
 
105
  ## Citation
106
 
107
- ```bibtex
108
- @inproceedings{pujari2027frontend,
109
- title = {Front-End Evidence and Calibrated Abstention for
110
- Open-Set Audio Deepfake Attribution},
111
- author = {Pujari, Aditya},
112
- booktitle = {Proc. IEEE ICASSP},
113
- year = {2027}
114
- }
115
- ```
 
1
  ---
2
  license: mit
3
+ library_name: pytorch
4
+ pipeline_tag: audio-classification
5
  tags:
6
  - audio
7
  - audio-classification
 
10
  - open-set-recognition
11
  - wavlm
12
  - encodec
13
+ datasets:
14
+ - mueller91/MLAAD
15
+ metrics:
16
+ - accuracy
17
  ---
18
 
19
  # sourcetrace β€” fitted heads for open-set audio deepfake source tracing
 
27
  They hold the small trained head plus the fitted scoring stack (class anchors,
28
  relative-Mahalanobis density, z-norm constants, conformal calibration, per-block
29
  whitening). The front-ends β€” `microsoft/wavlm-large` and `facebook/encodec_24khz` β€” are
30
+ frozen, are **not** included here, and are fetched separately by `./setup.sh`.
31
+
32
+ ## Model
33
+
34
+ | | |
35
+ |---|---|
36
+ | Input | 2133-d feature vector, **not** audio |
37
+ | SSL front end | `microsoft/wavlm-large`, **frozen**, layers 4–7, mean\|std pooled β†’ 2048-d |
38
+ | Signature channel | 24 group-delay bands + 16 modulation bins + 12 codec-grid dims β†’ 52-d |
39
+ | Codec channel | `facebook/encodec_24khz` reconstruction residual at 1.5 / 6 / 12 kbps β†’ 33-d |
40
+ | Head | factorized gated, AM 192 + vocoder 64 + codec 32 = 288-d, tanh FiLM gates |
41
+ | Embedding | 800-d = 288 score branch β€– 512 whitened transfer branch |
42
+ | Trainable parameters | 1,089,888 (548,576 head + 541,312 transfer) |
43
+ | Training | Adam, lr 3e-4, no weight decay, 300 epochs, batch 512 |
44
+
45
+ The file is far larger than the parameter count because most of it is the fitted
46
+ scoring stack β€” 65 per-class Mahalanobis precisions at 288Γ—288 float64, plus the
47
+ whitening matrices β€” not weights.
48
+
49
+ The codec channel is the contribution: re-encode each clip through EnCodec-24 kHz
50
+ and keep what it got *wrong*. Those 33 numbers come off the waveform the speech
51
+ model never sees. Deleting the channel moves FPR95 from 1.14 % to 2.70 % while
52
+ closed-set accuracy barely changes β€” it buys *rejection*, not attribution.
53
+
54
+ The head in the public code is a reconstruction from the published method
55
+ description, not a recovered original; its construction order is load-bearing for
56
+ RNG reproducibility.
57
 
58
  ## Input
59
 
60
  Not audio. A **2133-d** feature vector per clip, laid out as
61
  `[ SSL 0:2048 | signature 2048:2100 | codec residual 2100:2133 ]`, produced by
62
+ `python -m sourcetrace.extract`. There is no way to run these weights without the
63
  repository and an extracted feature cache.
64
 
65
+ ## Files
66
+
67
+ | file | size | what it is |
68
+ |---|---|---|
69
+ | `mlaad_v5.pt` | 79 MB | MLAAD v5, 65 known generator families |
70
+ | `stopa.pt` | 18 MB | STOPA, 13 attack classes |
71
+
72
+ Both are sha256-verified on download against digests compiled into
73
+ `scripts/download_weights.py`, not served from here. A digest served from the same
74
+ place as the file it describes attests to nothing.
75
+
76
+ ## Use
77
+
78
+ ```bash
79
+ git clone https://github.com/pujariaditya/sourcetrace && cd sourcetrace
80
+ pip install -e . && ./setup.sh
81
+ python scripts/download_weights.py # both heads, sha256-pinned
82
+ python -m sourcetrace.evaluate --task mlaad_v5 --checkpoint checkpoints/mlaad_v5.pt
83
+ ```
84
+
85
+ Downloading saves the ~35–40 min fit and nothing else: evaluation still reads the
86
+ feature cache, so MLAAD v5 must be downloaded and extracted first. See the
87
+ repository README for that step.
88
+
89
  ## `mlaad_v5.pt`
90
 
91
  MLAAD v5, family-level open-set protocol: 65 known generator families, 9,620 evaluation
 
93
 
94
  | Metric | Value | Published SOTA |
95
  |---|---|---|
96
+ | FPR95 ↓ | **1.14 %** | 3.36 % |
97
+ | OOD-EER ↓ | 3.66 % | β€” |
98
+ | Closed-set accuracy ↑ | 99.34 % | β€” |
99
 
100
  Conformal abstention: measured coverage 96.11 % against a 95 % nominal level.
101
 
102
  **Reproducible, not just reported.** Refitting from the public code at these seeds
103
  reproduces `results/ablation/full.json` bit-for-bit β€” FPR95 1.1428571428571428, OOD-EER
104
  3.6571428571428575, closed-set 99.33714285714285, under exact equality rather than a
105
+ tolerance. This file is that fit.
 
 
 
 
 
 
 
 
106
 
107
  **Single-seed.** One split seed, one fit seed. These are point estimates with no
108
  variance attached; do not read the margin over 3.36 % as a measured effect size.
 
110
  ## `stopa.pt`
111
 
112
  STOPA cross-corpus open-set protocol: 3 EET attacks fitted, 5 known enrolled, 5 unknown
113
+ held out; 33,200 enrolment and 629,800 probe utterances, conditions pooled, split seed
114
+ 42 / fit seed 0.
115
 
116
+ | Metric | Value | Published |
117
  |---|---|---|
118
+ | Unknown-attack EER ↓ | **9.33 %** | 16.43 % |
119
+ | Known-attack EER ↓ | 10.79 % | β€” |
120
 
121
+ Measured by the released code on 2026-08-18; raw numbers in
122
+ `results/stopa_measured.json`.
123
 
124
+ 9.33 % sits below every baseline STOPA itself reports β€” mid-30s for AASIST-family
125
+ countermeasures, near 50 % for ResNet-34 β€” and those are the like-for-like anchors:
126
+ trained systems, scored the same way, over the same partition. **No margin is claimed
127
+ over the lower published 16.43 %.** That is a *zero-shot* system, fitted on no STOPA
128
+ split, where this head is fitted on EET; the two share a metric but not a setting.
129
 
130
  **Single-seed**, like the MLAAD numbers above.
131
 
 
 
 
 
 
132
  ## Limitations
133
 
134
  - Trained on MLAAD v5 only. Attribution across other corpora, languages, codecs or
135
  recording conditions is untested.
136
+ - Both numbers are single-seed point estimates.
137
+ - For research on open-set attribution. **Not validated for forensic, legal or
138
+ moderation use**, and the abstention rule is calibrated on this protocol β€” its
139
+ coverage guarantee does not transfer off it.
140
+ - The harm from an attribution model is a confident wrong name, not a refusal. On an
141
+ unseen generator the calibrated answer is *unknown*, and that answer is the point
142
+ of the system; do not deploy it anywhere the abstention is discarded, and do not
143
+ present an attribution as evidence about a person.
144
 
145
  ## Licence
146
 
 
149
 
150
  ## Citation
151
 
152
+ See [`CITATION.cff`](https://github.com/pujariaditya/sourcetrace/blob/main/CITATION.cff)
153
+ in the code repository, which is the single source for how to cite this.
154
+
155
+ Please also cite the benchmarks (MLAAD, STOPA) and the baselines this is compared
156
+ against (Neamtu et al., EUSIPCO 2026; Chhibber et al., Odyssey 2026).