Can Vision-Language Models Reverse-Engineer Handwriting? Inside inkGround's Trajectory Benchmark
Based on: inkGround: Benchmarking Fine-grained Visual Grounding Capabilities of Vision-Language Models for Cursive Handwriting in the Wild — Sidra Hanif
When you look at a handwritten greeting card, it is tempting to reconstruct physical movement. You might imagine the sweep that formed an f, the curve around an o, or the separate stroke that crossed a t. But the ink does not reveal exactly where the writer began, when they paused, or which stroke came first. You observe static pigment on paper and infer a possible choreography that deposited it.
Handwriting recognition systems such as TrOCR and DeepSeek-OCR recover the transcription rather than the pen trajectory. That serves the familiar goal of turning a document into readable text. Stroke trajectory recovery asks for something different: an ordered sequence of coordinates and stroke boundaries that reconstructs the handwriting. The paper connects this task to research in handwriting biometrics, pen-order prediction, and handwriting style imitation.
A new paper by Sidra Hanif from San Diego State University (inkGround: Benchmarking Fine-grained Visual Grounding Capabilities of Vision-Language Models for Cursive Handwriting in the Wild, arXiv:2610.38720) asks a fascinating question: Can general-purpose Vision-Language Models (VLMs) infer plausible pen trajectories from offline handwriting?
Given a full-page camera image, a target word, and an example showing the required output, can an off-the-shelf multimodal model locate the word and emit its ordered stroke coordinates?
The findings present a sharp split under the tested prompting protocol. The three frontier proprietary models produce substantially more readable trajectories than the four tested open-weight models. The results also expose a trade-off between legibility and stylistic fidelity, without establishing what causes that trade-off inside the models.

The missing dimension: Offline ink versus online trajectories
In document processing research, handwriting exists in two distinct formats:
- Online handwriting: Recorded during writing as an ordered stream of pen coordinates, with information about stroke boundaries or pen-up/pen-down events. In inkGround's trajectory representation, each point is $(x_t, y_t, s_t)$, where $s_t=1$ marks the first point of a stroke and $s_t=0$ marks a continuation point.
- Offline handwriting: The static image left behind after writing. It preserves the visible ink but does not directly record stroke order, timing, or pen-up movements.
Bridging this divide is known as stroke trajectory recovery. Previous approaches include specialized recurrent encoder-decoder networks, differentiable line-level rendering, and methods for unconstrained documents. Many are trained for particular datasets or scripts, using text lines or isolated characters.
The benchmark datasets backing that research have a coverage limitation. Online corpora such as IAM-OnDB, UNIPEN, and CASIA provide recorded trajectories, but the paper describes their collection settings as controlled and their writer and style coverage as limited. Many samples consist of isolated characters or text lines. Conversely, in-the-wild handwriting collections such as GNHK provide photographs with varied backgrounds and layouts, but no recorded trajectories.
inkGround targets the gap between those settings: full-page, camera-captured cursive handwriting paired with reference trajectories, used to test general-purpose VLMs at the stroke level.
How inkGround turned 537 handwritten pages into 163,000 reference strokes
Creating a trajectory dataset from offline camera images presents an obvious catch-22: if nobody recorded the writing process, how do you verify the true historical path of the pen?
Hanif does not claim to solve that ambiguity. Instead, inkGround uses a two-stage pseudo-labeling and human validation pipeline to retain plausible trajectories that reproduce the text and appearance of the source images. The final collection contains 537 camera-captured pages of cursive personal notes and greeting-card messages, provided by an unnamed greeting-card company. The paper states that the company holds the copyright and agreed to release the dataset for research purposes.
Without writer identifiers, the author treated each page as a distinct writer for evaluation. That is a modeling assumption, not evidence that the collection contains 537 different people. Across the 537 pages, the dataset contains:
- Roughly 18,700 total words, averaging 34.89 words per page and ranging from 2 to 140.
- Approximately 163,400 reference strokes, averaging 304.3 strokes per page.
- An average of 49 coordinate points per stroke.
Target words occupy a small spatial footprint. Word-level bounding boxes have a mean width of 11.2% of the page width, or 140.7 pixels, and a mean height of 4.3% of the page height, or 71.9 pixels. The task therefore requires both locating the word within the page and tracing its shape.
To build reference trajectories without physical sensor data, the author implemented two successive quality filters.
Stage 1: Machine derendering and OCR filtering
The pipeline fed each full page into InkSight Small-p, a specialist offline-to-online model developed by Mitrevski et al., using the prompt “Recognize and derender.” InkSight detected words, derendered each word into a series of $(x, y, s)$ stroke tokens, and placed the resulting strokes back into page coordinates.
To identify content mismatches, both the original camera image and a rendering of the recovered trajectory were transcribed using DeepSeek-OCR. If the word-level matching score between the two transcriptions dropped below 85%, the entire page was discarded.
This mechanical filter was merciless: out of 2,984 candidate pages, only 777, roughly 26%, survived. The threshold was selected empirically to balance reference quality against dataset size. OCR agreement checked whether the renderings preserved the text; it could not establish whether they preserved the writing's appearance.
Stage 2: Independent human validation
The remaining 777 candidate pages were evaluated by 85 human raters aged 18 to 50. Each participant inspected the original page alongside the rendered trajectory.
Raters started at a score of 10 and deducted points for character or spelling errors, missing words, or words whose style differed from the original. They assigned zero if errors exceeded 10. Every image pair was assessed independently by at least two raters, and a sample entered the final benchmark only if every rater awarded it a perfect 10 out of 10.
Inter-rater agreement on the accept/reject decision reached 81.7%. After human validation, 537 of the 777 pages passed.
The resulting references are pseudo-labels representing plausible pen paths. Human approval supports their textual and visual fidelity, but cannot verify the original stroke order or direction.
The task setup: Prompting a VLM to act as a pen plotter
Rather than fine-tuning the VLMs on domain data, the benchmark evaluated how off-the-shelf models perform through in-context point grounding.
The prompting setup described an explicit coordinate grid over the input image. Models received the same system prompt, task prompt, and worked image–stroke example, following a format inspired by SketchAgent.
The task prompt instructed the model to locate a target word {concept} on the page and emit an XML-like structure containing its ordered strokes. Each stroke required three fields:
- An identifier describing the stroke component, such as
f body -- curved descending stroke with top arc. - A sequence of textual grid coordinates, such as
x59y95, x59y93, x58y88. - An ordered list of coordinate tuples $(x, y, s)$, where $s=1$ marks the start of a stroke and $s=0$ marks subsequent points within that stroke.
For inkGround, the prompt provided a worked example for the word forever, detailing seven stroke segments. For IAM-OnDB, it used the same prompt and output format with an example word from a different writer than the test sample.
Seven VLMs were evaluated under this shared protocol:
- Four open-weight models: Qwen3-VL-32B, Molmo-7B-D-0924, InternVL3_5-8B, and Phi-4-vision-15B.
- Three frontier proprietary models: Gemini-3.1-Pro, Claude-Opus-4.8, and Kimi-K3.
The paper reports running the open-source models on NVIDIA A100 GPUs. It also includes InkSight as a specialist reference on IAM-OnDB, where InkSight was trained on the dataset's training split and evaluated on the same test set used for the comparison.
To evaluate outputs, the benchmark combined four groups of metrics:
- Dynamic Time Warping (DTW): Measures sequence-level agreement by aligning predicted and reference trajectories of different lengths. It is sensitive to point order, but does not establish the writer's actual timing or speed. Lower is better.
- Chamfer Distance: Measures geometric agreement between predicted and reference point sets, without evaluating their temporal order. Lower is better. Both distance metrics are computed per word using coordinates normalized by the word's height, then averaged over words on a page.
- Accurate Rate (AR) and Correct Rate (CR): Measure readability through DeepSeek-OCR transcriptions of the rendered strokes. CR is $(N-S-D)/N$, where $N$ is the reference character count and $S$ and $D$ are substitutions and deletions. AR is $(N-S-D-I)/N$, additionally subtracting insertions. Higher is better.
- Style Score: Measures the probability a fine-tuned ResNet-18 writer classifier assigns to the reference writer or page, averaged over evaluated words. Higher is better.
For inkGround's style classifier, each page is treated as a writer, with 75% of its reference-rendered word crops used for training and 25% held out for testing. The IAM-OnDB classifier uses 217 actual writer identities. Those different classification settings mean style scores should be compared within each dataset, not across the two tables.
Output validity also matters. The paper defines unparseable stroke outputs as invalid and assigns them zero AR, CR, and Style, plus maximum distance penalties. It defines incomplete outputs as covering only part of a page's words, but does not clearly specify a separate scoring rule for those cases.
The benchmark scorecard: Frontier models trace, tested open weights struggle
The experimental results revealed a large capability gap between the tested proprietary and open-weight models under this shared prompt.
| Model | Model Type | DTW $\downarrow$ | Chamfer $\downarrow$ | Accurate Rate (AR) $\uparrow$ | Correct Rate (CR) $\uparrow$ | Style Score $\uparrow$ |
|---|---|---|---|---|---|---|
| Qwen3-VL-32B | Open Weights | 0.378 | 0.222 | 0.0529 | 0.0529 | 0.0909 |
| Molmo-7B-D-0924 | Open Weights | 0.463 | 0.650 | 0.0754 | 0.0820 | 0.0965 |
| InternVL3_5-8B | Open Weights | 0.288 | 0.533 | 0.0344 | 0.0344 | 0.0754 |
| Phi-4-vision-15B | Open Weights | 0.389 | 0.639 | 0.0696 | 0.0699 | 0.0703 |
| Claude-Opus-4.8 | Proprietary | 0.209 | 0.119 | 0.7680 | 0.8120 | 0.2830 |
| Gemini-3.1-Pro | Proprietary | 0.105 | 0.052 | 0.8120 | 0.8260 | 0.8610 |
| Kimi-K3 | Proprietary | 0.171 | 0.091 | 0.5810 | 0.5910 | 0.9270 |
The four open-weight models struggled to produce readable strokes. Despite Molmo and Qwen3-VL having point-grounding capabilities, their performance here remained poor. Across the four models, Accurate Rates ranged from about 3.4% to 7.5%. These are character-based transcription scores, not percentages of correctly reconstructed words or successful pages.
The paper describes the open models as attempting to follow the word trajectories without reliably producing readable text. It does not isolate whether localization, stroke ordering, coordinate precision, or output-format failures account for most of the deficit. The result is narrower but still striking: point-grounding capability did not ensure successful stroke recovery under this protocol.
Among the frontier models, the picture changed dramatically. Gemini-3.1-Pro led the tested VLMs in trajectory agreement, with DTW 0.105 and Chamfer 0.052, and in readability, with AR 0.812 and CR 0.826. It also scored strongly on style at 0.861, although Kimi-K3 scored higher on that metric.
Validating on recorded hardware ground truth (IAM-OnDB)
Because inkGround relies on InkSight pseudo-labels, the author repeated the evaluation on IAM-OnDB, which provides pen trajectories recorded during writing. For this experiment, input images were rendered from those recorded strokes.
| Model | Model Type | DTW $\downarrow$ | Chamfer $\downarrow$ | Accurate Rate (AR) $\uparrow$ | Correct Rate (CR) $\uparrow$ | Style Score $\uparrow$ |
|---|---|---|---|---|---|---|
| InkSight (Specialist) | In-domain Reference | 0.0620 | 0.0420 | 0.9077 | 0.8692 | 0.9667 |
| Qwen3-VL-32B | Open Weights | 1.5180 | 6.0900 | 0.0519 | 0.0519 | 0.6179 |
| Molmo-7B-D-0924 | Open Weights | 7.7430 | 4.8970 | 0.0047 | 0.0047 | 0.6368 |
| InternVL3_5-8B | Open Weights | 4.7290 | 2.4870 | 0.0236 | 0.0236 | 0.5094 |
| Phi-4-vision-15B | Open Weights | 4.7420 | 3.2500 | 0.0991 | 0.0991 | 0.6415 |
| Claude-Opus-4.8 | Proprietary | 0.1365 | 0.0670 | 0.8208 | 0.8208 | 0.6667 |
| Gemini-3.1-Pro | Proprietary | 0.0880 | 0.0470 | 0.8644 | 0.8562 | 0.8889 |
| Kimi-K3 | Proprietary | 0.1580 | 0.0870 | 0.4811 | 0.4858 | 0.8951 |
These values reproduce Table 2 as reported; bold marks the best scores among the general-purpose VLMs. The source has a numerical inconsistency: InkSight and Gemini have AR values above CR, which is incompatible with the stated formulas. Some readability values in the paper's prose also differ from its table. Those discrepancies need clarification rather than an assumed correction.
The reported readability ordering held across datasets: Gemini-3.1-Pro led Claude-Opus-4.8, followed by Kimi-K3, with all four open-weight models below 0.10 AR. The distance ranking was not identical: Kimi beat Claude on inkGround's DTW and Chamfer metrics, while Claude beat Kimi on IAM-OnDB.
On IAM-OnDB, open-model DTW reached 7.743 and Chamfer reached 6.090. Gemini came closest to the specialist InkSight reference on those distance metrics. Because InkSight was trained on IAM-OnDB, the paper treats it as an in-domain reference rather than a directly equivalent competitor.
The repeated readability pattern supports the conclusion that the gap is not solely an artifact of inkGround's pseudo-labels. It does not prove that every metric measures genuine recovery of the writer's original movements.

The legibility versus style dilemma: Claude's readable strokes and Kimi's stylistic match
One of the most interesting findings is the different balance frontier models strike between legibility and stylistic imitation.
The benchmark asks for both readable text and trajectories that resemble the source handwriting. Those goals are evaluated separately: DeepSeek-OCR supplies the readability measure, while the writer classifier supplies the style measure. A high score on one does not guarantee a high score on the other.
The models produced distinct profiles:
- Claude-Opus-4.8 favors readability over stylistic match in these results. It achieves a 76.8% Accurate Rate on inkGround, but a Style Score of 0.283, the lowest among the three proprietary models. The paper's qualitative discussion likewise describes readable output with weaker style imitation. The experiment does not measure pen pressure or establish that Claude deliberately normalizes letterforms.
- Kimi-K3 achieves the strongest style scores among the tested VLMs. It reaches 0.927 on inkGround and 0.8951 on IAM-OnDB, while recording the lowest proprietary-model AR in each table: 0.581 and 0.4811. That supports a readability–style trade-off in its outputs, but does not identify the precise stroke errors causing it. InkSight's IAM-OnDB style score remains higher.
- Gemini-3.1-Pro combines stronger readability with a high style score. On inkGround, it leads in DTW, Chamfer, AR, and CR while reaching 0.861 on Style. It also leads the general-purpose VLMs on the reported IAM-OnDB distance and readability metrics, subject to the table's AR/CR inconsistency.
These are observed performance profiles under a particular prompt. They do not reveal the models' internal objectives or prove that improving style necessarily reduces readability.
Why it matters for document engineering and OCR pipelines
For engineers building document pipelines, inkGround offers a concrete way to examine stroke reconstruction. Its practical implications are most useful when separated from applications the paper did not test.
1. The limits of demonstrated point grounding
The tested open-weight models' poor results show that existing point-grounding ability is insufficient to guarantee readable trajectory output. Producing an ordered series of strokes poses a different demand from returning a few locations.
That is a useful evaluation lesson for teams considering coordinate generation. It is not evidence that all open VLMs fail at vectorization, or that a particular coordinate tokenizer, grounding head, or fine-tuning method would fix the problem. Those interventions were not evaluated.
2. Trajectory recovery as a separate document task
An ordered stroke representation describes handwriting differently from a transcription or bounding box. inkGround demonstrates how to evaluate that representation through both geometric agreement and readability of its rendering.
The paper does not show that inserting trajectory recovery upstream improves ordinary OCR accuracy. In particular, the VLM is given the target word in the prompt, so this experiment does not establish that trajectory recovery can independently decipher unknown text. Any downstream recognition benefit would require a separate evaluation.
3. Biometrics require care about what was actually recovered
The paper identifies handwriting biometrics as a relevant application area for trajectory recovery. But plausible stroke order is not a recording of a person's writing dynamics.
inkGround's points and stroke-start markers do not establish original timing, acceleration, pressure, or pen-up motion. Its human validation cannot verify the historical order of strokes either. The study therefore does not demonstrate forensic signature verification or a way to reconstruct authentic dynamic biometric evidence from a photograph.
4. Reference generation for future training data
The construction pipeline offers a concrete example of pairing offline handwriting images with model-generated trajectories, followed by OCR filtering and human review. That could inform future work assembling image–trajectory training material.
The filtering burden is substantial: only 537 of 2,984 candidate pages reached the final collection. The paper recommends human validation before using recovered trajectories as training targets. It does not evaluate a downstream generator trained on inkGround or demonstrate the costs of extending the pipeline to larger archives.
Honest limitations: The dangers of circular OCR and pseudo-labels
While inkGround provides a useful benchmark, engineers reviewing the paper should account for several structural limitations:
- The pseudo-label ceiling: inkGround's references originate from InkSight Small-p. They represent plausible strokes, not necessarily the physical sequence used by the writer. Different orders can produce similar ink, so DTW may penalize valid alternatives. Human review improves confidence in visible fidelity without resolving that ambiguity.
- Evaluator circularity: The author used DeepSeek-OCR both to filter candidate pages and to evaluate rendered outputs through AR and CR. The paper acknowledges that this shared evaluator may favor certain outputs and suggests an independent OCR model as a stricter readability check. The experiment does not quantify the size of that potential bias.
- Source and writer coverage: The pages come from one greeting-card company and consist of cursive personal notes and greeting-card messages. This does not establish performance across other scripts, languages, or document types. Missing writer labels also mean the inkGround style metric measures classification among pages treated as writers, rather than verified person identities.
- Prompt sensitivity: The comparison uses one shared prompting protocol with in-context examples. The forever example applies to inkGround; IAM-OnDB uses an example from a different writer within that dataset. Other prompts, fine-tuning, or tool use may change the rankings, as the author acknowledges.
- Reporting limits: The IAM-OnDB AR/CR inconsistencies prevent treating every reported readability value as internally reconciled. Likewise, the paper's definition of incomplete outputs does not clearly explain their separate scoring treatment. These details matter when interpreting or reproducing the scorecard.
Architectural takeaways for developers
If you are developing OCR or document intelligence systems, inkGround offers three grounded engineering takeaways:
- Test dense trajectory generation directly: The four evaluated open-weight models did not reliably produce readable strokes under the shared protocol. Existing point-grounding capability alone was not enough. That is a reason to validate the exact task, not a universal verdict on open models or untested adaptations.
- Keep plausible reconstruction separate from recorded motion: Ordered stroke primitives can represent an offline image in a useful new form, but they do not recover all the physical information lost when writing became a photograph. inkGround's pseudo-labels and IAM-OnDB's recorded trajectories answer related but different evaluation questions.
- Measure style and readability separately: Kimi-K3 scored highest on style among the tested VLMs, while Gemini-3.1-Pro combined stronger readability and trajectory agreement with a high style score. Claude-Opus-4.8 produced readable strokes with weaker stylistic matching. The benchmark makes those differences visible without yet explaining their architectural causes.