Inverse FX Chain Predictor β presence + ORDER + PARAMETERS (three-head Log-Mel Transformer)
From dry + wet audio only, predicts which of EQ / Compressor / Reverb were applied, in which audible order,
and with which settings (12 parameters). Fine-tuned from the two-head model
APINAJA/inverse-fx-order-logmel-transformer on
APINAJA/inverse-fx-phase1-effect-order (revision a5d0eeff7f8d9062b30f1971a2bed342e0de2521),
same song-level train / validation / test splits; test used once.
Heads
- presence: P(EQ), P(Compressor), P(Reverb) β BCE on every pair
- order: P(EQ before Compressor), P(Reverb before Compressor) β BCE only where both effects are present
- parameters (new): 12 sigmoid outputs = the dataset's
parameters_normalizedvalues (0β1). L1 loss only on the parameters of effects that are really present, averaged per effect. Reverbwidthis not predicted.
Decoding: most probable of the 12 audibly distinct chains (joint probability), then the parameters of the effects in that chain.
| # | 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 |
| # | effect | parameter | unit | scale | range (0 β 1) |
|---|---|---|---|---|---|
| 0 | EQ | frequency |
Hz | log | 100 β 8000 |
| 1 | EQ | gain |
dB | lin | -12 β 12 |
| 2 | EQ | q |
β | log | 0.5 β 4 |
| 3 | Compressor | threshold |
dB | lin | -40 β -15 |
| 4 | Compressor | ratio |
:1 | log | 2 β 10 |
| 5 | Compressor | attack |
ms | log | 1 β 50 |
| 6 | Compressor | release |
ms | log | 50 β 500 |
| 7 | Compressor | makeup_gain |
dB | lin | 0 β 6 |
| 8 | Reverb | room_size |
β | lin | 0.3 β 0.9 |
| 9 | Reverb | damping |
β | lin | 0.2 β 0.8 |
| 10 | Reverb | wet_mix |
β | lin | 0.15 β 0.5 |
| 11 | Reverb | dry_mix |
β | lin | 0.6 β 0.9 |
lin: value = low + xΒ·(high β low); log: value = lowΒ·(high/low)^x.
Fine-tuning
Backbone + presence/order heads copied from the two-head model (incl. log-mel normalisation stats); the parameter head is new. Backbone and old heads are frozen for 1 epoch(s), then trained with LR Γ0.3 (old heads Γ0.3); parameter head LR 0.0003. Loss = BCE(presence) + 1.0 Γ BCE(order)
- 1.0 Γ l1(parameters). Best checkpoint by validation
combined_score(combined score = (12-chain accuracy + parameter skill) / 2, parameter skill = 1 β MAE / MAE of the mean-value baseline).
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 [B,3] + order [B,2] + parameters [B,12].
2,309,137 trainable parameters.
Results β test (best-validation checkpoint, epoch 21)
| metric | model | trivial baseline |
|---|---|---|
| 12-chain accuracy | 0.5394 | 0.1333 (majority class) |
| order accuracy (both questions) | 0.6629 | 0.5 (coin flip) |
| presence macro F1 | 0.9323 | 0.8462 (always "present") |
| parameter MAE (0-1, macro over 12) | 0.2133 | 0.2541 (predict training mean) |
| parameter skill | 0.160 | 0 |
| parameters within tolerance | 0.412 | β |
| combined score | 0.3499 | β |
Parameter errors are measured for effects that are really present (given the true chain).
| parameter | n | MAE (0-1) | mean-baseline MAE | typical error | baseline error | within tolerance | baseline | RΒ² |
|---|---|---|---|---|---|---|---|---|
| EQ frequency | 726 | 0.1508 | 0.2397 | 0.95 oct | 1.52 oct | 38.7% | 16.1% | 0.442 |
| EQ gain | 726 | 0.1771 | 0.3149 | 4.25 dB | 7.56 dB | 24.1% | 0.0% | 0.495 |
| EQ Q | 726 | 0.1954 | 0.2484 | Γ1.50 | Γ1.68 | 59.8% | 38.3% | 0.233 |
| Comp threshold | 726 | 0.1398 | 0.2316 | 3.50 dB | 5.79 dB | 51.2% | 26.9% | 0.572 |
| Comp ratio | 726 | 0.2205 | 0.2477 | Γ1.43 | Γ1.49 | 60.5% | 51.0% | 0.149 |
| Comp attack | 726 | 0.2266 | 0.2420 | Γ2.43 | Γ2.58 | 44.5% | 38.7% | 0.050 |
| Comp release | 726 | 0.2571 | 0.2601 | Γ1.81 | Γ1.82 | 35.1% | 31.8% | -0.051 |
| Comp makeup | 726 | 0.2305 | 0.2528 | 1.38 dB | 1.52 dB | 37.6% | 34.3% | 0.113 |
| Rev room size | 726 | 0.2245 | 0.2391 | 0.13 | 0.14 | 39.1% | 35.0% | 0.048 |
| Rev damping | 726 | 0.2666 | 0.2601 | 0.16 | 0.16 | 29.9% | 28.7% | -0.101 |
| Rev wet mix | 726 | 0.2237 | 0.2516 | 0.08 | 0.09 | 36.9% | 30.9% | 0.122 |
| Rev dry mix | 726 | 0.2474 | 0.2609 | 0.07 | 0.08 | 37.3% | 32.8% | 0.015 |
| effect | precision | recall | F1 |
|---|---|---|---|
| EQ | 0.9378 | 0.8306 | 0.8809 |
| Compressor | 0.9986 | 0.9683 | 0.9832 |
| Reverb | 0.9592 | 0.9077 | 0.9328 |
Validation at the best epoch: 12-chain 0.5700, parameter MAE 0.2211, combined score 0.3593.
Training history
| epoch | train loss | val loss | val 12-chain acc | val param MAE | val param skill | val combined | best |
|---|---|---|---|---|---|---|---|
| 001 | 0.7200 | 1.3152 | 0.5043 | 0.2461 | 0.053 | 0.2785 | yes |
| 002 | 0.7182 | 1.3278 | 0.4889 | 0.2385 | 0.082 | 0.2853 | yes |
| 003 | 0.7351 | 1.3206 | 0.4831 | 0.2382 | 0.083 | 0.2830 | |
| 004 | 0.7187 | 1.2864 | 0.5208 | 0.2323 | 0.106 | 0.3132 | yes |
| 005 | 0.7063 | 1.2386 | 0.5237 | 0.2282 | 0.121 | 0.3226 | yes |
| 006 | 0.6844 | 1.3273 | 0.5082 | 0.2285 | 0.120 | 0.3143 | |
| 007 | 0.6686 | 1.3015 | 0.5237 | 0.2289 | 0.119 | 0.3213 | |
| 008 | 0.6594 | 1.3409 | 0.5159 | 0.2264 | 0.128 | 0.3221 | |
| 009 | 0.6431 | 1.3225 | 0.5256 | 0.2248 | 0.135 | 0.3301 | yes |
| 010 | 0.6320 | 1.2759 | 0.5295 | 0.2257 | 0.131 | 0.3302 | yes |
| 011 | 0.6190 | 1.3604 | 0.5304 | 0.2230 | 0.142 | 0.3360 | yes |
| 012 | 0.6148 | 1.3678 | 0.5169 | 0.2251 | 0.133 | 0.3251 | |
| 013 | 0.5974 | 1.3943 | 0.5188 | 0.2244 | 0.136 | 0.3275 | |
| 014 | 0.5937 | 1.3454 | 0.5391 | 0.2226 | 0.143 | 0.3411 | yes |
| 015 | 0.5864 | 1.3856 | 0.5382 | 0.2225 | 0.143 | 0.3407 | |
| 016 | 0.5769 | 1.3767 | 0.5498 | 0.2211 | 0.149 | 0.3492 | yes |
| 017 | 0.5665 | 1.3991 | 0.5469 | 0.2207 | 0.150 | 0.3486 | |
| 018 | 0.5652 | 1.4136 | 0.5633 | 0.2216 | 0.147 | 0.3550 | yes |
| 019 | 0.5547 | 1.4574 | 0.5527 | 0.2223 | 0.144 | 0.3485 | |
| 020 | 0.5523 | 1.4080 | 0.5536 | 0.2209 | 0.149 | 0.3516 | |
| 021 | 0.5465 | 1.3828 | 0.5700 | 0.2211 | 0.149 | 0.3593 | yes |
| 022 | 0.5458 | 1.4251 | 0.5536 | 0.2210 | 0.149 | 0.3513 | |
| 023 | 0.5443 | 1.4168 | 0.5556 | 0.2210 | 0.149 | 0.3524 | |
| 024 | 0.5398 | 1.4237 | 0.5643 | 0.2211 | 0.149 | 0.3565 | |
| 025 | 0.5494 | 1.4256 | 0.5565 | 0.2211 | 0.149 | 0.3527 |
Files
final/ (model.pt, config.json, label_map.json, test_metrics.json), best/, checkpoint_epoch_XXX/ (full resumable state),
results/ (history, plots, test predictions incl. parameters), runs/ (TensorBoard), fxp3/ (model code), train.py.
Model tree for APINAJA/inverse-fx-order-params-logmel-transformer
Base model
APINAJA/inverse-fx-order-logmel-transformer