arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.14672cs.CLcs.CVecon.GNq-fin.EC
收藏

使用视觉Transformer量化字符相似度

Quantifying Character Similarity with Vision Transformers

Renmin University(中国人民大学);Harvard University(哈佛大学);National Bureau of Economic Research(美国国家经济研究局)

Xinmei Yang, Abhishek Arora, Shao-Yu Jheng, Melissa Dell

AI总结:

本研究提出一种基于视觉Transformer(ViT)和对比学习的方法,通过计算同形字向量的余弦距离作为字符替换成本,显著提升了OCR文档的记录链接准确率,并验证了其在低资源古文字中的泛化能力。

摘要:

记录链接是定量社会科学的基石,因为分析通常需要将来自多个噪声源的数据进行链接。现成的字符串匹配方法被广泛使用,因为它们易于实现、成本低且易于扩展。并非所有的字符替换都是等概率的,在某些场景下,广泛使用的手工列表标明了哪些字符串替换更有可能发生,从而提高了字符串匹配的准确性。然而,这样的列表在许多场景下并不存在,这使得使用链接数据集的研究偏向于少数无法代表人类社会多样性的高资源语境。本研究通过使用增强数字字体对视觉Transformer(ViT)进行大规模自监督训练,开发了一种可扩展的方法来测量OCR文档的字符替换成本。对于使用CJK脚本编写的每种语言,我们对比学习了一个度量空间,在该空间中,同一字符的不同增强表示在相近位置。在这个空间中,同形字——即外观相似的字符,如“O”和“0”——具有相似的向量表示。在编辑距离匹配算法中,将字符表示之间的余弦距离作为替换成本,与其他广泛使用的字符串匹配方法相比,显著改善了记录链接,因为OCR错误本质上倾向于同形性。同形字可以合理地捕捉任何脚本中的字符视觉相似性,包括低资源场景。我们通过为具有高度图形化特征的3000年历史的古汉字创建同形字集来证明这一点。令人着迷的是,ViT能够捕捉古代社会对不同抽象概念概念化方式之间的关系,这些关系已在考古学文献中被注意到。

英文摘要:

Record linkage is a bedrock of quantitative social science, as analyses often require linking data from multiple, noisy sources. Off-the-shelf string matching methods are widely used, as they are straightforward and cheap to implement and scale. Not all character substitutions are equally probable, and for some settings there are widely used handcrafted lists denoting which string substitutions are more likely, that improve the accuracy of string matching. However, such lists do not exist for many settings, skewing research with linked datasets towards a few high-resource contexts that are not representative of the diversity of human societies. This study develops an extensible way to measure character substitution costs for OCR'ed documents, by employing large-scale self-supervised training of vision transformers (ViT) with augmented digital fonts. For each language written with the CJK script, we contrastively learn a metric space where different augmentations of the same character are represented nearby. In this space, homoglyphic characters - those with similar appearance such as ``O'' and ``0'' - have similar vector representations. Using the cosine distance between characters' representations as the substitution cost in an edit distance matching algorithm significantly improves record linkage compared to other widely used string matching methods, as OCR errors tend to be homoglyphic in nature. Homoglyphs can plausibly capture character visual similarity across any script, including low-resource settings. We illustrate this by creating homoglyph sets for 3,000 year old ancient Chinese characters, which are highly pictorial. Fascinatingly, a ViT is able to capture relationships in how different abstract concepts were conceptualized by ancient societies, that have been noted in the archaeological literature.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑