Untwisting RoPE: Frequency Control for Shared Attention in DiTs

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Mikaeili, Aryan, Patashnik, Or, Tagliasacchi, Andrea, Cohen-Or, Daniel, Mahdavi-Amiri, Ali
Formato: Preprint
Publicado: 2026
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866908814039580672
author Mikaeili, Aryan
Patashnik, Or
Tagliasacchi, Andrea
Cohen-Or, Daniel
Mahdavi-Amiri, Ali
author_facet Mikaeili, Aryan
Patashnik, Or
Tagliasacchi, Andrea
Cohen-Or, Daniel
Mahdavi-Amiri, Ali
contents Positional encodings are essential to transformer-based generative models, yet their behavior in multimodal and attention-sharing settings is not fully understood. In this work, we present a principled analysis of Rotary Positional Embeddings (RoPE), showing that RoPE naturally decomposes into frequency components with distinct positional sensitivities. We demonstrate that this frequency structure explains why shared-attention mechanisms, where a target image is generated while attending to tokens from a reference image, can lead to reference copying, in which the model reproduces content from the reference instead of extracting only its stylistic cues. Our analysis reveals that the high-frequency components of RoPE dominate the attention computation, forcing queries to attend mainly to spatially aligned reference tokens and thereby inducing this unintended copying behavior. Building on these insights, we introduce a method for selectively modulating RoPE frequency bands so that attention reflects semantic similarity rather than strict positional alignment. Applied to modern transformer-based diffusion architectures, where all tokens share attention, this modulation restores stable and meaningful shared attention. As a result, it enables effective control over the degree of style transfer versus content copying, yielding a proper style-aligned generation process in which stylistic attributes are transferred without duplicating reference content.
format Preprint
id arxiv_https___arxiv_org_abs_2602_05013
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Untwisting RoPE: Frequency Control for Shared Attention in DiTs
Mikaeili, Aryan
Patashnik, Or
Tagliasacchi, Andrea
Cohen-Or, Daniel
Mahdavi-Amiri, Ali
Graphics
Computer Vision and Pattern Recognition
Positional encodings are essential to transformer-based generative models, yet their behavior in multimodal and attention-sharing settings is not fully understood. In this work, we present a principled analysis of Rotary Positional Embeddings (RoPE), showing that RoPE naturally decomposes into frequency components with distinct positional sensitivities. We demonstrate that this frequency structure explains why shared-attention mechanisms, where a target image is generated while attending to tokens from a reference image, can lead to reference copying, in which the model reproduces content from the reference instead of extracting only its stylistic cues. Our analysis reveals that the high-frequency components of RoPE dominate the attention computation, forcing queries to attend mainly to spatially aligned reference tokens and thereby inducing this unintended copying behavior. Building on these insights, we introduce a method for selectively modulating RoPE frequency bands so that attention reflects semantic similarity rather than strict positional alignment. Applied to modern transformer-based diffusion architectures, where all tokens share attention, this modulation restores stable and meaningful shared attention. As a result, it enables effective control over the degree of style transfer versus content copying, yielding a proper style-aligned generation process in which stylistic attributes are transferred without duplicating reference content.
title Untwisting RoPE: Frequency Control for Shared Attention in DiTs
topic Graphics
Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2602.05013