Exploring Compositional Generalization (in COGS/ReCOGS_pos) by Transformers using Restricted Access Sequence Processing (RASP)
Bruns
Humans understand new combinations of words encountered if they are combinations of words recognized from different contexts, an ability called Compositional Generalization. The COGS benchmark (Kim and Linzen, 2020) arXiv:2010.05465 reports 0% accuracy for Transformer models on some structural generalizations. We use (Weiss et al., 2021) arXiv:2106.06981's Restricted Access Sequence Processing (RASP), a Transformer-equivalent programming language, to demonstrate that a Transformer Encoder-Decoder can perform COGS and the semantically equivalent ReCOGS_pos (Wu et al., 2024) arXiv:2303.13716 systematically and compositionally: Our RASP models attain near perfect scores on structural generalization splits on COGS (exact match) and ReCOGS_pos (semantic exact match). Our RASP models show the (Re)COGS tasks do not require a hierarchical or tree-structured solution (contrary to (Kim and Linzen, 2020) arXiv:2010.05465, (Yao and Koller, 2022) arXiv:2210.13050, (Murty et al., 2022) arXiv:2211.01288, (Liu et al., 2021) arXiv:2107.06516): we use word-level tokens with an "embedding" layer that tags with possible part of speech, applying just once per encoder pass 19 attention-head compatible flat pattern-matching rules (easily identified with specific training examples), shown using grammar coverage (Zeller et al., 2023) to cover the non-recursive aspects of the input grammar, plus masking out prepositional phrases ("pp noun") and/or sentential complements (cp) when recognizing grammar patterns and extracting nouns related to the main verb in the sentence, and output the next logical form (LF) token (repeating until the LF is complete). The models do not apply recursive, tree-structured rules like "np_det pp np -> np_pp -> np", but score near perfect semantic and string exact match on both COGS and ReCOGS pp recursion, cp recursion using the decoder loop.
academic
RASP를 사용한 Transformer의 조합 일반화 탐색 (COGS/ReCOGS_pos)
인간은 다양한 문맥에서 식별된 어휘로 구성된 새로운 조합을 이해할 수 있으며, 이러한 능력을 조합 일반화(Compositional Generalization)라고 합니다. COGS 벤치마크는 Transformer 모델이 특정 구조 일반화에서 0%의 정확도를 보인다고 보고합니다. 본 논문은 RASP(제한된 접근 시퀀스 처리) 언어를 사용하여 Transformer 인코더-디코더가 COGS 및 의미론적으로 동등한 ReCOGS_pos 작업을 체계적이고 조합적으로 수행할 수 있음을 증명합니다: RASP 모델은 구조 일반화 분할에서 거의 완벽한 점수를 달성합니다. 연구는 (Re)COGS 작업이 계층적 또는 트리 구조 솔루션을 필요로 하지 않으며, 대신 19개의 주의 헤드 호환 평면 패턴 매칭 규칙을 사용하여 전치사구와 절을 마스킹함으로써 문법 패턴을 식별함을 보여줍니다.
Kim, N., & Linzen, T. (2020). COGS: A compositional generalization challenge based on semantic interpretation. EMNLP 2020.
Wu, Z., Manning, C. D., & Potts, C. (2024). ReCOGS: How incidental details of a logical form overshadow an evaluation of semantic interpretation. TACL.
Weiss, G., Goldberg, Y., & Yahav, E. (2021). Thinking like transformers. NeurIPS 2021.
Zhou, H., et al. (2023). What algorithms can transformers learn? A study in length generalization. arXiv preprint.
Zeller, A., et al. (2023). Grammar coverage. In The Fuzzing Book.
본 논문은 엄밀한 이론 분석과 실증 검증을 통해 조합 일반화 작업에서 Transformer의 능력과 한계를 이해하기 위한 중요한 통찰력을 제공합니다. 일부 실용성 제한이 있지만, 이론적 기여와 방법론적 혁신은 관련 연구 발전에 중요한 가치를 가집니다.