← Latest papers
🤖 machine learning

Structure over Pixels: Learning Variable-Length Visual Programs

The paper introduces STROP, a discrete visual tokenizer that learns variable-length visual programs to capture structural scene representations by optimizing a dedicated length head through a four-phase curriculum supervised by high-level features, thereby bypassing pixel reconstruction to prioritize compositional structure over texture.

Original authors: Piotr Wyrwiński, Kacper Dobek, Krzysztof Krawiec

Published 2026-05-28
📖 5 min read🧠 Deep dive

Original authors: Piotr Wyrwiński, Kacper Dobek, Krzysztof Krawiec

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to describe a complex scene, like a busy street market, to a friend over a text message. You have two choices:

  1. The Old Way: You send a massive, unedited photo. It's clear, but it takes forever to load and doesn't tell your friend what to look for.
  2. The New Way (STROP): You send a short, variable-length list of keywords. If the scene is just a clear blue sky, you send one word: "Sky." If it's a chaotic market with 20 people, stalls, and animals, you send a longer list: "Stall, Apple, Dog, Child, Hat..."

This paper introduces STROP, a new way for computers to "read" images by turning them into these variable-length lists of keywords (called a "visual program") instead of just compressing pixels.

Here is how it works, using simple analogies:

1. The Problem with Current "Tokenizers"

Most current AI image compressors work like a fixed-size grid. Imagine you have a photo, and the computer forces it into a 64-square grid.

  • If the photo is a blank white wall, the computer still fills all 64 squares with "white" tokens.
  • If the photo is a crowded stadium, the computer still only has 64 squares to work with.
    It wastes space on empty areas and runs out of space for complex areas. It's like trying to write a novel on a postcard; you either leave out details or cram everything in unreadably.

2. The STROP Solution: A "Smart Script"

STROP treats an image like a script or a recipe that can be short or long depending on the scene.

  • The Generator (The Writer): It looks at the image and decides, "This scene is simple; I only need 10 words to describe it." Or, "This scene is messy; I need 40 words."
  • The Interpreter (The Reader): It takes those words and rebuilds the understanding of the image.
  • The Length Head: This is a special part of the AI that acts like a manager. It looks at the image and immediately says, "Stop writing after token number 15," or "Keep going until token 40." It learns to match the length of the script to the complexity of the scene.

3. How It Learns: The "Four-Phase Curriculum"

The AI didn't just wake up knowing how to do this. The authors taught it using a four-step training camp:

  • Phase 1 (Random Truncation): The AI is forced to write scripts of random lengths. This teaches it that the most important information must be written first (front-loaded), just like a good headline.
  • Phase 2 (The Oracle): The computer secretly figures out the "perfect" length for each image by testing different lengths and seeing which one works best. It doesn't tell the AI yet; it just collects the answers.
  • Phase 3 (Supervised Learning): Now, the AI's "Manager" (the Length Head) is shown the "perfect" answers from Phase 2 and learns to predict them.
  • Phase 4 (The Handoff): The AI starts using its own predictions instead of the random ones, gradually taking full control.

4. The Secret Sauce: "Feature Distillation"

Most image compressors try to recreate the exact pixels (the colors and textures) of the original photo. STROP ignores the pixels.
Instead, it tries to recreate the "understanding" of the image. It uses a pre-trained "teacher" AI (called DINOv3) that is already very good at recognizing shapes and objects.

  • Analogy: Imagine you are taking a test. Instead of trying to memorize the exact font and ink color of the textbook (pixels), you try to memorize the concepts and logic the teacher taught you (features). STROP learns to write its "keywords" so that when a smart teacher reads them, they understand the scene perfectly, even if the exact colors aren't perfect.

5. What Did They Find?

  • Complexity Matches Length: The more objects and details in a picture, the longer the "program" (list of tokens) becomes. Simple scenes get short lists; complex scenes get long lists.
  • Tokens are "Handles": If you delete a specific token from the list, a specific part of the image disappears or changes. This suggests each token acts like a handle for a specific object or concept (e.g., one token might control the "dog," another the "tree").
  • Better than the Competition: When tested on standard computer vision tasks (like finding objects or segmenting images), STROP preserved more useful information than other adaptive methods that try to do the same thing.

6. Limitations (The "But...")

The paper is honest about what STROP can't do yet:

  • It's not a direct dictionary: If you look at the raw list of tokens (e.g., "Token 42, Token 105"), a human or a standard AI can't easily read it. You need the "Interpreter" to translate the list back into something useful. It's like a secret code that only the machine knows how to decode.
  • Attributes are fuzzy: While the AI is good at figuring out where objects are and how many there are, it struggles to perfectly link specific tokens to specific attributes like "red" or "metal." The connection between the code and the specific color isn't perfectly clear yet.

Summary

STROP is a new way for computers to turn images into variable-length lists of concepts. Instead of forcing every image into a rigid grid, it writes a custom-length "story" for each scene, focusing on the structure and meaning of the image rather than just the raw colors. It learns to stop writing when the scene is fully described, saving space on simple images and using more detail for complex ones.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →