디퓨전 트랜스포머의 공간적 관계 생성을 위한 회로 메커니즘
Circuit Mechanisms for Spatial Relation Generation in Diffusion Transformers
디퓨전 트랜스포머(DiT)는 텍스트-이미지 생성 기술을 크게 발전시켰으나, 모델들은 여전히 텍스트 프롬프트에 명시된 객체 간의 올바른 공간적 관계를 생성하는 데 어려움을 겪고 있다. 본 연구에서는 DiT가 객체 간의 올바른 공간적 관계를 어떻게 생성하는지 조사하기 위해 기계적 해석 가능성 접근 방식을 채택한다. 우리는 텍스트 프롬프트에 명시된 속성과 공간적 관계를 가진 두 객체가 포함된 이미지를 생성하도록 학습하기 위해, 서로 다른 텍스트 인코더를 가진 다양한 크기의 DiT를 처음부터 학습시킨다. 연구 결과, 모든 모델이 이 작업을 거의 완벽한 정확도로 학습할 수 있음에도 불구하고, 기저 메커니즘은 텍스트 인코더의 선택에 따라 극적으로 다르다는 것을 발견했다. 무작위 텍스트 임베딩을 사용할 때, 공간 관계 정보는 텍스트 프롬프트에서 공간 관계와 단일 객체 속성을 각각 따로 읽어들이는 두 개의 교차 어텐션 헤드를 포함하는 2단계 회로를 통해 이미지 토큰으로 전달된다. 반면 사전 학습된 텍스트 인코더(T5)를 사용할 때, DiT는 텍스트 토큰 내의 정보 융합을 활용하여 단일 텍스트 토큰에서 공간 관계와 단일 객체 정보를 함께 읽어들이는 다른 회로를 사용한다. 나아가 두 설정의 도메인 내부 성능은 유사하지만 도메인 외부 섭동에 대한 견고성은 다르다는 것을 보여주며, 이는 실제 시나리오에서 올바른 관계를 생성하는 것의 잠재적 어려움을 시사한다.
Diffusion Transformers (DiTs) have greatly advanced text-to-image generation, but models still struggle to generate the correct spatial relations between objects as specified in the text prompt. In this study, we adopt a mechanistic interpretability approach to investigate how a DiT can generate correct spatial relations between objects. We train, from scratch, DiTs of different sizes with different text encoders to learn to generate images containing two objects whose attributes and spatial relations are specified in the text prompt. We find that, although all the models can learn this task to near-perfect accuracy, the underlying mechanisms differ drastically depending on the choice of text encoder. When using random text embeddings, we find that the spatial-relation information is passed to image tokens through a two-stage circuit, involving two cross-attention heads that separately read the spatial relation and single-object attributes in the text prompt. When using a pretrained text encoder (T5), we find that the DiT uses a different circuit that leverages information fusion in the text tokens, reading spatial-relation and single-object information together from a single text token. We further show that, although the in-domain performance is similar for the two settings, their robustness to out-of-domain perturbations differs, potentially suggesting the difficulty of generating correct relations in real-world scenarios.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.