2026-09-05

Can padding change audio-classification metrics?

Note · Models and meaning

Can padding change audio-classification metrics?

Audio clips have different lengths. To process several clips together, we often extend the shorter ones with padding.

Those extra samples are bookkeeping. They should not casually become evidence about what someone said.

I’m investigating whether padding-sensitive normalization can change downstream audio-classification metrics in a small DistilHuBERT model.

The mechanism

The reported issue concerns HuBERT’s positional convolution when conv_pos_batch_norm=True. Batch normalization receives padded time steps without using their validity mask. This can affect valid-frame normalization during training, and padded positions can become nonzero before the convolution. The original report includes a reproduction of the padding sensitivity. Transformers issue #47739

A difference inside a model is a reason to investigate. It does not establish how much classification performance changes.

That is the question for this experiment.

What I am testing

The study uses a pretrained DistilHuBERT backbone with a new classifier for 14 spoken intents. The dataset combines the Australian, British, and American English portions of MInDS-14: 1,809 examples in total.

The fixed split contains 1,266 training examples, 269 validation examples, and 274 test examples.

There is an important architectural detail: the original DistilHuBERT checkpoint does not use this positional BatchNorm path. The main experiment explicitly adds it after converting the positional convolution’s weight-normalized representation to an equivalent ordinary convolution.

The study therefore tests a controlled configuration built from DistilHuBERT. It does not assume that the original checkpoint has the same problem.

Four conditions

Condition Positional normalization Padding
C-L Ordinary BatchNorm Minimum needed for each batch
F-L Masked BatchNorm Minimum needed for each batch
C-H Ordinary BatchNorm Pad to a total of 20 seconds
F-H Masked BatchNorm Pad to a total of 20 seconds

The cached utterances are capped at 12 seconds. The high-padding condition extends the tensor to 20 seconds; it does not add 20 seconds to every utterance.

The masked version gathers valid feature frames, applies PyTorch’s BatchNorm to those frames, and puts the results back into a tensor whose padded positions are zero.

Within each seed, the four conditions start from the same initialized state and use the same examples and batch order.

The comparison that matters

I am tracking macro-F1, accuracy, and loss.

For macro-F1, one useful comparison is:

[(FH-CH)-(FL-CL).]

This asks whether the difference between masked and ordinary normalization changes when padding increases.

A positive value means the masked-minus-ordinary difference is larger under high padding. It does not, by itself, prove a general improvement.

The study also separates changes accumulated during training from changes caused by padding at evaluation time.

Why repeat it?

A single training run can give an interesting result for the wrong reason.

The planned main comparison uses five paired seeds. It also includes a repeated run and two controls that retain the architecture without positional BatchNorm.

These checks help distinguish the targeted mechanism from other padding effects and run-to-run variation.

Where the study stands

As of 5 September 2026, all four pilot conditions passed the predefined learning gate. The main comparison has started, but the full matrix and controls are not complete.

Passing the pilot means the setup can learn well enough to continue. It does not answer the research question.

I will draw a conclusion only after reviewing the paired results, controls, and measurements inside the model.

For now, the question remains open: does this implementation detail produce a consistent, practically meaningful change in classification metrics?

Related