Neural networks now estimate where a sound comes from in 3D, including its horizontal angle (azimuth), vertical angle (elevation) and distance, from two ears or a small microphone array. Nobody can yet say which moments of the sound they rely on. Asking "which part of the input mattered" is normally done by deleting pieces of the input and watching the output change. Time-series research has shown that deleting individual time steps in isolation creates impossible inputs and yields scattered, noisy explanations. That is the temporal independence assumption. Spatial audio adds a second problem. Deleting a frame removes both what was said and where it came from, so the explanation cannot tell a timing cue apart from a content cue.
We propose an explanation method for 3D localization networks. It deletes only the spatial information in a chosen time–frequency region and leaves the sound's content in place. Within that region, the relationships between microphone channels are replaced by those of a direction-less, diffuse sound field, while each channel's spectral energy is kept. The method optimizes a contiguous mask under this operator, separately for azimuth, elevation and distance. The result shows which segments, and which kinds of cue (time difference, level difference, or ear-shaped spectral notches), each estimate depends on. We test these explanations against ground truth we plant ourselves.
Core Claim
Every deletion operator used in current time-series explanation removes too much or too little when applied to spatial audio. Zeroing a frame of a log-spectrogram or of the cross-correlation between channels (GCC-PHAT) produces values the network never sees in training. The context-preserving temporal blur of Explaining Time Series Predictions with Dynamic Masks, which replaces a segment by a local average of its neighbors, fails in the other direction. For a static or slowly moving source, the neighbors point the same way, so blurring over time leaves the direction information intact. A blur-based mask therefore cannot detect that a segment carried the location.
Our claim is that a cue-specific, spatially neutral deletion operator, combined with segment-shaped masks, gives two things. First, it recovers planted ground-truth cue locations far better than zero-occlusion, gradient methods, windowed Shapley values, Dynamask, or TimeSeg. Second, it keeps perturbed inputs statistically close to real ones. We use the method to test one concrete hypothesis about 3D localization networks. Prior work describes distance cues (the direct-to-reverberant ratio) as unstable (Exploring Efficient Directional and Distance Cues for Regional Speech Separation) and elevation as harder than azimuth (AuralNet). Our hypothesis is that distance and elevation estimates are carried by short, variable-length windows just after sound onsets, before wall reflections arrive, while azimuth is spread across the whole utterance.
Research Program
The deletion operator. Let $x$ be a multichannel short-time spectrum with $C$ channels, $T$ frames and $F$ frequency bands. Let $N_k(x)$ be a neutralized copy in which cue family $k$ is replaced by its diffuse-field value and all other content is kept. For $k=$ time difference, we replace interchannel phase with draws from the diffuse-field coherence implied by the array or head geometry. For $k=$ level difference, we equalize interchannel magnitudes. For $k=$ monaural spectral cue, we replace each channel's direction-dependent spectral shape with the direction-averaged head-related transfer function (HRTF) magnitude, which removes elevation notches. The head-related transfer function is the direction-dependent filter that the head and ears apply to incoming sound.
On simulated data built from TIMIT speech and the ITA HRTF set, as in AuralNet, we can apply $N_k$ exactly by re-rendering the dry source through modified filters. On real recordings it is applied as a signal-domain approximation. We report both settings so the gap between them is visible.
The mask. A mask $m \in [0,1]^{T\times F}$ chooses where to neutralize. The perturbed input is $\Phi_k(x,m) = m\odot x + (1-m)\odot N_k(x)$. For a model output $f_d$ along dimension $d$ (azimuth, elevation or distance), we solve a preservation problem in the style of Dynamask:
$$\min_{m}\; \ell\big(f_d(\Phi_k(x,m)),\, f_d(x)\big) + \lambda_a \,\big|\, \|m\|_1/(TF) - a \,\big| + \lambda_s \,\mathrm{TV}_t(m),$$
Here $\ell$ is angular error for directions and absolute error for distance. The target fraction of kept area is $a$. The term $\mathrm{TV}_t$ is total variation along time, which penalizes fragmented masks so that solutions come out as contiguous segments. The weights are $\lambda_a$ and $\lambda_s$. We borrow TimeSeg's segment-level view (TimeSeg) but use gradient optimization rather than a reinforcement-learning agent. TimeSeg's authors report that repeated black-box queries make the agent costly. They also note that its mutual-information objective lacks physical priors, and the neutralization operator is where we supply such a prior. Running the problem once per cue family $k$ and per dimension $d$ gives a cue-by-dimension map of what the network uses.
Models explained. We explain AuralNet (hierarchical attention over log-Gammatone spectrograms and GCC-PHAT), FAViT (Binaural Sound Localization in Noisy Environments Using Frequency-Based Audio Vision Transformer (FAViT)), and the convolutional-recurrent audio baseline from STARSS23. For distance we use the three-stream model of Efficient and Microphone-Fault-Tolerant 3D Sound Source Localization on LuViRA. Where public weights are unavailable, we retrain and check that our numbers are close to the published ones. The published references are 2.92° azimuth and 3.99° elevation error for AuralNet, 66.9° localization error for the audio-only tetrahedral-array STARSS23 baseline, and 13.9 cm music error on LuViRA.
Planted ground truth. Explanation papers in Direction 2 validate on synthetic white-box tasks. Dynamask's rare-feature task is one example, where it reports recall-area 0.58 against 0.14 for competitors. We build the acoustic counterpart in three forms. In the first, an utterance is spatialized at its true direction only inside a known segment and rendered diffuse everywhere else. In the second, only one segment contains energy above 5 kHz, where elevation notches live, so any elevation information must come from that segment. In the third, a shortcut is planted: a faint, direction-correlated spectral tilt is injected during training, and we check whether the explainer flags it as the network's cue.
Baselines
The naive reference is zero-occlusion. It slides a contiguous window over the time–frequency input, sets features to zero (or to the silence floor in the log domain), and records the change in the output. Integrated Gradients is a second naive reference, since it is the gradient method that scored 0.91 and 0.79 against Dynamask's 0.93 and 0.85 on the hidden-Markov-model task.
WindowSHAP groups time steps into windows for Shapley estimation. It is the strongest occlusion-family method that already respects local temporal grouping.
Dynamask with its moving-average operator is the closest existing method and the main ablation target. It uses the same mask objective and differs from ours only in the deletion operator. Swapping our neutral operator for its blur therefore isolates the one ingredient we claim matters.
TimeSeg is the strongest segment-level competitor. It reports F1 0.739 and IoU (overlap between selected and true segments) 0.621 on MIT-ECG, against 0.593 and 0.460 for TimeX++. We also include raw attention weights from AuralNet and FAViT, because practitioners would otherwise read those directly.
All methods explain the same trained model checkpoints on the same test utterances. All mask-based methods receive the same number of model forward passes, and all hyperparameters are tuned on a shared held-out planted set. No result has been reported on Lacuna for any attribution method on 3D sound localization. Our bar is therefore set against these baselines run by us. We count success as segment IoU with planted ground truth at least 0.15 above the best baseline on every model, together with a perturbed-versus-real detector AUROC within 0.1 of chance. The detector is described under the decisive checks.
Why not just…?
Why not just use Dynamask's temporal blur? For a stationary source, averaging neighboring frames keeps the interchannel phase and level relationships, because the neighbors share the same direction. Blurring therefore leaves the location in place, and a blur mask will wrongly call spatially informative segments unimportant. The first decisive check measures this directly. On static-source planted data, we compare how much each operator moves the azimuth and elevation outputs when applied to the planted segment. If blur moves the output as much as neutralization does, our central argument fails, and we will report that.
Why not just zero-occlude, given that speech already contains pauses? This is a real threat at the waveform level, where a zeroed 20 ms stretch resembles a natural gap. At the feature level the inputs differ: zeroed log-spectrograms or GCC-PHAT maps do not resemble pauses. A zeroed frame also removes content and direction together, so it cannot separate elevation cues from phonetic cues. We include waveform-level zero-occlusion as an extra baseline. If it matches our operator on ground-truth recovery, we will concede that the simpler method suffices for segment finding, and our contribution reduces to cue-family factorization.
Why not just read the attention maps of AuralNet or FAViT? Attention weights show where the model routes information, not what changes its answer. The test is faithfulness under deletion. If the regions attention highlights, when neutralized, move the output less than the regions our masks select, attention is not a faithful explanation.
Why not just retrain without a cue to see if accuracy drops? Retraining answers a dataset-level question at the cost of one training run per cue, and the retrained model may learn a different solution. We use it as a dataset-level confirmation of the per-example explanations, not as a substitute for them.
Proposed Experiments
The first decisive check is operator validity. We train a small classifier to tell perturbed inputs from real ones for each operator. Our prediction is detection AUROC near 1 for zero-occlusion and near 0.5 for neutralization. For blur, we predict that detection is low but that blur moves the outputs little on spatialized segments.
The second check is ground-truth recovery on the three planted constructions, under T60 (reverberation time) from 0.2 to 1.3 s and SNR from 0 to 20 dB, following the simulation setup of Spatially Weighted Contrastive Learning for Robust Sound Source Localization. It is scored with segment F1, IoU and area under precision and recall, and the cue-family assignment is scored by whether the correct $k$ is flagged.
The third check is the scientific question. On reverberant simulations and on STARSS23 real recordings, we test whether distance and elevation masks concentrate in the first tens of milliseconds after onsets while azimuth masks spread out, and whether this concentration grows with T60. We then intervene. Neutralizing only the onset windows the explainer selects should raise distance error on LuViRA and elevation error on the AuralNet data much more than neutralizing an equal area of randomly placed windows. If it does not, the onset hypothesis is refuted, independent of how good the explanations look.
The final check is a randomization sanity check: masks computed on models with randomized weights should lose all structure.
References
- Explaining Time Series Predictions with Dynamic Masks
- Exploring Efficient Directional and Distance Cues for Regional Speech Separation
- AuralNet: Hierarchical Attention-based 3D Binaural Localization of Overlapping Speakers
- TimeSeg: An Information-Theoretic Segment-Wise Explainer for Time-Series Predictions
- Binaural Sound Localization in Noisy Environments Using Frequency-Based Audio Vision Transformer (FAViT)
- STARSS23: An Audio-Visual Dataset of Spatial Recordings of Real Scenes with Spatiotemporal Annotations of Sound Events
- Efficient and Microphone-Fault-Tolerant 3D Sound Source Localization
- WindowSHAP: An efficient framework for explaining time-series classifiers based on Shapley values
- Spatially Weighted Contrastive Learning for Robust Sound Source Localization