Upload README.md with huggingface_hub
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
-
`
|
| 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
|
| 42 |
-
| OOD-EER
|
| 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.
|
| 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
|
| 67 |
-
fit seed 0.
|
| 68 |
|
| 69 |
-
| Metric | Value | Published
|
| 70 |
|---|---|---|
|
| 71 |
-
| Unknown-attack EER
|
| 72 |
-
| Known-attack EER | 10.79 % | β |
|
| 73 |
|
| 74 |
-
Measured by the released code on 2026-08-18; raw numbers in
|
|
|
|
| 75 |
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 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 |
-
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
|
|
|
|
|
|
| 99 |
|
| 100 |
## Licence
|
| 101 |
|
|
@@ -104,12 +149,8 @@ redistributed here.
|
|
| 104 |
|
| 105 |
## Citation
|
| 106 |
|
| 107 |
-
``
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 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).
|
|
|
|
|
|
|
|
|
|
|
|