Abstract
Generating long-form audio using Latent Diffusion Models (LDMs) is computationally expensive due to the quadratic complexity of self-attention mechanisms. We present LiteFocus, a training-free optimization that accelerates inference by sparsifying attention based on frequency-domain redundancies. LiteFocus employs a dual sparse mechanism: Same-frequency Focusing to capture harmonic structures and Cross-frequency Compensation for global context. Our method achieves a 1.99× speedup for 80-second audio clips while simultaneously improving acoustic fidelity, offering a plug-and-play solution for efficient long-audio synthesis.
Introduction
Recent advancements in Latent Diffusion Models (LDMs), such as AudioLDM2, have enabled high-quality text-to-audio synthesis. However, these models typically operate on short contexts (e.g., 10 seconds). Extending generation to longer sequences introduces two primary challenges: quadratic computational slowdown and quality degradation. As audio length increases, the number of tokens $N$ grows, causing the $O(N^2)$ complexity of self-attention to dominate inference time. Furthermore, models trained on short contexts often fail to maintain coherence over long durations, leading to a drop in acoustic fidelity.
Methodology: The LiteFocus Mechanism
LiteFocus is built on the observation that tokens in a mel-spectrogram primarily interact with others within the same frequency band. To exploit this redundancy, LiteFocus factorizes the standard dense attention into two sparse components:
- Same-frequency Focusing ($S_i$): For a query token, attention is restricted to tokens sharing the same frequency coordinate. This preserves the core rhythmic and harmonic consistency of the audio.
- Cross-frequency Compensation ($C$): To maintain global context and inter-frequency interactions, a small percentage (typically 10%) of all other tokens are randomly sampled and included in the attention calculation.
The resulting focus set $F_i = S_i \cup C$ significantly reduces the number of key-value pairs processed. This mechanism is applied as a "plug-and-play" module to specific Transformer blocks within the U-Net during inference, requiring no retraining or fine-tuning.
Experimental Results
We evaluated LiteFocus using the AudioLDM2 architecture on the AudioCaps dataset, generating 4,845 audio clips to benchmark performance.
Efficiency Gains
The efficiency of LiteFocus scales with audio length. For 80-second clips, LiteFocus achieved a 1.99× speedup compared to standard inference, significantly faster than general-purpose methods like Token Merging (1.56×). While the speedup is negligible for short 10-second clips, it becomes critical for long-form generation where self-attention accounts for nearly 90% of the time cost.
Quality Improvements
Counter-intuitively, sparsifying attention improved quality for long sequences. For 80-second audio, the Fréchet Audio Distance (FAD) improved from 7.74 to 6.56, and the CLAP score increased from 10.8 to 12.2. This suggests that for models trained on short contexts, dense attention on long sequences may introduce distracting "noise," which LiteFocus effectively filters out by focusing on relevant frequency features.
Discussion and Limitations
While LiteFocus excels at long-form synthesis, it presents a trade-off for short-form audio. For 10-second clips, FAD increased from 2.89 to 4.17, indicating that dense attention remains superior for short contexts where the computational overhead of the sparse mechanism is not justified. Additionally, the optimal sampling ratio $r$ for cross-frequency compensation may vary depending on the complexity of the audio content.
Conclusion
LiteFocus provides a robust, training-free solution for accelerating long-audio synthesis. By leveraging frequency-domain sparsity, it overcomes the quadratic bottleneck of self-attention while enhancing the coherence of generated audio. Future work may explore integrating LiteFocus directly into the training phase to further optimize native long-form generation capabilities.
Summary updated