binary noise classification

Mastering Noisy Data: A Smarter Path to Sound Event Detection

A 0.284 Event F1 against a 0.635 Dice tells a clear story: your model detects noise, but it cannot place it in time. The aggressive consistency weight is the prime suspect, eroding sharp boundaries by forcing rigid…

4 min readMachine Learning

The model isn't failing to hear noise; it's failing to know when the noise starts and stops. That distinction matters, because it points to a fix that has nothing to do with adding more data or swapping architectures. The user's current Event F1 of 0.284 tells us the detector catches events but smears their edges, and the Dice score of 0.635 confirms the overlap is sloppy. The combined target of 1.5 is ambitious, but it is reachable if they stop treating this as a classification problem and start treating it as a localization problem.

The first culprit is right there in the training setup: an aggressive consistency weight schedule in the mean teacher phase. Forcing the student to rigidly match a smoothed teacher is a known way to erode temporal sharpness, and the 14% variation allowance clearly got exceeded. That is not a subtle tuning issue; it is a structural mismatch between the loss function and the task objective. The fix is to decouple the consistency loss from the boundary-sensitive losses. Use a ramp-up schedule that stays flat for the first third of stage two, then increases slowly, and cap the weight at a value that does not dominate the Dice loss. If the model cannot preserve sharp onsets under the current schedule, the schedule is wrong, not the model.

The second issue is the windowing. Five-second windows with a batch size of eight are fine for memory, but they are brutal for boundary learning. A sound event that starts at 4.8 seconds and ends at 5.1 seconds gets split across two windows, and the model sees a truncated event in both. That forces the BiGRU head to guess, and guessing is exactly what produces onset and offset mismatches. The user should consider overlapping windows with a stride of one second, then aggregate predictions across windows using a simple voting scheme. This adds inference cost but directly attacks the dominant error source. They can also try a lightweight post-processing step: apply a median filter to the raw probability curve before thresholding, which removes single-frame flicker without dulling real edges.

On the architecture side, the AST backbone with a frozen stage one is a solid choice, and switching away from it would be a mistake. But the BiGRU head may be underpowered for temporal precision. A CRNN head with a larger receptive field, or a simple convolutional head with dilated kernels, often does better at boundary localization because it sees more context around each frame. The user can test this cheaply by freezing the AST weights and only training the head for a few epochs to compare boundary F1 before committing to stage two. That is a low-cost experiment with a high information return.

One more thing to watch: the verified versus unverified timestamps. The user mentioned having both, and the unverified ones are likely adding noise to the teacher targets. The mean teacher framework assumes the teacher is reliable, but if the unverified labels contain boundary errors, the teacher will propagate them. A practical move is to weight the consistency loss by label confidence, giving verified timestamps more influence in the early epochs and letting the model gradually trust the teacher only where its predictions are stable. This is a simple confidence mask, and it often yields a bigger jump than any architecture change.

The takeaway is direct: stop tuning the model and start fixing the temporal supervision. Reduce the consistency weight, overlap the windows, and apply a confidence mask to the unverified labels. Do those three things before touching the backbone, and the combined score will move. If it does not reach 1.5, the next lever is the head design, not the encoder. The user is close; the errors are concentrated in a known place, and that is a good position to be in.

From Machine Learning

Hi all, so im making a binary noise classification model. I have training data with timestamps of noise and some with verified some with unverified. The performance parameters are F1 and Dice scores and their combined score. I am following AST backbone (Stage 1 ast frozen and stage 2 ast unfrozen along with BiGRU/CRNN head in stage 1 and then the mean teacher in stage 2).

Read the original at Machine Learning