BAT: Learning to Reason about Spatial Sounds with Large Language Models

Zhisheng Zheng, Puyuan Peng, Ziyang Ma, Xie Chen, Eunsol Choi, David Harwath

TL;DR

BAT (Binaural Audio Transformer-based LLM) is the first multimodal large language model capable of reasoning about sounds within a 3D environment. By combining a novel spatial audio encoder with LLaMA-2, the system can not only identify "what" a sound is but also "where" it is and how it relates spatially to other sounds in a complex, reverberant scene.

What Problem Does This Paper Address?

While Large Language Models (LLMs) have become proficient at understanding text, images, and even monaural audio (like speech or music), they remain "spatially deaf." Humans naturally use binaural hearing to navigate—we can tell if a phone is ringing behind a sofa or if footsteps are approaching from upstairs.

Current AI models struggle with "in-the-wild" spatial audio for two reasons:

  1. Lack of Data: There are few large-scale datasets that pair complex 3D spatial audio with natural language descriptions or reasoning tasks.
  2. Architectural Gaps: Existing audio encoders are typically optimized for sound classification or simple localization, not for the high-level reasoning required to answer questions like, "Is the barking dog to the left of the stereo?"

Methods

The authors introduce a two-part solution: a specialized encoder and a reasoning framework.

1. SPATIAL-AST (The Encoder)

The Spatial Audio Spectrogram Transformer is the model's "ears." Unlike standard encoders that only look at frequency (Mel-spectrograms), SPATIAL-AST also processes Interaural Phase Difference (IPD)—the tiny timing differences between sound hitting the left vs. right ear.

Figure 1. Illustration of the BAT model structure. The rightmost part shows the binaural audio generation process.

As shown in the architecture diagram above, the encoder uses three specialized [CLS] tokens to extract distinct features for category, distance, and direction. These features are then projected into the embedding space of a LLaMA-2 7B model.

2. Perception-to-Reasoning Curriculum

Training a model to reason about spatial relationships is difficult. The authors found that a three-stage "curriculum" was essential:

  • Stage I: Basic perception of single sound sources.
  • Stage II: Identifying multiple sources in a mix (implicit sound separation).
  • Stage III: Complex spatial reasoning (e.g., comparing distances between two different objects).

Datasets

Because real-world spatial audio is hard to collect and annotate, the authors turned to simulation.

  • AudioSet: Used as the source for "what" the sounds are (curated down to 355 identifiable labels).
  • SoundSpaces 2.0: A state-of-the-art simulator used to place these sounds into 3D meshes of real buildings (Matterport3D). This allowed the authors to generate 21,131 unique, highly realistic reverberant environments.
  • SPATIALSOUNDQA: A new benchmark containing 872,000 QA pairs. It ranges from simple detection (Type A) to complex spatial reasoning (Type E).
Table 1. SPATIALSOUNDQA Overview: The first four types focus on perception, while the last emphasizes reasoning. DP: Distance Prediction; DoA: Direction-of-Arrival. Numbers (e.g., 139K, 15.9%) indicate the QA sample count and their percentages in the dataset.

Key Insights and Ideas

  • Phase is Paramount: Including IPD information was critical. Without it, the model's ability to localize sounds (Direction of Arrival) plummeted.
  • The "Separation" Bridge: One of the most important findings was that the model must learn to separate sounds (Stage II) before it can reason about them. If you skip the multi-source perception training and go straight to reasoning, the model's performance on spatial relationship questions drops to near-random levels (~54%).
  • Monaural is Not Enough: A "Monaural BAT" baseline performed significantly worse on reasoning tasks, proving that spatial audio cues (binaural) provide information that cannot be recovered from a single-channel recording, even with a powerful LLM.

Key Results

BAT demonstrates a significant leap in spatial audio understanding:

  • Spatial Reasoning: BAT achieved 76.89% accuracy on complex reasoning tasks (Type E), far outperforming monaural baselines.
  • Localization: The SPATIAL-AST encoder achieved a Mean Angular Error (MAE) of 17.94° and could estimate distance within 0.5 meters with 32.54% accuracy.
  • Robustness: The model maintains strong performance even in highly reverberant environments, which typically confuse simpler acoustic models.
Table 4. Performance evaluation on SPATIALSOUNDQA. The metrics include mAP for detection accuracy, represented by two columns corresponding to question types A and C, respectively; Accuracy (Acc) for assessing the accuracy of identifying directions and Distance Error Rate (DER) for distance prediction, with two columns each for question types B and D; and Binary Accuracy (BA) for the accuracy of binary (Yes/No) responses in reasoning (question type E). Input types include monaural audio (M), binaural audio (B), prompt (P), or ground truth sound source parameters (GT). The “Random” and “Oracle” rows serve as baseline and ideal performance benchmarks.

Limitations and Future Work

While BAT is a pioneer, the authors note several areas for growth:

  • Source Complexity: The current model is limited to handling a maximum of two concurrent sound sources.
  • Binaural vs. Ambisonics: The framework currently uses binaural (two-channel) audio. Moving to First-Order Ambisonics could provide even richer spatial detail.
  • The Sim-to-Real Gap: As the model was trained entirely on simulated data, its performance in real-world, non-simulated environments still needs extensive validation.
  • Multimodal Integration: Future versions could integrate visual data (using the native support in SoundSpaces 2.0) to create a truly embodied AI that sees and hears its environment in 3D.

Summary updated

BibTeX
@inproceedings{zheng2024bat,
  author = {Zhisheng Zheng and Puyuan Peng and Ziyang Ma and Xie Chen and Eunsol Choi and David Harwath},
  title = {{BAT: Learning to Reason about Spatial Sounds with Large Language Models}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=kao5hRX9YA},
}
Figure