Lune

AAAI2026Top-tier venue

Melodia: Training-Free Music Editing Guided by Attention Probing in Diffusion Models

Yi Yang, Haowen Li, Tianxiang Li, Boyu Cao, Xiaohan Zhang, Liqun Chen, Qi Liu

Abstract

Text-to-music generation technology is progressing rapidly, creating new opportunities for musical composition and editing. However, existing music editing methods often fail to preserve the source music's temporal structure, including melody and rhythm, when altering particular attributes like instrument, genre, and mood. To address this challenge, this paper conducts an in-depth probing analysis on attention maps within AudioLDM 2, a diffusion-based model commonly used as the backbone for existing music editing methods. We reveal a key finding: cross-attention maps encompass details regarding distinct musical characteristics, and interventions on these maps frequently result in ineffective modifications. In contrast, self-attention maps are essential for preserving the temporal structure of the source music during its conversion into the target music. Building upon this understanding, we present Melodia, a training-free technique that selectively manipulates self-attention maps in particular layers during the denoising process and leverages an attention repository to store source music information, achieving accurate modification of musical characteristics while preserving the original structure without requiring textual descriptions of the source music. Additionally, we propose two novel metrics to better evaluate music editing methods. Both objective and subjective experiments demonstrate that our approach achieves superior results in terms of textual adherence and structural integrity across various datasets. This research enhances comprehension of internal mechanisms within music generation models and provides improved control for music creation.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • High-Resolution Image Synthesis with Latent Diffusion Models cites Denoising Diffusion Implicit Models
  • Simple and Controllable Music Generation cites High-Resolution Image Synthesis with Latent Diffusion Models
  • AnchorSteer: Self-Discovered Concept Injection for Structure-Preserving Music Editing cites High-Resolution Image Synthesis with Latent Diffusion Models
  • AnchorSteer: Self-Discovered Concept Injection for Structure-Preserving Music Editing cites Simple and Controllable Music Generation
  • AnchorSteer: Self-Discovered Concept Injection for Structure-Preserving Music Editing cites SDEdit: Guided Image Synthesis and Editing with Stochastic Differential Equations
  • SDEdit: Guided Image Synthesis and Editing with Stochastic Differential Equations cites Denoising Diffusion Implicit Models
  • AudioLDM: Text-to-Audio Generation with Latent Diffusion Models cites High-Resolution Image Synthesis with Latent Diffusion Models
  • AudioLDM: Text-to-Audio Generation with Latent Diffusion Models cites Denoising Diffusion Implicit Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. AnchorSteer: Self-Discovered Concept Injection for Structure-Preserving Music EditingChih-Heng Chang, Keng-Seng Ho, Chih-Yu Tsai, Kuan-Lin Chen et al.KDD 2026

Builds on13

  1. High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
  2. Denoising Diffusion Implicit ModelsJiaming Song, Chenlin Meng, Stefano ErmonICLR 2021 · 11,743 citations
  3. SDEdit: Guided Image Synthesis and Editing with Stochastic Differential EquationsChenlin Meng, Yutong He, Yang Song, Jiaming Song et al.ICLR 2022 · 2,128 citations
  4. Simple and Controllable Music GenerationJade Copet, Felix Kreuk, Itai Gat, Tal Remez et al.NeurIPS 2023 · 843 citations
  5. AudioLDM: Text-to-Audio Generation with Latent Diffusion ModelsHaohe Liu, Zehua Chen, Yi Yuan, Xinhao Mei et al.ICML 2023 · 773 citations

Related papers

  1. MelodyEdit: Zero-shot Music Editing with Disentangled Inversion ControlHuadai Liu, Jialei Wang, Xiangtai Li, Wen Wang et al.ACM MM 2025
  2. Towards Understanding Cross and Self-Attention in Stable Diffusion for Text-Guided Image EditingBingyan Liu, Chengyu Wang, Tingfeng Cao, Kui Jia et al.CVPR 2024
  3. DITTO: Diffusion Inference-Time T-Optimization for Music GenerationZachary Novack, Julian J. McAuley, Taylor Berg-Kirkpatrick, Nicholas J. BryanICML 2024 · 81 citations
  4. MIDILM: A Dual-Path Model for Controllable Text-to-MIDI GenerationShuyu Li, Dooho Choi, Yunsick SungAAAI 2026
  5. Prompt-guided Precise Audio Editing with Diffusion ModelsManjie Xu, Chenxing Li, Duzhen Zhang, Dan Su et al.ICML 2024 · 15 citations
Dusk over the sea between two cliffs drawn in fine vertical lines