{"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/glimpse-attend-and-explore-self-attention-for","title":"Glimpse-Attend-and-Explore: Self-Attention for Active Visual Exploration","arxiv_id":"2108.11717","date":"2021-08-26","proceeding":"ICCV 2021 10","authors":["Soroush Seifi","Abhishek Jha","Tinne Tuytelaars"],"abstract":"Active visual exploration aims to assist an agent with a limited field of view to understand its environment based on partial observations made by choosing the best viewing directions in the scene. Recent methods have tried to address this problem either by using reinforcement learning, which is difficult to train, or by uncertainty maps, which are task-specific and can only be implemented for dense prediction tasks. In this paper, we propose the Glimpse-Attend-and-Explore model which: (a) employs self-attention to guide the visual exploration instead of task-specific uncertainty maps; (b) can be used for both dense and sparse prediction tasks; and (c) uses a contrastive stream to further improve the representations learned. Unlike previous works, we show the application of our model on multiple tasks like reconstruction, segmentation and classification. Our model provides encouraging results while being less dependent on dataset bias in driving the exploration. We further perform an ablation study to investigate the features and attention learned by our model. Finally, we show that our self-attention module learns to attend different regions of the scene by minimizing the loss on the downstream task. Code: https://github.com/soroushseifi/glimpse-attend-explore.","url_abs":"https://arxiv.org/abs/2108.11717v1","url_pdf":"https://arxiv.org/pdf/2108.11717v1.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":"glimpse-attend-and-explore-self-attention-for","repo_url":"https://github.com/soroushseifi/glimpse-attend-explore","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2108.11717","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2108.11717"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/soroushseifi/glimpse-attend-explore","reach":null}],"summary":{"unverified":9},"by_repo_kind":{"official":{"samples":9,"ran":0,"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":"c3d4044e4ac74f13","entry":"calculate_losses","repo":"soroushseifi/glimpse-attend-explore","repo_kind":"official","path":"network_functions.py","file_url":"https://github.com/soroushseifi/glimpse-attend-explore/blob/HEAD/network_functions.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":"c3d4044e4ac74f13"}},{"code_sha256_prefix":"02fc85da8a06ad83","entry":"contrastive_loss","repo":"soroushseifi/glimpse-attend-explore","repo_kind":"official","path":"network_functions.py","file_url":"https://github.com/soroushseifi/glimpse-attend-explore/blob/HEAD/network_functions.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":"02fc85da8a06ad83"}},{"code_sha256_prefix":"10ee08467bdb6f23","entry":"final_prediction","repo":"soroushseifi/glimpse-attend-explore","repo_kind":"official","path":"network_functions.py","file_url":"https://github.com/soroushseifi/glimpse-attend-explore/blob/HEAD/network_functions.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":"10ee08467bdb6f23"}},{"code_sha256_prefix":"a5b03c5f95450b8b","entry":"find_next_location","repo":"soroushseifi/glimpse-attend-explore","repo_kind":"official","path":"network_functions.py","file_url":"https://github.com/soroushseifi/glimpse-attend-explore/blob/HEAD/network_functions.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":"a5b03c5f95450b8b"}},{"code_sha256_prefix":"ea26e612a9f62e7c","entry":"forward","repo":"soroushseifi/glimpse-attend-explore","repo_kind":"official","path":"network_functions.py","file_url":"https://github.com/soroushseifi/glimpse-attend-explore/blob/HEAD/network_functions.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":"ea26e612a9f62e7c"}},{"code_sha256_prefix":"447dade418a4c188","entry":"get_full_features","repo":"soroushseifi/glimpse-attend-explore","repo_kind":"official","path":"network_functions.py","file_url":"https://github.com/soroushseifi/glimpse-attend-explore/blob/HEAD/network_functions.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":"447dade418a4c188"}},{"code_sha256_prefix":"b74d176a421015f5","entry":"get_masks","repo":"soroushseifi/glimpse-attend-explore","repo_kind":"official","path":"network_functions.py","file_url":"https://github.com/soroushseifi/glimpse-attend-explore/blob/HEAD/network_functions.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":"b74d176a421015f5"}},{"code_sha256_prefix":"ccfe7d9a9fcbcb2a","entry":"reinitialize","repo":"soroushseifi/glimpse-attend-explore","repo_kind":"official","path":"network_functions.py","file_url":"https://github.com/soroushseifi/glimpse-attend-explore/blob/HEAD/network_functions.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":"ccfe7d9a9fcbcb2a"}},{"code_sha256_prefix":"357105ea74c92aa0","entry":"to_memory","repo":"soroushseifi/glimpse-attend-explore","repo_kind":"official","path":"network_functions.py","file_url":"https://github.com/soroushseifi/glimpse-attend-explore/blob/HEAD/network_functions.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":"357105ea74c92aa0"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}