Eliminating quantization errors in classification-based sound source localization

Linfeng Feng, Xiao-Lei Zhang, Xuelong Li

TL;DR

Researchers have developed a new framework for Sound Source Localization (SSL) that combines the robustness of classification with the precision of regression. By introducing a novel "Unbiased Label Distribution" and specialized decoding techniques, they have effectively broken the theoretical "quantization limit" that usually plagues classification-based models, achieving state-of-the-art accuracy in both simulated and real-world environments.

What Problem Does This Paper Address?

In the world of Sound Source Localization (SSL), engineers typically choose between two paths to estimate the Direction of Arrival (DOA) of a sound:

  1. Regression: Treating the angle as a continuous number. This is precise but often struggles with noise and interference.
  2. Classification: Dividing the 360° circle into "bins" (e.g., every 5°). This is much more robust in messy, reverberant rooms, but it suffers from quantization error.

If your bins are 5° wide, even a perfect model will be off by an average of 1.25° because it can only tell you which "bucket" the sound fell into, not where it sits within that bucket. This paper aims to eliminate that "quantization tax" while keeping the robustness that makes classification so popular in deep learning.

Methods

The authors propose a three-pronged solution to bridge the gap between classification and regression:

  • Unbiased Label Distribution (ULD): Instead of a "one-hot" label (where only one bin is 1 and the rest are 0), ULD uses "soft" labels. If a sound is at 12.4°, and your bins are at 10° and 15°, ULD distributes the probability between those two bins based on the exact decimal distance. This creates an injective mapping, meaning you can mathematically "undo" the encoding to get the exact original angle back.
  • Tailored Loss Functions: Standard functions like Cross-Entropy (CE) don't handle these soft labels well—they often ignore "pseudo-peaks" (wrong guesses near the right answer). The authors introduced Negative Log Absolute Error (NLAE) and Mean Squared Error without activation (MSE(wo)) to provide better gradients for training models on these specific distributions.
  • Weighted Adjacent Decoding (WAD): During the prediction phase, instead of just picking the bin with the highest probability (Top-1 decoding), WAD looks at the peak bin and its immediate neighbors. It calculates a weighted average of these bins to "interpolate" the exact position, allowing the model to point to a spot between the predefined classes.

Datasets

The team evaluated their approach across a rigorous set of benchmarks:

  • Simulated Datasets (C1, C2, A1, L1, L2): These covered everything from "perfect" anechoic conditions to highly reverberant rooms with multiple speakers and varying microphone array geometries.
  • Real-World Dataset: Recordings from an office and a conference room, featuring actual speakers and 10 different linear microphone arrays to test the model's ability to generalize beyond "clean" math.

Key Insights and Ideas

  • Bins are not independent: In standard classification (like identifying cats vs. dogs), the classes are independent. In SSL, the classes are ordered. A sound in the 10° bin is "closer" to the 15° bin than the 90° bin. ULD and WAD exploit this spatial correlation.
  • Breaking the $l/4$ Limit: Mathematically, the expected error for a classification system with bin width $l$ is $l/4$. The "aha moment" here is proving that by using ULD and WAD, you can achieve an error significantly lower than this theoretical floor.
  • The Best of Both Worlds: The results suggest that WAD acts as a form of "local regression" within a classification framework. It keeps the model focused on the right general area (classification's strength) while fine-tuning the exact coordinate (regression's strength).

Key Results

  • Quantization Breakthrough: In anechoic tests with 5° bins (where the theoretical limit is 1.25°), the proposed method achieved a Mean Absolute Error (MAE) of just 0.061°—nearly 20 times better than the limit.
  • Robustness: On the "Office" real-world dataset, the ULD + MSE(wo) + WAD-3 combination outperformed standard one-hot classification by a significant margin, reducing the MAE from 3.168° to 2.925°.
  • Efficiency: In some simulated scenarios, the proposed strategy reduced the MAE by up to 45.22% compared to the most common industry-standard setup (One-hot + CE + Top-1 decoding).

Limitations and Future Work

  • The "Overfitting" Threshold: The authors found that if you make the bins too small (e.g., 1° wide), the model starts to overfit, and the accuracy (ACC) actually drops because the classification task becomes too complex.
  • Adverse Conditions: In extremely noisy or reverberant environments, "classification error" (picking the wrong bin entirely) starts to outweigh "quantization error." In these cases, the benefits of WAD are less pronounced because the model is struggling just to find the right neighborhood.
  • Future Directions: The paper suggests exploring how these unbiased distributions could be applied to 3D localization (adding height/elevation) and more complex multi-source scenarios where speakers are very close to one another.

Check out the code: https://github.com/linfeng-feng/ULD

Summary updated

Abstract

Sound Source Localization (SSL) involves estimating the Direction of Arrival (DOA) of sound sources. Since the DOA estimation output space is continuous, regression might be more suitable for DOA, offering higher precision. However, in practice, classification often outperforms regression, exhibiting greater robustness to interference. Conversely, classification's drawback is inherent quantization error. Within the classification paradigm, the DOA output space is discretized into intervals, each treated as a class. These classes show strong inter-class correlations, being inherently ordered, with higher similarity as intervals grow closer. Nevertheless, this has not been fully exploited. To address this, we propose an Unbiased Label Distribution (ULD) to eliminate quantization error in training targets. Furthermore, we tailor two loss functions for the soft label family: Negative Log Absolute Error (NLAE) and Mean Squared Error without activation (MSE(wo)). Finally, we introduce Weighted Adjacent Decoding (WAD) to overcome quantization error during model prediction decoding. Experimental results demonstrate our approach surpasses classification quantization limits, achieving state-of-the-art performance. Our code and supplementary materials are available at https://github.com/linfeng-feng/ULD.
BibTeX
@article{feng2025eliminating,
  author = {Linfeng Feng and Xiao-Lei Zhang and Xuelong Li},
  title = {{Eliminating quantization errors in classification-based sound source localization}},
  journal = {Neural Networks},
  year = {2025},
  doi = {10.1016/j.neunet.2024.106679},
}

Loading related content...

Figure