arXiv:2611.12124eess.ASNov 2026

Manuscript Offprint

arXiv:2611.12124

SCLAP: Temporal structural alignment improves localization in long-form audio

Yacouba Kaloga, Ina Kodrasi

ABSTRACT

Audio-text models such as Contrastive Language-Audio Pretraining (CLAP) typically pool frame and token sequences uniformly into global embeddings. This discards temporal structure and impairs both retrieval and localization, especially for short events in long recordings. We introduce SCLAP, a sequence-level contrastive framework that aligns audio frames and text tokens using monotone one-dimensional optimal transport. Its learned marginals and transport plan provide fine-grained temporal supervision from clip-level captions alone. On short-form audio (i.e., Clotho and TACOS datasets with 15-30s recordings), SCLAP remains competitive for retrieval while improving zero-shot localization over CLAP and Text-aware Attention Pooling. On long-form audio (i.e., CASTELLA dataset with up to 300s recordings), SCLAP improves retrieval performance and its localization advantage grows as the event-to-context ratio decreases. At inference, SCLAP requires no optimal transport computation since retrieval can use pooled embeddings and localization can use inexpensive frame-text cosine scores.

Index Terms— language, audio, CLAP, retrieval, optimal transport

1. INTRODUCTION

Contrastive multimodal pretraining has become a standard way to learn shared representation spaces across modalities, enabling zero-shot recognition and transfer to downstream tasks [1, 2]. Contrastive Language-Audio Pretraining (CLAP) [3] extends this recipe to audio-text pairs. Like other dual-encoder systems with sequential or temporally structured inputs such as audio-text or video-text learning, CLAP represents each modality as a sequence of embeddings and then uniformly pools these representations into a single global vector [3, 4]. This recipe has proven remarkably effective, since it is simple to train, scales well to large corpora, and achieves strong zero-shot classification and cross-modal retrieval performance [5].

Global pooling implicitly assumes that a single vector can adequately summarize the entire input. This assumption holds reasonably well on short-form audio benchmarks, where relevant events often occupy a substantial portion of the input and transformer-based encoders can aggregate local context through self-attention. However, in long-form audio, recordings are often processed chunk by chunk while the captioned event may occupy only a small fraction of the timeline. In this low event-to-context ratio regime, uniform global pooling can dilute the relevant event among background, silence, or irrelevant context. The event's presence can often still be inferred from the pooled vector, however, its temporal location within the clip is lost [6].

Such temporal localization is essential particularly in long recordings, where retrieving relevant segments and navigating directly to them requires knowing not just that an event occurred, but also when. Existing approaches often recover temporal information using additional supervision. Examples include temporal-contrastive objectives [7], frame-wise training with temporally grounded captions [8], and supervised audio moment retrieval [9]. Related image-text methods use auxiliary objectives [10], while [11] relies on frame-level labels. Although effective, these approaches require temporal annotations beyond ordinary clip-level captions.

In contrast, comparatively few methods learn fine-grained audio-text structure using only clip-level supervision. Li et al. [12] align frames and tokens through a shared codebook, but the approach is tested only on short audio clips. For long-form audio, Contrastive Long-form Language-Audio Pretraining (CoLLAP) [13] applies temporal attention over audio segments with respect to a global caption embedding for (long-form) music retrieval, but this mechanism is never evaluated for its ability to localize events in time. A related direction is Text-aware Attention Pooling (TAP) [14] which lets a single caption-level query attend over audio frames, allowing the model to emphasize the most relevant audio frames. However this produces a single attention distribution for the whole caption, without an alignment between individual text tokens and audio frames. The resulting weights are never supervised or evaluated as a localization signal, and are only used to build a better pooled vector for retrieval.

These limitations motivate the necessity of a mechanism that aligns frames and tokens directly without collapsing either sequence first. Optimal transport [15] offers a natural way to obtain such a correspondence. Rather than collapsing two sequences into single vectors before comparing them, optimal transport finds a soft assignment between individual frames and individual tokens that minimizes the total cost of aligning them. Although prior work has applied optimal transport to audio-text retrieval, it has only been used to match pooled representations of different examples across a training batch [16, 17] rather than to align the frames and tokens within a single pair.

In this paper we propose Sequence-level Contrastive Language-Audio Pretraining (SCLAP), which applies optimal transport within each audio-caption pair to align its frame and token sequences directly. A lightweight network predicts an importance weight for each audio frame, and a separate lightweight network predicts an importance weight for each text token, using only that modality's own sequence. These weights induce a monotone transport plan between the frames and tokens, and SCLAP replaces CLAP's pooled similarity with the resulting transport-weighted similarity in the same contrastive objective. Because this objective rewards weights that help distinguish matched from mismatched pairs, training shapes them into meaningful importance scores without any supervision beyond the ordinary clip-level caption. Since each modality's weights are computed independently of the other, SCLAP does not need the

This work was supported by the Swiss National Science Foundation project CRSII5 202228 on "Characterisation of motor speech disorders and processes".

transport plan at inference. Instead, for retrieval SCLAP can pool each modality into a single embedding using its own learned weights and compare the two pooled embeddings directly with cosine similarity. For localization, it instead compares each individual audio frame against the pooled text embedding, yielding a per-frame score that shows where in the audio the caption's content is concentrated. Experimental results show that on short-form audio (i.e., on Clotho [18] and TACOS [8] datasets), SCLAP remains competitive with pooling-and attention-based models such as TAP for global retrieval, while improving zero-shot localization. On long-form audio (i.e., on the CASTELLA dataset [19]), SCLAP obtains the strongest mean retrieval performance and localizes events more accurately than global pooling and TAP, with its localization advantage increasing as more irrelevant context surrounds the target event. Our main contributions are:

• Token-level contrastive alignment: We introduce SCLAP, a temporal optimal-transport objective that aligns audio-frame and text-token sequences using only clip-level supervision.

• Improved long-form localization: SCLAP localizes described events more accurately than mean pooling and TAP on long recordings, with its advantage increasing as more irrelevant context surrounds the event.

• Transport-free inference: We empirically show that SCLAP retains its gains using marginal-weighted pooling for retrieval and frame-text cosine scores for localization, without needing to solve optimal transport at inference.

References (24)