How language models extrapolate outside the training data: A Case study in Textualized Gridworld

Doyoung Kim, Jongwon Lee, Jinho Park, Minjoon Seo · Submission to ICLR 2025 · Rejected

Abstract

Language models' ability to extrapolate learned behaviors to novel, more complex environments beyond their training scope is highly unknown. This study introduces a path planning task in a textualized Gridworld to probe language models' extrapolation capabilities. We show that conventional approaches, including next-token prediction and Chain of Thought (CoT) fine-tuning, fail to extrapolate in larger, unseen environments. Inspired by human cognition and dual-process theory, we propose cognitive maps for path planning—a novel CoT framework that simulates human-like mental representations. Our experiments show that cognitive maps not only enhance extrapolation to unseen environments but also exhibit human-like characteristics through structured mental simulation and rapid adaptation. Our finding that these cognitive maps require specialized training schemes and cannot be induced through simple prompting opens up important questions about developing general-purpose cognitive maps in language models. Our comparison with exploration-based methods further illuminates the complementary strengths of offline planning and online exploration.
BibTeX
@misc{kim2024how,
  author = {Doyoung Kim and Jongwon Lee and Jinho Park and Minjoon Seo},
  title = {{How language models extrapolate outside the training data: A Case study in Textualized Gridworld}},
  year = {2024},
  eprint = {2406.15275},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.15275},
}
Figure