{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/word-rotator-s-distance-decomposing-vectors","title":"Word Rotator's Distance","arxiv_id":"2004.15003","date":"2020-04-30","proceeding":"EMNLP 2020 11","authors":["Sho Yokoi","Ryo Takahashi","Reina Akama","Jun Suzuki","Kentaro Inui"],"abstract":"A key principle in assessing textual similarity is measuring the degree of semantic overlap between two texts by considering the word alignment. Such alignment-based approaches are intuitive and interpretable; however, they are empirically inferior to the simple cosine similarity between general-purpose sentence vectors. To address this issue, we focus on and demonstrate the fact that the norm of word vectors is a good proxy for word importance, and their angle is a good proxy for word similarity. Alignment-based approaches do not distinguish them, whereas sentence-vector approaches automatically use the norm as the word importance. Accordingly, we propose a method that first decouples word vectors into their norm and direction, and then computes alignment-based similarity using earth mover's distance (i.e., optimal transport cost), which we refer to as word rotator's distance. Besides, we find how to grow the norm and direction of word vectors (vector converter), which is a new systematic approach derived from sentence-vector estimation methods. On several textual similarity datasets, the combination of these simple proposed methods outperformed not only alignment-based approaches but also strong baselines. The source code is available at https://github.com/eumesy/wrd","url_abs":"https://arxiv.org/abs/2004.15003v3","url_pdf":"https://arxiv.org/pdf/2004.15003v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"word-rotator-s-distance-decomposing-vectors","repo_url":"https://github.com/eumesy/wrd","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"semantic-similarity","task_name":"Semantic Similarity"},{"task_slug":"semantic-textual-similarity","task_name":"Semantic Textual Similarity"},{"task_slug":"sentence","task_name":"Sentence"},{"task_slug":"word-alignment","task_name":"Word Alignment"},{"task_slug":"word-similarity","task_name":"Word Similarity"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2004.15003","atlas_url":"https://app.syntology.ai/?focus=2004.15003","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2004.15003"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/PrincetonML/SIF","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/eumesy/wrd","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_fixture":2,"unverified":2},"by_repo_kind":{"found_in_text":{"samples":4,"ran":2,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"d6a1106150b9388c","entry":"compute_pc","repo":"PrincetonML/SIF","repo_kind":"found_in_text","path":"src/SIF_embedding.py","file_url":"https://github.com/PrincetonML/SIF/blob/HEAD/src/SIF_embedding.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d6a1106150b9388c"}},{"code_sha256_prefix":"c050a06975cb89c3","entry":"remove_pc","repo":"PrincetonML/SIF","repo_kind":"found_in_text","path":"src/SIF_embedding.py","file_url":"https://github.com/PrincetonML/SIF/blob/HEAD/src/SIF_embedding.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c050a06975cb89c3"}},{"code_sha256_prefix":"3ca3cbf6b3d74634","entry":"SIF_embedding","repo":"PrincetonML/SIF","repo_kind":"found_in_text","path":"src/SIF_embedding.py","file_url":"https://github.com/PrincetonML/SIF/blob/HEAD/src/SIF_embedding.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3ca3cbf6b3d74634"}},{"code_sha256_prefix":"7a853c22bfcdc85a","entry":"get_weighted_average","repo":"PrincetonML/SIF","repo_kind":"found_in_text","path":"src/SIF_embedding.py","file_url":"https://github.com/PrincetonML/SIF/blob/HEAD/src/SIF_embedding.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7a853c22bfcdc85a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}