{"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/a-probabilistic-formulation-of-unsupervised-1","title":"A Probabilistic Formulation of Unsupervised Text Style Transfer","arxiv_id":"2002.03912","date":"2020-02-10","proceeding":"ICLR 2020 1","authors":["Junxian He","Xinyi Wang","Graham Neubig","Taylor Berg-Kirkpatrick"],"abstract":"We present a deep generative model for unsupervised text style transfer that unifies previously proposed non-generative techniques. Our probabilistic approach models non-parallel data from two domains as a partially observed parallel corpus. By hypothesizing a parallel latent sequence that generates each observed sequence, our model learns to transform sequences from one domain to another in a completely unsupervised fashion. In contrast with traditional generative sequence models (e.g. the HMM), our model makes few assumptions about the data it generates: it uses a recurrent language model as a prior and an encoder-decoder as a transduction distribution. While computation of marginal data likelihood is intractable in this model class, we show that amortized variational inference admits a practical surrogate. Further, by drawing connections between our variational objective and other recent unsupervised style transfer and machine translation techniques, we show how our probabilistic view can unify some known non-generative objectives such as backtranslation and adversarial loss. Finally, we demonstrate the effectiveness of our method on a wide range of unsupervised style transfer tasks, including sentiment transfer, formality transfer, word decipherment, author imitation, and related language translation. Across all style transfer tasks, our approach yields substantial gains over state-of-the-art non-generative baselines, including the state-of-the-art unsupervised machine translation techniques that our approach generalizes. Further, we conduct experiments on a standard unsupervised machine translation task and find that our unified approach matches the current state-of-the-art.","url_abs":"https://arxiv.org/abs/2002.03912v3","url_pdf":"https://arxiv.org/pdf/2002.03912v3.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":"a-probabilistic-formulation-of-unsupervised-1","repo_url":"https://github.com/cindyxinyiwang/deep-latent-sequence-model","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"a-probabilistic-formulation-of-unsupervised-1","repo_url":"https://github.com/cindyxinyiwang/TextStyleTransfer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"a-probabilistic-formulation-of-unsupervised-1","repo_url":"https://github.com/kaletap/nlp-experiments","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"a-probabilistic-formulation-of-unsupervised-1","repo_url":"https://github.com/martiansideofthemoon/style-transfer-paraphrase","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"a-probabilistic-formulation-of-unsupervised-1","repo_url":"https://github.com/thu-coai/NAST","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"decipherment","task_name":"Decipherment"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"machine-translation","task_name":"Machine Translation"},{"task_slug":"style-transfer","task_name":"Style Transfer"},{"task_slug":"text-style-transfoer","task_name":"Text Style Transfer"},{"task_slug":"translation","task_name":"Translation"},{"task_slug":"unsupervised-machine-translation","task_name":"Unsupervised Machine Translation"},{"task_slug":"unsupervised-text-style-transfer","task_name":"Unsupervised Text Style Transfer"},{"task_slug":"variational-inference","task_name":"Variational Inference"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2002.03912","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2002.03912"}},"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/cindyxinyiwang/deep-latent-sequence-model","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/thu-coai/NAST","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kaletap/nlp-experiments","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/cindyxinyiwang/TextStyleTransfer","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/martiansideofthemoon/style-transfer-paraphrase","reach":null}],"summary":{"ran":11,"ran_draft_wrong":5,"ran_fixture":2,"unverified":7},"by_repo_kind":{"listed":{"samples":22,"ran":15,"repositories":2}},"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":"2a0fe14622f8497d","entry":"Beam","repo":"cindyxinyiwang/TextStyleTransfer","repo_kind":"listed","path":"src/transformer.py","file_url":"https://github.com/cindyxinyiwang/TextStyleTransfer/blob/HEAD/src/transformer.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":"2a0fe14622f8497d"}},{"code_sha256_prefix":"f62647ab841d8eac","entry":"DecoderLayer","repo":"thu-coai/NAST","repo_kind":"listed","path":"styletransformer/transformer.py","file_url":"https://github.com/thu-coai/NAST/blob/HEAD/styletransformer/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f62647ab841d8eac"}},{"code_sha256_prefix":"cc6417e762730325","entry":"Embedding","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"cc6417e762730325"}},{"code_sha256_prefix":"fd281e0df749b749","entry":"EmbeddingLayer","repo":"thu-coai/NAST","repo_kind":"listed","path":"styletransformer/transformer.py","file_url":"https://github.com/thu-coai/NAST/blob/HEAD/styletransformer/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fd281e0df749b749"}},{"code_sha256_prefix":"ac16887aad3c401d","entry":"Encoder","repo":"thu-coai/NAST","repo_kind":"listed","path":"styletransformer/transformer.py","file_url":"https://github.com/thu-coai/NAST/blob/HEAD/styletransformer/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ac16887aad3c401d"}},{"code_sha256_prefix":"fe38343a20d6cec6","entry":"EncoderLayer","repo":"thu-coai/NAST","repo_kind":"listed","path":"styletransformer/transformer.py","file_url":"https://github.com/thu-coai/NAST/blob/HEAD/styletransformer/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fe38343a20d6cec6"}},{"code_sha256_prefix":"31ab6deda5fe5457","entry":"Generator","repo":"thu-coai/NAST","repo_kind":"listed","path":"styletransformer/transformer.py","file_url":"https://github.com/thu-coai/NAST/blob/HEAD/styletransformer/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"31ab6deda5fe5457"}},{"code_sha256_prefix":"9f75aa33a1ccdc32","entry":"Hyp","repo":"cindyxinyiwang/TextStyleTransfer","repo_kind":"listed","path":"src/transformer.py","file_url":"https://github.com/cindyxinyiwang/TextStyleTransfer/blob/HEAD/src/transformer.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":"9f75aa33a1ccdc32"}},{"code_sha256_prefix":"244df97d092c7e06","entry":"LayerNorm","repo":"thu-coai/NAST","repo_kind":"listed","path":"styletransformer/transformer.py","file_url":"https://github.com/thu-coai/NAST/blob/HEAD/styletransformer/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"244df97d092c7e06"}},{"code_sha256_prefix":"01f0f6d4a6e475b1","entry":"Linear","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"01f0f6d4a6e475b1"}},{"code_sha256_prefix":"b9a5bb409e08cbc8","entry":"MultiHeadAttention","repo":"thu-coai/NAST","repo_kind":"listed","path":"styletransformer/transformer.py","file_url":"https://github.com/thu-coai/NAST/blob/HEAD/styletransformer/transformer.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":"b9a5bb409e08cbc8"}},{"code_sha256_prefix":"e2b9062d0b945f4b","entry":"PolyNorm","repo":"cindyxinyiwang/TextStyleTransfer","repo_kind":"listed","path":"src/transformer.py","file_url":"https://github.com/cindyxinyiwang/TextStyleTransfer/blob/HEAD/src/transformer.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":"e2b9062d0b945f4b"}},{"code_sha256_prefix":"94350806140c9d40","entry":"PositionwiseFeedForward","repo":"thu-coai/NAST","repo_kind":"listed","path":"styletransformer/transformer.py","file_url":"https://github.com/thu-coai/NAST/blob/HEAD/styletransformer/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"94350806140c9d40"}},{"code_sha256_prefix":"3e2638d464cbc25c","entry":"SublayerConnection","repo":"thu-coai/NAST","repo_kind":"listed","path":"styletransformer/transformer.py","file_url":"https://github.com/thu-coai/NAST/blob/HEAD/styletransformer/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3e2638d464cbc25c"}},{"code_sha256_prefix":"7a943e0929e23b36","entry":"advcance_ens_beam","repo":"cindyxinyiwang/TextStyleTransfer","repo_kind":"listed","path":"src/transformer.py","file_url":"https://github.com/cindyxinyiwang/TextStyleTransfer/blob/HEAD/src/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7a943e0929e23b36"}},{"code_sha256_prefix":"97bd0c0f69d68e77","entry":"scaled_attention","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"97bd0c0f69d68e77"}},{"code_sha256_prefix":"ca8292bfcf4d9b5a","entry":"select_active_enc_info","repo":"cindyxinyiwang/TextStyleTransfer","repo_kind":"listed","path":"src/transformer.py","file_url":"https://github.com/cindyxinyiwang/TextStyleTransfer/blob/HEAD/src/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ca8292bfcf4d9b5a"}},{"code_sha256_prefix":"a97450c4460623c1","entry":"select_active_enc_mask","repo":"cindyxinyiwang/TextStyleTransfer","repo_kind":"listed","path":"src/transformer.py","file_url":"https://github.com/cindyxinyiwang/TextStyleTransfer/blob/HEAD/src/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a97450c4460623c1"}},{"code_sha256_prefix":"dbea3ea139953d0c","entry":"Decoder","repo":"thu-coai/NAST","repo_kind":"listed","path":"styletransformer/transformer.py","file_url":"https://github.com/thu-coai/NAST/blob/HEAD/styletransformer/transformer.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":"dbea3ea139953d0c"}},{"code_sha256_prefix":"7a121f5925381565","entry":"Decoder","repo":"cindyxinyiwang/TextStyleTransfer","repo_kind":"listed","path":"src/transformer.py","file_url":"https://github.com/cindyxinyiwang/TextStyleTransfer/blob/HEAD/src/transformer.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":"7a121f5925381565"}},{"code_sha256_prefix":"4e9d07e2d5cbf009","entry":"Encoder","repo":"cindyxinyiwang/TextStyleTransfer","repo_kind":"listed","path":"src/transformer.py","file_url":"https://github.com/cindyxinyiwang/TextStyleTransfer/blob/HEAD/src/transformer.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":"4e9d07e2d5cbf009"}},{"code_sha256_prefix":"159a44511500802f","entry":"HiddenDecoder","repo":"thu-coai/NAST","repo_kind":"listed","path":"styletransformer/transformer.py","file_url":"https://github.com/thu-coai/NAST/blob/HEAD/styletransformer/transformer.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":"159a44511500802f"}},{"code_sha256_prefix":"6d9d8f5da460708b","entry":"LengthPredictor","repo":"thu-coai/NAST","repo_kind":"listed","path":"styletransformer/transformer.py","file_url":"https://github.com/thu-coai/NAST/blob/HEAD/styletransformer/transformer.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":"6d9d8f5da460708b"}},{"code_sha256_prefix":"e73587b60482cbcc","entry":"StyleTransformer","repo":"thu-coai/NAST","repo_kind":"listed","path":"styletransformer/transformer.py","file_url":"https://github.com/thu-coai/NAST/blob/HEAD/styletransformer/transformer.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":"e73587b60482cbcc"}},{"code_sha256_prefix":"30cf69b3b879a328","entry":"Transformer","repo":"cindyxinyiwang/TextStyleTransfer","repo_kind":"listed","path":"src/transformer.py","file_url":"https://github.com/cindyxinyiwang/TextStyleTransfer/blob/HEAD/src/transformer.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":"30cf69b3b879a328"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}