Literature
Display
← All papers

Finding structure in logographic writing with library learning

Guangyuan Jiang · Matthias Hofer · Jiayuan Mao · Lionel Wong · Joshua B. Tenenbaum · Roger P. Levy

· CogSci 2024 ↗

Contents

Overview

The complete paper is condensed below, preserving five figures, both tables, all four numbered equation/program displays, and the references. This is a model of graphical structure and compression in Chinese writing; it does not establish a complete account of language evolution or human reading difficulty.

At a glance

The authors model a writing system as a collection of stroke-sequence programs and learn reusable functions that compress those programs. The learned library recovers many expert-defined radicals and some hierarchical character structure. Applying the same objective to historical scripts yields decreasing program complexity, although image-based pictorial complexity follows a different ordering. The result supports compression as a useful structural account under the chosen representation, with important limitations in cross-script annotation and spatial information.

Introduction

Combinatorial systems reuse a small inventory of parts to form many complex symbols. Chinese writing offers a long historical record and repeated graphical components, making it a useful case for testing a representational-efficiency hypothesis. The study first asks whether compression recovers recognizable structure in simplified Chinese, then compares four historical stages. Its distinction from perimetric image complexity is that a library can share parts across characters rather than assess each character independently.

Refer to caption
Figure 1: An overview of our library learning model for writing systems: (A) Parts are frequently reused (marked in the same color) within and across characters in the multiple logographic writing systems (e.g., Cuneiform, Chinese). (B) In our library learning model, we represent characters as stroke sequences. Learned library functions identify and represent reused parts (e.g., 木) and relations (e.g., x3, repeating three times), leading to program compression and the discovery of structures. (C) The model scales to study the multiple scripts in the Chinese writing system across time, revealing trends and adaptations in the use of radicals and other elements.
Original figure
Figure 2: (Left): Primitives used in the base dsl ℒb​a​s​e\mathcal{L}_{base}, including 33 stroke primitives and one list symbol. (Middle): Character programs represented in ℒb​a​s​e\mathcal{L}_{base} and the library functions learned by the model. (Right): Visualization of an example character 颢’s hierarchical decomposition discovered, represented as a tree of library functions.

Part I: A library learning model for the Chinese writing system

Part I learns a library from simplified Chinese and compares its functions and decompositions with established structural descriptions. These comparisons test whether the compression objective yields linguistically recognizable patterns, not whether people execute the same search algorithm.

Methods

The model starts from literal stroke programs and repeatedly adds reusable abstractions. Its target is a concise description of the entire dataset together with the library required to encode it.

Defining a DSL.

The base domain-specific language contains 33 stroke types—six basic and 27 turning strokes—and a list primitive. Canonical stroke order supplies a sequence for each modern character. The language uses flattened lists rather than nested spatial layouts: structure is learned through function reuse, while explicit two-dimensional relationships are largely assumed recoverable from the sequence. Examples include 认 as (list D HZT SP N) and 知 as (list P H H SP N S HZ H).

Objectives for library learning and the measure of program complexity.

Description length includes both rewritten character programs and the bodies of all library functions, penalizing a large dictionary that merely memorizes the data. The ideal complexity is the minimum of this joint cost over libraries. Rewrite selects a shortest encoding using the current functions, and the program-size cost follows the lambda-calculus measure used by Stitch and DreamCoder. The formal optimum defines the objective; the practical iterative search does not prove that it has found the global optimum.

Equation 1
DLℒ​(𝒲)\displaystyle\mathrm{DL}_{\mathcal{L}}(\mathcal{W}) =∑p∈Pℒb​a​s​e​(𝒲)DL⁡(Rewrite​(p,ℒ))⏞description lengthof the rewritten characters+DL⁡(ℒ)⏞description lengthof the library\displaystyle=\overbrace{\sum_{p\in P_{\mathcal{L}_{base}}(\mathcal{W})}\mathrm{DL}\left(\textsc{Rewrite}(p,\mathcal{L})\right)}^{\begin{subarray}{c}\text{description length}\\ \text{of the rewritten characters}\end{subarray}}\quad+\overbrace{\vphantom{\sum_{p\in\mathcal{W}}\mathrm{DL}}\mathrm{DL}\left(\mathcal{L}\right)}^{\begin{subarray}{c}\text{description length}\\ \text{of the library}\end{subarray}} (1)
DL⁡(ℒ)\displaystyle\mathrm{DL}\left(\mathcal{L}\right) =∑fn∈ℒDL​(Body​(fn))\displaystyle=\sum_{\texttt{fn}\in\mathcal{L}}\mathrm{DL}\left(\textsc{Body}(\texttt{fn})\right)
C⁡(𝒲)\displaystyle C(\mathcal{W}) =minℒ⁡DLℒ​(𝒲)\displaystyle=\min_{\mathcal{L}}\mathrm{DL}_{\mathcal{L}}(\mathcal{W})

Iterative learning of the library.

Stitch (Bowers et al., 2023) performs top-down abstraction search and expands the library with reusable functions. The paper cites a roughly thousandfold speed advantage over DreamCoder’s compression algorithm, making thousands of characters tractable. In the three-character example 旦, 见, 日, the first abstraction stores the shared prefix (list S HZ); the next combines that abstraction with two horizontal strokes. Reusing a function inside another gives a hierarchical library. Equations 2–4 preserve every intermediate program and its rewrite.

Equations 2–4
p旦\displaystyle p_{\text{\begin{CJK*}{gbsn}旦\end{CJK*}}} :=(list S HZ H H H)\displaystyle:={\color[rgb]{0.35,0.87,1}\texttt{(list S HZ}}\texttt{ H H H)} (2)
p见\displaystyle p_{\text{\begin{CJK*}{gbsn}见\end{CJK*}}} :=(list S HZ SP SWG)\displaystyle:={\color[rgb]{0.35,0.87,1}\texttt{(list S HZ}}\texttt{ SP SWG)}
p日\displaystyle p_{\text{\begin{CJK*}{gbsn}日\end{CJK*}}} :=(list S HZ H H)\displaystyle:={\color[rgb]{0.35,0.87,1}\texttt{(list S HZ}}\texttt{ H H)}
Rewrite​(p旦,ℒ1)\displaystyle\textsc{Rewrite}(p_{\text{\begin{CJK*}{gbsn}旦\end{CJK*}}},\mathcal{L}_{1}) =(fn_0 H H H)\displaystyle={\color[rgb]{0.75,0,0.25}\texttt{(fn\_0 H H}}\texttt{ H}) (3)
Rewrite​(p见,ℒ1)\displaystyle\textsc{Rewrite}(p_{\text{\begin{CJK*}{gbsn}见\end{CJK*}}},\mathcal{L}_{1}) =(fn_0 SP SWG)\displaystyle=\texttt{(fn\_0 SP SWG)}
Rewrite​(p日,ℒ1)\displaystyle\textsc{Rewrite}(p_{\text{\begin{CJK*}{gbsn}日\end{CJK*}}},\mathcal{L}_{1}) =(fn_0 H H)\displaystyle={\color[rgb]{0.75,0,0.25}\texttt{(fn\_0 H H)}}
Rewrite​(p旦,ℒ2)\displaystyle\textsc{Rewrite}(p_{\text{\begin{CJK*}{gbsn}旦\end{CJK*}}},\mathcal{L}_{2}) =(fn_1 H)\displaystyle=\texttt{(fn\_1 H)} (4)
Rewrite​(p见,ℒ2)\displaystyle\textsc{Rewrite}(p_{\text{\begin{CJK*}{gbsn}见\end{CJK*}}},\mathcal{L}_{2}) =(fn_0 SP SWG)\displaystyle=\texttt{(fn\_0 SP SWG)}
Rewrite​(p日,ℒ2)\displaystyle\textsc{Rewrite}(p_{\text{\begin{CJK*}{gbsn}日\end{CJK*}}},\mathcal{L}_{2}) =fn_1\displaystyle=\texttt{fn\_1}
Original figure
Figure 3: Visualization of the aligned MoE radical–library function pairs. 201 radicals from the MoE radicals set are colored in blue, corresponding library functions are colored in gray on the top left (we omit the fn_ prefix for brevity). Our model discovered most of the expert-defined radicals (93.0%93.0\%).

Data.

The Han character library provides canonical decompositions and stroke order for 6,596 simplified characters, covering 6,596 of the 6,763 characters in the cited official inventory. This is the dataset for library discovery, distinct from the smaller historical comparisons.

Results

Learned library captures reuse and hierarchical decomposition in the Chinese writing system.

The model learns 1,805 functions beyond its 34 primitives, for a library of 1,839 entries. Of the learned functions, 1,717 (95.1%) reuse other learned functions. Total description length improves by 4.16×, while character programs alone use 5.63× fewer functions on average; the latter omits library overhead. The character 颢 illustrates a two-function encoding and a hierarchy of recurring components. Against gold decompositions for 3,052 characters, the learned trees obtain 61.6 F1, 51.7% precision, 76.3% recall, and 6.9% exact match, exceeding the four displayed simple tree baselines. High recall and much lower exact match show partial structural agreement, with many extra or differently grouped spans.

Library function discovered #Uses (percentile) Semantic Example usage
fn_0(#0) := (#0 S HZ H) 3342 (100%100\%) 口 口品扣亩
fn_23(#0) := (#0 SP N) 418 (99%99\%) 人 人仄灭认
fn_48(#0) := (#0 H SG) 220 (98%98\%) 夫 撵潜窥肤
fn_105(#0) := (fn_23 (fn_2 #0)) 83 (95%95\%) 寸 夺守尊将
fn_209(#0) := (fn_66 (fn_0 #0)) 38 (90%90\%) 兄 兑兕党况
fn_415(#0) := (fn_20 (fn_3 #0)) 15 (80%80\%) 喜 僖嘻嬉喜
fn_776() := (fn_128 fn_274) 6 (60%60\%) 比 皆比毕毖
fn_1624() := (fn_1233 T) 2 (20%20\%) 禺 愚遇
Table 1: Examples of learned library functions, ordered according to their frequency of usage. (#⋅\cdot) indicates the parameter a function takes in.
Model F1 Precision Recall Exact match
Library learning 61.6 51.7 76.3 6.9
Baselines
    – Balanced binary tree 34.4 26.5 48.6 2.2
    – Random binary tree 28.5 22.0 40.3 1.1
    – Left-branching tree 30.8 23.8 43.6 0.5
    – Right-branching tree 36.0 27.8 50.9 0.4
Table 2: Quantitative evaluation of the learned structure. Similar to the evaluations used in constituency parsing Black et al. ((1991)), we report F1 scores, precisions, recalls, and exact match (%) rates with respect to a gold standard of Chinese character decomposition.
Original figure
Figure 4: Changes in the quantifiable metrics over time. We visualize Left: pictorial complexity (following Han et al. ((2022))), program (mdl) complexity calculated by our model C⁡(𝒲)C(\mathcal{W}); Right: description length under the base library DLℒb​a​s​e​(𝒲)\mathrm{DL}_{\mathcal{L}_{base}}(\mathcal{W}), learned library size |ℒ∗|\lvert\mathcal{L}_{*}\rvert, and compression ratio DLℒb​a​s​e​(𝒲)/DLℒ∗​(𝒲)\mathrm{DL}_{\mathcal{L}_{base}}(\mathcal{W})/\mathrm{DL}_{\mathcal{L}_{*}}(\mathcal{W}) for the four scripts (oracle bone, seal, traditional, and simplified) respectively.

Library functions resemble expert-defined radicals.

The evaluation compares learned functions with the Ministry of Education’s 201 indexing radicals for simplified Chinese. It recovers 187, or 93.0%, and Figure 3 retains both the recovered matches and fourteen missed radicals. This is coverage of the expert radical inventory, not precision over all 1,805 learned functions. A reusable graphical function need not be an expert-defined radical or have independent semantic meaning.

Part II: Complexity analysis across time

Part II asks whether the same compression measure decreases across historical scripts. Pictorial complexity counts visual contour properties, whereas program complexity also rewards repeated structure across symbols. Their different rankings therefore reflect different operational definitions of complexity; neither alone directly measures literacy, learning effort, or the historical causes of change.

Methods and data

Data used for oracle bone, seal, traditional, and simplified.

The historical comparison aligns 754 characters across oracle bone, seal, traditional, and simplified scripts. Modern stroke decompositions come from the Han character library. Ancient forms are manually traced on a tablet, fitted with cubic Bézier curves, and clustered into 33 stroke categories, matching the modern base vocabulary size. The same library-learning objective is then applied separately to each script. Equal vocabulary sizes help comparison but do not remove the difference between standardized modern annotations and manually parsed ancient forms.

Data used for traditional and simplified comparison.

A separate, larger comparison aligns 3,762 traditional/simplified character pairs using the cited comparison manual and the Han character library. This isolates the modern pair of scripts rather than extending the four-stage analysis to all those characters.

Results

The Chinese writing system has been simplified over time.

On the 754 aligned characters, learned program complexity decreases from oracle bone to seal to traditional to simplified. Literal stroke-program length decreases overall but rises from seal to traditional. The pictorial measure instead ranks seal highest, followed by traditional, simplified, and oracle bone. Thus the library measure recovers the proposed simplification trend in this representation and sample; the observational comparison does not establish that compression pressure alone caused the historical changes.

Simplified Chinese is simpler but less systematic compared to traditional Chinese.

For 3,762 modern pairs, traditional characters have approximately 16% greater literal description length but only 4% greater length after compression. Their compression ratio is higher—about 4.05× versus 3.64× in Figure 5—suggesting more reusable structure under this encoding. Simplified is therefore shorter overall but less compressible by this model. Compression ratio is the authors’ proxy for systematicity; the experiment does not directly test recognition, acquisition, or the educational effects of simplification.

Original figure
Figure 5: Comparison of the compression ratio between traditional and simplified Chinese. The traditional Chinese script is more compressible than simplified Chinese on the 3,762 aligned characters at a larger scale.

Discussion

Library learning recovers useful graphical abstractions and gives a structural measure distinct from visual contour complexity. Main limitations are the different annotation procedures for ancient and modern scripts, imperfect recovery of spatial layout from stroke order, representation-dependent complexity, and lack of direct behavioral or causal validation of the proposed human inductive bias. The authors propose unsupervised image parsing, spatial templates, and broader form–meaning modeling. Extending the account beyond writing would require additional evidence.

Acknowledgments

The authors thank collaborators and reviewers and acknowledge support from MIT Quest for Intelligence, AFOSR, the MIT-IBM Watson AI Lab, ONR, and the Simons Center for the Social Brain.

Concept demonstration

Open image ↗