{"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/divide-bind-your-attention-for-improved","title":"Divide & Bind Your Attention for Improved Generative Semantic Nursing","arxiv_id":"2307.10864","date":"2023-07-20","proceeding":null,"authors":["Yumeng Li","Margret Keuper","Dan Zhang","Anna Khoreva"],"abstract":"Emerging large-scale text-to-image generative models, e.g., Stable Diffusion (SD), have exhibited overwhelming results with high fidelity. Despite the magnificent progress, current state-of-the-art models still struggle to generate images fully adhering to the input prompt. Prior work, Attend & Excite, has introduced the concept of Generative Semantic Nursing (GSN), aiming to optimize cross-attention during inference time to better incorporate the semantics. It demonstrates promising results in generating simple prompts, e.g., \"a cat and a dog\". However, its efficacy declines when dealing with more complex prompts, and it does not explicitly address the problem of improper attribute binding. To address the challenges posed by complex prompts or scenarios involving multiple entities and to achieve improved attribute binding, we propose Divide & Bind. We introduce two novel loss objectives for GSN: a novel attendance loss and a binding loss. Our approach stands out in its ability to faithfully synthesize desired objects with improved attribute alignment from complex prompts and exhibits superior performance across multiple evaluation benchmarks.","url_abs":"https://arxiv.org/abs/2307.10864v3","url_pdf":"https://arxiv.org/pdf/2307.10864v3.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":"divide-bind-your-attention-for-improved","repo_url":"https://github.com/boschresearch/Divide-and-Bind","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"AGPL-3.0"}}],"tasks":[{"task_slug":"attribute","task_name":"Attribute"},{"task_slug":"generative-semantic-nursing","task_name":"Generative Semantic Nursing"},{"task_slug":"text-to-image-generation","task_name":"Text-to-Image Generation"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"latent-diffusion-model","method_name":"Latent Diffusion Model"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2307.10864","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2307.10864"}},"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/boschresearch/Divide-and-Bind","reach":{"status":"ok","spdx":"AGPL-3.0"}}],"summary":{"ran":6,"unverified":2},"by_repo_kind":{"official":{"samples":8,"ran":6,"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":8,"samples":[{"code_sha256_prefix":"eb9a392d46a9c13e","entry":"default_param","repo":"boschresearch/Divide-and-Bind","repo_kind":"official","path":"divide_and_bind/pipeline_divide_and_bind_latest.py","file_url":"https://github.com/boschresearch/Divide-and-Bind/blob/HEAD/divide_and_bind/pipeline_divide_and_bind_latest.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"AGPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"eb9a392d46a9c13e"}},{"code_sha256_prefix":"e132ad4cbb6127e2","entry":"get_indices_to_alter","repo":"boschresearch/Divide-and-Bind","repo_kind":"official","path":"divide_and_bind/pipeline_divide_and_bind.py","file_url":"https://github.com/boschresearch/Divide-and-Bind/blob/HEAD/divide_and_bind/pipeline_divide_and_bind.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"AGPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"e132ad4cbb6127e2"}},{"code_sha256_prefix":"c520f65767f7c7a6","entry":"jenson_shannon_divergence","repo":"boschresearch/Divide-and-Bind","repo_kind":"official","path":"divide_and_bind/pipeline_divide_and_bind.py","file_url":"https://github.com/boschresearch/Divide-and-Bind/blob/HEAD/divide_and_bind/pipeline_divide_and_bind.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"AGPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"c520f65767f7c7a6"}},{"code_sha256_prefix":"bbce8ae94df69bee","entry":"min_max_norm","repo":"boschresearch/Divide-and-Bind","repo_kind":"official","path":"utils/annotation_sd.py","file_url":"https://github.com/boschresearch/Divide-and-Bind/blob/HEAD/utils/annotation_sd.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"AGPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"bbce8ae94df69bee"}},{"code_sha256_prefix":"630566ccfdfd6468","entry":"move_to","repo":"boschresearch/Divide-and-Bind","repo_kind":"official","path":"utils/ptp_utils.py","file_url":"https://github.com/boschresearch/Divide-and-Bind/blob/HEAD/utils/ptp_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"AGPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"630566ccfdfd6468"}},{"code_sha256_prefix":"0eec56d25a94e28f","entry":"reshape_CA_attn_map","repo":"boschresearch/Divide-and-Bind","repo_kind":"official","path":"utils/annotation_sd.py","file_url":"https://github.com/boschresearch/Divide-and-Bind/blob/HEAD/utils/annotation_sd.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"AGPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"0eec56d25a94e28f"}},{"code_sha256_prefix":"c2a62ea502f8be8b","entry":"aggregate_attention","repo":"boschresearch/Divide-and-Bind","repo_kind":"official","path":"utils/annotation_sd.py","file_url":"https://github.com/boschresearch/Divide-and-Bind/blob/HEAD/utils/annotation_sd.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"AGPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"c2a62ea502f8be8b"}},{"code_sha256_prefix":"42f35256bd885673","entry":"text_under_image","repo":"boschresearch/Divide-and-Bind","repo_kind":"official","path":"utils/ptp_utils.py","file_url":"https://github.com/boschresearch/Divide-and-Bind/blob/HEAD/utils/ptp_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"AGPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"42f35256bd885673"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}