Autoregressive Mosaics: Probing 2D Spatial Reasoning in Text-Only Language Models

Ashwin Nedungadi, Stefan Oehmcke, Stefan Lüdtke

University of Rostock

Published September 1, 2026 · on the feed September 3, 2026 · ▲ 3 · arXiv 2608.30751

Interpretability & analysisReasoning & mathLanguage & dialogue No code arXiv ↗Hugging Face ↗

The abstract

Large language models (LLMs) trained only on text and code can sometimes generate programs that draw recognizable images. However, it is unclear whether this reflects an internal representation of 2D spatial layout or simply the ability to translate spatial descriptions into code. We introduce Autoregressive Mosaics (AM-Bench), a benchmark that separates these factors: First, a translation task gives a model a fully specified geometry of a picture in words as a prompt and asks for the code that produces it. Second, a layout task requires the model to compose an image from an underspecified prompt. Across eight open-weight text-and-code-only models, all models reliably translate specified geometry into code, but their open-ended layout performance differs substantially, indicating that these differences are not explained by code-generation ability alone. An output-medium ablation further shows that the interface or medium of expression that the model uses matters: replacing procedural code with raw SVG improves layout scores across all models. Finally, probing model activations shows that a coarse layout plan is present before generation, but reflects only the layout implied by the prompt. During generation, models track the evolving geometric state instead of executing an initially fixed plan. Overall, these results show that 2D spatial performance in text-only LLMs depends on both the model and the output medium, and is not explained by code-generation ability alone.

The Brief

2:50

A short podcast summary of the paper. Written and voiced by AI.

Transcript

Autoregressive Mosaics. Probing 2D Spatial Reasoning in Text-Only Language Models. By Ashwin Nedungadi and two others, from the University of Rostock. Published on the first of September. No code repository is linked to it.

Large language models trained only on text and code can sometimes write programs that draw recognizable images. A model that has never seen a picture produces code, the code runs, and out comes something a person can name. The puzzle is what that ability actually reflects. One reading is that the model holds some internal representation of two-dimensional spatial layout. Another is that it is simply good at translating spatial descriptions into code, and that the picture is a side effect of fluent programming. Looking at a finished drawing cannot tell those two readings apart, because both produce the same output.

Autoregressive Mosaics, called AM-Bench, is built to separate the two factors. It measures them with a pair of tasks that pull in different directions. One isolates translation: can the model turn a fully specified geometry into code. The other isolates layout: can the model decide where things go when nobody has told it. If a model does well on the first and poorly on the second, its drawing ability is not coming from layout at all.

The translation task gives a model the complete geometry of a picture, written out in words, as its prompt, and asks for the code that produces it. Nothing has to be invented. Every position is already stated, and the job is faithful conversion. The layout task removes that support. The prompt is underspecified, and the model has to compose the image itself, choosing an arrangement the words only imply. Beyond the two tasks, the study adds an ablation of the output medium, swapping procedural code for raw SVG, and it probes model activations to look for a layout plan inside the network.

Eight open-weight models trained only on text and code were tested. On translation, all of them reliably turn specified geometry into code. On layout, their performance differs substantially. Since they are equally capable at the translation step, those differences are not explained by code-generation ability alone.

The medium turns out to matter as well. Replacing procedural code with raw SVG improves layout scores across every model, so the interface a model expresses itself through shapes how well it lays things out. The probing results are the most specific. A coarse layout plan is present in the activations before generation begins, but it reflects only the layout the prompt implies. Once drawing starts, the models track the evolving geometric state as it changes, rather than carrying out a plan fixed at the outset.

Put together, two-dimensional spatial performance in a text-only model depends on two things: which model it is, and which medium it draws in. Code skill is not the explanation. And the picture of how the drawing happens is incremental. There is a rough sketch in mind at the start, drawn from the prompt, and then the model keeps track of the canvas as it goes, one step at a time.

Paper Quest · 7 chapters · about 41 min

Play this paper

Learn it by doing: make the calls the authors made, guess the result before you see it, and defend it in a viva graded on your own words. Chapter 1 is right here.

Chapter 1 🧩 · The problem

A model that never saw a picture draws one. The question is what that really proves.

You notice that language models trained only on text and code can write programs that draw pictures you can recognise. A model that never saw an image gives you a little drawing.

The road ahead

  1. 1 · The problem ~7 min A text-only model can draw a recognizable picture in code, but the picture alone cannot show where that skill comes from.
  2. 2 · What came before ~3 min
  3. 3 · The key idea ~9 min Split drawing into two tasks: one that only tests turning stated geometry into code, and one that tests deciding the layout yourself.
  4. 4 · Choose your own research ~3 min
  5. 5 · Build the method ~8 min Run a fully specified translation task, an open layout task, a swap of drawing medium, and a probe of activations before drawing.
  6. 6 · The experiment ~6 min You’ll guess: When text-only models drew in raw SVG instead of procedural code, what happened to their layout scores?
  7. 7 · The viva ~5 min Three questions from the examiners, answered in your own words. Win it for the paper’s trophy.
Join free to play the whole quest ›

Free, with Google or an email address. Your stars and progress are kept.

KipQuest: the day’s AI research, as podcasts and quests. All papers Android app Privacy Contact Episodes are written and voiced by AI from each paper. Summaries can contain mistakes: the paper is the source.