A generative model for handwriting and sketches is surfacing
By AI Update World · 2026-11-25

The core idea behind PenGPT is conceptually simple but historically significant: machine learning models can learn from the sequential structure of pen strokes themselves, rather than converting handwriting into static images first. This represents a shift in how we think about capturing human gesture and motion digitally.
What makes strokes different from images
Images flatten motion into a single moment. A handwritten letter, a sketch, or a signature contains temporal information that an image loses. Each stroke has a sequence: start point, path, speed, pressure, angle, and endpoint. When you convert handwriting to an image, you're discarding when the pen moved, how fast it moved, and the order of individual strokes. That temporal dimension is real data that could help a model understand human intent and variation.
How transformers process sequential information
Transformers are neural network architectures designed to process sequences by learning relationships between elements in that sequence. They were originally developed for language, where words come in order and context matters. The core insight of transformers is "attention": the model learns which parts of a sequence are most relevant to predicting the next part. This mechanism works on any sequential data, not just text. The same architecture that learns "the word after 'artificial' is often 'intelligence'" can learn "after a downstroke angled left, the next point typically moves up and right."
The token approach to pen input
In language models, text is broken into tokens: small units like individual characters or word fragments. PenGPT adapts this idea by treating raw stroke data as tokens. Each coordinate, pressure reading, or timing measurement becomes a discrete unit the model processes. This is fundamentally different from pixel-based approaches, where an image is a fixed grid of values. Tokenizing pen input preserves the structure of how handwriting actually happens: as a sequence of decisions over time.
Why this matters for AI training
Training models on raw sequential data rather than pre-processed images can capture patterns humans implicitly understand about handwriting. Variation in how the same person writes the same letter, the rhythm of fast versus careful writing, or the subtle differences between a signature and a forgery all live in the temporal dimension. Models that work from stroke sequences can learn these patterns directly instead of inferring them from images.
The historical context
Computer vision has long dominated how machines "see" handwriting, treating it as an image classification or recognition problem. The transformer revolution of recent years showed that many tasks once thought to require image processing could be reimagined as sequence modeling. PenGPT is part of a broader shift toward treating inputs more like their natural form rather than converting everything into images first.
Why curious people