{"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/large-language-model-validity-via-enhanced","title":"Large language model validity via enhanced conformal prediction methods","arxiv_id":"2406.09714","date":"2024-06-14","proceeding":null,"authors":["John J. Cherian","Isaac Gibbs","Emmanuel J. Candès"],"abstract":"We develop new conformal inference methods for obtaining validity guarantees on the output of large language models (LLMs). Prior work in conformal language modeling identifies a subset of the text that satisfies a high-probability guarantee of correctness. These methods work by filtering claims from the LLM's original response if a scoring function evaluated on the claim fails to exceed a threshold calibrated via split conformal prediction. Existing methods in this area suffer from two deficiencies. First, the guarantee stated is not conditionally valid. The trustworthiness of the filtering step may vary based on the topic of the response. Second, because the scoring function is imperfect, the filtering step can remove many valuable and accurate claims. We address both of these challenges via two new conformal methods. First, we generalize the conditional conformal procedure of Gibbs et al. (2023) in order to adaptively issue weaker guarantees when they are required to preserve the utility of the output. Second, we show how to systematically improve the quality of the scoring function via a novel algorithm for differentiating through the conditional conformal procedure. We demonstrate the efficacy of our approach on biography and medical question-answering datasets.","url_abs":"https://arxiv.org/abs/2406.09714v2","url_pdf":"https://arxiv.org/pdf/2406.09714v2.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":"large-language-model-validity-via-enhanced","repo_url":"https://github.com/jjcherian/conformal-safety","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"large-language-model-validity-via-enhanced","repo_url":"https://github.com/dmis-lab/olaph","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"large-language-model-validity-via-enhanced","repo_url":"https://github.com/n4feng/ResponseQualityAssessment","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}}],"tasks":[{"task_slug":"conformal-prediction","task_name":"Conformal Prediction"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"},{"task_slug":null,"task_name":"Medical Question Answering"},{"task_slug":"prediction","task_name":"Prediction"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":null,"task_name":"valid"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.09714","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.09714"}},"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/jjcherian/conformal-safety","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/jjcherian/conditional-conformal","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dmis-lab/olaph","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/n4feng/ResponseQualityAssessment","reach":{"status":"ok"}}],"summary":{"ran":22,"ran_draft_wrong":1,"unverified":9},"by_repo_kind":{"official":{"samples":11,"ran":7,"repositories":1},"listed":{"samples":12,"ran":10,"repositories":1},"found_in_text":{"samples":9,"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":12,"samples":[{"code_sha256_prefix":"0bf59e178503b9e6","entry":"ROUGESCORE","repo":"dmis-lab/olaph","repo_kind":"listed","path":"pdata_collection.py","file_url":"https://github.com/dmis-lab/olaph/blob/HEAD/pdata_collection.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0bf59e178503b9e6"}},{"code_sha256_prefix":"cd195a4090c8d1a8","entry":"auto_eval","repo":"dmis-lab/olaph","repo_kind":"listed","path":"pred_to_sft.py","file_url":"https://github.com/dmis-lab/olaph/blob/HEAD/pred_to_sft.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cd195a4090c8d1a8"}},{"code_sha256_prefix":"510528f4db1006bc","entry":"best_demos","repo":"dmis-lab/olaph","repo_kind":"listed","path":"Factscore/factscore/atomic_facts.py","file_url":"https://github.com/dmis-lab/olaph/blob/HEAD/Factscore/factscore/atomic_facts.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"510528f4db1006bc"}},{"code_sha256_prefix":"50ffc3534adfd228","entry":"best_demos","repo":"jjcherian/conformal-safety","repo_kind":"official","path":"src/atomizer.py","file_url":"https://github.com/jjcherian/conformal-safety/blob/HEAD/src/atomizer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"50ffc3534adfd228"}},{"code_sha256_prefix":"a9044f6ed0707c0e","entry":"binary_search","repo":"jjcherian/conditional-conformal","repo_kind":"found_in_text","path":"conditionalconformal/condconf.py","file_url":"https://github.com/jjcherian/conditional-conformal/blob/HEAD/conditionalconformal/condconf.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a9044f6ed0707c0e"}},{"code_sha256_prefix":"c5b53b2caa9e7c67","entry":"compute_conformity_scores","repo":"jjcherian/conformal-safety","repo_kind":"official","path":"src/conformal.py","file_url":"https://github.com/jjcherian/conformal-safety/blob/HEAD/src/conformal.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c5b53b2caa9e7c67"}},{"code_sha256_prefix":"08b581e4f2313f0c","entry":"conformal_filter","repo":"jjcherian/conformal-safety","repo_kind":"official","path":"src/conformal.py","file_url":"https://github.com/jjcherian/conformal-safety/blob/HEAD/src/conformal.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"08b581e4f2313f0c"}},{"code_sha256_prefix":"96273073405b5dcc","entry":"eval_score","repo":"dmis-lab/olaph","repo_kind":"listed","path":"pred_to_preference.py","file_url":"https://github.com/dmis-lab/olaph/blob/HEAD/pred_to_preference.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"96273073405b5dcc"}},{"code_sha256_prefix":"f2b316a3259d0a06","entry":"find_unique_element","repo":"jjcherian/conformal-safety","repo_kind":"official","path":"src/dataset.py","file_url":"https://github.com/jjcherian/conformal-safety/blob/HEAD/src/dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f2b316a3259d0a06"}},{"code_sha256_prefix":"e970ec6b296d3b38","entry":"generate_annotation_prompt","repo":"jjcherian/conformal-safety","repo_kind":"official","path":"src/query.py","file_url":"https://github.com/jjcherian/conformal-safety/blob/HEAD/src/query.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e970ec6b296d3b38"}},{"code_sha256_prefix":"153977b5ca408d0b","entry":"generate_merge_prompt","repo":"jjcherian/conformal-safety","repo_kind":"official","path":"src/query.py","file_url":"https://github.com/jjcherian/conformal-safety/blob/HEAD/src/query.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"153977b5ca408d0b"}},{"code_sha256_prefix":"a305f477743aeac3","entry":"generate_subclaim_prompt","repo":"jjcherian/conformal-safety","repo_kind":"official","path":"src/query.py","file_url":"https://github.com/jjcherian/conformal-safety/blob/HEAD/src/query.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a305f477743aeac3"}},{"code_sha256_prefix":"a43705d36c393243","entry":"indicator_matrix","repo":"jjcherian/conditional-conformal","repo_kind":"found_in_text","path":"conditionalconformal/synthetic_data.py","file_url":"https://github.com/jjcherian/conditional-conformal/blob/HEAD/conditionalconformal/synthetic_data.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a43705d36c393243"}},{"code_sha256_prefix":"8eb846a8e76a79b8","entry":"is_invalid_paragraph_ppl","repo":"dmis-lab/olaph","repo_kind":"listed","path":"Factscore/factscore/abstain_detection.py","file_url":"https://github.com/dmis-lab/olaph/blob/HEAD/Factscore/factscore/abstain_detection.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8eb846a8e76a79b8"}},{"code_sha256_prefix":"672bd38d830be48d","entry":"is_invalid_ppl","repo":"dmis-lab/olaph","repo_kind":"listed","path":"Factscore/factscore/abstain_detection.py","file_url":"https://github.com/dmis-lab/olaph/blob/HEAD/Factscore/factscore/abstain_detection.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"672bd38d830be48d"}},{"code_sha256_prefix":"a58480b813525951","entry":"make_inst","repo":"dmis-lab/olaph","repo_kind":"listed","path":"pred_to_preference.py","file_url":"https://github.com/dmis-lab/olaph/blob/HEAD/pred_to_preference.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a58480b813525951"}},{"code_sha256_prefix":"6a96435eba311b08","entry":"normalize_answer","repo":"dmis-lab/olaph","repo_kind":"listed","path":"Factscore/factscore/atomic_facts.py","file_url":"https://github.com/dmis-lab/olaph/blob/HEAD/Factscore/factscore/atomic_facts.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6a96435eba311b08"}},{"code_sha256_prefix":"abe7e77347b17747","entry":"phi_fn_intercept","repo":"jjcherian/conditional-conformal","repo_kind":"found_in_text","path":"experiments/synthetic_trial.py","file_url":"https://github.com/jjcherian/conditional-conformal/blob/HEAD/experiments/synthetic_trial.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"abe7e77347b17747"}},{"code_sha256_prefix":"ca62a7e8fcef8799","entry":"phi_fn_shifts","repo":"jjcherian/conditional-conformal","repo_kind":"found_in_text","path":"experiments/synthetic_trial.py","file_url":"https://github.com/jjcherian/conditional-conformal/blob/HEAD/experiments/synthetic_trial.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ca62a7e8fcef8799"}},{"code_sha256_prefix":"3635046105ae0fce","entry":"remove_citation","repo":"dmis-lab/olaph","repo_kind":"listed","path":"Factscore/factscore/abstain_detection.py","file_url":"https://github.com/dmis-lab/olaph/blob/HEAD/Factscore/factscore/abstain_detection.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3635046105ae0fce"}},{"code_sha256_prefix":"c738d349dd542153","entry":"setup_cvx_problem","repo":"jjcherian/conditional-conformal","repo_kind":"found_in_text","path":"conditionalconformal/condconf.py","file_url":"https://github.com/jjcherian/conditional-conformal/blob/HEAD/conditionalconformal/condconf.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c738d349dd542153"}},{"code_sha256_prefix":"4fe1f68fa8d32424","entry":"split_dataset","repo":"jjcherian/conditional-conformal","repo_kind":"found_in_text","path":"conditionalconformal/experiment_utils.py","file_url":"https://github.com/jjcherian/conditional-conformal/blob/HEAD/conditionalconformal/experiment_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4fe1f68fa8d32424"}},{"code_sha256_prefix":"13867f872a481bd3","entry":"text_to_sentences","repo":"dmis-lab/olaph","repo_kind":"listed","path":"Factscore/factscore/atomic_facts.py","file_url":"https://github.com/dmis-lab/olaph/blob/HEAD/Factscore/factscore/atomic_facts.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"13867f872a481bd3"}},{"code_sha256_prefix":"91e4954df685088b","entry":"BERTSCORE","repo":"dmis-lab/olaph","repo_kind":"listed","path":"pdata_collection.py","file_url":"https://github.com/dmis-lab/olaph/blob/HEAD/pdata_collection.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":"91e4954df685088b"}},{"code_sha256_prefix":"68d4cb0d0d0e65db","entry":"BLEURT","repo":"dmis-lab/olaph","repo_kind":"listed","path":"pdata_collection.py","file_url":"https://github.com/dmis-lab/olaph/blob/HEAD/pdata_collection.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":"68d4cb0d0d0e65db"}},{"code_sha256_prefix":"17beb7b9e7b9c708","entry":"calibrate_thresholds","repo":"jjcherian/conformal-safety","repo_kind":"official","path":"src/conformal.py","file_url":"https://github.com/jjcherian/conformal-safety/blob/HEAD/src/conformal.py","link_basis":"first_harvest_node","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":"17beb7b9e7b9c708"}},{"code_sha256_prefix":"7040aef1e8bc0075","entry":"finish_dual_setup","repo":"jjcherian/conditional-conformal","repo_kind":"found_in_text","path":"conditionalconformal/condconf.py","file_url":"https://github.com/jjcherian/conditional-conformal/blob/HEAD/conditionalconformal/condconf.py","link_basis":"first_harvest_node","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":"7040aef1e8bc0075"}},{"code_sha256_prefix":"cb73b72629a8bdb8","entry":"generate_cqr_data","repo":"jjcherian/conditional-conformal","repo_kind":"found_in_text","path":"conditionalconformal/synthetic_data.py","file_url":"https://github.com/jjcherian/conditional-conformal/blob/HEAD/conditionalconformal/synthetic_data.py","link_basis":"first_harvest_node","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":"cb73b72629a8bdb8"}},{"code_sha256_prefix":"84209d574223e28e","entry":"get_conformal_loss","repo":"jjcherian/conformal-safety","repo_kind":"official","path":"src/prob_model.py","file_url":"https://github.com/jjcherian/conformal-safety/blob/HEAD/src/prob_model.py","link_basis":"first_harvest_node","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":"84209d574223e28e"}},{"code_sha256_prefix":"94a610d9319c1840","entry":"get_prompts","repo":"jjcherian/conformal-safety","repo_kind":"official","path":"src/dataset.py","file_url":"https://github.com/jjcherian/conformal-safety/blob/HEAD/src/dataset.py","link_basis":"first_harvest_node","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":"94a610d9319c1840"}},{"code_sha256_prefix":"7ab268a78b3e6254","entry":"s3_open","repo":"jjcherian/conformal-safety","repo_kind":"official","path":"src/aws_utils.py","file_url":"https://github.com/jjcherian/conformal-safety/blob/HEAD/src/aws_utils.py","link_basis":"first_harvest_node","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":"7ab268a78b3e6254"}},{"code_sha256_prefix":"24635b5492ae6ce5","entry":"torch_ts","repo":"jjcherian/conditional-conformal","repo_kind":"found_in_text","path":"experiments/temperatureScaling.py","file_url":"https://github.com/jjcherian/conditional-conformal/blob/HEAD/experiments/temperatureScaling.py","link_basis":"first_harvest_node","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":"24635b5492ae6ce5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}