{"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/rsa-control-a-pragmatics-grounded-lightweight","title":"RSA-Control: A Pragmatics-Grounded Lightweight Controllable Text Generation Framework","arxiv_id":"2410.19109","date":"2024-10-24","proceeding":null,"authors":["Yifan Wang","Vera Demberg"],"abstract":"Despite significant advancements in natural language generation, controlling language models to produce texts with desired attributes remains a formidable challenge. In this work, we introduce RSA-Control, a training-free controllable text generation framework grounded in pragmatics. RSA-Control directs the generation process by recursively reasoning between imaginary speakers and listeners, enhancing the likelihood that target attributes are correctly interpreted by listeners amidst distractors. Additionally, we introduce a self-adjustable rationality parameter, which allows for automatic adjustment of control strength based on context. Our experiments, conducted with two task types and two types of language models, demonstrate that RSA-Control achieves strong attribute control while maintaining language fluency and content consistency. Our code is available at https://github.com/Ewanwong/RSA-Control.","url_abs":"https://arxiv.org/abs/2410.19109v1","url_pdf":"https://arxiv.org/pdf/2410.19109v1.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":"rsa-control-a-pragmatics-grounded-lightweight","repo_url":"https://github.com/ewanwong/rsa-control","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"attribute","task_name":"Attribute"},{"task_slug":"text-generation","task_name":"Text Generation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2410.19109","atlas_url":"https://app.syntology.ai/?focus=2410.19109","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.19109"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ewanwong/rsa-control","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/Ewanwong/RSA-Control","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":1,"unverified":6},"by_repo_kind":{"official":{"samples":7,"ran":1,"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":"f13140a03613fa93","entry":"StepwiseOutput","repo":"Ewanwong/RSA-Control","repo_kind":"official","path":"readability_controlled_summarization/PragmaticLlama.py","file_url":"https://github.com/Ewanwong/RSA-Control/blob/HEAD/readability_controlled_summarization/PragmaticLlama.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":"f13140a03613fa93"}},{"code_sha256_prefix":"465efe240c5fe168","entry":"PragmaticLlamaForCausalLM","repo":"Ewanwong/RSA-Control","repo_kind":"official","path":"readability_controlled_summarization/PragmaticLlama.py","file_url":"https://github.com/Ewanwong/RSA-Control/blob/HEAD/readability_controlled_summarization/PragmaticLlama.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":"465efe240c5fe168"}},{"code_sha256_prefix":"65ff3cc64458c73e","entry":"compute_conditional_perplexity","repo":"ewanwong/rsa-control","repo_kind":"official","path":"toxicity_bias_mitigation/output_perplexity.py","file_url":"https://github.com/ewanwong/rsa-control/blob/HEAD/toxicity_bias_mitigation/output_perplexity.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":"65ff3cc64458c73e"}},{"code_sha256_prefix":"b501be3d87f11fd2","entry":"compute_perplexity","repo":"ewanwong/rsa-control","repo_kind":"official","path":"toxicity_bias_mitigation/output_perplexity.py","file_url":"https://github.com/ewanwong/rsa-control/blob/HEAD/toxicity_bias_mitigation/output_perplexity.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":"b501be3d87f11fd2"}},{"code_sha256_prefix":"3cae5430e4c7162e","entry":"load_data","repo":"ewanwong/rsa-control","repo_kind":"official","path":"toxicity_bias_mitigation/output_perplexity.py","file_url":"https://github.com/ewanwong/rsa-control/blob/HEAD/toxicity_bias_mitigation/output_perplexity.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":"3cae5430e4c7162e"}},{"code_sha256_prefix":"a6df2fb7f84eb042","entry":"load_model_outputs","repo":"ewanwong/rsa-control","repo_kind":"official","path":"toxicity_bias_mitigation/io_utils.py","file_url":"https://github.com/ewanwong/rsa-control/blob/HEAD/toxicity_bias_mitigation/io_utils.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":"a6df2fb7f84eb042"}},{"code_sha256_prefix":"44bbf4459b4f2e94","entry":"load_prompts","repo":"ewanwong/rsa-control","repo_kind":"official","path":"toxicity_bias_mitigation/io_utils.py","file_url":"https://github.com/ewanwong/rsa-control/blob/HEAD/toxicity_bias_mitigation/io_utils.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":"44bbf4459b4f2e94"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}