Abstract
Neuro-symbolic models offer a promising path toward AI that generalizes like humans. We present DooD (Drawing out of Distribution), an unsupervised generative model that learns to decompose images into symbolic Bézier splines. By combining neural inference with symbolic rendering, DooD achieves remarkable zero-shot transfer—learning to write digits on MNIST and successfully applying that knowledge to draw complex Japanese characters or doodles without any additional training.
Introduction
While humans can easily transition from writing letters to sketching a cat, AI models typically struggle with this kind of "out-of-distribution" (OOD) generalization. Current approaches generally fall into two camps: purely neural models, which scale well but lack structural understanding, and symbolic models, which generalize well but often require expensive manual supervision.
The authors address this gap by creating DooD, a model that is unsupervised (learns from raw images), efficient (uses amortized inference), and interpretable (uses a symbolic stroke model).
Methods
DooD is a neuro-symbolic generative model that treats drawing as a sequential process. Its architecture consists of two main components:
- The Generative Model: At each step, the model decides where to draw (Layout Module) and what to draw (Stroke Module). The "what" is defined as a Bézier spline—a mathematical curve defined by control points. This stroke is then rendered onto a canvas using a differentiable renderer, allowing the model to learn via gradient descent.
- The Recognition Model: This encoder performs amortized variational inference by analyzing the current "residual" (the difference between the target image and what has been drawn so far) to predict parameters for the next stroke.
The model employs Execution-Guided Inference (EG), constantly checking its progress against the target image to decide when to stop drawing using a learned stopping criterion ($o_t$).
Key Results
The authors evaluated DooD across five diverse stroke-based datasets: MNIST, EMNIST, KMNIST (Japanese characters), QuickDraw (doodles), and Omniglot.
Zero-Shot Transfer
A DooD model trained only on MNIST digits significantly outperformed neural baselines when tasked with reconstructing images from other datasets. While standard models produced blurry results, DooD produced sharp, accurate stroke-based reconstructions by applying its learned "language of strokes" to new domains.
Quantitative Performance
- Unconditional Generation: DooD achieved a Fréchet Inception Distance (FID) of 0.051 on Omniglot, vastly outperforming the state-of-the-art neuro-symbolic model GNS (0.133).
- One-Shot Classification: On the challenging Omniglot 20-way task, DooD achieved 73.5% accuracy, a massive leap over the neural AIR baseline (14.5%).
- Parsimony: The model naturally learns to be efficient, using fewer strokes for simple digits and more for complex doodles.
Key Insights
- Symbolic Constraints as a Regularizer: Forcing the model to use Bézier splines acts as a powerful inductive bias, preventing overfitting to specific pixel patterns.
- The Power of the Residual: By focusing on the residual ($\Delta x_t$), the recognition model becomes robust when decomposing complex images it hasn't seen before.
- Meaningful Latent Spaces: DooD naturally groups strokes into semantically meaningful categories (e.g., horizontal lines, loops), unlike purely neural baselines.
Limitations and Future Work
A primary limitation is s-component (stroke) generalization. When trained on simple data like MNIST, the model may struggle with complex glimpses containing multiple strokes, sometimes attempting to cover them with a single curve. Future directions include implementing more flexible Spatial Transformer Networks and adding masking mechanisms to help the model isolate individual strokes within a glimpse.
Summary updated