Glyph-aware Embedding of Chinese Characters
Paper · 2017 · Falcon Z. Dai and Zheng Cai
Summary
Chinese sentences are typically written without spaces between words. A system can start from the characters it sees, but it still has to decide what information to keep about each character. A conventional embedding gives each character its own learned vector. Dai and Cai ask what a system could learn from the shape of the character as well. The same component appears in the written forms of snow, hail, and thunder, for instance. An embedding derived from the glyph could let what the system learns about one of these characters inform how it represents the others. The authors test that idea by changing how the system builds its character representations. Word embeddings
The method renders each character as a grayscale image and uses a convolutional neural network to convert the pixels into a vector. Convolution lets the system look for a pattern in different parts of the image, which matters because a component can appear in different positions in different characters. The authors also try adding the image-derived vector to a conventional vector for the character’s identity. Keeping the identity separately gives the system a way to distinguish characters whose shapes are similar but whose meanings differ. In each comparison, a recurrent network reads the resulting vectors and makes predictions about the text.
The clearest gains come from Chinese word segmentation, where the system has to decide where each word ends. A bidirectional recurrent network with the combined identity and glyph representation reaches an F1 score of 96.15 on Peking University data and 97.43 on Microsoft Research data. F1 combines precision and recall for the words the system identifies. Both scores exceed those of the previous segmenter reported for comparison. The glyph-only results depend on the recurrent architecture, while the combined representation produces the highest F1 on both datasets when paired with the bidirectional network. Tokenization
Next-character prediction yields a different result. On the Microsoft Research test split, the identity-only baseline achieves a perplexity of 47.53, where lower is better. The combined representation reaches 47.75, and the convolutional glyph-only representation reaches 55.51. Convolution does improve substantially on a simpler pixel-based baseline, which scores 71.51. An analysis of the combined vectors finds that the glyph component tends to have low magnitude in the next-character experiment. Together, the comparisons show where character shape helped in these experiments and where the ability to extract features from a glyph yielded little additional predictive value.
Deep dive: Glyph-aware Embedding of Chinese Characters
Dai and Cai turn Chinese character glyphs into embeddings that improve word segmentation but offer little help in predicting the next character. · about 31 minutes to read
The problem and its context
Why start from characters?
A word-based system needs a sequence of words before it can process them. In ordinary Chinese writing, a reader sees a sequence of characters without spaces indicating which of them form words together. A traditional processing pipeline can put a separate segmenter in front of a word-based system. That segmenter might rely on hand-written rules or be trained on its own. Either way, its decisions determine which units the next stage receives. The paper points out that ambiguities can sometimes be resolved by a later task. Once an early stage has committed to a particular segmentation, the later stage has to work with those decisions. The authors also describe corpora with explicit word segmentation as scarce.
Starting from characters lets a system receive the sequence directly. It can still learn patterns that span several characters, and it can be trained under the objective of the task the user ultimately cares about. The authors connect this possibility to differentiable neural networks, in which the parameters that represent the input can be adjusted along with the parameters that make predictions. For segmentation itself, the advantages are especially easy to see. The input already supplies the ordered characters. The job of the system is to infer where words end, and the training signal can shape the representation of the very characters around which those decisions are made.
The paper situates this idea beside earlier success with character and sub-word units in applications involving Western languages. The comparison raises a question about what counts as an equivalent input unit. In English, the authors point to a small alphabet. Chinese has a large inventory of characters, many of which have individual significance. The standard-character inventory discussed in the paper contains 3,500 characters in its most common tier and more than 8,105 characters overall. Treating every Chinese character as the equivalent of an English word would also miss the fact that a Chinese word can extend across characters. Some words consist of a single character, so the relationship varies across the vocabulary. The authors suggest the English word fragment as a closer analogy. Subword tokenization
The authors give a distributional reason for drawing the distinction as well. They cite a study showing that Chinese character frequencies differ substantially from the pattern of decline by rank described by Zipf’s law. They also cite evidence that frequencies of segmented Chinese words can follow it. Their point is about the choice of unit. Ranking characters and ranking words give different views of the text, even though both rankings start from the same writing system. A system can use characters as its computational input without making the stronger linguistic assumption that each input position corresponds to a word. Zipf’s law
What the written form can contribute
In a conventional identity embedding, each character is assigned its own location in a table of vectors. Training can make the vectors for related characters similar, because related characters may produce similar signals in the task. The identity lookup itself supplies no relationship between an entry and the entries around it. Changing an arbitrary assignment of IDs would change the addresses used for lookup without changing which characters an example contains. The assignment therefore carries none of the visual similarities that a reader could recognize from looking at the characters. Dai and Cai ask whether those similarities are worth giving the system directly.
The paper’s examples show several kinds of clues. The component 雨, associated with rain, can be seen in 雪 for snow, 雹 for hail, and 雷 for thunder. A recurring component of that sort is called a radical in the paper’s example. A feature that responds to it could give the characters a shared signal related to weather. The authors give 打, 提, and 抓 as another family. Their shared component 扌 occurs in examples glossed as hitting, lifting, and grabbing, illustrating a clue about grammatical use. The forms 乙, 亿, and 忆 illustrate a possible pronunciation clue, with the related readings given as yǐ and yì. These examples motivate learning from shape. They provide distinct reasons why a repeated design in the writing system might matter to a task.
Shape can be misleading as well. 土 and 士 look very similar in spite of the different meanings the paper associates with them. 人 and 入 offer a second example, with the meanings person and enter. An image-based representation that emphasizes large common patterns could give too little weight to the marks that separate the members of each pair. A task may also need information that the pixels do not readily reveal, even when the characters are easy to tell apart by eye. The authors therefore frame their proposal as a hypothesis about statistical sharing. A component might let a system reuse something it has learned, while the surrounding marks and the identity of the complete character can still carry crucial information.
The composition of a character adds another issue. The paper contrasts the vertical arrangement in 昌, the horizontal arrangement in 明, and the compound arrangement in 晶. It also shows how the component 口 appears at different positions in 喊, 员, 含, and 向. A useful representation should be able to notice recurrence across such placements. It may also need to preserve information about how a component fits with the rest of the character. The identity of a component and its position are separate pieces of evidence. A representation that preserves the rendered image gives the system an opportunity to use both.
What earlier approaches retained
Dai and Cai discuss earlier work by Shi and colleagues that represented characters using radicals derived from the Wubi input method. This gives characters a way to share information through components, so the basic idea of looking inside a character had precedent. The difference is in what the input preserves. As the authors describe it, the Wubi-based representation omits component scale and spatial arrangement. A rendered glyph retains both in the image. Working from pixels also means the proposed embedder can search for recurring shapes without receiving an explicit list of the radicals in each character.
The authors draw their architectural inspiration from convolutional networks in computer vision. A glyph is small enough to serve as an image input, and filters can learn to respond to shapes in local regions. This creates a link between the visual problem of recognizing recurring marks and the linguistic problem of predicting something from a character sequence. The training objective still comes from text. The system learns visual features for their contribution to segmentation or next-character prediction. The paper distinguishes this setting from handwriting recognition, where visual appearance is already essential to establishing which character was written.
The paper also records related research carried out independently around the same time. Liu and colleagues studied character-level composition with visual features, used a convolutional approach close to Dai and Cai’s, and evaluated it on a document classification task. Dai and Cai describe their own way of combining identity and glyph vectors as roughly analogous to Liu and colleagues’ early fusion. Costa-jussà and colleagues used glyph information in Chinese–Spanish translation. The paper likens their approach to its simpler, single-layer image embedder. These projects used different task objectives, which matters for Dai and Cai’s central question. Character shape can be supplied in several ways, and its value has to be judged in relation to the decision the system is trained to make. Text classification · Machine translation
The method, step by step
From printed shape to a character vector
The authors begin with the characters in a sentence. For the visual route, they render each character with Google’s Noto font and treat the result as a grayscale image. The grayscale values describe the shape as it appears on a grid, including where strokes sit relative to one another. Each image serves as input to an embedder, a feed-forward network that takes a character and returns a vector. The recurrence comes later. The same embedder is applied at successive positions, so a sentence becomes a sequence of vectors in its original character order.
For the identity route, the embedder retrieves the learned vector associated with a character’s ID. For the convolutional route, it computes a vector from the image. A convolutional filter applies the same set of learned weights at successive locations. If a configuration of pixels is informative in several places, weight sharing allows a filter to respond to it wherever those locations are sampled. A filter can thus exploit recurring evidence across both different positions and different characters. It is the learned response that is shared. The individual glyphs still supply different pixel arrangements.
The filter outputs are passed through a rectified linear unit, or ReLU, which keeps positive responses and sets negative responses to zero. A fully connected layer after the convolutional stage converts the resulting features to the embedding size required by the task. A fully connected layer can use features from across the image when producing each output coordinate. The representation can therefore draw on patterns that recur locally and on the arrangement of the responses across the glyph. The use of shared filters encourages sensitivity to recurrent shapes across positions. It does not impose identical vectors on characters that contain one of the same shapes.
The authors also test a simpler image path in the next-character experiment. This linear embedder uses a single fully connected layer to transform its pixel input into an embedding. The comparison gives the convolutional route a relevant counterpart. Both receive information from the character image, while convolution introduces a mechanism that can share a local detector across the image. A result in favor of convolution in this comparison speaks to how the image is encoded. The question of whether an image adds useful information to a conventional identity embedding requires another comparison.
The mixed embedder supplies that comparison. It retrieves the ID vector and computes the CNN vector at the same width, then adds them coordinate by coordinate. Each coordinate of the result can include a contribution from identity and a contribution from shape. The next stage receives a vector of the same width as it would from either source on its own. This is a practical feature for the experimental design, because the recurrent network can be kept fixed within a comparison. It also shapes what the network can do with the inputs. The recurrent part receives their sum, with no separate input slot indicating which component contributed a particular value.
From a Chinese character to a sequence prediction
The steps in order.
The use of an identity vector alongside the glyph is particularly important for similar-looking characters. Two images that give rise to similar convolutional responses can still start from different ID vectors. Conversely, characters that benefit from sharing a visual feature can retain that feature in the sum even if they have very different learned identity vectors. The training objective decides how the available signals are used. The sum includes no fixed requirement that the image have a particular influence. It can have a large effect, a limited one, or an effect concentrated in a subset of the coordinates.
Each task uses the embedding as input to a recurrent network. A recurrent network processes a sequence while carrying information in a hidden state, an internal vector updated as it reads. Because the embedding functions feed this network, the loss from a prediction can train the representation upstream. A glyph filter can become useful by helping answer a question about the sequence. It receives no separate label telling it what a radical means or whether its activation corresponds to a particular stroke. This arrangement is what makes the method task-dependent. A representation learned to mark word boundaries need not organize its features the same way as a representation learned to anticipate forthcoming characters.
Predicting the next character
The language objective assigns a probability to a sentence by proceeding through its characters in order. It starts with the probability of the opening character. For each following position it assigns a probability to the actual character conditioned on the preceding characters. The product gives the probability of the entire sequence. A character can be difficult to predict in one sentence and easy in another, because the conditional probability depends on what the system has already read. The identity or glyph embedding influences the information that the recurrent network can carry forward about that history. Language model
p(c₁, …, cₙ) = p(c₁) × ∏ᵢ₌₂ⁿ p(cᵢ | c₁, …, cᵢ₋₁)
Here p is a probability. The symbol c denotes a character, the subscript i denotes its position, and n is the number of characters in the sentence. The left side is the joint probability of the sequence from c₁ through cₙ. On the right, p(c₁) is the probability of the first character. The product sign ∏ means to multiply the factors from position 2 through position n, and × joins that product to the initial probability. The vertical bar means “given.” The conditional factor at position i is the probability of cᵢ after observing c₁ through cᵢ₋₁. The ellipsis stands for the intervening characters.
The recurrent part of this experiment is a gated recurrent unit, abbreviated GRU. Its gates regulate what information from the preceding state is retained and how the state changes with new input. The progression through the sentence follows the direction in the probability formula. The network has a 128-dimensional hidden state, and each embedder produces a 300-dimensional vector. The widths refer to different parts of the system. The first is the size of the internal state that carries information forward, and the second is the size of the representation supplied for each character.
The image embedder for this task has two convolutional layers. The first applies 32 filters of size (7, 7) with stride (2, 2). The second applies 16 filters of size (5, 5), also with stride (2, 2). A filter’s size describes the region it examines, and stride specifies the step between positions at which it is applied along the image axes. A fully connected layer at the end produces the embedding, and the authors specify ReLU as the nonlinearity. The ID, linear, CNN, and combined alternatives all supply the same embedding width to the GRU. The resulting comparison covers several different decisions about representation while keeping the downstream architecture fixed.
The vocabulary for these runs is limited to 4000, with one unknown class. The unknown class gives the sequence predictor a way to handle items beyond the identities distinguished by its vocabulary. It also matters to the interpretation of perplexity. The task measures prediction over the experiment’s chosen output classes, so it tests the ability to anticipate characters at the granularity of that vocabulary. The recurrent architecture and the prediction scope are shared across the embedding comparison.
Finding where words end
For word segmentation, the input is a full sentence, and the system assigns a binary label to every character. The label answers whether a word boundary follows that character. A string of labels yields a segmentation when the characters are grouped according to the predicted endings. If several characters form a word, its internal positions have a negative label and its final character has a positive label. Predicting a boundary after the wrong character changes which characters are grouped together, so errors at particular positions affect the recovered words.
The paper illustrates the labeling with 这 是 一句 话 。, where the spaces show the intended segmentation. The labels are 1 1 0 1 1 1, one per character including punctuation. The 0 follows 一 and keeps it together with 句. The 1 after 句 ends the word. The other positive labels close the preceding single-character units in the example. This representation lets the system predict over the original character sequence and express a word of more than one character through successive decisions along that sequence.
The authors use both a GRU that reads in a single direction and a bidirectional long short-term memory network, abbreviated LSTM. An LSTM is another recurrent architecture with gates for managing information as the sequence is processed. In the bidirectional setup, the state used at a given position can reflect what comes before and after it. This is possible because segmentation starts with the whole sentence in view. A following character can help resolve whether the current character ends a word. The next-character experiment has a different information constraint, since the following character is precisely what the system is trying to predict.
The segmentation CNN uses one convolutional layer with 16 filters of size (5,5) and stride (2,2), followed by a fully connected layer that yields a 100-dimensional vector. The layer uses ReLU. The recurrent hidden units are 100-dimensional. A fully connected output layer maps the state at each character to its boundary decision. The shorter convolutional configuration and the different embedding width are part of this task’s setup. The paper compares embedders under each recurrent segmenter, so the experiment can ask how the glyph input affects a GRU and how it affects a bidirectional LSTM. The vocabulary is again 4000 with one unknown class.
Training and reuse of glyphs
The authors use the Adam optimizer throughout the experiments. An optimizer updates trainable weights in response to gradients of the task objective. Here those updates can reach the character embeddings as well as the recurrent predictor. The glyph image comes from the font and is held as input. The learned quantities in the CNN path include the filter weights and the weights that map their responses to the embedding. With the mixed path, training also updates the identity lookup vectors. Glyph features that assist the text prediction can thus be reinforced through the same training process that adjusts the recurrent network.
A character that appears repeatedly can reuse its rendered image. The authors cache the glyphs and report that this reduces repeated rendering calls for the same character by 1,000 times. That figure describes rendering calls and does not measure total training speed. The cache also clarifies what stays fixed across ordinary occurrences of a character. A character can appear in many textual contexts, each generating different task evidence, while its base glyph image remains the same. The authors implement their experiments in TensorFlow and release the chinese-char-lm implementation.
How the representation scales
The paper distinguishes the trainable lookup table from the resources needed to represent characters through a CNN. In the lookup case, expanding the vocabulary adds another independently learned vector for each character. In the image case, the network shares its parameters across characters, and expanding the vocabulary adds rendered glyphs. The authors express that comparison in terms of vocabulary size and embedding width, for the architecture under discussion.
O(N + K)
This is the paper’s scaling expression for the CNN representation when rendered glyphs and trainable weights are counted together. O denotes order of growth, N is the vocabulary size, and K is the dimension of an embedding vector. The addition sign joins the contributions from the vocabulary and the embedding width. The paper treats the basic convolutional architecture and the size of a rendered glyph as fixed for this comparison.
O(K)
Here O again denotes order of growth and K is the embedding dimension. This expression describes the trainable parameters of the CNN embedder under the paper’s accounting. The same CNN is applied to the characters in the vocabulary. Its trainable parameter count therefore has no separate term for an independently learned weight vector for each glyph.
O(N)
Here O denotes order of growth and N is the vocabulary size. This expression describes the collection of rendered glyphs used by the CNN. Each vocabulary entry contributes its glyph to that collection. The stored images are input resources, and their count is reported separately from the trainable weights.
O(NK)
Here O denotes order of growth, N is vocabulary size, and K is the embedding dimension. The adjacent symbols NK mean their product. The ID table grows this way because it contains a trainable vector of width K for each of the N entries. The authors use this comparison to argue that the shared visual embedder is a compact alternative. The mixed embedder retains the lookup table as well as the visual path, so the compactness argument for the CNN alone and the performance case for the mixed system concern different configurations.
Experiments and results
The benchmarks and what their scores measure
The Second International Chinese Word Segmentation Bakeoff is the source of the authors’ data. They use the Microsoft Research dataset, abbreviated MSR, for next-character prediction. They use both MSR and the Peking University dataset, abbreviated PKU, for segmentation. This lets the paper evaluate the boundary task on separate datasets and use one of those datasets for a task with a different objective. In next-character prediction, the target is the forthcoming character in the sequence. In segmentation, the target is a division of the observed sequence into words. Evaluation & benchmarks
For the next-character experiment, the paper reports perplexity on the MSR test split. Perplexity summarizes the probabilities assigned to the observed characters. It falls when the system gives more probability to the characters that actually occur. A system can assign the highest probability to the correct character while still spreading substantial probability among alternatives, so perplexity evaluates more than the rank of the correct answer. The comparison uses the same vocabulary and GRU configuration across the input conditions, which gives the scores a common basis.
For segmentation, the paper reports precision, recall, and F1 on each benchmark. Precision reflects how many of the words produced by the system match the reference segmentation. Recall reflects how many reference words the system recovers. F1 combines the two, so it depends on both producing correct spans and finding the words that should be there. These are scores for the resulting segmentation. The recurrent predictor emits a binary output at each character, but its results are judged by the words those outputs establish.
The ID embedder is the internal baseline for both tasks. It learns a separate vector for each vocabulary entry and feeds the same sequence architecture used in the corresponding visual condition. The CNN embedder tests what can be learned when the embedding comes from shape. The mixed setting tests what happens when shape accompanies identity. The next-character comparison also includes the linear image route. In segmentation the authors add a published benchmark result, NWS from Cai and Zhao, to their own architecture comparisons. That previous result sets a performance reference. The comparisons within the paper’s recurrent setups provide more direct evidence about the effect of changing the embedder.
Next-character prediction on MSR
Embedding alternatives on MSR test perplexity
The identity lookup achieves the lowest perplexity, with the mixed embedder close behind.
The numbers
| System or setting | perplexity |
|---|---|
| ID lookup | 47.53 |
| Linear glyph embedder | 71.51 |
| Convolutional glyph embedder | 55.51 |
| ID plus convolutional glyph embedder (this paper) | 47.75 |
The ID lookup gives the best result on the MSR test split, with perplexity of 47.53. The mixed embedder reaches 47.75. Its proximity to the ID score is informative because the character images had a route into the predictor alongside the full identity representation. Any benefit from the extra input would have had an opportunity to appear in this comparison. The aggregate score provides no evidence of an improvement from that addition. It puts the mixed configuration near the strongest baseline for the task.
Among systems using only an image-derived embedding, the architecture makes a considerable difference. The linear transform gives a test perplexity of 71.51. The convolutional embedder reaches 55.51 on the same split. This is evidence that the route from pixels to vector matters even when the rendered input is held fixed. Shared local filters yield a better result than the single fully connected layer in the configurations tested. The residual gap between the convolutional and ID systems shows why improving the image encoder and improving the overall predictor are separate outcomes.
There are therefore several performance questions inside the same experiment. One asks whether the glyph is informative enough to function as the sole input representation. The glyph-only CNN produces usable predictions but trails the identity lookup. Another asks whether convolution is an improvement over the tested linear way of processing those pixels. The scores support that comparison. The final question asks whether the convolutional embedding gives the identity-based predictor additional help. The mixed result gives little support for that claim on this benchmark.
Word segmentation on PKU
Segmenter and embedding alternatives on PKU F1
Adding glyphs to the bidirectional LSTM produces the highest F1 among the reported systems.
The numbers
| System or setting | F1 |
|---|---|
| GRU with ID | 85.75 |
| GRU with convolutional glyphs | 89.78 |
| GRU with ID plus convolutional glyphs | 89.62 |
| Bidirectional LSTM with ID | 95.36 |
| Bidirectional LSTM with convolutional glyphs | 94.81 |
| Bidirectional LSTM with ID plus convolutional glyphs (this paper) | 96.15 |
| NWS | 95.16 |
On PKU, the mixed bidirectional configuration combines precision of 96.91 with recall of 95.41, for F1 of 96.15. The ID-only version of the same recurrent setup obtains precision of 96.06 and recall of 94.66, with F1 of 95.36. The change to the mixed input is associated with gains on both components of the evaluation in this comparison. The previous NWS result has precision of 95.5 and recall of 94.9, with F1 of 95.16. The mixed system exceeds that reported F1, as does the ID-only bidirectional LSTM used by the authors. The paper’s own ID configuration is consequently a demanding reference for estimating the contribution of the glyphs.
The glyph-only bidirectional LSTM shows a different balance on PKU. It records precision of 94.73 and recall of 94.88, yielding F1 of 94.81. Its recall is above that of the ID-only bidirectional LSTM, while its precision is lower. The combination of the two sources improves both metrics over the glyph-only condition. The pattern is compatible with the idea that an explicit identity vector helps distinguish cases that the image alone handles less reliably. The aggregate figures do not identify which characters or types of word produced the changes.
The GRU comparisons establish that the ordering of embedders can depend on the sequence architecture. Its ID baseline has precision of 87.41 and recall of 84.14 on PKU. With glyphs alone, those become 90.03 and 89.54. The mixed GRU gives precision of 90.46 and recall of 88.80. Its precision is the highest of the GRU conditions on this dataset, while its recall is below that of the glyph-only GRU. The combined effect is visible in F1, where the glyph-only GRU leads the mixed GRU. The mixed embedder’s strongest performance on PKU depends on its pairing with the bidirectional LSTM.
Word segmentation on MSR
Segmenter and embedding alternatives on MSR F1
The mixed bidirectional system again leads on F1, with the glyph-only GRU ahead of the other GRU settings.
The numbers
| System or setting | F1 |
|---|---|
| GRU with ID | 86.10 |
| GRU with convolutional glyphs | 88.33 |
| GRU with ID plus convolutional glyphs | 88.00 |
| Bidirectional LSTM with ID | 97.29 |
| Bidirectional LSTM with convolutional glyphs | 97.03 |
| Bidirectional LSTM with ID plus convolutional glyphs (this paper) | 97.43 |
| NWS | 96.4 |
On MSR, the mixed bidirectional LSTM achieves precision of 97.82 and recall of 97.04. Its F1 of 97.43 is the highest reported for the dataset. The ID-only bidirectional configuration has precision of 97.34 and recall of 97.25, with F1 of 97.29. The mixed system’s precision increases while recall decreases relative to that baseline. The balance between those movements favors the mixed setting on F1. The glyph-only bidirectional configuration has precision of 97.07 and recall of 96.98, with F1 of 97.03. It is below the mixed setting on both precision and recall.
The external NWS comparison on MSR reports precision of 96.1, recall of 96.7, and F1 of 96.4. The internal ID-only bidirectional system already exceeds the NWS F1 on MSR, just as it does on PKU. The strongest direct evidence for the visual contribution is the comparison with the ID-only system under the same recurrent configuration. On MSR, the higher F1 of the mixed system accompanies a trade in precision and recall. On PKU, both measures move in its favor. A reader interested in either type of segmentation error can use the separate metrics to see what the headline F1 leaves implicit.
With the single-direction GRU on MSR, ID alone obtains precision of 86.97 and recall of 85.25. The glyph-only GRU reaches precision of 89.93 and recall of 86.79, giving the leading F1 among the GRU variants. The mixed GRU attains precision of 88.81 and recall of 87.19. It improves recall over the glyph-only variant but has lower precision. Across both segmentation datasets, the glyph-only GRU has the strongest F1 within its recurrent family, and the mixed bidirectional LSTM has the strongest F1 overall. The recurrent predictor and the input representation both matter to which system performs best.
What the ablations show
Image processing, identity, and context
The paper’s main controlled comparisons replace the embedder and preserve the recurrent architecture within each comparison. The simplest question is whether the shape information can sustain the task on its own. In next-character prediction, the convolutional alternative trails the ID baseline. In segmentation, it raises F1 for the GRU on both benchmarks and lowers it for the bidirectional LSTM on both. This matters because a glyph-only result reflects two changes at once in the available evidence. The system gains access to pixels and gives up the separate lookup vector. Its score measures the net effect of that substitution.
Adding the glyph vector to the ID vector addresses a different question. The identity is still represented by a trainable lookup, and the mixed system can learn what value to assign to the image signal. The strongest evidence for complementarity comes from the bidirectional segmenter. In that setting, the mixed system scores above both single-source variants on each segmentation benchmark. The GRU results place a limit on the generality of this observation. With that predictor the mixed version falls below glyphs alone in F1 on both datasets. A path for both signals to reach the recurrent network is sufficient to let them help one another in some settings. The training results also show that providing both paths does not guarantee that they will be used to best effect.
Comparing the two recurrent families provides context for those findings. Across the embedding conditions, the bidirectional LSTM is the stronger segmenter. The comparison changes recurrence type and direction of access together, so it cannot isolate the contribution of either architectural choice. It does show that a conclusion about a glyph embedder drawn solely from the single-direction network could give the wrong ordering for the stronger segmenter. The segmentation scores support statements about particular combinations of input representation and recurrent architecture.
In the next-character task, the linear alternative provides a more specific comparison about the processing of pixels. The input remains the rendered character while the embedder changes from a fully connected transformation to a convolutional stack with a projection. The CNN’s lower perplexity shows that the tested convolutional configuration uses the glyph more effectively. This comparison changes the architecture as a whole, including depth and the structure of the calculation. It cannot say which individual design choice explains the gain. The role of spatial weight sharing is a rationale for the design and a plausible contributor to the result, rather than a separately measured effect.
Increasing variation in the image input
Dai and Cai suspect that the convolutional embedder may receive too little variation in the next-character experiment. Under the base rendering procedure, a character has one glyph in the chosen font. Repeated occurrences of the character provide different text contexts while repeatedly presenting the same image. The authors report that a sub-glyph structure appears in about 40 characters on average. They compare this sparsity with the 6,000 training examples per digit class in MNIST, a handwritten digit dataset. In the comparison they are drawing, those digit examples give an image learner many different observations of the same type, while each Chinese character starts with a single rendered form.
The test they make is to apply random horizontal and vertical translations to the glyphs during training. Translating an image changes where its strokes fall while keeping the same character as its source. The procedure gives the convolutional filters more positional variation. The text prediction target stays the same, which lets the authors test whether the added variety of appearances can help the predictor under the existing training objective.
∆x, ∆y ∈ {−2, −1, 0, +1, +2}
The symbols ∆x and ∆y are the horizontal and vertical displacements applied to the image. The membership sign ∈ says that each displacement is selected from the set inside the braces. Negative and positive signs denote opposite directions along the corresponding axis, and 0 represents no displacement along that axis. The commas separate the two displacement symbols and the possible offset values.
The authors describe the procedure as a 25-fold increase in input variation. The resulting perplexity is 49.66, which they report as a deterioration. The result gives a direct answer about these small translations in the tested setup. They did not remedy the weak contribution of the glyph features to next-character prediction. Positional jitter preserves the repertoire of shapes and moves them around. The result leaves open whether a different kind of image variation or another source of training information would affect what the embedder learns. It also leaves open whether restricted variation was the main reason the baseline mixed setting did not improve perplexity.
Looking at the magnitude of the two signals
The paper also examines the trained representations inside the mixed system. The two components are summed, so the size of each vector gives a way to inspect its potential contribution. The authors plot distributions of Frobenius norms for the ID component and for the CNN component. For an embedding vector, its norm measures overall magnitude across coordinates. A small glyph vector contributes a comparatively small displacement to the result of adding it to an identity vector. This is a diagnostic of how the representations are being combined, separate from the task score.
The distributions differ between the segmentation and next-character experiments. The feature the authors emphasize is the compressed magnitude of the CNN embeddings in the next-character system. That pattern is consistent with the system relying mainly on the identity component. It agrees with the small change in perplexity when the glyph path is available. The analysis goes beyond checking whether the mixed predictor won. It asks whether training made appreciable use of the extra component before the vector reached the recurrent network.
The magnitudes leave several questions unanswered. A downstream network can be sensitive to a small component along a particular direction, and a large component can overlap with information already carried by the ID vector. A distribution of norms also averages away differences among characters. The paper’s diagnostic supports a broad interpretation about the limited influence of the CNN embedder in next-character prediction. It does not assign individual segmentation decisions to visual features, and it does not demonstrate that a particular filter responds to a linguistically defined radical.
Limitations
Limits identified by the authors
The authors present the evidence for glyph information as specific to the tasks they examine. The segmentation experiments show improved scores for the strongest mixed system. The next-character results leave them with an unresolved question about why the CNN contributes so little there. Their proposal of insufficient training variation is a possible explanation. The jitter experiment shows that one way of increasing variation fails to help. In their discussion of future work, they suggest giving the CNN additional supervision through bag-of-stroke prediction, where predicting which strokes occur would be an auxiliary objective alongside the text task. The paper gives no result for that proposed training procedure.
They also note that the evaluated tasks emphasize information related to meaning and grammatical use. The pronunciation examples explain why glyph features might be useful in other settings, but they do not supply a phonetic evaluation. The authors propose investigating a task such as phoneme prediction. The distinction matters because a visual pattern can carry different sorts of information. An improvement in finding word boundaries does not establish that the system can infer a character’s pronunciation. Testing that ability would require a task whose targets directly measure it.
The authors highlight ambiguous appearance and the difficulty of interpreting the neural networks. The similar forms used to motivate the mixed representation illustrate the first issue. Visual recurrence can be informative in one family of characters and misleading in another. Learned filters might exploit subtle features that separate near lookalikes, but the reported scores do not show whether they do. Interpretability is a separate concern. Better task performance indicates a useful change in the system’s predictions under a particular setup. It gives little direct information about the visual rule the system used or whether that rule corresponds to the kinds of components the authors discuss. Interpretability
Limits of what the comparisons establish
The segmentation results cover PKU and MSR, and the next-character results cover the MSR test split. Within that scope the largest clear gains are associated with segmentation. The tasks also differ in what the system predicts, how much context it can access, and which visual and recurrent architectures the authors use. The successful segmentation setting uses the whole sentence and a bidirectional LSTM. The next-character setting proceeds forward through a sequence with a GRU. The contrast is informative about the tested systems, but it does not isolate a single explanation for why shape is useful in one setting and contributes little in the other. The difference could depend on how the task and the architecture interact.
The segmentation tables give benchmark scores for each setting. They do not give variation across repeated training runs or statistical intervals for the comparisons. The strongest mixed system leads on both datasets, and the PKU and MSR precision and recall figures specify how those leads arise. The reported numbers establish the ordering of the results in the paper. They do not specify how consistently that ordering would recur across independently trained instances. This is especially relevant to the mixed and ID-only bidirectional results on MSR, where the F1 scores are close and the metrics move in different directions.
There is also a distinction between the internal and external comparisons. The NWS scores put the best segmentation results in the context of earlier benchmark performance. The paper’s own bidirectional ID baseline already exceeds that earlier F1 on each dataset. Accordingly, the gain over NWS cannot all be credited to incorporating glyphs. The comparison between the ID and mixed variants of the bidirectional LSTM controls the recurrent architecture and is better suited to that question. Even there, the mixed system adds a trainable visual path. A test with a matched amount of extra capacity receiving a different signal would address whether the glyph information itself accounts for the improvement. The paper reports no such control.
All glyphs are rendered with Noto. Small translations probe the effect of moving its glyphs within the image. They do not test how the learned representation responds to different typefaces or other ways the same character can be written. The vocabulary and its unknown class likewise constrain what can be concluded about rare or unseen forms. The CNN can in principle process an image through shared weights, which motivates potential transfer between characters with shared components. The paper does not report a separate experiment that withholds selected characters during training and measures this transfer at evaluation. Benchmark improvements are evidence about the given inventory and task, without showing how much of the benefit comes from transferring knowledge to less familiar characters.
The paper’s account of parameter growth concerns the embedders. It supports a compactness argument for a shared CNN in comparison with a separate trainable vector per vocabulary entry. The best segmenter uses the combined representation, keeping both a table and a visual network. Practical costs also include storing rendered inputs and computing image features. The caching result measures the avoided rendering calls, and the discussion gives an asymptotic comparison of representation sizes. Together they describe aspects of efficiency without providing an end-to-end memory or runtime comparison between the benchmark systems. Efficient models & compression
Finally, the performance scores and the norm diagnostic answer questions at different levels. The segmentation metrics establish the quality of predicted word spans. The norm plots indicate that the visual component tends to be small in the mixed next-character experiment. Neither supplies a character-by-character explanation of decisions. In particular, the weather, action, and pronunciation examples remain illustrations of signals the CNN might learn. Establishing that it actually learns those signals would require measurements tied to the relevant groups of characters or the particular decisions in which they occur.
What came after
The later survey by Mielke and colleagues places character-based processing within a broader history of the units used in natural language processing. Its subject is how systems represent text when what they encounter extends beyond a predetermined word vocabulary. Dai and Cai’s experiment speaks to a choice that arises after selecting characters as the input units. A character can enter the system through an arbitrary identity or through a representation that also uses its written shape. Untangling the choice of unit from the choice of representation helps explain why character-based approaches can differ even when they take the same sequence as input. Between words and characters
Eger and colleagues address visual information from the perspective of attacks and defenses in text processing. Their topic makes the distinction between symbol identity and perceived appearance important for another reason. A change in the underlying symbol can leave a written form looking similar to a reader. Dai and Cai already identify near lookalikes as a potential source of ambiguity when character representations rely on shape. The later work’s focus places such visual resemblance in a setting where the difference between how text looks and how a system identifies it is central to the problem. Text Processing Like Humans Do
These citing works connect glyph-aware embeddings to different research questions. The survey is concerned with the choice of units and how a system handles vocabulary. The attacks and defenses work is concerned with the consequences of visual resemblance for text processing. Their connection to Dai and Cai’s study rests on the status of the written form as evidence. Within one task that evidence can help a system share information across characters. In another setting the same resemblance can create ambiguity about which symbols are present. Dai and Cai’s own contrasting task results show why the value of shape has to be assessed against the prediction the system is expected to make.
Cite
Cite as Falcon Z. Dai and Zheng Cai. 2017. Glyph-aware Embedding of Chinese Characters. Proceedings of the First Workshop on Subword and Character Level Models in NLP.
@inproceedings{dai2017glyph,
title = {{Glyph-aware Embedding of Chinese Characters}},
author = {Falcon Z. Dai and Zheng Cai},
booktitle = {Proceedings of the First Workshop on Subword and Character Level Models in NLP},
year = {2017},
doi = {10.18653/v1/w17-4109},
url = {https://doi.org/10.18653/v1/w17-4109}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/dai-2017-glyph-aware-embedding-chinese-characters/