Let's Think 一步一步: A Cognitive Framework for Characterizing Code-Switching in LLM Reasoning
Abstract
State-of-the-art large language models (LLMs) code-switch (i.e., mix languages), but how and why is still poorly understood--especially cognitive differences from humans. We address this gap by introducing a cognitive framework for characterizing code-switching in LLM reasoning. We start from reasoning examples sourced from diverse models, languages, domains, and tasks. Fusing top-down theory-driven and bottom-up data-driven approaches, we then develop a taxonomy of code-switched reasoning behaviors. Our taxonomy reveals that LLM and human code-switching behaviors in LLMs partially align. Additionally, more naturalistic, human-like code-switching may boost model performance, particularly for languages from the long tail of training data distributions. Our work serves as a first, necessary step toward uncovering parallels between LLM and human code-switching. With further testing, LLMs could potentially serve as proxies for human multilingual cognition. Additionally, our approach can develop future reasoning taxonomies informed by cognitive science and education.