{"about":{"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.","site":"https://codewithpapers.app","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","syntology":{"site":"https://syntology.ai","developers":"https://syntology.ai/developers","mcp":{"server":"https://syntology.ai/mcp","transport":"streamable-http","server_card":"https://syntology.ai/.well-known/mcp/server-card.json","auth":{"type":"trial token, no account","trial_token":"https://syntology.ai/api/oauth/trial/token","method":"POST","docs":"https://syntology.ai/developers"}},"have":"https://syntology.ai/api/graph/have?x=<method, arXiv id or title> (free, answers coverage only)","paper_base":"https://syntology.ai/paper/","atlas_base":"https://app.syntology.ai/?focus="},"machine_readable":[{"url":"https://codewithpapers.app/llms.txt","what":"the machine catalog: every machine-readable file, counted"},{"url":"https://codewithpapers.app/index/manifest.json","what":"paper-to-code index by arXiv id, with Syntology's counts"},{"url":"https://codewithpapers.app/search/manifest.json","what":"site search index (titles, authors) and its files"},{"url":"https://codewithpapers.app/download","what":"bulk files: Syntology's layer, described there"},{"url":"https://codewithpapers.app/build_manifest.json","what":"the build record: inputs, counts, exclusions, probes"}]},"url":"/method/gala","slug":"gala","name":"GALA","full_name":"Global-and-Local attention","full_name_withheld":false,"description_markdown":"Most attention mechanisms learn where to focus using only weak supervisory signals from class labels, which inspired Linsley et al. to investigate how explicit human supervision can affect the performance and interpretability of attention models. As a proof of concept, Linsley et al. proposed the global-and-local attention (GALA) module, which extends an SE block with a spatial attention mechanism.\r\n\r\nGiven the input feature map $X$, GALA uses an attention mask that combines global and local attention to tell the network where and on what to focus. As in SE blocks, global attention aggregates global information by global average pooling and then produces a channel-wise attention weight vector using a multilayer perceptron. In local attention, two consecutive $1\\times 1$ convolutions are conducted on the input to produce a positional weight map. The outputs of the local and global pathways are combined by addition and multiplication. Formally, GALA can be represented as:\r\n\\begin{align}\r\n    s_g &= W_{2} \\delta (W_{1}\\text{GAP}(x))\r\n\\end{align}\r\n\r\n\\begin{align}\r\n    s_l &= Conv_2^{1\\times 1} (\\delta(Conv_1^{1\\times1}(X)))\r\n\\end{align}\r\n\r\n\\begin{align}\r\n    s_g^* &= \\text{Expand}(s_g)\r\n\\end{align}\r\n\r\n\\begin{align}\r\n    s_l^* &= \\text{Expand}(s_l) \r\n\\end{align}\r\n\r\n\\begin{align}\r\n    s &= \\tanh(a(s_g^\\* + s_l^\\*) +m \\cdot (s_g^\\* s_l^\\*) )\r\n\\end{align}\r\n\r\n\\begin{align}\r\n    Y &= sX\r\n\\end{align}\r\n\r\nwhere $a,m \\in \\mathbb{R}^{C}$ are learnable parameters representing channel-wise weight vectors. \r\n\r\nSupervised by human-provided feature importance maps, GALA has significantly improved representational power and can be combined with any CNN backbone.","description_state":"present","introduced_year":null,"introduced_by":{"title":"Learning what and where to attend","paper":"/paper/global-and-local-attention-networks-for","first_author":"Drew Linsley","n_authors":4,"url_abs":null,"archive_paper_url":"https://paperswithcode.com/paper/global-and-local-attention-networks-for"},"source":{"url":"https://arxiv.org/abs/1805.08819v4","title":"Learning what and where to attend","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":9,"archive_num_papers":9,"papers_newest_first":[{"paper":null,"slug":"2506-08419","title":"Online Learning-guided Learning Rate Adaptation via Gradient Alignment","date":"2025-06-10","arxiv_id":"2506.08419","n_code_links":0,"syntology":null},{"paper":"/paper/gala-graph-diffusion-based-alignment-with","slug":"gala-graph-diffusion-based-alignment-with","title":"GALA: Graph Diffusion-based Alignment with Jigsaw for Source-free Domain Adaptation","date":"2024-10-22","arxiv_id":"2410.16606","n_code_links":1,"syntology":null},{"paper":null,"slug":"gala-geometry-aware-local-adaptive-grids-for","title":"GALA: Geometry-Aware Local Adaptive Grids for Detailed 3D Generation","date":"2024-10-13","arxiv_id":"2410.10037","n_code_links":0,"syntology":null},{"paper":null,"slug":"gala-generating-animatable-layered-assets","title":"GALA: Generating Animatable Layered Assets from a Single Scan","date":"2024-01-23","arxiv_id":"2401.12979","n_code_links":0,"syntology":null},{"paper":"/paper/does-invariant-graph-learning-via-environment-1","slug":"does-invariant-graph-learning-via-environment-1","title":"Does Invariant Graph Learning via Environment Augmentation Learn Invariance?","date":"2023-10-29","arxiv_id":"2310.19035","n_code_links":1,"syntology":{"ran":3,"of":3,"n_ran_checked":3,"n_instrument":0,"unverified":0,"pointer_only":0,"phrase":"3 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 3 honoured, 0 violated, 0 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified","official":null}},{"paper":null,"slug":"temporal-and-contextual-transformer-for-multi","title":"Temporal and Contextual Transformer for Multi-Camera Editing of TV Shows","date":"2022-10-17","arxiv_id":"2210.08737","n_code_links":0,"syntology":null},{"paper":null,"slug":"gala-toward-geometry-and-lighting-aware","title":"GALA: Toward Geometry-and-Lighting-Aware Object Search for Compositing","date":"2022-03-31","arxiv_id":"2204.00125","n_code_links":0,"syntology":null},{"paper":"/paper/gossip-based-actor-learner-architectures-for","slug":"gossip-based-actor-learner-architectures-for","title":"Gossip-based Actor-Learner Architectures for Deep Reinforcement Learning","date":"2019-06-09","arxiv_id":"1906.04585","n_code_links":1,"syntology":null},{"paper":"/paper/global-and-local-attention-networks-for","slug":"global-and-local-attention-networks-for","title":"Learning what and where to attend","date":"2018-05-22","arxiv_id":"1805.08819","n_code_links":1,"syntology":null}],"papers_shown":9,"papers_order":"date (newest first), then slug","paper_counts":{"archive_papers_tagged":9,"with_a_code_link":4,"where_syntology_ran_a_sample":1,"not_listed_spam_title":0,"listed":9,"listed_where_code_ran":1,"where_syntology_ran_a_sample_split":{"with_a_run_with_no_instrument_failure":1,"every_run_a_failure_of_syntologys_instrument":0,"listed_with_a_run_with_no_instrument_failure":1,"listed_every_run_a_failure_of_syntologys_instrument":0,"filter":{"states":["a run with no instrument failure","any run, instrument failures included"],"default":"a run with no instrument failure","note":"on the 'only where code ran' pages the default hides, in the browser, the rows where every run was a failure of Syntology's instrument; the second state shows them again. Rows are hidden, never re-ordered; these twins list every row"}},"definition":"distinct papers the archive tags; 'where Syntology ran a sample' counts papers with at least one harvested sample that ran, which is not a correctness claim"},"papers_where_code_ran":1,"papers_where_code_ran_first_page":"/method/gala/papers/ran/1","papers_where_code_ran_caption":"We ran code from the paper's repository; we did not isolate this method inside it.","pages":[{"order":"ran","page":1,"of":1,"url":"/method/gala/papers/ran/1","json":"/method/gala/papers/ran/1.json","rows":1}],"tasks":[{"task":"/task/3d-generation","name":"3D Generation","papers":1},{"task":"/task/3d-geometry","name":"3D geometry","papers":1},{"task":"/task/deep-reinforcement-learning","name":"Deep Reinforcement Learning","papers":1},{"task":"/task/diagnostic","name":"Diagnostic","papers":1},{"task":"/task/domain-adaptation","name":"Domain Adaptation","papers":1},{"task":null,"name":"GPU","papers":1},{"task":"/task/graph-domain-adaptation","name":"GRAPH DOMAIN ADAPTATION","papers":1},{"task":"/task/general-knowledge","name":"General Knowledge","papers":1},{"task":"/task/graph-learning","name":"Graph Learning","papers":1},{"task":"/task/graph-neural-network","name":"Graph Neural Network","papers":1},{"task":"/task/graph-representation-learning","name":"Graph Representation Learning","papers":1},{"task":"/task/image-categorization","name":"Image Categorization","papers":1},{"task":"/task/object","name":"Object","papers":1},{"task":"/task/object-recognition","name":"Object Recognition","papers":1},{"task":"/task/out-of-distribution-generalization","name":"Out-of-Distribution Generalization","papers":1},{"task":"/task/quantization","name":"Quantization","papers":1},{"task":"/task/reinforcement-learning","name":"Reinforcement Learning","papers":1},{"task":"/task/reinforcement-learning-1","name":"Reinforcement Learning (RL)","papers":1},{"task":"/task/representation-learning","name":"Representation Learning","papers":1},{"task":"/task/source-free-domain-adaptation","name":"Source-Free Domain Adaptation","papers":1}],"tasks_shown":20,"n_tasks":21,"usage_by_year":[{"year":"2018","papers":1},{"year":"2019","papers":1},{"year":"2022","papers":2},{"year":"2023","papers":1},{"year":"2024","papers":3},{"year":"2025","papers":1}],"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/gala"},"syntology_read_at":"2026-10-05T00:36:11+00:00","syntology":{"source":"Syntology's have check for this name (the free coverage lookup), read from Syntology's graph","have_url":"https://syntology.ai/api/graph/have?x=GALA","read_at":"2026-10-05T00:56:18+00:00","query":"GALA","kind":"method","have":"no_code","tier":"paper_only","verified_implementation":false,"level":null,"level_meaning":"the served verification level, per answer; never summed across methods","resolved_to":{"method":"GALA","origin_arxiv_id":"2401.12979"},"resolution":"exact","resolved_name_differs":false,"absence_asserted":"for_this_exact_name_only","absence_unchecked":null,"no_code_is_about_this_method":false,"subject":"different_paper","archive_paper_arxiv_id":"1805.08819","repositories":{"listed":null,"in_graph":0,"list_truncated":null,"strongest_link":null},"retrieve_with":null,"name_competition":{"verdict":"outranked","may_be_wrong_sense":true,"bearers_found":8,"served":{"arxiv_id":"2401.12979","citations":33},"leading_other_bearer":{"arxiv_id":"2105.01827","title":"GALA: Greedy ComputAtion for Linear Algebra in Privacy-Preserved Neural Networks","citations":77,"named_by":["title_prefix"],"bearer_name":"GALA: Greedy ComputAtion for Linear Algebra in Privacy-Preserved Neural Networks","ask_with":"have('2105.01827')"},"n_other_bearers_listed":5,"note":"'GALA' is ALSO the name of the paper 'GALA: Greedy ComputAtion for Linear Algebra in Privacy-Preserved Neural Networks' (arXiv:2105.01827, 77 citations), which is cited FAR more than the paper this answer is about (33). This answer may be about the wrong GALA. If you meant the better-known one, ask again with that entry of `also_named`."},"name_competition_text":"The same name also belongs to the paper “GALA: Greedy ComputAtion for Linear Algebra in Privacy-Preserved Neural Networks” (arXiv:2105.01827, 77 citations), which the lookup finds cited far more than the paper this answer is about (33 citations), so this answer may be about a different sense of the name.","near_matches":null,"code_nearby":[],"code_nearby_caption":null,"origin_paper":{"arxiv_id":"2401.12979","page":null,"syntology_url":"https://syntology.ai/paper/2401.12979","in_graph_layer":false,"samples":0},"line":"about another paper, arXiv:2401.12979: no code under this exact name (no_code; paper_only). About another paper: this answer is about arXiv:2401.12979, while the archive credits arXiv:1805.08819, so it does not say whether this method has code.","level_legend":null},"syntology_have_state":"loaded","record_sha256":"20e841b39eb801a2622681c862bde4c838230a8655075e3dd9658dc3ec3ef5aa","record_changed_at":"2026-10-05","record_changed_at_basis":"changed"}