{"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/sentence-embedding-leaks-more-information","title":"Sentence Embedding Leaks More Information than You Expect: Generative Embedding Inversion Attack to Recover the Whole Sentence","arxiv_id":"2305.03010","date":"2023-05-04","proceeding":null,"authors":["Haoran Li","Mingshi Xu","Yangqiu Song"],"abstract":"Sentence-level representations are beneficial for various natural language processing tasks. It is commonly believed that vector representations can capture rich linguistic properties. Currently, large language models (LMs) achieve state-of-the-art performance on sentence embedding. However, some recent works suggest that vector representations from LMs can cause information leakage. In this work, we further investigate the information leakage issue and propose a generative embedding inversion attack (GEIA) that aims to reconstruct input sequences based only on their sentence embeddings. Given the black-box access to a language model, we treat sentence embeddings as initial tokens' representations and train or fine-tune a powerful decoder model to decode the whole sequences directly. We conduct extensive experiments to demonstrate that our generative inversion attack outperforms previous embedding inversion attacks in classification metrics and generates coherent and contextually similar sentences as the original inputs.","url_abs":"https://arxiv.org/abs/2305.03010v1","url_pdf":"https://arxiv.org/pdf/2305.03010v1.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":"sentence-embedding-leaks-more-information","repo_url":"https://github.com/hkust-knowcomp/geia","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"sentence","task_name":"Sentence"},{"task_slug":"sentence-embedding","task_name":"Sentence Embedding"},{"task_slug":"sentence-embeddings","task_name":"Sentence Embeddings"},{"task_slug":"sentence-embedding-1","task_name":"Sentence-Embedding"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2305.03010","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.03010"}},"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/hkust-knowcomp/geia","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":13},"by_repo_kind":{"official":{"samples":13,"ran":0,"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":"5f5f9fad1871e072","entry":"beam_decode_sentence","repo":"hkust-knowcomp/geia","repo_kind":"official","path":"decode_beam_search.py","file_url":"https://github.com/hkust-knowcomp/geia/blob/HEAD/decode_beam_search.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":"5f5f9fad1871e072"}},{"code_sha256_prefix":"2e10d39d2c034f27","entry":"beam_decode_sentence","repo":"hkust-knowcomp/geia","repo_kind":"official","path":"decode_beam_search_opt.py","file_url":"https://github.com/hkust-knowcomp/geia/blob/HEAD/decode_beam_search_opt.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":"2e10d39d2c034f27"}},{"code_sha256_prefix":"a797af62019f8fa4","entry":"eval_on_batch_t5","repo":"hkust-knowcomp/geia","repo_kind":"official","path":"attacker_t5.py","file_url":"https://github.com/hkust-knowcomp/geia/blob/HEAD/attacker_t5.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":"a797af62019f8fa4"}},{"code_sha256_prefix":"86a19927df85ca2c","entry":"get_qnli_data","repo":"hkust-knowcomp/geia","repo_kind":"official","path":"data_process.py","file_url":"https://github.com/hkust-knowcomp/geia/blob/HEAD/data_process.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":"86a19927df85ca2c"}},{"code_sha256_prefix":"352397365a26270f","entry":"greedy_decode","repo":"hkust-knowcomp/geia","repo_kind":"official","path":"decode_beam_search.py","file_url":"https://github.com/hkust-knowcomp/geia/blob/HEAD/decode_beam_search.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":"352397365a26270f"}},{"code_sha256_prefix":"c70730d40d77dd50","entry":"punctuation_remove","repo":"hkust-knowcomp/geia","repo_kind":"official","path":"eval_classification.py","file_url":"https://github.com/hkust-knowcomp/geia/blob/HEAD/eval_classification.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":"c70730d40d77dd50"}},{"code_sha256_prefix":"44a7a4939b82527f","entry":"read_gpt","repo":"hkust-knowcomp/geia","repo_kind":"official","path":"eval_generation.py","file_url":"https://github.com/hkust-knowcomp/geia/blob/HEAD/eval_generation.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":"44a7a4939b82527f"}},{"code_sha256_prefix":"c318208d02661269","entry":"read_pt","repo":"hkust-knowcomp/geia","repo_kind":"official","path":"attacker_models.py","file_url":"https://github.com/hkust-knowcomp/geia/blob/HEAD/attacker_models.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":"c318208d02661269"}},{"code_sha256_prefix":"6d2a894bf002fffc","entry":"sequence_cross_entropy_with_logits","repo":"hkust-knowcomp/geia","repo_kind":"official","path":"attacker_models.py","file_url":"https://github.com/hkust-knowcomp/geia/blob/HEAD/attacker_models.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":"6d2a894bf002fffc"}},{"code_sha256_prefix":"980364a3d8631cf0","entry":"top_filtering","repo":"hkust-knowcomp/geia","repo_kind":"official","path":"attacker_evaluation_gpt.py","file_url":"https://github.com/hkust-knowcomp/geia/blob/HEAD/attacker_evaluation_gpt.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":"980364a3d8631cf0"}},{"code_sha256_prefix":"bbd4bd47170f5a88","entry":"train_on_batch","repo":"hkust-knowcomp/geia","repo_kind":"official","path":"attacker.py","file_url":"https://github.com/hkust-knowcomp/geia/blob/HEAD/attacker.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":"bbd4bd47170f5a88"}},{"code_sha256_prefix":"1da8afc0c30785e8","entry":"train_on_batch","repo":"hkust-knowcomp/geia","repo_kind":"official","path":"attacker_opt.py","file_url":"https://github.com/hkust-knowcomp/geia/blob/HEAD/attacker_opt.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":"1da8afc0c30785e8"}},{"code_sha256_prefix":"2a52efec5d900b19","entry":"vectorize","repo":"hkust-knowcomp/geia","repo_kind":"official","path":"eval_classification.py","file_url":"https://github.com/hkust-knowcomp/geia/blob/HEAD/eval_classification.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":"2a52efec5d900b19"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}