Skip to content
AI.info

Research

BoundInk: Boundary-Aware Online Handwriting Generation

Overview Research area: Computer vision / generative modeling of online handwriting, specifically writer-conditioned sentence-level handwriting synthesis. Technical level: Intermediate. The paper is r

BoundInk: Boundary-Aware Online Handwriting Generation
arXiv
2604.02103
Published
2026-04-02
Authors
Jinsu Shin, Sungeun Hong, JinYeong Bak

AI summary

Overview

Research area: Computer vision / generative modeling of online handwriting, specifically writer-conditioned sentence-level handwriting synthesis.

Technical level: Intermediate. The paper is readable without deep expertise, but it assumes familiarity with trajectory sequence generation, dynamic time warping, and mixture-density network outputs.

Scope: The paper proposes BoundInk, a writer-conditioned framework that treats inter-character boundaries as explicit generation targets rather than implicit byproducts of long-sequence decoding, together with a boundary-aware evaluation suite called Connectivity and Spacing Metrics (CSM).

What This Paper Is About

Existing online handwriting generators model whole sentences as long sequences, so the way one character connects to the next is learned only implicitly. This produces recognizable glyphs but broken cursive joins, rigid spacing, and writer-inconsistent transitions. BoundInk reframes the problem by making the boundary between adjacent characters an explicit unit of generation, so that style, connectivity, spacing, and alignment can each be controlled and measured.

Key Contributions

  1. Explicit modeling of inter-character boundaries. BoundInk elevates inter-character transitions from implicit sequence artifacts to explicit generation targets, integrating local predecessor-current dynamics with sentence context to generate writer-consistent glyphs, connections, spacing, and alignment.
  2. Boundary-aware evaluation. The paper introduces Connectivity and Spacing Metrics (CSM) — comprising F1_Cursive, CRE, KGS, and SSS — which directly assess cursive connectivity and spatial relationships between adjacent characters, complementing global trajectory similarity.
  3. Comprehensive empirical validation. Across three benchmark-matched settings, BoundInk consistently improves all applicable boundary-aware measures and normalized trajectory similarity, with human preference results supporting gains in perceived connectivity, spacing, and writer-style fidelity.
  4. A boundary-supervised training recipe. A three-stage curriculum (glyph to bigram to sentence) with a CursiveEOC pen state and a Vertical Drift Loss provides explicit supervision for pen-down continuation and predecessor-to-current vertical alignment.

Main Findings

  • Sentence-level trajectory improvements. Under the DeepWriting-matched protocol, normalized DTW drops from 2.70 to 1.41. Under the DSD-matched protocol, it drops from 1.25 to 0.99. Under the OLHWG-compatible protocol, it drops from 0.17 to 0.14. The abstract reports an overall reduction in normalized dynamic time warping of 17.6–47.8%.
  • Connectivity gains against DeepWriting: F1_Cursive rises from 0.26 to 0.33, CRE from 0.81 to 0.84, KGS from 0.15 to 0.41, and SSS from 0.57 to 0.61.
  • Connectivity gains against DSD: F1_Cursive rises from 0.07 to 0.45, CRE from 0.84 to 0.90, KGS from 0.39 to 0.44, and SSS from 0.49 to 0.63.
  • Chinese/OLHWG-compatible setting: only KGS is defined because the evaluation set lacks cursive-positive boundaries and whitespace runs; KGS improves from 0.34 to 0.40.
  • Glyph-level quality is preserved. Under SDT-compatible protocols, English DTW falls from 1.6048 (SDT) to 1.3649, and Chinese DTW falls from 0.8789 to 0.8718 — the lowest DTW in both protocols despite BoundInk being designed for sentence-level generation. Other methods reported: Drawing 1.8519 / 1.1813, DeepImitator 1.6460 / 1.0622, WriteLikeYou-v2 1.6215 / 0.9289.
  • Ablation: Bi-SWT matters most. Removing the bigram-aware sliding-window Transformer drops F1_Cursive from 0.49 to 0.37, SSS from 0.71 to 0.40, and raises normalized DTW from 0.51 to 0.60.
  • Ablation: context fusion drives connectivity. Removing gated context fusion drops F1_Cursive from 0.49 to 0.35 while CRE, KGS, and SSS change more moderately. Removing both components yields F1_Cursive of 0.22.
  • Character identity embedding helps. Adding the learnable character-code embedding (CharID) reduces average normalized DTW from 0.3464 to 0.3328 on the glyph-level ablation subset, a 3.9% relative improvement.
  • Human preference. Against DSD, BoundInk received 615 of 789 valid criterion-wise preferences with 111 responses marked "Cannot judge." Against DeepWriting, it received 673 of 815 valid preferences with 85 "Cannot judge." The abstract states a preference rate of 78.0–82.6% of valid criterion-wise judgments.
  • Content legibility is maintained and writer identity is stronger. Against DeepWriting, Top-1 writer-classification accuracy rises from 35.8 to 61.7 and Top-5 from 68.3 to 81.7. Against DSD, Top-1 rises from 6.0 to 69.0 and Top-5 from 27.0 to 74.0. Real-handwriting ground truth scores are 93.4/98.4 and 98.5/99.5 respectively.
  • Design comparison. Among the benchmark-matched methods (DeepWriting, DSD, OLHWG, BoundInk), only BoundInk has explicit boundary supervision and image-based style reference; DeepWriting is marked partial/implicit for word-spacing modeling, DSD has no dedicated word-spacing mechanism, and OLHWG models layout and spacing but not pen-down continuation across characters.

Methodology in Plain English

BoundInk separates handwriting generation into four questions: what to write (character identity), whose handwriting to imitate (global writer style), how each character should look (glyph-specific style), and how neighboring characters should interact (sentence context plus local boundary history).

A Style Identifier extracts writer-level and glyph-level style cues from reference handwriting images, following the SDT style-reference protocol. In parallel, a Character Context Encoder represents the target text: each Unicode character is encoded in isolation to produce a deterministic identity anchor, which is cached for unique codepoints within a mini-batch and augmented with a learnable code embedding to sharpen case-sensitive distinctions. A lightweight Transformer encoder over the whole sentence produces position-specific "context memory," so the same character can be realized differently depending on its neighbors and position.

Generation itself is handled by a bigram-aware sliding-window Transformer decoder (Bi-SWT). Instead of decoding an entire sentence in one pass, it builds a local window containing the predecessor character and the current character, using relative positional encoding (RoPE) and causal self-attention with key-padding masks. The decoder predicts point-to-point trajectory deltas rather than absolute coordinates, outputting bivariate Gaussian Mixture Model parameters with K = 20 components plus 4-way pen-state logits. Sentence-level information is injected through token-wise gated context fusion, where a scalar gate caps how much context can override style cues — the stated reason is that excessive context injection can weaken writer/glyph stylization.

Training uses a cumulative three-stage curriculum. Stage 1 (first 10k iterations) learns representative glyphs; Stage 2 (10k to 50k iterations) adds predecessor-current bigram windows; Stage 3 (50k iterations onward) adds sentence-level supervision while retaining the earlier streams. Pen states are PM, PU, CursiveEOC, and EOC, with CursiveEOC explicitly supervising pen-down continuation across character boundaries. A lightweight Vertical Drift Loss regularizes predecessor-to-current vertical offsets measured at three summary statistics (centroid, top band, bottom band). Style is trained with supervised writer-level and self-supervised glyph-level contrastive losses.

Evaluation is done through benchmark-matched pairwise comparisons rather than a single unified setting: IAM-expanded for DeepWriting, BRUSH for DSD, and CASIA-OLHWDB 2.0–2.2 for OLHWG, with glyph-level tests on the English SDT benchmark and CASIA-OLHWDB 1.0–1.2. A merged English dataset from IAM and BRUSH is used for qualitative evaluation, human evaluation, and ablations, with a writer-disjoint split of 150 training and 20 test writers. All quantitative evaluations use fully autoregressive inference, with metrics computed per sample, averaged within each writer, then macro-averaged across writers. A CSM component is reported as "--" when the protocol lacks the required boundary type.

Why This Matters

Impact on research. The paper argues that inter-character boundaries deserve to be treated as a first-class modeling and evaluation unit, not an incidental outcome of long-sequence decoding. It also provides CSM as a diagnostic suite that catches failures — broken joins, unnatural kerning — that global trajectory distance like DTW can miss entirely, since a globally similar trajectory can still contain incorrect connections or spacing.

Real-world applications:

  • Digital ink and note-taking systems that need to render a user's own handwriting style at sentence length rather than character by character.
  • Assistive writing tools for users who cannot physically write but want personalized, natural-looking handwritten output.
  • Font and handwriting-style personalization products, where a small reference sample is used to reproduce a person's script.
  • Document generation and e-signature or personalization pipelines that require consistent spacing and cursive flow across full lines.

Industry relevance. The work sits in a space relevant to digital ink platforms, stylus-driven devices, and personalized content generation. Its explicit separation of content, writer style, glyph style, and boundary behavior maps cleanly onto controllable-generation product requirements, and the addition of OCR-based legibility verification and writer-classification verification speaks to quality control needs beyond aesthetic similarity.

Future Directions

  • Incorporating optional sequence references to better capture writer-specific boundary tendencies.
  • Examining generalization to broader scripts, unseen character combinations, and scarce or mismatched style references.
  • Improving long-sequence decoding efficiency and robustness to autoregressive error accumulation.
  • Establishing standardized benchmarks that jointly assess content, style, boundary quality, reliability, and efficiency.
  • The paper notes that local boundary learning remains coupled with complete sentence generation in prior work, and that rare character pairs remain difficult to generate reliably even when individual glyphs are accurate — an open problem its bigram design mitigates but does not claim to solve.

Target Audience

Researchers and practitioners in handwriting generation, digital ink, and controllable generative modeling; computer vision and NLP students interested in sequence generation with structured supervision; and engineers building personalized handwriting synthesis or digital ink products. Readers wanting to evaluate or extend boundary-quality evaluation for sequential generative models will find the CSM definitions and the ablation structure most directly useful.

Authors’ abstract

Realistic online handwriting depends not only on individual character shapes, but also on how a writer connects, spaces, and aligns adjacent characters. Existing methods rely primarily on long-range sequence modeling and capture these inter-character behaviors only implicitly. This often produces plausible glyphs accompanied by broken cursive joins, inconsistent spacing, or writer-inconsistent transitions. We introduce BoundInk, a writer-conditioned framework that treats inter-character boundaries as explicit generation units. By jointly modeling local transitions and surrounding text context, BoundInk preserves writer-specific glyph appearance while improving connectivity and spacing across complete text lines. We further introduce a boundary-aware evaluation framework that directly assesses cursive continuity and spatial relationships between characters beyond conventional trajectory similarity. Across three benchmark-matched settings, BoundInk improves all applicable boundary-quality measures and reduces normalized dynamic time warping by 17.6--47.8%. In blind human evaluations, BoundInk outputs are preferred in 78.0--82.6% of valid criterion-wise judgments.

Read the original paper