{"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/arxiv-2509-23459","title":"MaskSQL: Safeguarding Privacy for LLM-Based Text-to-SQL via Abstraction","arxiv_id":"2509.23459","date":"2025-09-27","proceeding":"NeurIPS","authors":["Sepideh Abedini","Shubhankar Mohapatra","D. B. Emerson","Masoumeh Shafieinejad","Jesse C. Cresswell","Xi He"],"abstract":"Large language models (LLMs) have shown promising performance on tasks that require reasoning, such as text-to-SQL, code generation, and debugging. However, regulatory frameworks with strict privacy requirements constrain their integration into sensitive systems. State-of-the-art LLMs are also proprietary, costly, and resource-intensive, making local deployment impractical. Consequently, utilizing such LLMs often requires sharing data with third-party providers, raising privacy concerns and risking noncompliance with regulations. Although fine-tuned small language models (SLMs) can outperform LLMs on certain tasks and be deployed locally to mitigate privacy concerns, they underperform on more complex tasks such as text-to-SQL translation. In this work, we introduce MaskSQL, a text-to-SQL framework that utilizes abstraction as a privacy protection mechanism to mask sensitive information in LLM prompts. Unlike redaction, which removes content entirely, or generalization, which broadens tokens, abstraction retains essential information while discarding unnecessary details, striking an effective privacy-utility balance for the text-to-SQL task. Moreover, by providing mechanisms to control the privacy-utility tradeoff, MaskSQL facilitates adoption across a broader range of use cases. Our experimental results show that MaskSQL outperforms leading SLM-based text-to-SQL models and achieves performance approaching state-of-the-art LLM-based models, while preserving privacy.","url_abs":"https://arxiv.org/abs/2509.23459","url_pdf":"https://arxiv.org/pdf/2509.23459","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2509.23459","atlas_url":"https://app.syntology.ai/?focus=2509.23459","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2509.23459"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/sepideh-abedini/MaskSQL","reach":null}],"summary":{"ran_draft_wrong":2,"unverified":3},"by_repo_kind":{"found_in_text":{"samples":5,"ran":2,"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":"54ef33d567f9c0df","entry":"apply_async","repo":"sepideh-abedini/MaskSQL","repo_kind":"found_in_text","path":"src/pipe/det_mask.py","file_url":"https://github.com/sepideh-abedini/MaskSQL/blob/HEAD/src/pipe/det_mask.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"54ef33d567f9c0df"}},{"code_sha256_prefix":"31329ca6e8127261","entry":"replace_str","repo":"sepideh-abedini/MaskSQL","repo_kind":"found_in_text","path":"src/pipe/det_mask.py","file_url":"https://github.com/sepideh-abedini/MaskSQL/blob/HEAD/src/pipe/det_mask.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"31329ca6e8127261"}},{"code_sha256_prefix":"1b17c3b99f0faf9b","entry":"AddSymbolicQuestion","repo":"sepideh-abedini/MaskSQL","repo_kind":"found_in_text","path":"src/pipe/det_mask.py","file_url":"https://github.com/sepideh-abedini/MaskSQL/blob/HEAD/src/pipe/det_mask.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":"1b17c3b99f0faf9b"}},{"code_sha256_prefix":"57abae59756b6264","entry":"JsonListProcessor","repo":"sepideh-abedini/MaskSQL","repo_kind":"found_in_text","path":"src/pipe/det_mask.py","file_url":"https://github.com/sepideh-abedini/MaskSQL/blob/HEAD/src/pipe/det_mask.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":"57abae59756b6264"}},{"code_sha256_prefix":"cfad038613d4fa29","entry":"JsonListTransformer","repo":"sepideh-abedini/MaskSQL","repo_kind":"found_in_text","path":"src/pipe/det_mask.py","file_url":"https://github.com/sepideh-abedini/MaskSQL/blob/HEAD/src/pipe/det_mask.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":"cfad038613d4fa29"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.CR","source":"arxiv_api"},"syntology_extracted_results":null}