{"url":"/method/rga","slug":"rga","name":"RGA","full_name":"Relation-aware Global Attention","full_name_withheld":false,"description_markdown":"In relation-aware global attention (RGA) stresses the importance of global structural information provided by pairwise relations, and uses it to produce attention maps. \r\n\r\nRGA comes in two forms,  spatial RGA (RGA-S) and channel RGA (RGA-C). RGA-S first reshapes the input feature map $X$ to $C\\times (H\\times W)$ and the pairwise relation matrix $R \\in \\mathbb{R}^{(H\\times W)\\times (H\\times W)}$ is computed using \r\n\\begin{align}\r\n    Q &= \\delta(W^QX) \r\n\\end{align}\r\n\\begin{align}\r\n    K &= \\delta(W^KX) \r\n\\end{align}\r\n\\begin{align}\r\n    R &= Q^TK\r\n\\end{align}\r\nThe relation vector $r_i$ at position $i$ is defined by stacking  pairwise relations at all positions:\r\n\\begin{align}\r\n    r_i = [R(i, :); R(:,i)]    \r\n\\end{align}\r\nand the spatial relation-aware feature $y_i$ can be written as\r\n\\begin{align}\r\n    Y_i = [g^c_\\text{avg}(\\delta(W^\\varphi x_i)); \\delta(W^\\phi r_i)]\r\n\\end{align}\r\nwhere $g^c_\\text{avg}$ denotes global average pooling in the channel domain. Finally, the spatial attention score at position $i$ is given by \r\n\\begin{align}\r\n    a_i = \\sigma(W_2\\delta(W_1y_i))\r\n\\end{align}\r\nRGA-C has the same form as RGA-S, except for taking the input feature map as a set of $H\\times W$-dimensional features.\r\n\r\nRGA uses global relations to generate the attention score for each feature node,  so provides valuable structural information and significantly enhances the representational power. RGA-S and RGA-C are flexible enough to be used in any CNN network; Zhang et al. propose  using them jointly in sequence to better capture both spatial and cross-channel relationships.","description_state":"present","introduced_year":null,"introduced_by":{"title":"Relation-Aware Global Attention for Person Re-identification","paper":"/paper/relation-aware-global-attention","first_author":"Zhizheng Zhang","n_authors":5,"url_abs":null,"archive_paper_url":"https://paperswithcode.com/paper/relation-aware-global-attention"},"source":{"url":"https://arxiv.org/abs/1904.02998v2","title":"Relation-Aware Global Attention for Person Re-identification","url_on_a_paper_host":true},"code_snippet_url":null,"code_snippet_url_on_a_code_host":false,"categories":[{"area":"General","area_id":"general","collection":"Attention Mechanisms","url":"/methods/category/attention-mechanisms","pwc_aliases":["attention-mechanisms-1"]}],"n_papers_tagged":11,"archive_num_papers":11,"papers_newest_first":[{"paper":null,"title":"A Family of Robust Generalized Adaptive Filters and Application for Time-series Prediction","date":"2025-05-31","arxiv_id":"2506.00397","n_code_links":0,"syntology":null},{"paper":null,"title":"Bridging the Reality Gap in Digital Twins with Context-Aware, Physics-Guided Deep Learning","date":"2025-05-17","arxiv_id":"2505.11847","n_code_links":0,"syntology":null},{"paper":null,"title":"CogniSNN: A First Exploration to Random Graph Architecture based Spiking Neural Networks with Enhanced Expandability and Neuroplasticity","date":"2025-05-09","arxiv_id":"2505.05992","n_code_links":0,"syntology":null},{"paper":null,"title":"Region-Guided Attack on the Segment Anything Model (SAM)","date":"2024-11-05","arxiv_id":"2411.02974","n_code_links":0,"syntology":null},{"paper":"/paper/rate-gradient-approximation-attack-threats","title":"Rate Gradient Approximation Attack Threats Deep Spiking Neural Networks","date":"2023-01-01","arxiv_id":null,"n_code_links":1,"syntology":null},{"paper":"/paper/reinforced-genetic-algorithm-for-structure","title":"Reinforced Genetic Algorithm for Structure-based Drug Design","date":"2022-11-28","arxiv_id":"2211.16508","n_code_links":1,"syntology":null},{"paper":null,"title":"On Use of the Moore-Penrose Pseudoinverse for Evaluating the RGA of Non-Square Systems","date":"2021-06-17","arxiv_id":"2106.09766","n_code_links":0,"syntology":null},{"paper":null,"title":"Adversarial Blocking Bandits","date":"2020-12-01","arxiv_id":null,"n_code_links":0,"syntology":null},{"paper":null,"title":"Quantization in Relative Gradient Angle Domain For Building Polygon Estimation","date":"2020-07-10","arxiv_id":"2007.05617","n_code_links":0,"syntology":null},{"paper":null,"title":"Delving into the Imbalance of Positive Proposals in Two-stage Object Detection","date":"2020-05-23","arxiv_id":"2005.11472","n_code_links":0,"syntology":null},{"paper":"/paper/relation-aware-global-attention","title":"Relation-Aware Global Attention for Person Re-identification","date":"2019-04-05","arxiv_id":"1904.02998","n_code_links":1,"syntology":{"ran":0,"of":6,"unverified":6,"pointer_only":0}}],"papers_shown":11,"tasks":[{"task":"/task/image-classification","name":"Image Classification","papers":2},{"task":"/task/autonomous-driving","name":"Autonomous Driving","papers":1},{"task":"/task/blocking","name":"Blocking","papers":1},{"task":"/task/clustering","name":"Clustering","papers":1},{"task":"/task/combinatorial-optimization","name":"Combinatorial Optimization","papers":1},{"task":"/task/continual-learning","name":"Continual Learning","papers":1},{"task":"/task/domain-adaptation","name":"Domain Adaptation","papers":1},{"task":"/task/drug-design","name":"Drug Design","papers":1},{"task":"/task/drug-discovery","name":"Drug Discovery","papers":1},{"task":"/task/image-segmentation","name":"Image Segmentation","papers":1},{"task":"/task/object-detection","name":"Object Detection","papers":1},{"task":"/task/person-re-identification","name":"Person Re-Identification","papers":1},{"task":"/task/quantization","name":"Quantization","papers":1},{"task":null,"name":"Relation","papers":1},{"task":"/task/scene-segmentation","name":"Scene Segmentation","papers":1},{"task":"/task/segmentation","name":"Segmentation","papers":1},{"task":"/task/semantic-segmentation","name":"Semantic Segmentation","papers":1},{"task":"/task/structural-health-monitoring","name":"Structural Health Monitoring","papers":1},{"task":"/task/time-series-1","name":"Time Series","papers":1},{"task":"/task/time-series-prediction","name":"Time Series Prediction","papers":1}],"tasks_shown":20,"n_tasks":23,"usage_by_year":[{"year":"2019","papers":1},{"year":"2020","papers":3},{"year":"2021","papers":1},{"year":"2022","papers":1},{"year":"2023","papers":1},{"year":"2024","papers":1},{"year":"2025","papers":3}],"row_source":"methods_table","archive":{"source":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","archive_url":"https://paperswithcode.com/method/rga"},"syntology_read_at":"2026-09-24T18:15:14+00:00"}