{"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/flowretrieval-flow-guided-data-retrieval-for","title":"FlowRetrieval: Flow-Guided Data Retrieval for Few-Shot Imitation Learning","arxiv_id":"2408.16944","date":"2024-08-29","proceeding":null,"authors":["Li-Heng Lin","Yuchen Cui","Amber Xie","Tianyu Hua","Dorsa Sadigh"],"abstract":"Few-shot imitation learning relies on only a small amount of task-specific demonstrations to efficiently adapt a policy for a given downstream tasks. Retrieval-based methods come with a promise of retrieving relevant past experiences to augment this target data when learning policies. However, existing data retrieval methods fall under two extremes: they either rely on the existence of exact behaviors with visually similar scenes in the prior data, which is impractical to assume; or they retrieve based on semantic similarity of high-level language descriptions of the task, which might not be that informative about the shared low-level behaviors or motions across tasks that is often a more important factor for retrieving relevant data for policy learning. In this work, we investigate how we can leverage motion similarity in the vast amount of cross-task data to improve few-shot imitation learning of the target task. Our key insight is that motion-similar data carries rich information about the effects of actions and object interactions that can be leveraged during few-shot adaptation. We propose FlowRetrieval, an approach that leverages optical flow representations for both extracting similar motions to target tasks from prior data, and for guiding learning of a policy that can maximally benefit from such data. Our results show FlowRetrieval significantly outperforms prior methods across simulated and real-world domains, achieving on average 27% higher success rate than the best retrieval-based prior method. In the Pen-in-Cup task with a real Franka Emika robot, FlowRetrieval achieves 3.7x the performance of the baseline imitation learning technique that learns from all prior and target data. Website: https://flow-retrieval.github.io","url_abs":"https://arxiv.org/abs/2408.16944v2","url_pdf":"https://arxiv.org/pdf/2408.16944v2.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":"flowretrieval-flow-guided-data-retrieval-for","repo_url":"https://github.com/lihenglin/bridge_training_code","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"few-shot-imitation-learning","task_name":"Few-Shot Imitation Learning"},{"task_slug":"imitation-learning","task_name":"Imitation Learning"},{"task_slug":"optical-flow-estimation","task_name":"Optical Flow Estimation"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"semantic-similarity","task_name":"Semantic Similarity"},{"task_slug":"semantic-textual-similarity","task_name":"Semantic Textual Similarity"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2408.16944","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2408.16944"}},"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/lihenglin/bridge_training_code","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":2,"unverified":2},"by_repo_kind":{"listed":{"samples":4,"ran":2,"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":"32d99b725adf2cac","entry":"process_state","repo":"lihenglin/bridge_training_code","repo_kind":"listed","path":"data_processing/bridgedata_raw_to_numpy.py","file_url":"https://github.com/lihenglin/bridge_training_code/blob/HEAD/data_processing/bridgedata_raw_to_numpy.py","link_basis":"harvester_set","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":"32d99b725adf2cac"}},{"code_sha256_prefix":"d6440647f04a70be","entry":"tensor_feature","repo":"lihenglin/bridge_training_code","repo_kind":"listed","path":"data_processing/bridgedata_numpy_to_tfrecord.py","file_url":"https://github.com/lihenglin/bridge_training_code/blob/HEAD/data_processing/bridgedata_numpy_to_tfrecord.py","link_basis":"harvester_set","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":"d6440647f04a70be"}},{"code_sha256_prefix":"d2537349eee21015","entry":"process_images","repo":"lihenglin/bridge_training_code","repo_kind":"listed","path":"data_processing/bridgedata_raw_to_numpy.py","file_url":"https://github.com/lihenglin/bridge_training_code/blob/HEAD/data_processing/bridgedata_raw_to_numpy.py","link_basis":"harvester_set","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":"d2537349eee21015"}},{"code_sha256_prefix":"2b78c78cefa5c620","entry":"squash","repo":"lihenglin/bridge_training_code","repo_kind":"listed","path":"data_processing/bridgedata_raw_to_numpy.py","file_url":"https://github.com/lihenglin/bridge_training_code/blob/HEAD/data_processing/bridgedata_raw_to_numpy.py","link_basis":"harvester_set","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":"2b78c78cefa5c620"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}