{"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/arxiv-2603-04805","title":"Attention's Gravitational Field:A Power-Law Interpretation of Positional Correlation","arxiv_id":"2603.04805","date":"2026-02-06","proceeding":null,"authors":["Edward Zhang"],"abstract":"This paper explores the underlying principles of positional relationships and encodings within Large Language Models (LLMs) and introduces the concept of the Attention Gravitational Field (AGF). By decoupling positional encodings from semantic embeddings, we optimize the model architecture and achieve superior accuracy compared to prevailing encoding methods. Furthermore, we provide an in-depth analysis of AGF, demonstrating its intrinsic consistency with learning and stability curves, as well as its empirical alignment with Newton's Law of Universal Gravitation. By offering a rigorous theoretical exploration of these phenomena, this work represents a significant step toward interpreting the Attention mechanism and unlocks new possibilities for future research in model optimization and interpretability.","url_abs":"https://arxiv.org/abs/2603.04805","url_pdf":"https://arxiv.org/pdf/2603.04805","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2603.04805","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2603.04805"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/OpenNMT/OpenNMT-py","reach":null},{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/windyrobin/AGF","reach":null}],"summary":{"ran":1,"ran_fixture":2,"ran_honours":2,"ran_draft_wrong":4,"unverified":3},"by_repo_kind":{"found_in_text":{"samples":12,"ran":9,"repositories":2}},"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":1,"samples":[{"code_sha256_prefix":"525c2d39941bbce9","entry":"AlibiPositionalBias","repo":"OpenNMT/OpenNMT-py","repo_kind":"found_in_text","path":"onmt/modules/multi_headed_attn.py","file_url":"https://github.com/OpenNMT/OpenNMT-py/blob/HEAD/onmt/modules/multi_headed_attn.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"525c2d39941bbce9"}},{"code_sha256_prefix":"729ef446f280b974","entry":"_relative_position_bucket","repo":"OpenNMT/OpenNMT-py","repo_kind":"found_in_text","path":"onmt/modules/multi_headed_attn.py","file_url":"https://github.com/OpenNMT/OpenNMT-py/blob/HEAD/onmt/modules/multi_headed_attn.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":"729ef446f280b974"}},{"code_sha256_prefix":"d3473dc6f8a2cee8","entry":"compute_bias","repo":"OpenNMT/OpenNMT-py","repo_kind":"found_in_text","path":"onmt/modules/multi_headed_attn.py","file_url":"https://github.com/OpenNMT/OpenNMT-py/blob/HEAD/onmt/modules/multi_headed_attn.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d3473dc6f8a2cee8"}},{"code_sha256_prefix":"137d5fd06cd817a4","entry":"gen_relative_positions","repo":"OpenNMT/OpenNMT-py","repo_kind":"found_in_text","path":"onmt/modules/multi_headed_attn.py","file_url":"https://github.com/OpenNMT/OpenNMT-py/blob/HEAD/onmt/modules/multi_headed_attn.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"137d5fd06cd817a4"}},{"code_sha256_prefix":"e62e48a00ed06f63","entry":"pad_at_dim","repo":"OpenNMT/OpenNMT-py","repo_kind":"found_in_text","path":"onmt/modules/multi_headed_attn.py","file_url":"https://github.com/OpenNMT/OpenNMT-py/blob/HEAD/onmt/modules/multi_headed_attn.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e62e48a00ed06f63"}},{"code_sha256_prefix":"a14fa691ae6f254a","entry":"relative_matmul","repo":"OpenNMT/OpenNMT-py","repo_kind":"found_in_text","path":"onmt/modules/multi_headed_attn.py","file_url":"https://github.com/OpenNMT/OpenNMT-py/blob/HEAD/onmt/modules/multi_headed_attn.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a14fa691ae6f254a"}},{"code_sha256_prefix":"0d802270606c7e37","entry":"rotaryembeddings","repo":"OpenNMT/OpenNMT-py","repo_kind":"found_in_text","path":"onmt/modules/multi_headed_attn.py","file_url":"https://github.com/OpenNMT/OpenNMT-py/blob/HEAD/onmt/modules/multi_headed_attn.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0d802270606c7e37"}},{"code_sha256_prefix":"156ac72eda8c9323","entry":"shape","repo":"OpenNMT/OpenNMT-py","repo_kind":"found_in_text","path":"onmt/modules/multi_headed_attn.py","file_url":"https://github.com/OpenNMT/OpenNMT-py/blob/HEAD/onmt/modules/multi_headed_attn.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"156ac72eda8c9323"}},{"code_sha256_prefix":"3c73b517864547c4","entry":"unshape","repo":"OpenNMT/OpenNMT-py","repo_kind":"found_in_text","path":"onmt/modules/multi_headed_attn.py","file_url":"https://github.com/OpenNMT/OpenNMT-py/blob/HEAD/onmt/modules/multi_headed_attn.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3c73b517864547c4"}},{"code_sha256_prefix":"62f1ce6285ab599b","entry":"MultiHeadedAttention","repo":"OpenNMT/OpenNMT-py","repo_kind":"found_in_text","path":"onmt/modules/multi_headed_attn.py","file_url":"https://github.com/OpenNMT/OpenNMT-py/blob/HEAD/onmt/modules/multi_headed_attn.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":"62f1ce6285ab599b"}},{"code_sha256_prefix":"19d46f07e889fbb9","entry":"apply_rotary_emb","repo":"OpenNMT/OpenNMT-py","repo_kind":"found_in_text","path":"onmt/modules/multi_headed_attn.py","file_url":"https://github.com/OpenNMT/OpenNMT-py/blob/HEAD/onmt/modules/multi_headed_attn.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":"19d46f07e889fbb9"}},{"code_sha256_prefix":"1f873422e04f7352","entry":"attention","repo":"windyrobin/AGF","repo_kind":"found_in_text","path":"attention.py","file_url":"https://github.com/windyrobin/AGF/blob/HEAD/attention.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1f873422e04f7352"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.CL","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}