DOI: 10.3390/electronics15204813 ISSN: 2079-9292

STED-Driven Semantic-Structural Similarity Learning for Semi-Structured Data with Automatic Supervision

Nan Yin, Jian Liu, Yuan Ma, Jinxiao Si, Xi Guo, Xiaotong Zhang, Jie He

Semi-structured documents contain both hierarchical structure and field-level semantics. This makes similarity measurement difficult for methods that focus only on structure or only on global semantic representations. To address this problem, we propose a framework for schema-level semantic–structural similarity of semi-structured documents. We first introduce Semantic Tree Edit Distance (STED), which combines semantic node matching with hierarchical tree alignment. We then generate training pairs through controlled perturbations of real JSON documents and use their STED scores as automatic supervision. Based on this supervision, STED–GNN learns an efficient approximation of STED for repeated similarity computation. Experiments on MixedJSONBench-Doc show that STED–GNN achieves a mean ARI of 0.9799 for clustering, an accuracy of 0.9967 in the primary inductive classification evaluation, and a mean Recall@76 of 0.7289 on the low-similarity evaluation. After document representations are cached, STED–GNN reduces repeated pairwise scoring time by approximately 183.47 times relative to STED. These results show that jointly modeling semantic and structural information is effective for semi-structured document similarity, while learned approximation substantially reduces the cost of repeated pairwise comparison.

More from our Archive