{"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/confidential-prompting-protecting-user","title":"Confidential Prompting: Protecting User Prompts from Cloud LLM Providers","arxiv_id":"2409.19134","date":"2024-09-27","proceeding":null,"authors":["In Gim","Caihua Li","Lin Zhong"],"abstract":"Our work tackles the challenge of securing user inputs in cloud-hosted large language model (LLM) serving while ensuring model confidentiality, output invariance, and compute efficiency. We introduce Secure Partitioned Decoding (SPD), which uses confidential computing to confine user prompts to a trusted execution environment (TEE), namely a confidential virtual machine (CVM), while allowing service providers to generate tokens efficiently. We also introduce a novel cryptographic method, Prompt Obfuscation (PO), to ensure robustness against reconstruction attacks on SPD. We demonstrate our approach preserves both prompt confidentiality and LLM serving efficiency. Our solution enables privacy-preserving cloud LLM serving that handles sensitive prompts, such as clinical records, financial data, and personal information.","url_abs":"https://arxiv.org/abs/2409.19134v3","url_pdf":"https://arxiv.org/pdf/2409.19134v3.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":"confidential-prompting-protecting-user","repo_url":"https://github.com/yale-sys/confidential-prompting","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"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":"privacy-preserving","task_name":"Privacy Preserving"}],"methods":[{"method_slug":null,"method_name":null}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2409.19134","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2409.19134"}},"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/yale-sys/confidential-prompting","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_fixture":2,"ran":5,"ran_draft_wrong":1,"unverified":1},"by_repo_kind":{"official":{"samples":9,"ran":8,"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":"3c76e52815c5401d","entry":"repeat_kv","repo":"yale-sys/confidential-prompting","repo_kind":"official","path":"attention.py","file_url":"https://github.com/yale-sys/confidential-prompting/blob/HEAD/attention.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":2,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3c76e52815c5401d"}},{"code_sha256_prefix":"9a65a30d006fc96e","entry":"apply_rotary_pos_emb","repo":"yale-sys/confidential-prompting","repo_kind":"official","path":"llama.py","file_url":"https://github.com/yale-sys/confidential-prompting/blob/HEAD/llama.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9a65a30d006fc96e"}},{"code_sha256_prefix":"bb8d0a3d394b7784","entry":"apply_rotary_pos_emb1","repo":"yale-sys/confidential-prompting","repo_kind":"official","path":"llama.py","file_url":"https://github.com/yale-sys/confidential-prompting/blob/HEAD/llama.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":"bb8d0a3d394b7784"}},{"code_sha256_prefix":"695f965fbf9d7074","entry":"filter_probs_abs","repo":"yale-sys/confidential-prompting","repo_kind":"official","path":"gqs.py","file_url":"https://github.com/yale-sys/confidential-prompting/blob/HEAD/gqs.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":"695f965fbf9d7074"}},{"code_sha256_prefix":"55e823a53a0e194c","entry":"filter_probs_rel","repo":"yale-sys/confidential-prompting","repo_kind":"official","path":"gqs.py","file_url":"https://github.com/yale-sys/confidential-prompting/blob/HEAD/gqs.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":"55e823a53a0e194c"}},{"code_sha256_prefix":"567288f5cf3cbd8b","entry":"parse_tag","repo":"yale-sys/confidential-prompting","repo_kind":"official","path":"prompt.py","file_url":"https://github.com/yale-sys/confidential-prompting/blob/HEAD/prompt.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":"567288f5cf3cbd8b"}},{"code_sha256_prefix":"934dc72e49d36a18","entry":"process_data","repo":"yale-sys/confidential-prompting","repo_kind":"official","path":"logger.py","file_url":"https://github.com/yale-sys/confidential-prompting/blob/HEAD/logger.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":"934dc72e49d36a18"}},{"code_sha256_prefix":"e03d53ba9d4f9ae5","entry":"rotate_half","repo":"yale-sys/confidential-prompting","repo_kind":"official","path":"llama.py","file_url":"https://github.com/yale-sys/confidential-prompting/blob/HEAD/llama.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e03d53ba9d4f9ae5"}},{"code_sha256_prefix":"5d8593cb71b476b9","entry":"strip_special_tokens","repo":"yale-sys/confidential-prompting","repo_kind":"official","path":"gqs.py","file_url":"https://github.com/yale-sys/confidential-prompting/blob/HEAD/gqs.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":"5d8593cb71b476b9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}