{"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/smoothie-smoothing-diffusion-on-token","title":"Smoothie: Smoothing Diffusion on Token Embeddings for Text Generation","arxiv_id":"2505.18853","date":"2025-05-24","proceeding":null,"authors":["Alexander Shabalin","Viacheslav Meshchaninov","Dmitry Vetrov"],"abstract":"Diffusion models have achieved state-of-the-art performance in generating images, audio, and video, but their adaptation to text remains challenging due to its discrete nature. Prior approaches either apply Gaussian diffusion in continuous latent spaces, which inherits semantic structure but struggles with token decoding, or operate in categorical simplex space, which respect discreteness but disregard semantic relation between tokens. In this paper, we propose Smoothing Diffusion on Token Embeddings (Smoothie), a novel diffusion method that combines the strengths of both approaches by progressively smoothing token embeddings based on semantic similarity. This technique enables gradual information removal while maintaining a natural decoding process. Experimental results on several sequence-to-sequence generation tasks demonstrate that Smoothie outperforms existing diffusion-based models in generation quality. Furthermore, ablation studies show that our proposed diffusion space yields better performance than both the standard embedding space and the categorical simplex. Our code is available at https://github.com/ashaba1in/smoothie.","url_abs":"https://arxiv.org/abs/2505.18853v1","url_pdf":"https://arxiv.org/pdf/2505.18853v1.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":"smoothie-smoothing-diffusion-on-token","repo_url":"https://github.com/ashaba1in/smoothie","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"semantic-similarity","task_name":"Semantic Similarity"},{"task_slug":"semantic-textual-similarity","task_name":"Semantic Textual Similarity"},{"task_slug":"text-generation","task_name":"Text Generation"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2505.18853","atlas_url":"https://app.syntology.ai/?focus=2505.18853","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2505.18853"}},"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/ashaba1in/smoothie","reach":null}],"summary":{"ran":4,"ran_fixture":1,"ran_draft_wrong":1,"unverified":6},"by_repo_kind":{"official":{"samples":12,"ran":6,"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":12,"samples":[{"code_sha256_prefix":"221713c0fd810fa4","entry":"FlashAttention","repo":"ashaba1in/smoothie","repo_kind":"official","path":"model/score_estimator.py","file_url":"https://github.com/ashaba1in/smoothie/blob/HEAD/model/score_estimator.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":"221713c0fd810fa4"}},{"code_sha256_prefix":"40819f54763fdcd5","entry":"LlamaMLP","repo":"ashaba1in/smoothie","repo_kind":"official","path":"model/score_estimator.py","file_url":"https://github.com/ashaba1in/smoothie/blob/HEAD/model/score_estimator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"40819f54763fdcd5"}},{"code_sha256_prefix":"cdb9860741882c48","entry":"LlamaRMSNorm","repo":"ashaba1in/smoothie","repo_kind":"official","path":"model/score_estimator.py","file_url":"https://github.com/ashaba1in/smoothie/blob/HEAD/model/score_estimator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cdb9860741882c48"}},{"code_sha256_prefix":"b5b0ef756af83602","entry":"MistralRotaryEmbedding","repo":"ashaba1in/smoothie","repo_kind":"official","path":"model/score_estimator.py","file_url":"https://github.com/ashaba1in/smoothie/blob/HEAD/model/score_estimator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b5b0ef756af83602"}},{"code_sha256_prefix":"bb33eb1de527d14a","entry":"convert_to_simplex","repo":"ashaba1in/smoothie","repo_kind":"official","path":"model/score_estimator.py","file_url":"https://github.com/ashaba1in/smoothie/blob/HEAD/model/score_estimator.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bb33eb1de527d14a"}},{"code_sha256_prefix":"2e80e05908242417","entry":"get_extended_attention_mask","repo":"ashaba1in/smoothie","repo_kind":"official","path":"model/score_estimator.py","file_url":"https://github.com/ashaba1in/smoothie/blob/HEAD/model/score_estimator.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2e80e05908242417"}},{"code_sha256_prefix":"d6de9394993294d0","entry":"BertBlock","repo":"ashaba1in/smoothie","repo_kind":"official","path":"model/score_estimator.py","file_url":"https://github.com/ashaba1in/smoothie/blob/HEAD/model/score_estimator.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":"d6de9394993294d0"}},{"code_sha256_prefix":"9077ca61fbc6693b","entry":"ConditionEncoder","repo":"ashaba1in/smoothie","repo_kind":"official","path":"model/score_estimator.py","file_url":"https://github.com/ashaba1in/smoothie/blob/HEAD/model/score_estimator.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":"9077ca61fbc6693b"}},{"code_sha256_prefix":"de6c00653a34c2fd","entry":"LlamaBlock","repo":"ashaba1in/smoothie","repo_kind":"official","path":"model/score_estimator.py","file_url":"https://github.com/ashaba1in/smoothie/blob/HEAD/model/score_estimator.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":"de6c00653a34c2fd"}},{"code_sha256_prefix":"6562e1f19cc1c057","entry":"ScoreEstimatorEMB","repo":"ashaba1in/smoothie","repo_kind":"official","path":"model/score_estimator.py","file_url":"https://github.com/ashaba1in/smoothie/blob/HEAD/model/score_estimator.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":"6562e1f19cc1c057"}},{"code_sha256_prefix":"b51192aadec0a38b","entry":"TransformerEncoder","repo":"ashaba1in/smoothie","repo_kind":"official","path":"model/score_estimator.py","file_url":"https://github.com/ashaba1in/smoothie/blob/HEAD/model/score_estimator.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":"b51192aadec0a38b"}},{"code_sha256_prefix":"a4f77e43ad34dc66","entry":"apply_rotary_pos_emb","repo":"ashaba1in/smoothie","repo_kind":"official","path":"model/score_estimator.py","file_url":"https://github.com/ashaba1in/smoothie/blob/HEAD/model/score_estimator.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":"a4f77e43ad34dc66"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}