{"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/mamba-st-state-space-model-for-efficient","title":"Mamba-ST: State Space Model for Efficient Style Transfer","arxiv_id":"2409.10385","date":"2024-09-16","proceeding":"IEEE/CVF Winter Conference on Applications of Computer Vision (WACV) 2025 2","authors":["Filippo Botti","Alex Ergasti","Leonardo Rossi","Tomaso Fontanini","Claudio Ferrari","Massimo Bertozzi","Andrea Prati"],"abstract":"The goal of style transfer is, given a content image and a style source, generating a new image preserving the content but with the artistic representation of the style source. Most of the state-of-the-art architectures use transformers or diffusion-based models to perform this task, despite the heavy computational burden that they require. In particular, transformers use self- and cross-attention layers which have large memory footprint, while diffusion models require high inference time. To overcome the above, this paper explores a novel design of Mamba, an emergent State-Space Model (SSM), called Mamba-ST, to perform style transfer. To do so, we adapt Mamba linear equation to simulate the behavior of cross-attention layers, which are able to combine two separate embeddings into a single output, but drastically reducing memory usage and time complexity. We modified the Mamba's inner equations so to accept inputs from, and combine, two separate data streams. To the best of our knowledge, this is the first attempt to adapt the equations of SSMs to a vision task like style transfer without requiring any other module like cross-attention or custom normalization layers. An extensive set of experiments demonstrates the superiority and efficiency of our method in performing style transfer compared to transformers and diffusion models. Results show improved quality in terms of both ArtFID and FID metrics. Code is available at https://github.com/FilippoBotti/MambaST.","url_abs":"https://arxiv.org/abs/2409.10385v1","url_pdf":"https://arxiv.org/pdf/2409.10385v1.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":"mamba-st-state-space-model-for-efficient","repo_url":"https://github.com/filippobotti/mambast","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"mamba","task_name":"Mamba"},{"task_slug":"style-transfer","task_name":"Style Transfer"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"mamba","method_name":"Mamba"},{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/style-transfer-on-wikiart","task":"Style Transfer","dataset":"WikiArt","model":"Mamba-ST","rank_in_archive_order":2,"of":2,"metrics":{"ArtFID":"27.11"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2409.10385","atlas_url":"https://app.syntology.ai/?focus=2409.10385","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2409.10385"}},"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/filippobotti/mambast","reach":{"status":"ok"}}],"summary":{"ran_fixture":3,"ran_draft_wrong":1,"ran":3,"unverified":2},"by_repo_kind":{"official":{"samples":9,"ran":7,"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":9,"samples":[{"code_sha256_prefix":"38eaf8511dc7bc9c","entry":"calc_mean_std","repo":"filippobotti/mambast","repo_kind":"official","path":"function.py","file_url":"https://github.com/filippobotti/mambast/blob/HEAD/function.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"38eaf8511dc7bc9c"}},{"code_sha256_prefix":"3ac6b7d76e8e3584","entry":"drop_path","repo":"filippobotti/mambast","repo_kind":"official","path":"models/ViT_helper.py","file_url":"https://github.com/filippobotti/mambast/blob/HEAD/models/ViT_helper.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3ac6b7d76e8e3584"}},{"code_sha256_prefix":"9cfa20df1a35d293","entry":"normal","repo":"filippobotti/mambast","repo_kind":"official","path":"function.py","file_url":"https://github.com/filippobotti/mambast/blob/HEAD/function.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9cfa20df1a35d293"}},{"code_sha256_prefix":"9e863e83a72788dd","entry":"prepare_input","repo":"filippobotti/mambast","repo_kind":"official","path":"eval_time.py","file_url":"https://github.com/filippobotti/mambast/blob/HEAD/eval_time.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":"9e863e83a72788dd"}},{"code_sha256_prefix":"2ff189d76125d03c","entry":"select_random_images","repo":"filippobotti/mambast","repo_kind":"official","path":"eval_time.py","file_url":"https://github.com/filippobotti/mambast/blob/HEAD/eval_time.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":"2ff189d76125d03c"}},{"code_sha256_prefix":"44b1906941c2c3ed","entry":"test_transform","repo":"filippobotti/mambast","repo_kind":"official","path":"eval_time.py","file_url":"https://github.com/filippobotti/mambast/blob/HEAD/eval_time.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":"44b1906941c2c3ed"}},{"code_sha256_prefix":"02566da69866c48c","entry":"trunc_normal_","repo":"filippobotti/mambast","repo_kind":"official","path":"models/ViT_helper.py","file_url":"https://github.com/filippobotti/mambast/blob/HEAD/models/ViT_helper.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"02566da69866c48c"}},{"code_sha256_prefix":"163a3014ed2dbf50","entry":"build_transformer","repo":"filippobotti/mambast","repo_kind":"official","path":"models/mamba.py","file_url":"https://github.com/filippobotti/mambast/blob/HEAD/models/mamba.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":"163a3014ed2dbf50"}},{"code_sha256_prefix":"e956b4737851263c","entry":"calc_mean_std1","repo":"filippobotti/mambast","repo_kind":"official","path":"function.py","file_url":"https://github.com/filippobotti/mambast/blob/HEAD/function.py","link_basis":"harvester_set","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":"e956b4737851263c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}