GenVP: Generating Visual Puzzles with Contrastive Hierarchical VAEs

Kalliopi Basioti, Pritish Sahu, Tony Qingze Liu, Zihao Xu, Hao Wang, Vladimir Pavlovic

TL;DR

GenVP is a new generative framework that doesn't just solve Raven’s Progressive Matrices (RPMs)—it can create them from scratch. By combining a hierarchical VAE with a robust "Mixture of Experts" for rule prediction, GenVP achieves state-of-the-art reasoning accuracy and demonstrates a human-like ability to generate entirely new, rule-consistent visual puzzles.

What Problem Does This Paper Address?

Raven’s Progressive Matrices (RPMs) are the gold standard for testing abstract visual reasoning. You’ve likely seen them: a $3 \times 3$ grid of shapes with one missing piece, and you have to pick the correct completion from a list of eight choices.

While AI has gotten quite good at "solving" these by picking from the list, there’s a catch. Most models rely on discriminative learning, which often leads to "shortcut learning"—the AI finds patterns in the distractors rather than actually understanding the underlying logic. Furthermore, humans can do something most AI cannot: given a set of rules (e.g., "shape stays the same, color gets darker"), we can invent a brand-new puzzle.

Existing generative models for this task are often brittle, sensitive to noise, and struggle when the "search space" of possible images is large. The authors of GenVP aim to bridge this gap by creating a model that understands the entire generation process, from abstract rules to raw pixels.

Methods

The core of GenVP is a Generative Visual Puzzle framework built on a Hierarchical Variational Autoencoder (HVAE).

GenVP Architecture

Here is how the architecture breaks down the problem:

  1. Latent Decoupling: The model splits image features into two parts: $Z_o$ (relevant attributes like shape, size, and color) and $Z_{\bar{o}}$ (irrelevant "noise" or distractors). This helps the model ignore the "fluff" and focus on the logic.
  2. Mixture of Experts (MoE): Instead of one single rule-predictor, GenVP uses an ensemble. These "experts" look at different views of the puzzle—full grids, partial rows, or context-only matrices. This redundancy makes the model much more robust to missing information or noisy features.
  3. Dual-Level Contrastive Learning: To sharpen its reasoning, the model uses a novel training objective. It compares rules across different puzzles (Global) and compares the "correct" completed puzzle against "incorrect" versions made using distractors from the choice list (Local).
  4. The Generative Path: Because it's a VAE, the process is reversible. You can feed the model a set of abstract rules (e.g., "Progression on Size"), and it can sample from its latent space to render a completely new, coherent $3 \times 3$ puzzle.

Datasets

The authors evaluated GenVP on five major benchmarks:

  • RAVEN, I-RAVEN, and RAVEN-FAIR: The standard "go-to" datasets for this field.
  • PGM (Procedurally Generated Matrices): A massive dataset with more complex logic.
  • VAD (Visual Analogy Dataset): Focused on analogical reasoning.

Crucially, they also tested on 24 Out-of-Distribution (OOD) scenarios, where the model encounters attribute values (like a specific color or size) or rule combinations it never saw during training.

Key Insights and Ideas

  • Generation as the Ultimate Test: The authors argue that if a model can create a valid puzzle from a rule, it proves a deeper level of understanding than simply picking an answer from a list.
  • Filtering the Noise: By explicitly modeling "irrelevant" attributes ($Z_{\bar{o}}$), GenVP avoids the pitfall of many previous models that get confused by background distractors or complex layouts.
  • Robustness through Partial Views: The MoE approach is an "aha moment." By forcing the model to predict rules even when it can only see part of the puzzle, it learns more generalized, potent features that transfer better to new scenarios.
  • Handling Large Solution Spaces: Unlike previous state-of-the-art generative models (like RAISE), which struggle when the number of possible valid images is huge, GenVP’s hierarchical structure allows it to scale effectively to complex datasets like PGM.

Key Results

  • State-of-the-Art Accuracy: GenVP outperformed all previous generative solvers on RAVEN and I-RAVEN, hitting 94.7% and 96.1% accuracy, respectively.
  • OOD Dominance: In the 24 OOD evaluations, GenVP surpassed the previous best models in 22 out of 24 cases. It showed a remarkable ability to generalize to unseen colors, sizes, and even entirely excluded rules.
  • Creative Capability: Qualitatively, the model successfully generated diverse sets of new puzzles from abstract rule prompts. It didn't just "regurgitate" training data; it produced novel configurations that followed the requested logic.
  • Efficiency: Despite its complexity, GenVP requires significantly fewer parameters and less GPU memory than some of its predecessors (like GCA).

Limitations and Future Work

While GenVP is a leap forward, the authors note a few hurdles:

  • Small Object Resolution: The model sometimes struggles with very small objects in dense $3 \times 3$ grid configurations, where the encoders find it hard to extract clear features.
  • Numerical Reasoning: While it handles many rules well, capturing complex numerical relationships (like intricate arithmetic across multiple attributes) remains a challenge for the current architecture.
  • Future Directions: The team suggests that improving the visual comprehension of numerical relationships is the next frontier for making these models truly human-like in their reasoning.

Summary updated

BibTeX
@inproceedings{basioti2025genvp,
  author = {Kalliopi Basioti and Pritish Sahu and Tony Qingze Liu and Zihao Xu and Hao Wang and Vladimir Pavlovic},
  title = {{GenVP: Generating Visual Puzzles with Contrastive Hierarchical VAEs}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=Pd7IOswRUZ},
}
Figure