DH 2026

Daejeon, July 27–31

Thu, July 3013:40–15:10S006104
Long Paper

Vector Poetics: Parallelism and Cognitive Geometry in Chinese Regulated Verse

Maciej Kurzynski
Lingnan University, Hong Kong S.A.R. · maciej.kurzynski@ln.edu.hk
Xiaotong Xu
Peking University, People's Republic of China · xtxu@stu.pku.edu.cn
Yu Feng
Lingnan University, Hong Kong S.A.R. · yufeng2@ln.hk

Although parallelism occurs universally across different literary traditions (Zhang, 2021), its unequalled prominence in classical Chinese poetry can be attributed to the Chinese writing system, where the uninflected, monosyllabic lexical units, represented visually as square-shaped characters, make possible the strict matching, “syllable for syllable and word for word,” of poetic lines (Plaks, 1988). In a classic couplet by the Tang poet Wang Wei 王維 (699–761), for instance, the line “The bright moon shines between the pines” 明月松間照 is mirrored by “A clear spring flows over the stones” 清泉石上流, where “bright” corresponds to “clear,” “moon” to “spring,” and so on, creating a syntactic and semantic symmetry that invites the reader to linger between the lines (Kao & Mei, 1971; Wang, 1979; Cai, 2008). In anglophone academia, the term “parallelism” has been adapted from biblical studies to conceptualize various dualisms, symmetries, and contrasts found in Chinese texts (Dobbs-Allsopp, 2021), yet the term’s spatial connotations (from Greek parallelos, or “side by side”) remain underappreciated. Likewise, while the indigenous terms for parallel structures (such as duizhang 對仗, referring to honor guards in symmetrical opposition, or pianwen 駢文, evoking two horses side by side) suggest spatial imagery, this spatiality is often neglected in favor of metaphysical or symbolic interpretations, such as Liu Xie’s 劉勰 (c. 465–522) dualistic theory (Owen, 1977). The term “parallel” and its Chinese equivalents are little more than dead metaphors.

Distributional semantics and transformer-based language models have shown that lexical meaning and contextual relations can be represented geometrically in high-dimensional vector spaces (Mikolov et al., 2013; Vaswani et al., 2017), offering a unique opportunity to revive these dormant spatial connotations. So far, computational research on parallelism in Chinese poetry has been limited, focused on practical tasks such as classification and generation rather than theory and interpretation. Lee et al. (2018), for example, have applied POS-tagging to detect syntactic parallelism in Tang poetry, confirming traditional views that the middle couplets (second and third) in a four-couplet poem are more often syntactically parallel than the outer couplets (first and fourth). Several other studies focus on the automatic generation of parallel couplets (Chiang et al., 2021; Yuan et al., 2019; Song, 2022; Qu et al., 2022). Projects like the Chinese Classical Poetry Matching Dataset (CCPM) enable models to better understand the nuances of parallelism by matching ancient Chinese lines with their modern translations (Li et al., 2021). More recent scholarship has focused on the automatic detection of parallel couplets (Kurzynski et al., 2024, 2025).

In this project, our goal was to construct an interpretable, task-specific model capable of moving beyond simple classification to investigate the geometric mechanisms in Transformers that encode parallel structures in classical Chinese verse. First, we compiled a dataset of 142,235 eight-line pentasyllabic poems, including regulated verse and formally adjacent works, from the Tang through Qing dynasties. An initial heuristic included labeling the inner (second and third) couplets of these poems as parallel (1) and the outer ones (first and fourth) as non-parallel (0), given the core convention of the regulated form established in the Tang (618–907 CE). However, we found that this method introduced significant noise into the dataset: many poets consistently employed parallel couplets throughout the entire poem, while others completely avoided them, thus retaining the compositional freedom characteristic of pre-Tang poetry.

To refine the training data, we thus developed a filtering technique based on network analysis. We constructed a symbolic network where each of the 7,822 unique characters in the dataset was a node, and an edge connected any two characters that appeared in corresponding positions within the 284,470 nominally parallel inner couplets. The assumption was that statistically frequent pairings would reflect the actual practice of parallelism by Chinese poets. We then applied the Louvain method for community detection (Blondel et al., 2008), which revealed eight robust communities of characters (achieving a high Adjusted Rand Index of 0.81; Hubert & Arabie, 1985), representing statistically significant semantic and grammatical groupings such as verbs, numbers, and geographical names. This character network served as a filter to programmatically prune the dataset by removing likely false positives (inner couplets with three or more character pairs not belonging to the same community; these were likely non-parallel) and false negatives (outer couplets with three or more pairs that did; these were likely parallel).

The resulting SikuBERT-based classifier (Wang et al., 2022), fine-tuned on this cleaned data (batch size = 16, learning rate = 2e-5), achieved a strong F1 score of 0.784 on a manually curated test set of 6,153 couplets, validating its ability to identify parallelism and matching the performance of general-purpose models (GPT 4.1 and DeepSeek R1) when used in few-shot classification settings (Brown et al., 2020) on the same dataset.

Figure 1. Semantic network of parallel couplets. Communities of characters have been clustered by their co-occurrence in parallel positions across pentasyllabic couplets. We show twenty characters with the highest degrees in each community.

Figure 2. A conceptual drawing of three key (black) and one query (red) representation projected into a two-dimensional space. Notice that both K(風) and K(水) point in the same direction, representing landscape nouns (“wind” and “water”). Thus, the dot product of Q([CLS]) with either K(風) or K(水) is much larger than that of Q([CLS]) and K(有), the latter representing a verb “to have” or “having.”

Our analysis of the classifier’s attention mechanism identified a consistent geometric pattern associated with parallelism. Attention can be conceptualized as a dialogue within the model where words generate “queries” (questions) and “keys” (answers) to weigh their relevance to one another. The relevance score between a given query and key is computed via their dot product; because this value is maximized when two vectors point in the same direction, high relevance signifies geometric alignment. We hypothesized that for a couplet to be classified as parallel, the corresponding characters in each line must provide geometrically similar answers (keys) to the classification-focused questions posed by the special [CLS] token prepended by BERT to the encoded sequence (Devlin et al., 2019). The results support this hypothesis: in correctly classified parallel couplets, the key vectors associated with corresponding character positions tend to show stronger directional similarity than those in non-parallel couplets.

Figure 3. Pearson’s correlation coefficients on attention distributions for the five characters in both lines in parallel and non-parallel correctly classified couplets, top layer of the fine-tuned SikuBERT. Each point is a couplet. Vertical lines show standard deviation, larger dots are the means.

Roman Jakobson’s influential definition understands the “poetic function” of language as “the projection of the principle of equivalence from the axis of selection to the axis of combination” (Jakobson, 1960). In this view, equivalences are forged largely through rhythm, meter, and sound along the linear, sequential flow of language, drawing attention to the message itself rather than its semantics. Our findings, however, suggest a complementary spatial axis; insofar as the structures learned by artificial neural networks can offer insights into cognitive processes in the brain (Caucheteux & King, 2022; Kumar et al., 2024; Genkin et al., 2025), our discovery has implications for cognitive semantics. Peter Gärdenfors posits that the human mind organizes concepts not only as symbolic propositions but also within multidimensional conceptual spaces partitioned into distinct, convex regions around prototypes (Voronoi tessellation) (Gärdenfors, 2004, 2014). For example, a young child might initially use the word “dog” for all quadrupeds but then carve out specific conceptual regions for other prototypes (“cat,” “horse,” etc.), effectively partitioning their semantic space into increasingly specific domains. If one quotidian function of language is to discretize experience, we propose that poetic parallelism can act as a countervailing force: a cognitive bridging mechanism that temporarily brings distinct regions of conceptual space into relation by foregrounding semantic directions along which they align.

Figure 4. Attention distribution for the [CLS] token in parallel (left) and non-parallel (right) couplets, the top layer of the fine-tuned SikuBERT. Notice that, in the heads 2, 5, 7 and 11, the [CLS] token attends to itself, thus preserving its own information.

This is precisely the geometric congruence our model learns to detect. When processing Wang Wei’s couplet, the “answer” vectors for “moon” (月) and “spring” (泉) are oriented in a parallel fashion, as are the vectors for “bright” (明) and “clear” (清). This isomorphism is not a pre-existing condition of the words themselves but is contextually constructed by the AI model as it navigates the specific constraints of the couplet to ask “questions” that elicit similar “answers” from semantically distinct words. The model succeeds by detecting geometric congruence between contextually generated vectors; by analogy, such congruence offers a computational account of why human readers may experience parallel couplets as semantically resonant rather than merely formally symmetrical. In this discovered geometry, poetry realizes its potential not merely to imitate appearances, as Plato would have it, but to guide the mind in appreciating the latent symmetries that structure meaning itself.

References
  1. Blondel, V. D., Guillaume, J.-L., Lambiotte, R., & Lefebvre, E. (2008). Fast unfolding of communities in large networks. Journal of Statistical Mechanics: Theory and Experiment, 2008(10).
  2. Brown, T., Mann, B., Ryder, N., et al. (2020). Language models are few-shot learners. In NIPS'20: Proceedings of the 34th International Conference on Neural Information Processing Systems (pp. 1877–1901).
  3. Cai, Z. (Ed.). (2008). How to Read Chinese Poetry: A Guided Anthology. Columbia University Press.
  4. Caucheteux, C., & King, J.-R. (2022). Brains and algorithms partially converge in natural language processing. Communications Biology, 5, 134.
  5. Chiang, K.-Y., Lin, S., Chen, J., et al. (2021). Transcouplet: Transformer based Chinese couplet generation. arXiv preprint arXiv:2112.01707.
  6. Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019). BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT 2019).
  7. Dobbs-Allsopp, F. W. (2021). Robert Lowth, parallelism, and biblical poetry. The Journal of Hebrew Scriptures, 21, 1–36.
  8. Gärdenfors, P. (2004). Conceptual spaces: The geometry of thought. MIT Press.
  9. Gärdenfors, P. (2014). The geometry of meaning: Semantics based on conceptual spaces. MIT Press.
  10. Genkin, M., Shenoy, K. V., Chandrasekaran, C., & Engel, T. A. (2025). The dynamics and geometry of choice in the premotor cortex. Nature, 645, 168–176.
  11. Hubert, L., & Arabie, P. (1985). Comparing partitions. Journal of Classification, 2(1), 193–218.
  12. Jakobson, R. (1960). Linguistics and poetics. In T. A. Sebeok (Ed.), Style in Language (pp. 350–377). MIT Press.
  13. Kao, Y., & Mei, T. (1971). Syntax, diction, and imagery in T’ang poetry. Harvard Journal of Asiatic Studies, 31(2), 49–136.
  14. Kumar, S., Sumers, T. R., Yamakoshi, T., et al. (2024). Shared functional specialization in transformer-based language models and the human brain. Nature Communications, 15, 5523.
  15. Kurzynski, M., Xu, X., & Feng, Y. (2024). Vector Poetics: Parallel Couplet Detection in Classical Chinese Poetry. In Proceedings of the 4th International Conference on Natural Language Processing for Digital Humanities, pages 200–208, Miami, USA.
  16. Kurzynski, M., Xu, X., & Feng, Y. (2025). The game of keys and queries: Parallelism and cognitive geometry in Chinese regulated verse. International Journal of Humanities and Arts Computing, 19(2), 143–157.
  17. Lee, J., Kong, Y. H., & Luo, M. (2018). Syntactic patterns in classical Chinese poems: A quantitative study. Digital Scholarship in the Humanities, 33(1), 82–95.
  18. Li, W., Qi F., Sun M., et al. (2021). CCPM: A chinese classical poetry matching dataset, CoRR, abs/2106.01979.
  19. Mikolov, T., Chen, K., Corrado, G., et al., (2013). Efficient Estimation of Word Representations in Vector Space. 1st International Conference on Learning Representations, ICLR 2013, Scottsdale, Arizona, USA, May 2-4.
  20. Owen, S. (1977). The Poetry of the Early T'ang. Yale University Press.
  21. Plaks, A. H. (1988). Where the lines meet: Parallelism in Chinese and Western literatures. Chinese Literature: Essays, Articles, Reviews (CLEAR), 10(1/2), 43–60.
  22. Qu, Q., Lü, J., Liu, D., & Yang, K. (2022). Coupgan: Chinese couplet generation via encoder–decoder model and adversarial training under global control. Soft Computing, 26(15), 7423–7433.
  23. Song, Y. (2022). Chinese couplet generation with syntactic information. In Proceedings of the 29th International Conference on Computational Linguistics (pp. 6436–6446). Gyeongju, Republic of Korea.
  24. Vaswani, A., Shazeer, N., Parmar, N., et al. (2017). Attention is all you need. In Advances in Neural Information Processing Systems 30 (NIPS 2017).
  25. Wang, D., Zhang, L., Li, G., & Liu, Y. (2022). SikuBERT与SikuRoBERTa:面向数字人文的《四库全书》预训练模型构建及应用研究 [SikuBERT and SikuRoBERTa: Construction and application of pre-trained models for digital humanities in the Siku Quanshu]. Tushuguan Luntan, 42(6), 31–43.
  26. Wang, L. (1979). 诗词格律概要 [A Brief Introduction to the Metric Patterns of Chinese Poetry]. Beijing Publishing House.
  27. Yuan, S., Zhong, L., Li, L., et al. (2019). Automatic generation of Chinese couplets with attention based encoder-decoder model. In 2019 IEEE Conference on Multimedia Information Processing and Retrieval (MIPR) (pp. 65–70).
  28. Zhang, L. (2021). Parallelism and antithesis: Structural principles in the mind and in literature from a Chinese perspective. European Review, 29(2), 274–284.