{"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/needle-in-a-multimodal-haystack","title":"Needle In A Multimodal Haystack","arxiv_id":"2406.07230","date":"2024-06-11","proceeding":null,"authors":["Weiyun Wang","Shuibo Zhang","Yiming Ren","Yuchen Duan","Tiantong Li","Shuo Liu","Mengkang Hu","Zhe Chen","Kaipeng Zhang","Lewei Lu","Xizhou Zhu","Ping Luo","Yu Qiao","Jifeng Dai","Wenqi Shao","Wenhai Wang"],"abstract":"With the rapid advancement of multimodal large language models (MLLMs), their evaluation has become increasingly comprehensive. However, understanding long multimodal content, as a foundational ability for real-world applications, remains underexplored. In this work, we present Needle In A Multimodal Haystack (MM-NIAH), the first benchmark specifically designed to systematically evaluate the capability of existing MLLMs to comprehend long multimodal documents. Our benchmark includes three types of evaluation tasks: multimodal retrieval, counting, and reasoning. In each task, the model is required to answer the questions according to different key information scattered throughout the given multimodal document. Evaluating the leading MLLMs on MM-NIAH, we observe that existing models still have significant room for improvement on these tasks, especially on vision-centric evaluation. We hope this work can provide a platform for further research on long multimodal document comprehension and contribute to the advancement of MLLMs. Code and benchmark are released at https://github.com/OpenGVLab/MM-NIAH.","url_abs":"https://arxiv.org/abs/2406.07230v2","url_pdf":"https://arxiv.org/pdf/2406.07230v2.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":"needle-in-a-multimodal-haystack","repo_url":"https://github.com/opengvlab/mm-niah","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"retrieval","task_name":"Retrieval"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2406.07230","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.07230"}},"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":"deterministic:regex_extraction","url":"https://github.com/OpenGVLab/MM-NIAH","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/opengvlab/mm-niah","reach":{"status":"ok"}}],"summary":{"ran":5,"ran_draft_wrong":1,"ran_fixture":1,"unverified":5},"by_repo_kind":{"official":{"samples":12,"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":12,"samples":[{"code_sha256_prefix":"57e95166ade5f25c","entry":"build_transform","repo":"opengvlab/mm-niah","repo_kind":"official","path":"eval_internvl.py","file_url":"https://github.com/opengvlab/mm-niah/blob/HEAD/eval_internvl.py","link_basis":"harvester_set","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":"57e95166ade5f25c"}},{"code_sha256_prefix":"d610b5eabe0c9db1","entry":"dynamic_preprocess","repo":"OpenGVLab/MM-NIAH","repo_kind":"official","path":"eval_internvl.py","file_url":"https://github.com/OpenGVLab/MM-NIAH/blob/HEAD/eval_internvl.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d610b5eabe0c9db1"}},{"code_sha256_prefix":"bd77f5f8067f18e9","entry":"find_closest_aspect_ratio","repo":"OpenGVLab/MM-NIAH","repo_kind":"official","path":"eval_internvl.py","file_url":"https://github.com/OpenGVLab/MM-NIAH/blob/HEAD/eval_internvl.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bd77f5f8067f18e9"}},{"code_sha256_prefix":"d95b50a3f56470ad","entry":"get_input","repo":"opengvlab/mm-niah","repo_kind":"official","path":"utils/tools.py","file_url":"https://github.com/opengvlab/mm-niah/blob/HEAD/utils/tools.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":"d95b50a3f56470ad"}},{"code_sha256_prefix":"acb002c8cfa36ce4","entry":"has_word","repo":"opengvlab/mm-niah","repo_kind":"official","path":"val_mmniah.py","file_url":"https://github.com/opengvlab/mm-niah/blob/HEAD/val_mmniah.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":"acb002c8cfa36ce4"}},{"code_sha256_prefix":"210abccc49444195","entry":"load_image","repo":"opengvlab/mm-niah","repo_kind":"official","path":"prepare_rag.py","file_url":"https://github.com/opengvlab/mm-niah/blob/HEAD/prepare_rag.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":"210abccc49444195"}},{"code_sha256_prefix":"2de5f4fd2cd84a03","entry":"load_images","repo":"opengvlab/mm-niah","repo_kind":"official","path":"prepare_rag.py","file_url":"https://github.com/opengvlab/mm-niah/blob/HEAD/prepare_rag.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":"2de5f4fd2cd84a03"}},{"code_sha256_prefix":"60c8c56f09b202d7","entry":"build_model","repo":"opengvlab/mm-niah","repo_kind":"official","path":"prepare_rag.py","file_url":"https://github.com/opengvlab/mm-niah/blob/HEAD/prepare_rag.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":"60c8c56f09b202d7"}},{"code_sha256_prefix":"d701841310923e61","entry":"get_conv_template","repo":"opengvlab/mm-niah","repo_kind":"official","path":"utils/conversation.py","file_url":"https://github.com/opengvlab/mm-niah/blob/HEAD/utils/conversation.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":"d701841310923e61"}},{"code_sha256_prefix":"3e43891bd4e2356e","entry":"image_to_mdstring","repo":"opengvlab/mm-niah","repo_kind":"official","path":"visualization.py","file_url":"https://github.com/opengvlab/mm-niah/blob/HEAD/visualization.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":"3e43891bd4e2356e"}},{"code_sha256_prefix":"cf772b6df6ac2f48","entry":"is_correct","repo":"opengvlab/mm-niah","repo_kind":"official","path":"val_mmniah.py","file_url":"https://github.com/opengvlab/mm-niah/blob/HEAD/val_mmniah.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":"cf772b6df6ac2f48"}},{"code_sha256_prefix":"28f7f0fe58d8ed3e","entry":"process_item","repo":"opengvlab/mm-niah","repo_kind":"official","path":"visualization.py","file_url":"https://github.com/opengvlab/mm-niah/blob/HEAD/visualization.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":"28f7f0fe58d8ed3e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}