{"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/behavior-generation-with-latent-actions","title":"Behavior Generation with Latent Actions","arxiv_id":"2403.03181","date":"2024-03-05","proceeding":null,"authors":["Seungjae Lee","Yibin Wang","Haritheja Etukuru","H. Jin Kim","Nur Muhammad Mahi Shafiullah","Lerrel Pinto"],"abstract":"Generative modeling of complex behaviors from labeled datasets has been a longstanding problem in decision making. Unlike language or image generation, decision making requires modeling actions - continuous-valued vectors that are multimodal in their distribution, potentially drawn from uncurated sources, where generation errors can compound in sequential prediction. A recent class of models called Behavior Transformers (BeT) addresses this by discretizing actions using k-means clustering to capture different modes. However, k-means struggles to scale for high-dimensional action spaces or long sequences, and lacks gradient information, and thus BeT suffers in modeling long-range actions. In this work, we present Vector-Quantized Behavior Transformer (VQ-BeT), a versatile model for behavior generation that handles multimodal action prediction, conditional generation, and partial observations. VQ-BeT augments BeT by tokenizing continuous actions with a hierarchical vector quantization module. Across seven environments including simulated manipulation, autonomous driving, and robotics, VQ-BeT improves on state-of-the-art models such as BeT and Diffusion Policies. Importantly, we demonstrate VQ-BeT's improved ability to capture behavior modes while accelerating inference speed 5x over Diffusion Policies. Videos and code can be found https://sjlee.cc/vq-bet","url_abs":"https://arxiv.org/abs/2403.03181v2","url_pdf":"https://arxiv.org/pdf/2403.03181v2.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":"behavior-generation-with-latent-actions","repo_url":"https://github.com/jayLEE0301/vq_bet_official","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"behavior-generation-with-latent-actions","repo_url":"https://github.com/ziyadsheeba/qfat","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"autonomous-driving","task_name":"Autonomous Driving"},{"task_slug":"decision-making","task_name":"Decision Making"},{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"imitation-learning","task_name":"Imitation Learning"},{"task_slug":"quantization","task_name":"Quantization"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"speed","method_name":"SPEED"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"},{"method_slug":"k-means-clustering","method_name":"k-Means Clustering"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.03181","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.03181"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ziyadsheeba/qfat","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jayLEE0301/vq_bet_official","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_violates":2,"ran":3,"ran_honours":1,"ran_draft_wrong":1,"unverified":7},"by_repo_kind":{"official":{"samples":10,"ran":7,"repositories":1},"listed":{"samples":4,"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":0,"samples":[{"code_sha256_prefix":"60fff7c3c400d7ff","entry":"default","repo":"jayLEE0301/vq_bet_official","repo_kind":"official","path":"vector_quantize_pytorch/residual_vq.py","file_url":"https://github.com/jayLEE0301/vq_bet_official/blob/HEAD/vector_quantize_pytorch/residual_vq.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"60fff7c3c400d7ff"}},{"code_sha256_prefix":"aa5486a3650902d8","entry":"exists","repo":"jayLEE0301/vq_bet_official","repo_kind":"official","path":"vector_quantize_pytorch/residual_vq.py","file_url":"https://github.com/jayLEE0301/vq_bet_official/blob/HEAD/vector_quantize_pytorch/residual_vq.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"aa5486a3650902d8"}},{"code_sha256_prefix":"5f5f6bab7bdf48cb","entry":"get_tensor","repo":"jayLEE0301/vq_bet_official","repo_kind":"official","path":"vqvae/vqvae_utils.py","file_url":"https://github.com/jayLEE0301/vq_bet_official/blob/HEAD/vqvae/vqvae_utils.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":"5f5f6bab7bdf48cb"}},{"code_sha256_prefix":"f3232418205f7cbd","entry":"identity","repo":"jayLEE0301/vq_bet_official","repo_kind":"official","path":"vector_quantize_pytorch/vector_quantize_pytorch.py","file_url":"https://github.com/jayLEE0301/vq_bet_official/blob/HEAD/vector_quantize_pytorch/vector_quantize_pytorch.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f3232418205f7cbd"}},{"code_sha256_prefix":"92101b06ecbf1f1e","entry":"new_gelu","repo":"jayLEE0301/vq_bet_official","repo_kind":"official","path":"vq_behavior_transformer/gpt.py","file_url":"https://github.com/jayLEE0301/vq_bet_official/blob/HEAD/vq_behavior_transformer/gpt.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"92101b06ecbf1f1e"}},{"code_sha256_prefix":"b518b50864d18ead","entry":"q_inv","repo":"jayLEE0301/vq_bet_official","repo_kind":"official","path":"envs/antenv/ant.py","file_url":"https://github.com/jayLEE0301/vq_bet_official/blob/HEAD/envs/antenv/ant.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b518b50864d18ead"}},{"code_sha256_prefix":"bf63ff5f88b9f6b3","entry":"round_up_multiple","repo":"jayLEE0301/vq_bet_official","repo_kind":"official","path":"vector_quantize_pytorch/residual_vq.py","file_url":"https://github.com/jayLEE0301/vq_bet_official/blob/HEAD/vector_quantize_pytorch/residual_vq.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bf63ff5f88b9f6b3"}},{"code_sha256_prefix":"290e63bdbac69bc8","entry":"collate_policy","repo":"ziyadsheeba/qfat","repo_kind":"listed","path":"src/qfat/datasets/dataset.py","file_url":"https://github.com/ziyadsheeba/qfat/blob/HEAD/src/qfat/datasets/dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"290e63bdbac69bc8"}},{"code_sha256_prefix":"1a66725274da6033","entry":"covariance_ellipse","repo":"ziyadsheeba/qfat","repo_kind":"listed","path":"src/qfat/utils.py","file_url":"https://github.com/ziyadsheeba/qfat/blob/HEAD/src/qfat/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1a66725274da6033"}},{"code_sha256_prefix":"cde2ae8e18dc91d3","entry":"create_gather_env","repo":"jayLEE0301/vq_bet_official","repo_kind":"official","path":"envs/antenv/create_gather_env.py","file_url":"https://github.com/jayLEE0301/vq_bet_official/blob/HEAD/envs/antenv/create_gather_env.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":"cde2ae8e18dc91d3"}},{"code_sha256_prefix":"45edef65d8e9ec47","entry":"create_maze_env","repo":"jayLEE0301/vq_bet_official","repo_kind":"official","path":"envs/antenv/create_maze_env.py","file_url":"https://github.com/jayLEE0301/vq_bet_official/blob/HEAD/envs/antenv/create_maze_env.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":"45edef65d8e9ec47"}},{"code_sha256_prefix":"c32a6f9abdf33258","entry":"get_image_from_fig","repo":"ziyadsheeba/qfat","repo_kind":"listed","path":"src/qfat/utils.py","file_url":"https://github.com/ziyadsheeba/qfat/blob/HEAD/src/qfat/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c32a6f9abdf33258"}},{"code_sha256_prefix":"512357de55b799f0","entry":"load_metric_from_wandb","repo":"ziyadsheeba/qfat","repo_kind":"listed","path":"src/qfat/utils.py","file_url":"https://github.com/ziyadsheeba/qfat/blob/HEAD/src/qfat/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"512357de55b799f0"}},{"code_sha256_prefix":"b5987afb2eb91889","entry":"q_mult","repo":"jayLEE0301/vq_bet_official","repo_kind":"official","path":"envs/antenv/ant.py","file_url":"https://github.com/jayLEE0301/vq_bet_official/blob/HEAD/envs/antenv/ant.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":"b5987afb2eb91889"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}