{"id":20606138,"url":"https://github.com/tolga-b/debiaswe","last_synced_at":"2025-04-07T11:09:19.345Z","repository":{"id":86116138,"uuid":"77336565","full_name":"tolga-b/debiaswe","owner":"tolga-b","description":"Remove problematic gender bias from word embeddings.","archived":false,"fork":false,"pushed_at":"2023-05-09T14:46:28.000Z","size":60,"stargazers_count":246,"open_issues_count":5,"forks_count":90,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-31T09:08:51.700Z","etag":null,"topics":["debias","gender-equality","nips-2016","social-justice","word-embeddings","word2vec"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/1607.06520","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tolga-b.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-12-25T17:43:06.000Z","updated_at":"2025-03-28T15:28:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"12cc47b4-6cb1-478f-b845-e3b7e5865ad1","html_url":"https://github.com/tolga-b/debiaswe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolga-b%2Fdebiaswe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolga-b%2Fdebiaswe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolga-b%2Fdebiaswe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolga-b%2Fdebiaswe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tolga-b","download_url":"https://codeload.github.com/tolga-b/debiaswe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640465,"owners_count":20971557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debias","gender-equality","nips-2016","social-justice","word-embeddings","word2vec"],"created_at":"2024-11-16T09:32:41.014Z","updated_at":"2025-04-07T11:09:19.324Z","avatar_url":"https://github.com/tolga-b.png","language":"Jupyter Notebook","funding_links":[],"categories":["⚖️ Fairness, Bias \u0026 Ethics Testing","Technical Resources"],"sub_categories":["Open Source/Access Responsible AI Software Packages"],"readme":"# Debiaswe: try to make word embeddings less sexist\n\n\u0026#x1F534;[FAT* 2018 tutorial slides](https://drive.google.com/file/d/1IxIdmreH4qVYnx68QVkqCC9-_yyksoxR/view?usp=sharing)\n\n\nHere we have the code and data for the following paper:\n[Man is to Computer Programmer as Woman is to\nHomemaker? Debiasing Word Embeddings](http://papers.nips.cc/paper/6228-man-is-to-computer-programmer-as-woman-is-to-homemaker-debiasing-word-embeddings.pdf) by \nTolga Bolukbasi, Kai-Wei Chang, James Zou, Venkatesh Saligrama, and Adam Kalai. Proceedings of [NIPS 2016](https://papers.nips.cc/paper/6228-man-is-to-computer-programmer-as-woman-is-to-homemaker-debiasing-word-embeddings).\n\n**Just looking to download a debiased embedding?**\n\nYou can download [binary](https://drive.google.com/file/d/0B5vZVlu2WoS5ZTBSekpUX0RSNDg/view?usp=sharing\u0026resourcekey=0-qO1UY06KB42G1T6IeJ2XCQ)/[txt](https://drive.google.com/file/d/1_PvT4ZvtZjhq4HPywA8-u06epht9ccOw/view?usp=sharing) hard debiased version of the Google's Word2Vec embedding trained on Google News (Origin: GoogleNews-vectors-negative300.bin.gz found [here](https://code.google.com/archive/p/word2vec/)).\n\n**Python scripts:**\n- **learn_gender_specific.py**: given a word embedding and a seed set of gender-specific words (like \u003ci\u003eking\u003c/i\u003e, \u003ci\u003eshe\u003c/i\u003e, etc.), it learns a much larger list of gender-specific words\n- **debias.py**: given a word embedding, sets of gender-pairs, gender-specific words, and pairs to equalize, it outputs a new word embedding. This version basically reads/writes word2vec binary file format.  \n\n```\npython learn_gender_specific.py ../embeddings/GoogleNews-vectors-negative300.bin 50000 ../data/gender_specific_seed.json gender_specific_full.json\n```\n\n```\npython debias.py ../embeddings/GoogleNews-vectors-negative300.bin ../data/definitional_pairs.json ../data/gender_specific_full.json ../data/equalize_pairs.json ../embeddings/GoogleNews-vectors-negative300-hard-debiased.bin\n```\n\n\nWe also have seed data used to debias and crowd data used to evaluate the embeddings.\n\n**Data files:**\n- **gender_specific_seed.json**: A list of 218 gender-specific words\n- **gender_specific_full.json**: A list of 1441 gender-specific words\n- **definitional_pairs.json**: The ten pairs of words we use to define the gender direction\n- **equalize_pairs.json**: Some crowdsourced F-M pairs of words that represent gender direction\n\n\n(All external files that I refer within this repo can be found in [this folder](https://drive.google.com/drive/folders/0B5vZVlu2WoS5dkRFY19YUXVIU2M?resourcekey=0-rZ1HR4Fb0XCi4HFUERGhRA\u0026usp=sharing).)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftolga-b%2Fdebiaswe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftolga-b%2Fdebiaswe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftolga-b%2Fdebiaswe/lists"}