Reference. maze-dataset: Maze Generation with Algorithmic Variety and Representational Flexibility
Cite
Cites 39 works (4 here)
With notes (4)
On Logical Extrapolation for Mazes with Recurrent and Implicit Networks knutson-2024-on
Recent work suggests that certain neural network architectures – particularly recurrent neural networks (RNNs) and implicit neural networks (INNs) – are capable of logical extrapolation. When trained on easy instances of a task, these networks (henceforth: logical extrapolators) can generalize to more difficult instances. Previous research has hypothesized that logical extrapolators do so by learning a scalable, iterative algorithm for the given task which converges to the solution. We examine this idea more closely in the context of a single task: maze solving. By varying test data along multiple axes – not just maze size – we show that models introduced in prior work fail in a variety of ways, some expected and others less so. It remains uncertain whether any of these models has truly learned an algorithm. However, we provide evidence that a certain RNN has approximately learned a form of ‘deadend-filling’. We show that training these models on more diverse data addresses some failure modes but, paradoxically, does not improve logical extrapolation. We also analyze convergence behavior, and show that models explicitly trained to converge to a fixed point are likely to do so when extrapolating, while models that are not may exhibit more exotic limiting behavior such as limit cycles, even when they correctly solve the problem. Our results (i) show that logical extrapolation is not immune to the problem of goal misgeneralization, and (ii) suggest that analyzing the dynamics of extrapolation may yield insights into designing better logical extrapolators.
Transformers Use Causal World Models in Maze-Solving Tasks spies-2024-transformers
Recent studies in interpretability have explored the inner workings of transformer models trained on tasks across various domains, often discovering that these networks naturally develop highly structured representations. When such representations comprehensively reflect the task domain’s structure, they are commonly referred to as “World Models” (WMs). In this work, we identify WMs in transformers trained on maze-solving tasks. By using Sparse Autoencoders (SAEs) and analyzing attention patterns, we examine the construction of WMs and demonstrate consistency between SAE feature-based and circuit-based analyses. By subsequently intervening on isolated features to confirm their causal role, we find that it is easier to activate features than to suppress them. Furthermore, we find that models can reason about mazes involving more simultaneously active features than they encountered during training; however, when these same mazes (with greater numbers of connections) are provided to models via input tokens instead, the models fail. Finally, we demonstrate that positional encoding schemes appear to influence how World Models are structured within the model’s residual stream.
Structured World Representations in Maze-Solving Transformers ivanitskiy-2023-structured
Transformer models underpin many recent advances in practical machine learning applications, yet understanding their internal behavior continues to elude researchers. Given the size and complexity of these models, forming a comprehensive picture of their inner workings remains a significant challenge. To this end, we set out to understand small transformer models in a more tractable setting: that of solving mazes. In this work, we focus on the abstractions formed by these models and find evidence for the consistent emergence of structured internal representations of maze topology and valid paths. We demonstrate this by showing that the residual stream of only a single token can be linearly decoded to faithfully reconstruct the entire maze. We also find that the learned embeddings of individual tokens have spatial structure. Furthermore, we take steps towards deciphering the circuity of path-following by identifying attention heads (dubbed ), which are implicated in finding valid subsequent tokens.
A Configurable Library for Generating and Manipulating Maze Datasets ivanitskiy-2023-a
Understanding how machine learning models respond to distributional shifts is a key research challenge. Mazes serve as an excellent testbed due to varied generation algorithms offering a nuanced platform to simulate both subtle and pronounced distributional shifts. To enable systematic investigations of model behavior on out-of-distribution data, we present , a comprehensive library for generating, processing, and visualizing datasets consisting of maze-solving tasks. With this library, researchers can easily create datasets, having extensive control over the generation algorithm used, the parameters fed to the algorithm of choice, and the filters that generated mazes must satisfy. Furthermore, it supports multiple output formats, including rasterized and text-based, catering to convolutional neural networks and autoregressive transformer models. These formats, along with tools for visualizing and converting between them, ensure versatility and adaptability in research applications.
External (35)
- T-SCEND: Test-time scalable MCTS-enhanced diffusion model (2025)
- AlphaMaze: Enhancing large language models’ spatial intelligence via GRPO (2025)
- MORSE-500: A programmatically controllable video benchmark to stress-test multimodal reasoning (2025)
- Visual planning: Let’s think only with images (2025)
- Adaptive cyclic diffusion for inference scaling (2025)
- VFScale: Intrinsic reasoning through verifier-free test-time scalable diffusion model (2025)
- Transformers can navigate mazes with multi-step prediction (2024)
- The factorization curse: Which tokens you predict underlie the reversal curse and more (2024)
- Imperative learning: A self-supervised neural-symbolic learning framework for robot autonomy (2024)
- Let’s think dot by dot: Hidden computation in transformer language models (2024)
- iA*: Imperative learning-based A* search for pathfinding (2024)
- Evaluating large language models on graphs: Performance insights and comparative analysis (2023)
- Interpretable machine learning for science with PySR and SymbolicRegression.jl (2023)
- Toward transparent ai: A survey on interpreting the inner structures of deep neural networks (2023)
- Evaluating ChatGPT and GPT-4 for visual programming (2023)
- Maze dataset (software) (2023)
- Jfb: Jacobian-free backpropagation for implicit networks (2022)
- Maze (GitHub repository emadehsan/maze) (2022)
- Datasets for Studying Generalization from Easy to Hard Examples (2021)
- Can you learn an algorithm? Generalizing from easy to hard problems with recurrent networks (2021)
- seaborn: Statistical data visualization (2021)
- MDL suite: A language, generator and compiler for describing mazes (2020)
- Array programming with NumPy (2020)
- Maze-generation-algorithms (2019)
- MazeExplorer: A Customisable 3D Benchmark for Assessing Generalisation in Reinforcement Learning (2019)
- Leveraging procedural generation to benchmark reinforcement learning (2019)
- Maze generator (mazegenerator.net) (2019)
- Maze-generator: Generate a random maze represented as a 2D array using depth-first search (2018)
- Jupyter notebooks - a publishing format for reproducible computational workflows (2016)
- Index 1,600,000,000 keys with automata and rust (2015)
- Maze generator and solver (2011)
- Maze suite 1.0: A complete set of tools to prepare, present, and analyze navigational and spatial cognitive neuroscience experiments (2008)
- Matplotlib: A 2D graphics environment (2007)
- Python reference manual (1995)
- ZANJ