lossprint v0.6

Lossprint estimates whether a WAV, FLAC, or AIFF file was previously encoded with a lossy codec and decoded back to PCM—for example, an MP3 later re-wrapped as FLAC. It also estimates the encoder and effective bandwidth. The model is a 943,984-parameter CNN over native-rate mid/side spectrograms.

Results

All results use a fixed 0.5 threshold and up to sixteen 0.5-second windows from the first 20 seconds.

recall: test + wild positives FPR: test negatives only
98.53% (12,860/13,052) 0.49% (45/9,214)

Recall combines 9,214 controlled test transcodes with 3,838 known real-world transcodes. FPR uses only the 9,214 untouched masters in the test split.

The following cells show combined test + wild recall (number of positives). FPR is reported only once above because lossless negatives do not have a lossy codec or quality label. Real AAC files identify the codec profile but not the encoder implementation, so AAC is one row. Bitrate is the encoder target for controlled transcodes and measured average bitrate for real-world transcodes.

Common formats

encoder <112 kbps 112–159 160–223 224–287 ≥288
MP3 100.0% (345) 99.6% (269) 100.0% (463) 99.9% (890) 99.9% (1,126)
AAC 97.1% (1,083) 99.7% (324) 99.6% (568) 97.7% (666) 90.7% (701)

Less common formats

encoder <112 kbps 112–159 160–223 224–287 ≥288
MP2 100.0% (110) 100.0% (77) 99.3% (136) 99.3% (137) 100.0% (155)
Vorbis 99.7% (345) 100.0% (275) 100.0% (401) 99.6% (272) 97.9% (900)
Opus 91.7% (460) 100.0% (415) 99.7% (379) 100.0% (733) 100.0% (19)
WMA 100.0% (182) 99.5% (550) 100.0% (270) 100.0% (212) 100.0% (73)
Musepack 100.0% (53) 100.0% (67) 100.0% (78) 99.1% (115) 95.6% (203)

Combined AAC-profile recall was 99.10% for AAC-LC (n=892), 99.04% for HE-AAC (n=415), and 91.32% for HE-AACv2 (n=265).

Use

Decode up to 20 seconds at the native sample rate, bit depth, and channel count. Do not resample, downmix, normalize, requantize, or clip. Select up to sixteen evenly spaced 0.5-second windows. Mono and stereo are supported. Per window:

  1. Compute mid (L + R) / 2 and side L - R; mono uses a zero side channel.
  2. Compute a centered periodic-Hann STFT with n_fft = round(sample_rate / 43.06640625) and hop = n_fft // 2.
  3. Keep bins 0–512, zero-pad above Nyquist, then take log(magnitude + 1e-6) without normalization.

model.onnx accepts float32 [windows, 2, 513, 44] and returns:

  • transcode_probability: [windows]
  • encoder_probability: [windows, 9], ordered mp3, aac, aac_at, fdk_aac, vorbis, opus, mp2, wma, musepack
  • bandwidth_khz: [windows]

Pool classification probabilities with the normalized geometric mean; for the transcode head this is sigmoid(mean(logit(p))). Average bandwidth arithmetically. Preserve decoded float samples outside [-1, 1]. The current Rust CLI needs a frontend update before it can load this model.

Data

The corpus contains 90,072 exact positive/control pairs grouped by release. Negatives are untouched master segments; positives are the delay-corrected matching segments after lossy encoding and decoding. No other transform is applied. Training covers the nine encoders in the output head, including 586 HE-AAC and 666 HE-AACv2 pairs. Maximum measured alignment error was 0.125 ms. Manifest SHA-256: ea90b75ee1ec72ce28136b1eb55b3338f6032d5817d7a81350f02cb89d91cc46.

Limits

  • A score is evidence, not proof; nominal masters may already be transcodes.
  • Weak conditions are HE-AACv2, real-world Opus, high-quality Apple AAC, and high-quality Musepack. Unseen encoders and processing may behave differently.
  • Only mono and stereo are supported. Changing the threshold or window pooling changes the reported operating point.

Files

  • model.safetensors SHA-256: f701c57657efe12ad2a6023ec8f3bf5d50f1d630fa6a86ede75f0c56cdabc70d
  • model.onnx SHA-256: 1ba4997ecc1cd3379767017abc32140f883c79e74c0d2b6c1ee6628fbd4549e4

The ONNX export passed graph validation and PyTorch parity with maximum absolute error 1.91e-6.

Downloads last month

-

Downloads are not tracked for this model. How to track
Safetensors
Model size
944k params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support