diffusion-models transformer image-net latent-representation compression image-reconstruction image-quality image-tokenization
Abstract
Recent advancements in generative models have highlighted the crucial role of image tokenization in the efficient synthesis of high-resolution images. Tokenization, which transforms images into latent representations, reduces computational demands compared to directly processing pixels and enhances the effectiveness and efficiency of the generation process. Prior methods, such as VQGAN, typically utilize 2D latent grids with fixed downsampling factors. However, these 2D tokenizations face challenges in managing the inherent redundancies present in images, where adjacent regions frequently display similarities. To overcome this issue, we introduce Transformer-based 1-Dimensional Tokenizer (TiTok), an innovative approach that tokenizes images into 1D latent sequences. TiTok provides a more compact latent representation, yielding substantially more efficient and effective representations than conventional techniques. For example, a 256 x 256 x 3 image can be reduced to just 32 discrete tokens, a significant reduction from the 256 or 1024 tokens obtained by prior methods. Despite its compact nature, TiTok achieves competitive performance to state-of-the-art approaches. Specifically, using the same generator framework, TiTok attains 1.97 gFID, outperforming MaskGIT baseline significantly by 4.21 at ImageNet 256 x 256 benchmark. The advantages of TiTok become even more significant when it comes to higher resolution. At ImageNet 512 x 512 benchmark, TiTok not only outperforms state-of-the-art diffusion model DiT-XL/2 (gFID 2.74 vs. 3.04), but also reduces the image tokens by 64x, leading to 410x faster generation process. Our best-performing variant can significantly surpasses DiT-XL/2 (gFID 2.13 vs. 3.04) while still generating high-quality samples 74x faster.
한국어 요약
한 줄 요약
TiTok은 1D 이미지 토큰화를 통해 고해상도 이미지 생성을 32개 토큰으로 가능하게 하며, 기존 2D 방법 대비 410배 빠른 생성 속도를 달성한다.
핵심 기여도
- TiTok은 256×256 이미지를 32개 토큰으로 압축하여 기존 256~1024 토큰 대비 64배 더 효율적인 표현을 제공.
- ImageNet 256×256 벤치마크에서 gFID 1.97를 달성하며, MaskGIT 대비 4.21 개선.
- 512×512 이미지 생성 시 DiT-XL/2 대비 gFID 2.74 vs. 3.04로 성능 개선과 410배 빠른 생성 속도를 기록.
- 1D 토큰화는 고정 그리드 구조를 제거하여 더 유연한 토큰 디자인과 의미 있는 정보 학습을 가능하게 함.
핵심 아이디어
기존 2D 이미지 토큰화 방식(VQGAN 등)은 고정된 그리드 구조로 인해 이미지의 중복성을 효과적으로 처리하지 못한다. TiTok은 1D 토큰화를 도입하여 이미지를 1D 시퀀스로 변환함으로써 더 효율적이고 유연한 표현을 가능하게 한다. 이는 특히 고해상도 이미지 생성 시, 토큰 수를 줄이면서도 생성 품질을 유지하는 데 기여한다. TiTok은 Vision Transformer (ViT) 인코더와 디코더, 벡터 퀀티자(VQ)를 포함하며, 토큰화 단계에서 이미지를 패치로 분할하고 1D 토큰 시퀀스와 결합하여 처리한다. 이는 고정된 그리드를 벗어나, 의미 있는 정보를 더 잘 학습할 수 있도록 한다.
기술적 접근법
- **모델 구조**: TiTok은 ViT 인코더, ViT 디코더, VQ 모듈로 구성된다.
- **토큰화 과정**: 이미지는 패치로 분할되어 1D 토큰 시퀀스와 결합된다.
- **학습 전략**: 2단계 학습(프록시 코드 기반)을 통해 토큰화 성능을 개선.
- **하이퍼파라미터**: TiTok-L-32는 32개 토큰으로 256×256 이미지를 표현하며, 200 에포크 학습 후 2.21 rFID를 달성.
- **마스킹 스케줄**: TiTok은 다양한 마스킹 스케줄(arccos, linear)에 강건하며, 2D VQGAN 대비 더 의미 있는 토큰을 학습.
주요 결과
- **ImageNet 256×256**: TiTok은 gFID 1.97를 달성하며, MaskGIT 대비 4.21 개선.
- **ImageNet 512×512**: gFID 2.74 (DiT-XL/2 대비 3.04)로 64배 더 적은 토큰으로 410배 빠른 생성.
- **TiTok 최적 모델**: DiT-XL/2 대비 gFID 2.13 vs. 3.04로 74배 빠른 생성 속도를 기록.
- **토큰 수 실험**: 32개 토큰으로도 합리적인 이미지 재구성이 가능하며, 128개 이상에서는 개선 효과가 미미함.
의의 및 한계
TiTok은 1D 토큰화를 통해 기존 2D 토큰화 방식의 제약을 극복하고, 고해상도 이미지 생성의 효율성을 크게 향상시킨다. 특히, 32개 토큰으로 256×256 이미지를 표현하는 것은 기존 256~1024 토큰 대비 64배 더 효율적인 표현을 의미하며, 생성 속도 측면에서도 410배 빠른 성능을 보인다. 이는 이미지 생성 모델의 대규모화 및 실시간 적용 가능성에 기여할 수 있다. 그러나, TiTok은 대규모 데이터셋에서의 학습 효과를 아직 완전히 검증하지 못했으며, 공개된 강력한 학습 레시피가 부재한 점은 한계로 작용할 수 있다.
실용적 활용
TiTok은 고해상도 이미지 생성이 필요한 디지털 콘텐츠 제작, 실시간 이미지 생성 시스템, 대규모 이미지 생성 모델의 효율화 등에 적용 가능하다. 특히, 1D 토큰화를 통해 생성 속도를 410배 이상 향상시킬 수 있어, 실시간 이미지 생성이나 모바일 환경에서도 유용하게 활용될 수 있다.