{"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/nast-a-non-autoregressive-generator-with-word","title":"NAST: A Non-Autoregressive Generator with Word Alignment for Unsupervised Text Style Transfer","arxiv_id":"2106.02210","date":"2021-06-04","proceeding":"Findings (ACL) 2021 8","authors":["Fei Huang","Zikai Chen","Chen Henry Wu","Qihan Guo","Xiaoyan Zhu","Minlie Huang"],"abstract":"Autoregressive models have been widely used in unsupervised text style transfer. Despite their success, these models still suffer from the content preservation problem that they usually ignore part of the source sentence and generate some irrelevant words with strong styles. In this paper, we propose a Non-Autoregressive generator for unsupervised text Style Transfer (NAST), which alleviates the problem from two aspects. First, we observe that most words in the transferred sentence can be aligned with related words in the source sentence, so we explicitly model word alignments to suppress irrelevant words. Second, existing models trained with the cycle loss align sentences in two stylistic text spaces, which lacks fine-grained control at the word level. The proposed non-autoregressive generator focuses on the connections between aligned words, which learns the word-level transfer between styles. For experiments, we integrate the proposed generator into two base models and evaluate them on two style transfer tasks. The results show that NAST can significantly improve the overall performance and provide explainable word alignments. Moreover, the non-autoregressive generator achieves over 10x speedups at inference. Our codes are available at https://github.com/thu-coai/NAST.","url_abs":"https://arxiv.org/abs/2106.02210v1","url_pdf":"https://arxiv.org/pdf/2106.02210v1.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":"nast-a-non-autoregressive-generator-with-word","repo_url":"https://github.com/thu-coai/NAST","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"sentence","task_name":"Sentence"},{"task_slug":"style-transfer","task_name":"Style Transfer"},{"task_slug":"text-style-transfoer","task_name":"Text Style Transfer"},{"task_slug":"unsupervised-text-style-transfer","task_name":"Unsupervised Text Style Transfer"},{"task_slug":"word-alignment","task_name":"Word Alignment"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2106.02210","atlas_url":"https://app.syntology.ai/?focus=2106.02210","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.02210"}},"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":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/fastnlp/style-transformer","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/thu-coai/NAST","reach":null}],"summary":{"unverified":2},"by_repo_kind":{"found_in_text":{"samples":2,"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":2,"samples":[{"code_sha256_prefix":"d8ee2a61c05425ae","entry":"EmbeddingLayer","repo":"fastnlp/style-transformer","repo_kind":"found_in_text","path":"models/transformer.py","file_url":"https://github.com/fastnlp/style-transformer/blob/HEAD/models/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":"d8ee2a61c05425ae"}},{"code_sha256_prefix":"c8fa627713b0b9da","entry":"StyleTransformer","repo":"fastnlp/style-transformer","repo_kind":"found_in_text","path":"models/transformer.py","file_url":"https://github.com/fastnlp/style-transformer/blob/HEAD/models/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":"c8fa627713b0b9da"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}