Soft Label Coding for End-to-end Sound Source Localization With Ad-hoc Microphone Arrays

Linfeng Feng, Yijun Gong, Xiao-Lei Zhang · DOI

TL;DR

Researchers have improved 2D sound source localization by moving away from rigid "one-hot" classification. By introducing Soft Label Coding, the system now understands that missing a target by a few inches is "more correct" than missing it by several feet, leading to significantly higher localization accuracy in rooms with randomly placed microphones.

What Problem Does This Paper Address?

Locating a sound source (like a speaker in a room) usually involves complex geometry and signal processing. Recent "end-to-end" deep learning models simplify this by turning localization into a classification task: they divide a room into a grid of local areas and train a network to pick the right "cell."

However, these models typically use one-hot encoding. In this setup, if a speaker is in Cell A, the label is 1 for Cell A and 0 for everything else. This creates a logical "cliff": the model sees an adjacent cell (Cell B) as just as "wrong" as a cell on the opposite side of the house. This ignores the inherent spatial correlation of the physical world and makes the model sensitive to quantization errors—where a speaker standing right on the line between two cells confuses the system.

Methods

The authors propose two ways to "soften" these labels to reflect spatial reality:

  1. Static Soft Label Coding (SSLC): This is a handcrafted approach. Instead of a 0 or 1, the label for each cell is determined by a Gaussian function based on its physical distance from the true source. Nearby cells get a small "partial credit" value, while distant cells remain near zero.
  2. Dynamic Soft Label Coding (DSLC): Since handcrafted labels might not be perfect, DSLC allows the model to "learn" the best labels during training. It looks at the statistics of the model's own predictions (online label smoothing). If the model consistently confuses Cell A with Cell B, DSLC adjusts the labels to reflect that these two areas are statistically similar.
  3. Joint Training: Because a brand-new model is too "dumb" to generate its own dynamic labels, the authors use a joint loss function. They use the stable SSLC as a guide early on, gradually incorporating the learned DSLC labels as the model becomes more confident.

The backbone architecture is a spatial-temporal attention network that processes both the coordinates of the "ad-hoc" microphones (mics placed randomly) and the audio features (STFT) they capture.

Datasets

The study relied on simulated data to ensure precise ground-truth coordinates:

  • Audio Source: Speech from the LibriSpeech corpus (921 speakers).
  • Environment Simulation: Pyroomacoustics was used to generate room impulse responses for 15 different room sizes.
  • Setup: Rooms were divided into a 15x15 grid (225 local areas). For each simulation, 30 microphones were placed randomly in the room to simulate an "ad-hoc" array.
  • Noise: Additive noise and varying reverberation times ($T_{60}$ from 0.3 to 1.0s) were added to mimic challenging real-world acoustics.

Key Insights and Ideas

  • Geometry in the Label: The "aha moment" is realizing that the loss function should respect the laws of physics. By encoding geometric distance into the label itself, the gradient descent process receives more meaningful feedback.
  • The "Constant" Surprise: Interestingly, the authors found that setting the weight of the dynamic labels ($\alpha_d$) to a constant (0.5) performed better than trying to adaptively change it based on model accuracy. When they tried to make it adaptive, the model tended to overfit the training data.
  • Learning Error vs. Quantization Error: The paper distinguishes between error caused by the grid being too coarse (quantization) and error caused by the model failing to pick the right cell (learning). Their method specifically attacks the learning error.

Key Results

The proposed DSLC+SSLC method (with a constant weight) emerged as the winner:

  • Accuracy (ACC): Achieved 52.2%, compared to 51.2% for the standard one-hot baseline.
  • Mean Absolute Error (MAE): Reduced the average error to 0.2742 meters, outperforming the one-hot baseline of 0.2811 meters.
  • Learning Error Reduction: When looking specifically at the "learning error" (independent of the grid resolution), the proposed method achieved a 6.26% relative reduction in error across five test rooms.
  • Efficiency: These gains were achieved without increasing the model's complexity or inference time, as the soft labeling only changes how the model is trained, not how it runs.

Limitations and Future Work

  • Simulated vs. Real World: The entire study was conducted on simulated data. Real-world factors like microphone hardware discrepancies or moving sources weren't tested.
  • 2D Constraint: The model currently localizes in 2D (x, y coordinates). In many real-world applications (like drones or multi-story buildings), 3D localization (including height) would be necessary.
  • Grid Dependency: The system still relies on a predefined grid. If a room is much larger or has a strange shape, the 15x15 grid might become a bottleneck. Future work could explore mesh-free or continuous coordinate estimation using similar soft-coding principles.

Summary updated

BibTeX
@misc{feng2023soft,
  author = {Linfeng Feng and Yijun Gong and Xiao-Lei Zhang},
  title = {{Soft Label Coding for End-to-end Sound Source Localization With Ad-hoc Microphone Arrays}},
  year = {2023},
  eprint = {2304.07512},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.07512},
}
Figure