{"title":"CharFormer: Character-oriented attention network for string edit distance","authors":"Xijuan Liu , Haobo Wei , Peilun Yang , Haiyang Hu","doi":"10.1016/j.knosys.2025.113482","DOIUrl":null,"url":null,"abstract":"<div><div>String similarity computation plays a crucial role in numerous real-world applications, such as similarity search and sequence alignment. String Edit Distance (SED) is a representative similarity metric that effectively measures the similarity between strings. However, its quadratic complexity makes the computation of SED challenging, especially for large datasets. Consequently, in recent years, an increasing number of algorithms have adopted deep learning techniques to accelerate SED computation. However, we observe that existing methods often employ a bi-encoder framework to learn the features of individual strings, which leads to neglect of the matching information across strings. Moreover, these methods fail to fully leverage subsequence information and the sampling space. To this end, we propose a character-oriented attention network named CharFormer to learn the computation of SED. Specifically, CharFormer operates at the character granularity, leveraging both the intra-sequence information of individual input strings and the inter-sequence information between them to learn the representations of characters and strings. Subsequently, CharFormer uses two prediction heads to simultaneously utilize these two types of information to predict the similarity between strings. Additionally, we incorporate the similarity between substrings to provide extra supervision and design a novel sampling method to fully exploit the sampling space. Extensive experiments demonstrate the superiority of CharFormer over state-of-the-art algorithms and the efficacy of the proposed methods.</div></div>","PeriodicalId":49939,"journal":{"name":"Knowledge-Based Systems","volume":"318 ","pages":"Article 113482"},"PeriodicalIF":7.2000,"publicationDate":"2025-04-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Knowledge-Based Systems","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0950705125005283","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE","Score":null,"Total":0}
引用次数: 0
Abstract
String similarity computation plays a crucial role in numerous real-world applications, such as similarity search and sequence alignment. String Edit Distance (SED) is a representative similarity metric that effectively measures the similarity between strings. However, its quadratic complexity makes the computation of SED challenging, especially for large datasets. Consequently, in recent years, an increasing number of algorithms have adopted deep learning techniques to accelerate SED computation. However, we observe that existing methods often employ a bi-encoder framework to learn the features of individual strings, which leads to neglect of the matching information across strings. Moreover, these methods fail to fully leverage subsequence information and the sampling space. To this end, we propose a character-oriented attention network named CharFormer to learn the computation of SED. Specifically, CharFormer operates at the character granularity, leveraging both the intra-sequence information of individual input strings and the inter-sequence information between them to learn the representations of characters and strings. Subsequently, CharFormer uses two prediction heads to simultaneously utilize these two types of information to predict the similarity between strings. Additionally, we incorporate the similarity between substrings to provide extra supervision and design a novel sampling method to fully exploit the sampling space. Extensive experiments demonstrate the superiority of CharFormer over state-of-the-art algorithms and the efficacy of the proposed methods.
期刊介绍:
Knowledge-Based Systems, an international and interdisciplinary journal in artificial intelligence, publishes original, innovative, and creative research results in the field. It focuses on knowledge-based and other artificial intelligence techniques-based systems. The journal aims to support human prediction and decision-making through data science and computation techniques, provide a balanced coverage of theory and practical study, and encourage the development and implementation of knowledge-based intelligence models, methods, systems, and software tools. Applications in business, government, education, engineering, and healthcare are emphasized.