[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-327303-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-327303-en":131},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","x-logsmask-expand-transformer-for-graph-structured-data-a-preprint","X-LOGSMASK: EXPAND TRANSFORMER FOR GRAPH-STRUCTURED DATA - A PREPRINT","","Transformers are general-purpose architectures, but their all-to-all self-attention poorly matches graph data, whose relations are sparse, structured, and multi-scale. Existing Graph Transformers rely on structural encodings, hybrid message-passing, or learned attention constraints, often adding complexity and limiting interpretability. X-LogSMask introduces an explainable multi-head logarithmic structural mask that injects symmetrically normalized topology into attention logits.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/research-report/","Research & Report",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/x-logsmask-expand-transformer-for-graph-structured-data-a-preprint/327303/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/x-logsmask-expand-transformer-for-graph-structured-data-a-preprint/327303.png","ImageObject",300,407,{"name":42,"@type":43},"Ava Thompson","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-10-31","2026-09-21",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",11,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What problem does X-LogSMask address in Transformers for graph data?","Question",{"text":63,"@type":64},"It addresses the mismatch between Transformers’ unrestricted all-to-all self-attention and graphs’ sparse, structured, multi-scale topology by injecting topology information into attention.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How does X-LogSMask modify the attention mechanism?",{"text":68,"@type":64},"It constructs a symmetrically normalized adjacency matrix with self-loops and injects a logarithmic, topology-aware gating signal additively into the attention logits.",{"name":70,"@type":61,"acceptedAnswer":71},"What is the role of multi-head logarithmic structural masks in X-LogSMask?",{"text":72,"@type":64},"Different attention heads use different powers of the normalized adjacency matrix, giving each head an explicit structural radius and enabling multi-hop information propagation within a single layer.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},327303,1790375021,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,106,111,115,120,123,127],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":103,"show_sort_weight":104,"slug":105},6,"Technology",50,"technology",{"id":107,"doc_module":4,"doc_module_name":25,"category_name":108,"show_sort_weight":109,"slug":110},7,"Healthcare",40,"healthcare",{"id":112,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":113,"slug":114},8,30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":124,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":124,"slug":126},10,"Lifestyle","lifestyle",{"id":128,"doc_module":4,"doc_module_name":25,"category_name":129,"show_sort_weight":97,"slug":130},19,"General","general",{"code":4,"msg":82,"data":132},{"doc_id":79,"user_id":133,"nickname":42,"user_avatar":134,"doc_module":4,"category_id":112,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":140,"language":141,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":12,"update_tm":145,"read_time":146,"preview_page_count":4},1649267921044,"https://us-avatar.wpscdn.com/avatar/1800007509477c92dfb?_k=1786009248482753345","arXiv :2607 .0 1553v 1 [ cs .LG] 2 Jul 2026  \nX-LOGSMASK: EXPAND TRANSFORMER FOR GRAPH-STRUCTURED DATA  \nA PREPRINT  \nLeyan Li* Rennong Yang Zhenxing Zhang Liping Hu  \nJuly 3, 2026  \nABSTRACT  \nTransformers have become general-purpose architectures, but their all-to-all self-attention is poorly matched to graph data, whose interactions are sparse, structured and multi-scale. Existing Graph Transformers address this mismatch through structural encodings, hybrid message-passing modules or learned attention constraints, often introducing additional complexity and limited interpretability.  \nHere we introduce X-LogSMask, an explainable multi-head logarithmic structural mask that injects symmetrically normalized graph topology directly into attention logits. The logarithmic transform converts structural connectivity into a topology-aware gating signal, suppressing unsupported node interactions while preserving feature-dependent attention. By assigning different powers of the normalized adjacency matrix to different attention heads, X-LogSMask gives each head a defined structural radius and supports multi-hop information propagation within a single layer. We further show that a standard Transformer encoder can be interpreted as one-step message passing on a complete graph, motivating X-LogSMask as a topology-constrained alternative to unrestricted self-attention.  \nAcross 20 node-, edge- and graph-level benchmarks, Transformers equipped with X-LogSMask achieve state-of-the-art performance on 13 datasets and remain competitive in a lightweight onelayer configuration. These results show that simple, interpretable structural masks can make selfattention an effective graph-learning operator without changing the Transformer architecture. The code is available at [https://github.com/LiLeyan-0120/X-LogSMask](https://github.com/LiLeyan-0120/X-LogSMask).  \nKeywords Graph transformer, graph neural network, explainable learning, logarithmic structural mask, multi-hop attention  \n1 Introduction  \nGraphs provide a natural representation for relational systems, including citation networks, social networks, molecules, biological systems and transportation networks. Unlike sequences or images, graphs are defined by irregular neighborhoods, sparse connectivity and dependencies that may span multiple topological scales. Graph neural networks (GNNs) address this structure by propagating information along observed edges, thereby aligning model computation with graph topology [1, 2] . By contrast, the standard Transformer was developed around self-attention, which permits every token to interact with every other token [3] . This design gives Transformers strong representational flexibility, but it also creates a mismatch when the input is a graph.  \nTransformers have been successfully extended beyond language to vision, temporal modelling and other structured domains [4–8] . Their success suggests that self-attention can serve as a general-purpose information aggregation operator when equipped with an appropriate inductive bias. In sequential data, this role is played by positional encodings, which supply the order information absent from permutation-invariant attention. For graph data, however, the required inductive bias is not a one-dimensional position but a sparse, relational and multi-hop topology. Without such a bias, all-to-all self-attention can mix topologically unrelated nodes and weaken the structural constraints that make message passing effective.  \n∗ E-mail: li [leyan@163.com](leyan@163.com); [rangrn6907@163.com](rangrn6907@163.com); [zzx2207621676@hotmail.com](zzx2207621676@hotmail.com); Hlp [afeu@163.com](afeu@163.com)  \nRNN for 1D  \nCNN for 2D  \n• VIT [Dosovitskiy et al.]  \n• et al.  \nFigure 1: Transformer for all kinds of data.  \nRecent Graph Transformer models have therefore sought to inject graph structure into attention. One line of work incorporates attention mechanisms into GNN architectures, as in Graph Attention Networks [9] . ","cbCaiuNhBicCbBF6","https://ap.wps.com/l/cbCaiuNhBicCbBF6","pdf",1234804,17,"English","# Introduction\n## Motivation for graph-aware attention\n## Related work on Graph Transformers\n# Method\n## X-LogSMask design and injection into attention\n## Head-wise logarithmic structural radii\n# Experiments\n## Benchmarks and performance results","[{\"question\":\"What problem does X-LogSMask address in Transformers for graph data?\",\"answer\":\"It addresses the mismatch between Transformers’ unrestricted all-to-all self-attention and graphs’ sparse, structured, multi-scale topology by injecting topology information into attention.\"},{\"question\":\"How does X-LogSMask modify the attention mechanism?\",\"answer\":\"It constructs a symmetrically normalized adjacency matrix with self-loops and injects a logarithmic, topology-aware gating signal additively into the attention logits.\"},{\"question\":\"What is the role of multi-head logarithmic structural masks in X-LogSMask?\",\"answer\":\"Different attention heads use different powers of the normalized adjacency matrix, giving each head an explicit structural radius and enabling multi-hop information propagation within a single layer.\"}]","X-LOGSMASK: EXPAND TRANSFORMER FOR GRAPH-STRUCTURED DATA - A PREPRINT | PDF",1789976945,43]