Skip to main content
QUICK REVIEW

[Paper Review] CoSE: Compositional Stroke Embeddings

Emre Aksan, Thomas Deselaers|arXiv (Cornell University)|Jun 17, 2020
Handwritten Text Recognition TechniquesComputer Science38 references12 citations
TL;DR

CoSE proposes a compositional generative model for complex stroke-based drawings by treating drawings as unordered collections of variable-length strokes, using a learnable latent space to decouple local stroke appearance from global structural composition. The model outperforms prior sequence-based approaches in predicting complex diagrams and flowcharts, achieving superior reconstruction and prediction accuracy on DiDi, QuickDraw, and IAM-OnDB datasets through an end-to-end trainable auto-encoder and relational predictor in latent space.

ABSTRACT

We present a generative model for complex free-form structures such as stroke-based drawing tasks. While previous approaches rely on sequence-based models for drawings of basic objects or handwritten text, we propose a model that treats drawings as a collection of strokes that can be composed into complex structures such as diagrams (e.g., flow-charts). At the core of the approach lies a novel autoencoder that projects variable-length strokes into a latent space of fixed dimension. This representation space allows a relational model, operating in latent space, to better capture the relationship between strokes and to predict subsequent strokes. We demonstrate qualitatively and quantitatively that our proposed approach is able to model the appearance of individual strokes, as well as the compositional structure of larger diagram drawings. Our approach is suitable for interactive use cases such as auto-completing diagrams. We make code and models publicly available at https://eth-ait.github.io/cose.

Motivation & Objective

  • To address the limitations of sequence-based models in generating complex, compositional drawings such as flow-charts and diagrams.
  • To decouple local stroke appearance from global structural composition in stroke-based data for improved generative modeling.
  • To enable interactive, auto-completion of diagrams from sparse initial strokes using a relational model in a fixed-dimensional latent space.
  • To demonstrate that better predictive performance is achievable by learning a balanced, disentangled latent representation that supports both reconstruction and compositional reasoning.

Proposed method

  • The model treats a drawing as an unordered set of strokes, where each stroke is a sequence of 2D coordinates, to eliminate dependency on stroke order.
  • A deep auto-encoder maps variable-length strokes into a fixed-dimensional latent space, preserving local appearance and structural context.
  • A relational model operates in the latent space to predict future stroke embeddings based on the current set of strokes, using a GMM-based multi-modal distribution for uncertainty modeling.
  • The decoder reconstructs strokes from predicted latent embeddings, and the full model is trained end-to-end using reconstruction loss only on the encoder-decoder, with gradients not backpropagated to the relational model.
  • The architecture uses a GMM with 10 components as the primary source of stochasticity in the relational model, improving prediction diversity and accuracy.
  • The model is evaluated on DiDi (complex diagrams), QuickDraw (freeform sketches), and IAM-OnDB (handwriting), with ablation studies on GMM components and gradient flow.

Experimental results

Research questions

  • RQ1Can a generative model that treats drawings as unordered collections of strokes outperform sequence-based models in predicting complex diagram structures?
  • RQ2Does disentangling local stroke appearance from global compositional structure lead to better reconstruction and prediction performance?
  • RQ3How does the choice of latent space representation affect the model’s ability to generalize across diverse stroke-based data such as diagrams, sketches, and handwriting?
  • RQ4What is the impact of architectural choices such as gradient flow and GMM component count on predictive performance in the relational model?

Key findings

  • The proposed CoSE model achieves a reconstruction error (Recon. CD) of 0.0136 and a prediction error (Pred. CD) of 0.0442 on the DiDi dataset, outperforming baseline models.
  • Using 10 or more GMM components in the relational model significantly improves prediction performance, with 10 components used in the final model.
  • Back-propagating gradients to the encoder increases reconstruction and prediction errors (to 0.0162 and 0.0470, respectively), indicating that isolating the relational model preserves better disentanglement.
  • Qualitative results show that CoSE generates coherent, contextually appropriate diagram continuations even from sparse initial strokes, while baselines like SketchRNN fail on complex structures.
  • The learned latent space in CoSE enables better generalization and compositional reasoning, as evidenced by improved performance on diverse datasets including DiDi, QuickDraw, and IAM-OnDB.
  • The model demonstrates strong interactive potential, with a proof-of-concept demo showing real-time auto-completion of diagrams based on user input.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.