{"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/quantitative-certification-of-bias-in-large","title":"Quantitative Certification of Bias in Large Language Models","arxiv_id":"2405.18780","date":"2024-05-29","proceeding":null,"authors":["Isha Chaudhary","Qian Hu","Manoj Kumar","Morteza Ziyadi","Rahul Gupta","Gagandeep Singh"],"abstract":"Large Language Models (LLMs) can produce biased responses that can cause representational harms. However, conventional studies are insufficient to thoroughly evaluate LLM bias, as they can not scale to large number of inputs and provide no guarantees. Therefore, we propose the first framework, QuaCer-B that certifies LLMs for bias on distributions of prompts. A certificate consists of high-confidence bounds on the probability of unbiased LLM responses for any set of prompts mentioning various demographic groups, sampled from a distribution. We illustrate the bias certification for distributions of prompts created by applying varying prefixes drawn from a prefix distributions, to a given set of prompts. We consider prefix distributions for random token sequences, mixtures of manual jailbreaks, and jailbreaks in the LLM's embedding space to certify bias. We obtain non-trivial certified bounds on the probability of unbiased responses of SOTA LLMs, exposing their vulnerabilities over distributions of prompts generated from computationally inexpensive distributions of prefixes.","url_abs":"https://arxiv.org/abs/2405.18780v2","url_pdf":"https://arxiv.org/pdf/2405.18780v2.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":"quantitative-certification-of-bias-in-large","repo_url":"https://github.com/uiuc-focal-lab/quacer-b","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"AGPL-3.0"}}],"tasks":[{"task_slug":"benchmarking","task_name":"Benchmarking"}],"methods":[{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2405.18780","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.18780"}},"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/uiuc-focal-lab/LLMCert-B","reach":{"status":"ok","spdx":"AGPL-3.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/uiuc-focal-lab/quacer-b","reach":{"status":"ok","spdx":"AGPL-3.0"}}],"summary":{"ran":4,"unverified":2},"by_repo_kind":{"found_in_text":{"samples":6,"ran":4,"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":6,"samples":[{"code_sha256_prefix":"e25b264898ca821a","entry":"get_embedding_layer","repo":"uiuc-focal-lab/LLMCert-B","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/uiuc-focal-lab/LLMCert-B/blob/HEAD/utils.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":"e25b264898ca821a"}},{"code_sha256_prefix":"5940b71f90ca6d39","entry":"get_embedding_matrix","repo":"uiuc-focal-lab/LLMCert-B","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/uiuc-focal-lab/LLMCert-B/blob/HEAD/utils.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":"5940b71f90ca6d39"}},{"code_sha256_prefix":"e00307369c36acc3","entry":"get_embeddings","repo":"uiuc-focal-lab/LLMCert-B","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/uiuc-focal-lab/LLMCert-B/blob/HEAD/utils.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":"e00307369c36acc3"}},{"code_sha256_prefix":"8d62b2cc64e63739","entry":"get_nonascii_toks","repo":"uiuc-focal-lab/LLMCert-B","repo_kind":"found_in_text","path":"utils_api.py","file_url":"https://github.com/uiuc-focal-lab/LLMCert-B/blob/HEAD/utils_api.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":"8d62b2cc64e63739"}},{"code_sha256_prefix":"32a6520cacab6394","entry":"get_bias_score_helm","repo":"uiuc-focal-lab/LLMCert-B","repo_kind":"found_in_text","path":"common.py","file_url":"https://github.com/uiuc-focal-lab/LLMCert-B/blob/HEAD/common.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":"32a6520cacab6394"}},{"code_sha256_prefix":"fbcfaa3d9d711829","entry":"get_bias_score_toxigen_separate","repo":"uiuc-focal-lab/LLMCert-B","repo_kind":"found_in_text","path":"common.py","file_url":"https://github.com/uiuc-focal-lab/LLMCert-B/blob/HEAD/common.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":"fbcfaa3d9d711829"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}