[논문정리] Normalized Attention Guidance: Universal Negative Guidance for Diffusion Models
서지정보
Chen, Dar-Yen, Hmrishav Bandyopadhyay, Kai Zou와/과Yi-Zhe Song. “Normalized Attention Guidance: Universal Negative Guidance for Diffusion Models”. arXiv:2505.21179. Preprint, arXiv, 2025년 6월 3일. https://doi.org/10.48550/arXiv.2505.21179.
초록(Abstract)
Negative guidance – explicitly suppressing unwanted attributes – remains a fundamental challenge in diffusion models, particularly in few-step sampling regimes. While Classifier-Free Guidance (CFG) works well in standard settings, it fails under aggressive sampling step compression due to divergent predictions between positive and negative branches. We present Normalized Attention Guidance (NAG), an efficient, training-free mechanism that applies extrapolation in attention space with L1-based normalization and refinement. NAG restores effective negative guidance where CFG collapses while maintaining fidelity. Unlike existing approaches, NAG generalizes across architectures (UNet, DiT), sampling regimes (few-step, multi-step), and modalities (image, video), functioning as a \textit{universal} plug-in with minimal computational overhead. Through extensive experimentation, we demonstrate consistent improvements in text alignment (CLIP Score), fidelity (FID, PFID), and human-perceived quality (ImageReward). Our ablation studies validate each design component, while user studies confirm significant preference for NAG-guided outputs. As a model-agnostic inference-time approach requiring no retraining, NAG provides effortless negative guidance for all modern diffusion frameworks – pseudocode in the Appendix!
한줄 요약
Normalized Attention Guidance(NAG)는 CFG가 few-step diffusion에서 negative prompt를 안정적으로 적용하지 못하는 문제를, output space가 아니라 attention feature space에서 L1 normalization과 refinement를 걸어 해결하는 training-free guidance 방법이다.
diffusion 모델의 샘플링 단계 압축 시 발생하는 기존 classifier-free guidance의 성능 저하 문제를 해결하기 위해 어텐션 공간에서 직접 extrapolation을 수행하는 normalized attention guidance(NAG)를 제안한다
NAG는 L1 norm 기반 정규화 특징 refinement 기법을 통해 어텐션 특징의 경로를 제어함으로써 모델 구조나 샘플링 단계 수에 상관없이 안정적이고 효율적인 negative guidance를 가능하게 한다.
실험 결과 NAG는 텍스트 정렬, 시각적 충실도 및 사용자 선호도 측면에서 일관된 성능 향상을 보이며 기존 모델의 재학습 없이도 즉시 적용가능한 범용적인 플러그인 솔루션임을 입증했다.
하이라이트 & 내 메모
CFG는 4step 같은 few step 샘플링에서 예민한 구조 차이로 인해 왜곡이 크게 생길 수 있지만 NAG는 어텐션 공간에서의 외삽 이후의 정규화/정제 과정을 통해 안정적이도 의도한 원치 않는 속성 억제를 구현한다
(a) CFG 방식
CFG는 두가지 조건에서 얻은 예측치를 이용해 출력에 방향성을 주는 방법
- positive prompt Van Gogh 원하는 스타일이다. 이 프롬포트를 condition으로 사용한다
- negative prompt The starry Night 제거하고 싶은 개념이다.
-> 반고흐 스타일은 유지하되 the starry night 느낌은 제거
- $x_T ~ N(0,I)$
diffusion이라 초기 gaussian noise에서 시작한다
입력은 noise, positive prompt, negative prompt이다
CFG는 같은 noise를 이용하여 두번 UNet 또는 DiT를 수행한다
입력 노이즈 맞는지랑 두번 둘중 하나인지 확인
둘 다 맞음
처음에는 positive prompt -> x0+
두번째는 negative prompt-> x0-
$- x0^{CFG} = x0^{+} + \phi \cdot (x0^{+} - x0^{-})$
positive 방향으로 negative 반대방향으로 이동시킨다
문제점: 4step이하의 few step모델에서 positive, negative 경로가 크게 다르게 되어 예측간 구조적 불일치 발생
-> 출력 품질에 아티팩트가 생길 수 있고 negative 가이드가 오히려 해로울 수 있다
x0+랑 x0-가 이미 너무 다르다. 둘은 멀리 떨어져 있기에 x+ + (x+-x-) 는 멀리가게 된다 그래서 artifacts, 깨짐, 노이즈, 색번짐이 생긴다.
| CFG | NAG | |
|---|---|---|
| 입력 | $(x_t)+Positive / (x_t)+Negative$ | $(x_t)+Positive / (x_t)+Negative$ |
| 모델 실행 | 같은 UNet/DiT를 2번 | 같은 UNet/DiT를 2번 |
| 사용하는 값 | 최종 노이즈 예측 ($\hat\epsilon^+,\hat\epsilon^-$) 또는 ($x_0^+,x_0^-$) | Cross Attention의 ($Z^+, Z^-$) |
| Guidance 적용 위치 | 출력(노이즈/이미지) 공간 | Attention feature 공간 |
| 핵심 차이 | 출력을 조합 | Attention feature를 수정 후 다음 레이어로 전달 |
(b) NAG 방식
어텐션 공간에서의 외삽 extrapolation을 사용하되 안정화를 위해 추가 단계를 도입
output이 아니라 attention 에서 처리한다
- positive propmt
Van Gogh
텍스트 인코더를 거쳐 positive text features가 생성된다. cross attention에서 사용할 K+(Key), V+(Value)를 만든다. - negative prompt
The Starry Night
텍스트 인코더를 거쳐 Negative text features가 된다 K-,V-를 만든다.
현재 이미지 feature 생성
가운데 image feature이 있다.
이건 현재 timestep의 latent feature이다
diffusion 현재 상태가 $x_t$라면 여기서 Query Q를 만든다
현재 timestep의 latent $x_t$가 DiT 또는 Unet을 통과하면서 image feature가 생성된다. cross attention 에서는 이 image feature로부터 Query Q를 생성한다.
여기까지는 일반적인 cross attention 과 동일하다
positive attention 계산
같은 Query Q를 이용하여 positive key와 value를 사용한다.
Q + K+ + V+
-> attention
-> Z+
를 계산한다
$Z^+=Attention(Q,K^+,V^+)$
여기 $Z^+$ 는 Van Gogh의 특징이 반영된 attention feature이다
negative attention 계산
같은 query를 사용
$Z^−=Attention(Q,K^−,V^−)$를 생성한다
이것은ㄴ the starry night 가 반영된 attention feature
extrapolation
두 feature가 준비되었다
이 둘의 차이를 이용한다
Z+ -Z-
를 계산한다. 이는 negative prompt에서 멀어지는 방향이다
guiance scale을 곱하고 원래 positive feature에 더한다 \(\tilde{Z} = Z^+ + \phi \cdot (Z^+ - Z^-)\)
- $Z^+$: Positive prompt의 attention feature
- $Z^-$: Negative prompt의 attention feature
- ϕ: Guidance scale
extrapolation이 정확히 무슨 단계인지
Z+에서 시작해서 $Z^+-Z^-$ 방향으로 한 번 더 이동하는 단계
이 꼬부랑의 역할
negative guidance 강도를 조절하는 하이퍼파라미터
왜 normalization을 하는지
extrapolation을 하면 $\tilde{Z}$ 가 너무 커질 수 있다 feature가 너무 멀리 이동할 수 있는 것이다. 이를 out-of-manifold라고 한다.
normalize
L1 norm을 이용한다
을 계산하고 threshold τ 를 이용해서 feature 크기를 제한한다
- $\tilde{Z}$: Extrapolation 결과
- $Z^+$: 원래 Positive Feature
- R: Extrapolation 후 feature가 원래보다 몇 배 커졌는지
결과가 $Ẑ$ 이다. 방향은 유지하면서 크기만 줄인다
$$\hat{Z}[i]
\frac{\min(R[i],\tau)}{R[i]} \,\tilde{Z}[i]$$
\[\begin{cases} R[i] \le \tau, & \text{그대로 유지} \\ R[i] > \tau, & \text{Feature를 축소 (scale down)} \end{cases}\]τ는 L1 Normalization의 하이퍼파라미터로, Extrapolation 이후 feature가 원래 positive feature보다 얼마나 커질 수 있는지를 제한하는 임계값입니다. Feature의 크기가 τ를 초과하면 scaling하여 안정적인 범위로 되돌립니다.
refinement (blending)
normalization 만 하면 feature가 원래 positve feature와 조금 달라질 수 있다
그래서 원래 Z+를 가져온다
(1−α) 가 곱해지고
normalized feature는 α를 곱한다
둘을 더해서
\(Z^{\text{NAG}} = \alpha \cdot \widehat{Z} + (1 - \alpha) \cdot Z^{+}.\) 가 만들어진다.
- $\hat{Z}$: Normalization된 Feature
- $Z^{+}$: 원래 Positive Feature
- α: Blending 비율(하이퍼파라미터)
최종 attention output
$Z^{\text{NAG}}$가 만들어진다. 이게 원래 cross attention 출력 대신 다음 DiT 또는 UNet layer로 전달된다.
둘 중 하나인지. 사용하는 diffusion 모델이 무엇이냐에 따라 다르게 사용
- 초록색 경로: Positive prompt로부터 $Z^+$를 계산합니다.
- 빨간색 경로: Negative prompt로부터 $Z^-$를 계산합니다.
- 가운데의 Q는 동일한 Image Feature에서 만들어진 Query이며, 두 경로가 공통으로 사용합니다.
- 이후 $Z^+$와 $Z^-$를 이용해 extrapolation → normalization → refinement를 수행하여 최종 $Z^{NAG}$를 만듭니다.
즉, NAG는 기존 cross-attention을 대체하는 것이 아니라, cross-attention의 출력 Z를 더 안정적인 $Z^{NAG}$로 바꾸는 plug-in 모듈이라는 것이 이 그림의 핵심이다.
$Z+$
positice prompt만 사용했을 때 attention feature
$Z-$
negative prompt를 사용했을 때 attention feature
$\tilde{Z}$
extrapolation 결과 $\tilde{Z} = Z^+ + \phi \cdot (Z^+ - Z^-)$ 이다
방향이 negative prompt에서 멀어지는 방향이다
but 여기 너무 멀리 있다. out-of-manifold 모델이 학습 중 거의 보지 못한 feature인 것이다 artifact, 색번짐, texture 붕괴가 생기니까
점선 원
이게 수치로 정해지는 건지 모델마다 특정 식으로 인지
매 inference마다 계산되는 feature의 크기와 하이퍼파라미터 τ에 의해 동적으로 결정됩니다
- guidance boundary이다. normalization 이후 허용하는 최대 feature 크기를 의미한다.
- 논문에서는 L1 normalization 으로 feature magnitude를 제한한다.
- 너무 멀리가지 마라
normalize 수행
$\widehat{Z}$
이걸로 충분하지 않다. 원래 positive feature와는 조금 다를 수 있다. 크기만 줄였지 feature distribution 자체는 조금 벗어나 있을 수 있기 때문이다.
refinement manifold
가운데 갈색 영역이다
원래 positive feature가 존재하는 안정적인 영역이다.
모델이 잘 생성할 수 있는 feature 공간이다.
\[Z^{\text{NAG}} = \alpha \cdot \widehat{Z} + (1 - \alpha) \cdot Z^{+}.\]이 공간안에 어떻게 들어가는 건지
수치로 정한게 아닌 모델의 안정적인 feature 공간이다
normalize결과와 원래 positive feature를 섞는다. 그러면 최종 점 $Z^{NAG}$가 된다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Positive feature(Z+)
↓
Negative에서 멀어지도록
Extrapolation
↓
Ze
(너무 멀리 감)
↓
Normalize
↓
Ẑ
(크기 제한)
↓
Positive Feature와 Blending
↓
ZNAG
(안정적인 Feature)
NAG의 feature 이동 과정을 기하학적으로 나타낸 그림입니다. 먼저 positive feature $Z^+$에서 negative feature $Z^-$의 반대 방향으로 extrapolation하여 $\tilde{Z}$를 생성합니다. 하지만 학습된 feature 분포를 벗어날 수 있으므로, L1 normalization을 통해 Guidance Boundary 안으로 되돌려 $Ẑ$를 얻습니다. 마지막으로 Z^\hat ZZ^를 원래 positive feature $Ẑ$ 와 blending하여 $Z^{NAG}$를 생성함으로써, negative guidance는 유지하면서도 안정적인 feature 공간(Refinement Manifold) 안에 머물도록 합니다.
NASA Negative-Away Steer Attention
\[Z = \text{Softmax}\left(\frac{QK^\top}{\sqrt{d_k}}\right)V.\]크로스 어텐션 출력값을 직접 수정함으로써 어텐션 공간에서의 유도(attention-space guidance)를 도입합니다. 이미지 쿼리 Q와 텍스트 키-값 쌍 (K, V)에 대해, 어텐션은 일반적으로 다음과 같이 계산됩니다.
\[Z^{\text{NASA}} = Z^{+} - \phi \cdot Z^{-}.\]생성 과정을 제어하기 위해, NASA는 긍정 및 부정 프롬프트로부터 얻은 $K^+, V^+$와 $K^-, V^-$를 사용하여 $Z^+$와 $Z^-$를 각각 독립적으로 구한 다음, 스케일이 조정된 $Z^-$를 빼서 어텐션을 유도합니다
이는 추정된 노이즈를 조작하지 않고도 방향성을 제어할 수 있게 합니다.
기존 CFG처럼 output space가 아닌 attention space에서 negative guidance 수행
한계
- Negative feature를 단순히 빼기(subtraction) 때문에
- Feature가 학습된 분포(feature manifold)를 벗어날 수 있음
- 특히 DiT 기반 모델에서 불안정하며 artifact가 발생
↓
NAG는 이를 해결하기 위해
- Extrapolation
- L1 Normalization
- Refinement
를 추가하여 안정성을 높임.
results
Guidance Scale은 클수록 좋은 것이 아니라, 적절한 값에서 Negative Prompt 효과와 이미지 품질 사이의 균형(best trade-off)을 이룬다 는 것이 핵심 메시지입니다.
1step vs 4steps
4step 모델이 더 큰 guidance를 잘 견딘다. 안전성이 높아진다.
왜 4step이 좋다고 표현하는지
논문이 강조하는 것은 절대적인 성능 비교가 아니라 추세(trend) 입니다.
주장
핵심 주장 / 방법론
핵심 주장은 negative guidance의 실패 원인이 negative prompt 자체가 아니라, few-step sampling에서 positive branch와 negative branch의 denoised output이 너무 크게 벌어져 CFG extrapolation이 out-of-manifold로 나가기 때문이라는 점이다.
NAG는 이 extrapolation 위치를 바꾼다.
- Attention feature extrapolation: positive attention feature
Z+와 negative attention featureZ-의 차이를 이용해 attention space에서 negative direction을 밀어낸다. - L1-based normalization: extrapolated feature가 원래 feature manifold에서 너무 멀어지지 않도록 feature magnitude를 제한한다.
- Refinement / alpha blending: guidance 결과를 원래 positive feature와 섞어 안정성을 유지한다.
이 방식은 UNet, DiT/MM-DiT, image model, video model에 모두 attention block 수준에서 붙일 수 있다. 논문과 프로젝트 페이지는 Wan2.1 T2V/I2V, LTX Video, Flux, SD3.5, SDXL, SANA 등에서 NAG를 plug-in처럼 적용하는 것을 보여준다.
저자가 정말로 증명한 게 뭐고 그냥 주장만 한 게 뭔가?
증명한 것에 가까운 부분:
- CFG가 few-step sampling에서 negative guidance로 쓰일 때 artifacts와 collapse를 만들 수 있음을 문제화한다.
- NAG가 attention space extrapolation + L1 normalization + alpha blending을 통해 negative guidance를 더 안정화한다는 ablation을 제시한다.
- NeurIPS proceedings abstract 기준으로 CLIP Score, FID/PFID, ImageReward, user study에서 개선을 보인다.
- 프로젝트 페이지 기준으로 Wan2.1 video, LTX Video, Flux, SD3.5, SDXL, SANA 등 다양한 architecture/modality에 적용 가능함을 시연한다.
주장에 가까운 부분:
- “universal”이라는 표현은 강하다. 다양한 모델에 붙을 수는 있지만, 모든 diffusion architecture와 모든 negative prompt type에서 안정적이라는 뜻은 아니다.
- negative guidance 성능 개선이 personalization에서 identity preservation까지 자동으로 개선한다는 것은 직접 증명된 것이 아니다.
- video demo가 있어도 long video temporal consistency나 identity drift까지 충분히 평가한 것은 아니다.
이 결과가 놀랍나, 아니면 예상대로인가?
방향은 예상 가능하다. Few-step 모델에서는 positive/negative denoised outputs가 coarse하고 서로 구조적으로 맞지 않기 때문에 output-space CFG가 불안정해질 수 있다. Attention feature는 output보다 더 중간 표현에 가까워서, 여기서 guidance를 걸면 안정성이 높아지는 것이 자연스럽다.
흥미로운 점은 단순히 attention에서 negative direction을 빼는 것만으로는 부족하고, L1 normalization과 refinement가 핵심이라는 점이다. 즉 guidance의 방향뿐 아니라 feature magnitude를 얼마나 제한하느냐가 품질을 좌우한다.
저자의 결론이 실험 결과보다 과하게 일반화되진 않았나?
조금 과하게 읽힐 수 있다. NAG는 “negative guidance를 안정화하는 universal plug-in”으로는 강하지만, 이는 negative prompting/control 문제에 대한 방법이지, identity preservation이나 video personalization 전체 문제를 해결하는 방법은 아니다.
또한 video modality에 적용 가능하다는 것과 long video에서 temporal identity consistency가 유지된다는 것은 다른 문제다. 개인화 비디오에서는 NAG에 더해 reference binding, temporal memory, identity reward가 필요할 수 있다.
방법론
이 방법이 왜 작동하는가, 그냥 “잘 됐다”가 아니라 원리적으로?
원리적으로는 guidance를 output prediction이 아니라 attention representation에 적용하기 때문에 작동한다.
- CFG: positive output과 negative output을 직접 extrapolate한다. Few-step에서는 두 output 구조가 크게 달라서 subtraction 자체가 artifact를 만든다.
- NAG: attention feature
Z+,Z-사이에서 negative semantic direction을 계산한다. output보다 내부 표현이 더 안정적이라 guidance가 덜 폭주한다. - L1 normalization: extrapolated feature의 norm이 원래 feature보다 과도하게 커지는 것을 막아 out-of-manifold drift를 줄인다.
- Alpha blending/refinement: guided feature를 positive feature와 섞어 negative suppression과 fidelity 사이 균형을 잡는다.
즉 NAG는 negative prompt를 “출력 이미지에서 빼는 것”이 아니라 “attention이 원하지 않는 semantic feature를 덜 보게 만드는 것”에 가깝다.
숨겨진 가정이 뭔가?
- 모델의 attention feature가 negative attribute를 분리 가능한 방향으로 표현한다.
- positive/negative attention feature의 차이가 실제로 제거하고 싶은 semantic direction을 나타낸다.
- L1 norm 기반 normalization이 다양한 architecture에서 적절한 feature scale constraint로 작동한다.
- negative prompt가 target identity나 prompt 핵심 내용과 과하게 충돌하지 않는다.
- video model에서 frame별 attention guidance가 temporal inconsistency를 크게 만들지 않는다.
- attention block에 접근 가능한 inference stack을 사용한다.
실험 설정
- baseline이 공정한가?
OpenReview 기준 accept 정보는 NeurIPS 2025 poster다. NeurIPS proceedings에는 Advances in Neural Information Processing Systems 38 (NeurIPS 2025) Main Conference Track로 등록되어 있다.
실험 범위는 image와 video 모두를 포함한다. 프로젝트 페이지는 Flux-Schnell/Dev, SD3.5, SDXL, SANA, Wan2.1 T2V/I2V, LTX Video에서 NAG demo와 latency 비교를 제공한다. 논문 abstract 기준 주요 지표는 CLIP Score, FID, PFID, ImageReward, user study다.
baseline은 주로 CFG 및 기존 guidance 계열과 비교되는 것으로 볼 수 있다. 공정성은 task에 따라 다르다. NAG는 model weight를 바꾸지 않는 inference-time method라 training-based control method와 직접 비교하기보다는, 같은 base model/sampler에서 CFG를 대체하거나 보완하는 방식으로 비교하는 것이 가장 공정하다.
한계
직접 명시한 limitation
초록과 프로젝트 페이지 기준으로 명시적 limitation은 강하게 드러나지 않는다. 다만 방법의 범위는 negative guidance이며, identity preservation이나 subject-driven personalization 자체를 직접 해결하는 것은 아니다.
저자가 명시하지 않은, 추정되는 한계
- negative prompt가 identity cue와 충돌하면, 원치 않는 속성과 함께 subject identity까지 약해질 수 있다.
- video에서는 frame별 attention perturbation이 미세한 flickering을 만들 수 있다.
- attention layer에 접근할 수 없는 closed model/API 환경에서는 적용하기 어렵다.
- “universal” plug-in이지만 모델별 attention 구조와 scaling에 따라 hyperparameter tuning이 필요할 수 있다.
- few-step guidance 안정화는 강점이지만, motion consistency나 long-horizon drift를 직접 해결하지 않는다.
이 방법이 실패하는 경우를 상상할 수 있나?
Personalization에서 no glasses, no beard, not old 같은 negative prompt가 reference identity의 실제 특징과 겹치면, NAG가 identity feature까지 밀어낼 수 있다. 이 경우 subject는 깨끗해지지만 원래 사람과 덜 닮게 될 수 있다.
Video generation에서는 특정 frame에서만 negative feature가 강하게 잡히면, NAG가 frame마다 다른 정도로 attention을 수정해 temporal flickering을 만들 수 있다.
마무리
한 문장 설명
NAG는 negative prompt를 output space가 아니라 attention feature space에서 안정적으로 적용해 few-step diffusion에서도 unwanted attributes를 제거하는 training-free guidance 방법이다.
이 논문이 틀렸다면 어디가 가장 먼저 무너질까?
가장 먼저 무너질 지점은 attention feature 차이가 negative semantic direction을 안정적으로 표현한다는 가정이다. 만약 Z+ - Z-가 제거할 속성뿐 아니라 identity, composition, motion cue까지 같이 담고 있다면 NAG는 unwanted attribute만 제거하지 못한다.
두 번째는 L1 normalization이 universal stabilizer라는 가정이다. 모델별 feature scale이나 attention 구조가 다르면 같은 normalization이 어떤 모델에서는 약하고, 어떤 모델에서는 과하게 작동할 수 있다.



