[Paper Review] Sketch-BERT: Learning Sketch Bidirectional Encoder Representation from Transformers by Self-supervised Learning of Sketch Gestalt
Sketch-BERT proposes a self-supervised pre-training framework for sketch representation learning using a transformer-based architecture, introducing a novel Sketch Gestalt (sGesta) task to predict masked point positions and states. By pre-training on the QuickDraw dataset with this task, Sketch-BERT achieves state-of-the-art performance on sketch recognition, retrieval, and generative reconstruction, significantly improving downstream task convergence and accuracy over baseline models.
Previous researches of sketches often considered sketches in pixel format and leveraged CNN based models in the sketch understanding. Fundamentally, a sketch is stored as a sequence of data points, a vector format representation, rather than the photo-realistic image of pixels. SketchRNN studied a generative neural representation for sketches of vector format by Long Short Term Memory networks (LSTM). Unfortunately, the representation learned by SketchRNN is primarily for the generation tasks, rather than the other tasks of recognition and retrieval of sketches. To this end and inspired by the recent BERT model, we present a model of learning Sketch Bidirectional Encoder Representation from Transformer (Sketch-BERT). We generalize BERT to sketch domain, with the novel proposed components and pre-training algorithms, including the newly designed sketch embedding networks, and the self-supervised learning of sketch gestalt. Particularly, towards the pre-training task, we present a novel Sketch Gestalt Model (SGM) to help train the Sketch-BERT. Experimentally, we show that the learned representation of Sketch-BERT can help and improve the performance of the downstream tasks of sketch recognition, sketch retrieval, and sketch gestalt.
Motivation & Objective
- To address the limitation of CNN-based models that treat sketches as 2D images, rather than sequential vector data.
- To develop a general-purpose sketch representation model that generalizes across recognition, retrieval, and generation tasks.
- To introduce a novel self-supervised pre-training task—Sketch Gestalt—that leverages Gestalt principles to recover masked sketch points.
- To adapt the BERT framework to the sketch domain with domain-specific embeddings and a refined architecture.
- To demonstrate that pre-training via sketch gestalt improves downstream performance and accelerates convergence.
Proposed method
- Proposes a three-level embedding: point, positional, and stroke embeddings, tailored for sequential sketch data in vector format.
- Introduces a refinement embedding network to project raw sketch tokens into the transformer input space.
- Designs a novel Sketch Gestalt Model (SGM) inspired by BERT’s masked language modeling, predicting both continuous position and discrete state values of masked sketch points.
- Employs a multi-head, weight-shared transformer encoder with self-attention to model long-range dependencies in sketch sequences.
- Uses a dual-objective self-supervised pre-training task: masked position prediction and masked state prediction.
- Fine-tunes the pre-trained Sketch-BERT on downstream tasks such as sketch classification, retrieval, and gestalt reconstruction.
Experimental results
Research questions
- RQ1Can a BERT-style transformer model be effectively adapted to learn general-purpose sketch representations from sequential vector data?
- RQ2Does self-supervised pre-training via a Sketch Gestalt task—recovering masked sketch points—improve downstream sketch understanding performance?
- RQ3How do architectural choices such as depth, width, and embedding design affect Sketch-BERT’s performance on sketch tasks?
- RQ4Can pre-training on large-scale sketch data reduce the number of training epochs required for convergence on downstream tasks?
- RQ5How does Sketch-BERT compare to CNN-based models in generative sketch reconstruction tasks?
Key findings
- Sketch-BERT achieves a top-1 accuracy of 88.30% and top-5 accuracy of 97.82% on sketch classification, outperforming baseline models.
- On sketch retrieval, Sketch-BERT reaches 85.47% top-1 and 93.49% top-5 accuracy, demonstrating strong generalization.
- Pre-training on 70K samples from QuickDraw reduces the number of training epochs needed for convergence from ~50 to ~5, significantly accelerating training.
- The architecture with 8 layers, 12 attention heads, and 768 hidden size (8-12-768) achieves the best balance between performance and convergence.
- The Sketch Gestalt task is highly effective: CNN-based models fail to reconstruct complex sketches due to artifacts, while Sketch-BERT successfully learns structural and semantic patterns.
- Increasing the number of training samples per class improves performance by up to 3% in top-1 accuracy, while increasing the number of classes yields no significant gain.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.