Inverse FX Chain Predictor β€” effect presence + ORDER (two-head Log-Mel Transformer)

From dry + wet audio only, predicts which of EQ / Compressor / Reverb were applied and in which audible order. Trained from scratch on APINAJA/inverse-fx-phase1-effect-order (revision a5d0eeff7f8d9062b30f1971a2bed342e0de2521), song-level train / validation / test splits; test used once.

Why two heads (and 12, not 15, chains)

EQ (peaking biquad) and Reverb (Freeverb) are linear, so EQ→Reverb and Reverb→EQ give the same audio. Only the Compressor's position is audible. The model therefore predicts

  • presence head: P(EQ), P(Compressor), P(Reverb) β€” BCE on every pair
  • order head: P(EQ before Compressor), P(Reverb before Compressor) β€” BCE only where both effects are present

and decodes the most probable of the 12 audibly distinct chains (joint probability, always a valid chain). The dataset's 15 chains map onto them; a perfect model can reach at most 80 % 15-chain accuracy.

# chain presence [EQ,Comp,Rev] EQ before Comp Rev before Comp
0 EQ [1, 0, 0] β€” β€”
1 Compressor [0, 1, 0] β€” β€”
2 Reverb [0, 0, 1] β€” β€”
3 EQ + Reverb (order not audible) [1, 0, 1] β€” β€”
4 EQ β†’ Compressor [1, 1, 0] 1 β€”
5 Compressor β†’ EQ [1, 1, 0] 0 β€”
6 Compressor β†’ Reverb [0, 1, 1] β€” 0
7 Reverb β†’ Compressor [0, 1, 1] β€” 1
8 Compressor β†’ {EQ, Reverb} [1, 1, 1] 0 0
9 EQ β†’ Compressor β†’ Reverb [1, 1, 1] 1 0
10 Reverb β†’ Compressor β†’ EQ [1, 1, 1] 0 1
11 {EQ, Reverb} β†’ Compressor [1, 1, 1] 1 1

Architecture

dry/wet [B, 441000] β†’ Log-Mel [B, 128, T] each β†’ fusion concat_diff (dry β€– wet β€– wetβˆ’dry) β†’ [B, T, 384] β†’ Linear β†’ 256 β†’ [CLS] + sinusoidal positions β†’ TransformerEncoder (4 layers, 4 heads, FF 512) β†’ [CLS] β†’ presence head [B,3] + order head [B,2]. 2,274,693 trainable parameters. Loss = BCE(presence) + 1.0 Γ— masked BCE(order). Preprocessing: 44100 Hz mono, 10.0 s, n_fft 2048, hop 512, 128 mels 20.0–20000.0 Hz, log-mel standardised (mean -6.1873, std 4.7023).

Results β€” test (best-validation checkpoint, epoch 27, selected by validation chain12_accuracy)

metric model trivial baseline
12-chain accuracy (main) 0.4717 0.1333 (majority class)
15-chain accuracy 0.3657 ceiling 0.8000 for a perfect model
order accuracy (both questions) 0.6458 0.5 (coin flip)
EQ before Compressor 0.5568 0.5
Reverb before Compressor 0.7348 0.5
presence macro F1 0.9141 0.8462 (always "present")
presence exact match 0.6677 β€”
effect precision recall F1
EQ 0.8714 0.8030 0.8358
Compressor 1.0000 0.9711 0.9853
Reverb 0.9502 0.8939 0.9212

Order accuracy vs audibility (test)

audibility accuracy n
< βˆ’40 dB (practically identical) 0.5208 48
βˆ’40 … βˆ’20 dB (subtle) 0.5607 280
> βˆ’20 dB (clear) 0.6868 728

Validation at the best epoch: 12-chain 0.5043, order 0.6766, presence macro F1 0.9207.

Training history

epoch train loss val loss val 12-chain acc val order acc val presence F1 best
001 1.2473 1.1621 0.2290 0.5580 0.8563 yes
002 1.0799 1.0179 0.3285 0.5534 0.9033 yes
003 1.0045 0.9887 0.3478 0.5888 0.9124 yes
004 0.9639 0.9641 0.3787 0.6150 0.9121 yes
005 0.9362 0.9385 0.3594 0.6024 0.9103
006 0.9105 0.9757 0.3700 0.5770 0.9153
007 0.8711 0.9334 0.3874 0.5770 0.9230 yes
008 0.8492 0.9635 0.3913 0.6042 0.9214 yes
009 0.8121 0.9670 0.3643 0.5933 0.9184
010 0.7898 0.9279 0.3981 0.6486 0.9125 yes
011 0.7691 0.9586 0.4068 0.6395 0.9127 yes
012 0.7429 0.9040 0.3952 0.6531 0.9207
013 0.7352 0.9564 0.4126 0.6395 0.9207 yes
014 0.7003 0.9919 0.4135 0.6377 0.9217 yes
015 0.6929 0.9674 0.3961 0.6431 0.9150
016 0.6724 0.9850 0.3787 0.6476 0.9035
017 0.6476 1.0720 0.4135 0.6585 0.9130
018 0.6353 1.0505 0.4222 0.6531 0.9219 yes
019 0.6073 0.9917 0.4261 0.6639 0.9125 yes
020 0.5884 1.0243 0.4116 0.6522 0.8888
021 0.5707 1.0342 0.4319 0.6603 0.9156 yes
022 0.5523 1.0544 0.4386 0.6630 0.9105 yes
023 0.5315 1.0565 0.4744 0.6549 0.9238 yes
024 0.5118 1.0657 0.4773 0.6712 0.9265 yes
025 0.5001 1.0899 0.4870 0.6558 0.9231 yes
026 0.4880 1.0787 0.4966 0.6667 0.9229 yes
027 0.4830 1.0696 0.5043 0.6766 0.9207 yes
028 0.4712 1.0954 0.4976 0.6649 0.9269
029 0.4649 1.0685 0.5024 0.6730 0.9253
030 0.4581 1.0896 0.5043 0.6712 0.9264

Files

final/ (model.pt, config.json, label_map.json, test_metrics.json), best/, checkpoint_epoch_XXX/ (full resumable state), results/ (history, plots, test predictions, audibility analysis), runs/ (TensorBoard), fxp2/ (model code), train.py.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for APINAJA/inverse-fx-order-logmel-transformer

Finetunes
1 model

Dataset used to train APINAJA/inverse-fx-order-logmel-transformer