The Game of Keys and Queries

A Geometric Interpretation of Parallelism in Classical Chinese Poetry

Geometry of Parallelism

Language models represent word meanings as vectors in a multidimensional space. This study builds on this property to offer a geometric perspective on parallelism in classical Chinese poetry, complementing traditional symbolic interpretations. To automatically detect parallelism in poetic verse, the authors train a BERT-based classifier on a dataset of over 140,000 regulated poems (lüshi 律詩), achieving performance on par with state-of-the-art generative models such as GPT-4.1 and DeepSeek R1. Unlike general-purpose models, the custom classifier offers unique insights into how poetic meaning is encoded geometrically. The analysis shows that parallel lines exhibit alignment in the model’s attention patterns: the ‘key’ vectors of corresponding characters point in the same direction, while this alignment disappears in non-parallel lines. This finding is interpreted through Peter Gärdenfors’s theory of cognitive semantics, which posits that humans make sense of the world by organizing experience into distinct conceptual regions. The authors argue that parallelism serves as a bridging mechanism that temporarily unites these disparate domains of meaning, suggesting a deeper, geometric order that underlies language itself.

Kurzynski, Maciej, Xiaotong Xu, and Yu Feng, “The Game of Keys and Queries: A Geometric Interpretation of Parallelism in Classical Chinese Poetry,” International Journal of Humanities and Arts Computing (IJHAC) 19, 2025(2), forthcoming.

Kurzynski, Maciej, Xiaotong Xu, and Yu Feng, “Vector Poetics: Parallel Couplet Detection in Classical Chinese Poetry,” Proceedings of the 4th International Conference on Natural Language Processing for Digital Humanities, Miami (USA): Association for Computational Linguistics (ACL), pp. 200-208.