Glyce
A Chinese text model that adds glyph vectors, computed from character images, to BERT.
Language · 811 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Language
- Parameters
- 185.7M
- Operations
- 811
- Framework
- PyTorch
- Recurrent
- No
- Published
- NeurIPS 2019
- Cited by
- 163 (as of 26 October 2026)
- Authors
- Yuxian Meng, Wei Wu, Fei Wang and others
- Source
- GitHub: ShannonAI/glyce
- License
- Apache-2.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m17082
- Graph hash
- 38f2b44f0a5e9ad0ec4ae9392faa977962081569616c8cd1159a7566388b877e
- Skeleton hash
- 11ea3c244989b219565a162fc4a794d41f18b1eb51b92ee784ac5f45c14625df
- Architecture hash
- 6d10af6df2db5d7666ee24fb0f13e25ff9f51251bd36c0b9e6bc443a58fa4b52
- Diagram SHA-256
- db3bd45493754ea3bfa7ba00a386758e2955fb6fef1188b25a53e66795c357f7
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
Glyce builds representations of Chinese characters from their glyphs, the written shapes of the characters, by treating each character as an image and running a CNN over it. The starting point is that Chinese is a logographic language, so NLP tasks for it should benefit from glyph information.
The paper relies on three techniques. Glyce encodes images of historical and contemporary scripts, along with scripts of different writing styles. A CNN called the Tianzige-CNN uses max-pooling to reduce the feature map to a 2 by 2 grid and then applies group convolutions. Image classification is added as an auxiliary training objective to prevent overfitting.
This model is the combination of Glyce with BERT, which has four layers: the BERT layer, the glyph layer, the Glyce-BERT layer and the task-specific output layer. Position embeddings are added to the glyph embeddings, and the result is concatenated with the BERT output. For sentence classification, the representation of the CLS token in the task-specific layer goes to a softmax layer that predicts the label. The paper reports an F1 score of 80.6 on the OntoNotes dataset of NER, 1.5 above BERT.
Key idea. Glyce represents Chinese characters as images, encoding historical scripts with a Tianzige-CNN and an auxiliary image-classification objective to produce glyph vectors for Chinese NLP tasks.
- glyce
- glyph vectors
- glyce-bert
- chinese character representation
- glyph embeddings
- tianzige-cnn
- chinese nlp
- chinese text classification
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{meng2026glyceglyphvectorschinesecharacter,
title={Glyce: Glyph-vectors for Chinese Character Representations},
author={Yuxian Meng and Wei Wu and Fei Wang and Xiaoya Li and Ping Nie and Fan Yin and Muyu Li and Guoyin Wang and Qinghong Han and Xiaofei Sun and Jiwei Li},
year={2026},
eprint={1901.10125},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/1901.10125},
}