{"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/how-well-can-text-to-image-generative-models","title":"How well can Text-to-Image Generative Models understand Ethical Natural Language Interventions?","arxiv_id":"2210.15230","date":"2022-10-27","proceeding":null,"authors":["Hritik Bansal","Da Yin","Masoud Monajatipoor","Kai-Wei Chang"],"abstract":"Text-to-image generative models have achieved unprecedented success in generating high-quality images based on natural language descriptions. However, it is shown that these models tend to favor specific social groups when prompted with neutral text descriptions (e.g., 'a photo of a lawyer'). Following Zhao et al. (2021), we study the effect on the diversity of the generated images when adding ethical intervention that supports equitable judgment (e.g., 'if all individuals can be a lawyer irrespective of their gender') in the input prompts. To this end, we introduce an Ethical NaTural Language Interventions in Text-to-Image GENeration (ENTIGEN) benchmark dataset to evaluate the change in image generations conditional on ethical interventions across three social axes -- gender, skin color, and culture. Through ENTIGEN framework, we find that the generations from minDALL.E, DALL.E-mini and Stable Diffusion cover diverse social groups while preserving the image quality. Preliminary studies indicate that a large change in the model predictions is triggered by certain phrases such as 'irrespective of gender' in the context of gender bias in the ethical interventions. We release code and annotated data at https://github.com/Hritikbansal/entigen_emnlp.","url_abs":"https://arxiv.org/abs/2210.15230v1","url_pdf":"https://arxiv.org/pdf/2210.15230v1.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":"how-well-can-text-to-image-generative-models","repo_url":"https://github.com/hritikbansal/entigen_emnlp","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"culture","task_name":"Cultural Vocal Bursts Intensity Prediction"},{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"text-to-image-generation-1","task_name":"Text to Image Generation"},{"task_slug":"text-to-image-generation","task_name":"Text-to-Image Generation"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[{"slug":"entigen","name":"ENTIGEN","full_name":"Ethical NaTural Language Interventions in Text-to-Image GENeration"}],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2210.15230","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.15230"}},"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/hritikbansal/entigen_emnlp","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":7},"by_repo_kind":{"official":{"samples":7,"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":0,"samples":[{"code_sha256_prefix":"0d23c31b80ba171d","entry":"build_tokenizer","repo":"hritikbansal/entigen_emnlp","repo_kind":"official","path":"models/minDALL-E/dalle/models/tokenizer.py","file_url":"https://github.com/hritikbansal/entigen_emnlp/blob/HEAD/models/minDALL-E/dalle/models/tokenizer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0d23c31b80ba171d"}},{"code_sha256_prefix":"b0a5fdc3d1543189","entry":"clip_forward","repo":"hritikbansal/entigen_emnlp","repo_kind":"official","path":"biases/score_clip.py","file_url":"https://github.com/hritikbansal/entigen_emnlp/blob/HEAD/biases/score_clip.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b0a5fdc3d1543189"}},{"code_sha256_prefix":"67105b92f0a7dddb","entry":"cutoff_topk_logits","repo":"hritikbansal/entigen_emnlp","repo_kind":"official","path":"models/minDALL-E/dalle/utils/sampling.py","file_url":"https://github.com/hritikbansal/entigen_emnlp/blob/HEAD/models/minDALL-E/dalle/utils/sampling.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"67105b92f0a7dddb"}},{"code_sha256_prefix":"6d7b37c2cf95fb65","entry":"cutoff_topp_probs","repo":"hritikbansal/entigen_emnlp","repo_kind":"official","path":"models/minDALL-E/dalle/utils/sampling.py","file_url":"https://github.com/hritikbansal/entigen_emnlp/blob/HEAD/models/minDALL-E/dalle/utils/sampling.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6d7b37c2cf95fb65"}},{"code_sha256_prefix":"7469c69b65f2718f","entry":"download","repo":"hritikbansal/entigen_emnlp","repo_kind":"official","path":"models/minDALL-E/dalle/utils/utils.py","file_url":"https://github.com/hritikbansal/entigen_emnlp/blob/HEAD/models/minDALL-E/dalle/utils/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7469c69b65f2718f"}},{"code_sha256_prefix":"50f4d2c873a7aa5f","entry":"get_positional_encoding","repo":"hritikbansal/entigen_emnlp","repo_kind":"official","path":"models/minDALL-E/dalle/utils/sampling.py","file_url":"https://github.com/hritikbansal/entigen_emnlp/blob/HEAD/models/minDALL-E/dalle/utils/sampling.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"50f4d2c873a7aa5f"}},{"code_sha256_prefix":"d03334a78a33ccd1","entry":"realpath_url_or_path","repo":"hritikbansal/entigen_emnlp","repo_kind":"official","path":"models/minDALL-E/dalle/utils/utils.py","file_url":"https://github.com/hritikbansal/entigen_emnlp/blob/HEAD/models/minDALL-E/dalle/utils/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d03334a78a33ccd1"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}