Over more than a decade there has been an extensive research effort on how to effectively utilize recurrent models and attention. While recurrent models aim to compress the data into a fixed-size memory (called hidden state), attention allows attending to the entire context window, capturing the direct dependencies of all tokens. This more accurate modeling of dependencies, however, comes with a quadratic cost, limiting the model to a fixed-length context. We present a new neural long-term memory module that learns to memorize historical context and helps attention to attend to the current context while utilizing long past information. We show that this neural memory has the advantage of fast parallelizable training while maintaining a fast inference. From a memory perspective, we argue that attention due to its limited context but accurate dependency modeling performs as a short-term memory, while neural memory due to its ability to memorize the data, acts as a long-term, more persistent, memory. Based on these two modules, we introduce a new family of architectures, called Titans, and present three variants to address how one can effectively incorporate memory into this architecture. Our experimental results on language modeling, common-sense reasoning, genomics, and time series tasks show that Titans are more effective than Transformers and recent modern linear recurrent models. They further can effectively scale to larger than 2M context window size with higher accuracy in needle-in-haystack tasks compared to baselines.
본 논문은 과거 맥락을 기억하는 법을 배우고 주의 메커니즘이 장기 과거 정보를 활용하면서 동시에 현재 맥락에 집중하도록 돕는 새로운 신경 장기 기억 모듈을 제안한다. 저자들은 기억 관점에서 주의 메커니즘이 제한된 맥락이지만 정확한 의존성 모델링으로 인해 단기 기억으로 작동하며, 신경 기억이 데이터 기억 능력으로 인해 장기적이고 더 지속적인 기억으로 작동한다고 주장한다. 이 두 모듈을 기반으로 저자들은 새로운 아키텍처 계열인 Titans을 도입하고 기억을 아키텍처에 효율적으로 통합하기 위한 세 가지 변형을 제안한다. 실험 결과는 Titans이 언어 모델링, 상식 추론, 유전체학 및 시계열 작업에서 Transformers 및 현대 선형 순환 모델보다 더 효과적이며, 2M을 초과하는 맥락 윈도우 크기로 효과적으로 확장할 수 있음을 보여준다.