{"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/gaflow-incorporating-gaussian-attention-into-1","title":"GAFlow: Incorporating Gaussian Attention into Optical Flow","arxiv_id":"2309.16217","date":"2023-09-28","proceeding":"ICCV 2023 1","authors":["Ao Luo","Fan Yang","Xin Li","Lang Nie","Chunyu Lin","Haoqiang Fan","Shuaicheng Liu"],"abstract":"Optical flow, or the estimation of motion fields from image sequences, is one of the fundamental problems in computer vision. Unlike most pixel-wise tasks that aim at achieving consistent representations of the same category, optical flow raises extra demands for obtaining local discrimination and smoothness, which yet is not fully explored by existing approaches. In this paper, we push Gaussian Attention (GA) into the optical flow models to accentuate local properties during representation learning and enforce the motion affinity during matching. Specifically, we introduce a novel Gaussian-Constrained Layer (GCL) which can be easily plugged into existing Transformer blocks to highlight the local neighborhood that contains fine-grained structural information. Moreover, for reliable motion analysis, we provide a new Gaussian-Guided Attention Module (GGAM) which not only inherits properties from Gaussian distribution to instinctively revolve around the neighbor fields of each point but also is empowered to put the emphasis on contextually related regions during matching. Our fully-equipped model, namely Gaussian Attention Flow network (GAFlow), naturally incorporates a series of novel Gaussian-based modules into the conventional optical flow framework for reliable motion analysis. Extensive experiments on standard optical flow datasets consistently demonstrate the exceptional performance of the proposed approach in terms of both generalization ability evaluation and online benchmark testing. Code is available at https://github.com/LA30/GAFlow.","url_abs":"https://arxiv.org/abs/2309.16217v1","url_pdf":"https://arxiv.org/pdf/2309.16217v1.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":"gaflow-incorporating-gaussian-attention-into-1","repo_url":"https://github.com/la30/gaflow","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"gaflow-incorporating-gaussian-attention-into-1","repo_url":"https://github.com/MindSpore-scientific/code-12/tree/main/GAF","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null}],"tasks":[{"task_slug":"optical-flow-estimation","task_name":"Optical Flow Estimation"},{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2309.16217","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2309.16217"}},"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":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/LA30/GAFlow","reach":{"status":"ok"}}],"summary":{"ran_fixture":2,"ran_violates":1,"ran":3,"ran_draft_wrong":1,"unverified":2},"by_repo_kind":{"official":{"samples":9,"ran":7,"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":9,"samples":[{"code_sha256_prefix":"144d10b49baeb8a6","entry":"window_partition","repo":"LA30/GAFlow","repo_kind":"official","path":"core/model/encoder_gmflownet.py","file_url":"https://github.com/LA30/GAFlow/blob/HEAD/core/model/encoder_gmflownet.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":2,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"144d10b49baeb8a6"}},{"code_sha256_prefix":"c5acf386fe00c470","entry":"GET_BLOCKS","repo":"LA30/GAFlow","repo_kind":"official","path":"core/model/cuda.py","file_url":"https://github.com/LA30/GAFlow/blob/HEAD/core/model/cuda.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c5acf386fe00c470"}},{"code_sha256_prefix":"798a2174fc62b871","entry":"backwarp","repo":"LA30/GAFlow","repo_kind":"official","path":"core/model/loss_gmflownet.py","file_url":"https://github.com/LA30/GAFlow/blob/HEAD/core/model/loss_gmflownet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"798a2174fc62b871"}},{"code_sha256_prefix":"d4316e43c2a8252b","entry":"compute_supervision_coarse","repo":"LA30/GAFlow","repo_kind":"official","path":"core/model/loss_gmflownet.py","file_url":"https://github.com/LA30/GAFlow/blob/HEAD/core/model/loss_gmflownet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d4316e43c2a8252b"}},{"code_sha256_prefix":"584c9f0dfb692c9c","entry":"create_meshgrid","repo":"LA30/GAFlow","repo_kind":"official","path":"core/model/loss_gmflownet.py","file_url":"https://github.com/LA30/GAFlow/blob/HEAD/core/model/loss_gmflownet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"584c9f0dfb692c9c"}},{"code_sha256_prefix":"87577b3ff9d32712","entry":"drop_path","repo":"LA30/GAFlow","repo_kind":"official","path":"core/model/encoder_gmflownet.py","file_url":"https://github.com/LA30/GAFlow/blob/HEAD/core/model/encoder_gmflownet.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"87577b3ff9d32712"}},{"code_sha256_prefix":"61bf152e6a42a184","entry":"window_reverse","repo":"LA30/GAFlow","repo_kind":"official","path":"core/model/encoder_gmflownet.py","file_url":"https://github.com/LA30/GAFlow/blob/HEAD/core/model/encoder_gmflownet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"61bf152e6a42a184"}},{"code_sha256_prefix":"1e624f979ea53ae4","entry":"Dtype","repo":"LA30/GAFlow","repo_kind":"official","path":"core/model/cuda.py","file_url":"https://github.com/LA30/GAFlow/blob/HEAD/core/model/cuda.py","link_basis":"plan_row","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":"1e624f979ea53ae4"}},{"code_sha256_prefix":"8dc719b8880eda3d","entry":"validate_chairs","repo":"LA30/GAFlow","repo_kind":"official","path":"evaluate.py","file_url":"https://github.com/LA30/GAFlow/blob/HEAD/evaluate.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":"8dc719b8880eda3d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}