Audio-language models can now find a sound from a text description, but they cannot answer when one sound happens relative to another. Ask for "the stretch where a dog barks while a car passes" and current systems fail in one of two ways. Clip-level models that do understand words like "before" and "while" squash a whole recording into one vector, so they cannot point to a time. Frame-level models that can point to a time only accept single-sound queries such as "dog barking." This note proposes a system that returns time spans for relational queries. It has three parts: a frame-level open-vocabulary detector (a model that scores every short slice of audio against a text description of a sound), a step that turns those scores into true probabilities, and a small layer of soft temporal operators that combines the per-sound probabilities over a multi-second horizon into a span for the whole relation.
The central bet is that relational temporal understanding in audio should be built by composing localized evidence, not learned inside a single text embedding. If that is right, two things follow. Probability calibration stops being an optional detail and becomes the main bottleneck, because composed scores multiply errors. And a composed system should beat order-aware clip models on their own benchmarks while also producing time boundaries that those models cannot produce.
Core Claim
The claim has three parts, each testable. First, a detector at sub-200 ms resolution combined with differentiable temporal operators will localize relational queries ("A before B", "A while B", "A after B ends") on real recordings. No existing model in the file does this. Second, the same system, scored at clip level, will match or exceed order-aware contrastive models on their own diagnostics. Third, the gain over a naive "detect, threshold, apply rules" pipeline comes mostly from per-query calibration and end-to-end training of the operators, and not from the operator rules themselves. If the naive pipeline matches the full system, the paper reports that and the claim narrows to "composition suffices."
What the Prior Work Establishes
Two families of work motivate the gap from opposite sides. On the relational side, Dissecting Temporal Understanding in Text-to-Audio Retrieval shows that CLAP-style retrievers act as a temporal bag of words: on its SynCaps probe they score about 67% Recall@1 on correctly ordered and reversed queries alike. The same paper finds that roughly 23% of AudioCaps captions are temporally incomplete or wrong. T-CLAP adds order-flipped hard negatives and reaches 87.2% on its T-Classify order test, where standard CLAP sits near 50%. CompA builds expert-annotated order and attribute benchmarks from AudioSet-Strong; its CompA-CLAP reaches only about 33.8% group score on CompA-order, against 87.4% for humans. All three keep a single pooled vector per clip, so none can localize. CompA also reports a constraint we must face: performance collapses when the composed sounds are acoustically similar.
On the localization side, FLAM matches each of 32 frames in a 10-second clip, about 312 ms per frame, against a text embedding. It reaches AUROC 81.23 on ASFX-SED, compared with 69.56 for MGA-CLAP. It also shows that raw cosine scores are uncalibrated and need a learned scale and bias that depend on the text. FlexSED conditions a Dasheng audio encoder on CLAP text embeddings and caches the audio features so they can be reused across many queries. It also uses GPT-4 to choose "safe negatives" when labels are missing, and it keeps about 88% of PSDS1T on 20 held-out AudioSet-Strong classes. Both systems take only static, single-sound queries.
Three other papers set design constraints. Towards Duration Robust Weakly Supervised Sound Event Detection shows that mean pooling biases detection toward long sounds, with a 17.04% short-versus-long F1 gap for the DCASE2018 winner, compared with 4.02% for L^p pooling. It also shows that time steps coarser than about 200 ms (subsampling factor 16, 320 ms) break onset accuracy. FLAM's 312 ms grid is on the wrong side of that line, so our detector must be finer. Zero- and Few-shot Sound Event Localization and Detection shows that global cosine thresholds are fragile across classes. This is further evidence that calibration must be handled explicitly. The classic long-context results, Learning long-term temporal features in LVCSR using neural networks and Utterance-level Aggregation For Speaker Recognition In The Wild, support the idea that 0.5–several seconds of context resolves ambiguities that a single frame cannot. Here that context goes into the operator layer, not the frame grid.
Research Program
Detector. The detector is a FlexSED-style encoder–decoder: a cached audio encoder, text conditioning, and an output grid of 80–160 ms. It is trained on AudioSet-Strong together with FLAM-style synthetic mixtures, in which isolated sound clips are placed at known onsets over background audio. For every query $q$, the detector outputs a frame score $z_q(t)$. A calibration head maps this score to a probability:
$$p_q(t) = \sigma\big(\alpha_q\, z_q(t) + \beta_q\big),$$
where $\sigma$ is the logistic function. The scale $\alpha_q$ and bias $\beta_q$ are predicted from the text embedding, as in FLAM. They are fit with a frame-level calibration loss on held-out mixtures, so that $p_q(t)$ is an honest probability rather than just a good ranking score.
Temporal operators. An LLM parses each relational query into atoms and one relation. For example, "a siren starts after the rain stops" becomes rain, siren, and after-end. The parse is checked against a small grammar. The operators then act on the atom probability curves. "While" is the frame-wise product $p_A(t)\,p_B(t)$. "B after A" uses a soft memory of past A activity:
$$s_{A\to B}(t) = p_B(t)\cdot \max_{t' < t}\, k_\tau(t-t')\, p_A(t'),$$
where $k_\tau$ is a decay kernel with a learned horizon $\tau$ of up to several seconds. In practice the max is replaced by a smooth maximum so that gradients can flow.
The operators have few parameters: one horizon per relation and a small correction network. They are trained end to end on synthetic relational mixtures whose relation spans are known exactly. The relation labels are balanced across forward and reverse phrasings, following the debiasing recipe of the Dissecting paper.
Long-form audio. Recordings longer than the 10-second limit of FLAM and FlexSED are handled by caching encoder features over overlapping windows and stitching the atom probability curves before the operators run. Because of this, relations can span window boundaries.
Similar-sounding atoms. CompA's failure mode is handled by building some training mixtures from acoustically close pairs, such as two engines or two dog calls, with distinct descriptions. We measure that subset separately and do not claim to have solved it in advance.
Baselines
The naive reference point is off-the-shelf CLAP used as a sliding-window scorer: score each window against the full relational caption and pick the best-scoring span. It is run on the same evaluation audio with no extra training. Given the SynCaps and T-Classify results, it should be near chance on order. Its role is to show how much of any gain comes from localization at all.
The strongest existing clip-level competitors are T-CLAP and CompA-CLAP, scored on their own benchmarks: T-Classify, where T-CLAP reports 87.2%, and CompA-order, where CompA-CLAP reports about 33.8% group score. For localization we use the same sliding-window protocol as for CLAP. For clip-level scoring, our system produces one clip score by taking the maximum of the relation curve. Beating CompA-CLAP means a clearly higher CompA-order group score. Matching T-CLAP's 87.2% on T-Classify is the minimum bar. Both models are retrained on our relational mixtures as well as used in released form, so the comparison does not depend on training data.
The strongest localization competitor is FLAM, fine-tuned to emit frame-level relation targets directly from the whole relational caption. This monolithic variant is given the same data, the same GPU-hours, and the same hyperparameter search budget as our system. It is the fairest test of composition against direct learning. On static queries, FLAM's reported AUROC of 81.23 on ASFX-SED is the reference our detector must not fall below.
The decisive ablation is the hard pipeline: the same detector, with per-class global thresholds and rule-based relation logic, and no learned calibration or operator training. A second ablation removes calibration, keeping raw scores with soft operators, to test the claim that composition amplifies miscalibration. A third coarsens the grid to 320 ms to reproduce the Dinkel resolution effect on relational spans.
Why not just…?
Why not just run a tagger and let an LLM reason over its output? AHELM shows that cascades are a genuine threat: GPT-4o-mini Transcribe plus GPT-4o ranked 6th of 17 systems. However, AHELM's tasks are mostly about speech, and a closed-set tagger cannot name open-vocabulary sounds. Our hard-pipeline ablation is exactly this cascade, built with an open-vocabulary tagger. If it ties the full system, the conclusion is that calibration and soft operators add nothing. We would report that result.
Why not just train order-aware contrastive embeddings harder, as T-CLAP and CompA do? These models compress the clip into one vector, so they cannot output spans. They also lean on explicit connective words. CompA's 33.8% versus 87.4% human gap suggests that harder negatives alone have hit a ceiling. The clip-level comparison on CompA-order tests directly whether composing localized evidence closes more of that gap.
Why not just fine-tune a frame-wise model like FLAM on relational captions? This could work. It is the monolithic baseline, given equal budget. The relevant tests are held-out relation–atom combinations and reversed phrasings, where a monolithic model may memorize lexical patterns and a composed model should not. If FLAM-relational matches us there as well, composition is not needed.
Why not just pool over longer windows? The Dinkel results already show that mean pooling erases short events. Pooling also removes order by construction, so it cannot express "before."
Proposed Experiments
Evaluation uses T-Classify, SynCaps, and CompA-order at clip level, and ASFX-SED plus AudioSet-Strong (PSDS, including the 20-held-out-class zero-shot split) for static detection. For relation localization, we build a new benchmark from AudioSet-Strong timestamps. Its relational queries are generated from real overlapping and sequential events and balanced across phrasings. The target span is computed exactly from the annotations, for example the intersection of the two event spans for "while." It is scored with span IoU and relation-level PSDS, and it includes a subset of long recordings that cross window boundaries. A held-out set of relation–atom pairs measures compositional generalization, and the acoustically-similar subset is reported separately.
Three checks decide the outcome. First, the full system must beat the hard pipeline and FLAM-relational on relation span IoU for held-out combinations. Second, removing calibration must hurt the composed system more than it hurts single-atom detection. This is the signature of compounding miscalibration. Third, clip-level CompA-order must exceed CompA-CLAP's reported 33.8%. No reported result was found on Lacuna for relational span localization on any benchmark, so the new benchmark's numbers will be the first.
References
- Dissecting Temporal Understanding in Text-to-Audio Retrieval
- T-CLAP: Temporal-Enhanced Contrastive Language-Audio Pretraining
- CompA: Addressing the Gap in Compositional Reasoning in Audio-Language Models
- FLAM: Frame-Wise Language-Audio Modeling
- FlexSED: Towards Open-Vocabulary Sound Event Detection
- Towards Duration Robust Weakly Supervised Sound Event Detection
- Zero- and Few-Shot Sound Event Localization and Detection
- Learning long-term temporal features in LVCSR using neural networks
- Utterance-level Aggregation for Speaker Recognition in the Wild
- AHELM: A Holistic Evaluation of Audio-Language Models