{"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/arxiv-2608-10628","title":"InSight-doc: Agentic Visual Perception for Long-Document Understanding","arxiv_id":"2608.10628","date":"2026-08-11","proceeding":null,"authors":["Kaican Li","Weiyan Xie","Lewei Yao","Jiannan Wu","Lanqing Hong","Yongxiang Huang","Nevin L. Zhang"],"abstract":"Long-document understanding often requires reasoning over many visually rich pages, making inference costly and prone to context rot. In this work, we propose InSight-doc, an agentic visual perception framework that treats visual resolution as an adaptive reasoning-time resource. InSight-doc starts from low resolution and selectively zooms into high-resolution regions for finer evidence, without relying on any external retriever. To train such an agent, we construct an active-perception corpus of 17.9K high-quality SFT examples with region-level zoom-in trajectories, accompanied by 19.2K hard RL examples. Through SFT+RL, InSight-doc-8B improves the baseline by 4.3--16.4 accuracy points over document VQA benchmarks. On long documents, it reduces hallucination by more than 40% and inference latency by 41%--68% while maintaining an accuracy lead. Our code, datasets, and model are released at https://github.com/m-Just/InSight-doc .","url_abs":"https://arxiv.org/abs/2608.10628","url_pdf":"https://arxiv.org/pdf/2608.10628","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2608.10628","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2608.10628"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/m-Just/InSight-doc","reach":null}],"summary":{"ran":11,"ran_honours":2,"ran_draft_wrong":5,"ran_fixture":6,"unverified":6},"by_repo_kind":{"found_in_text":{"samples":30,"ran":24,"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":"e0d3da505593bbb5","entry":"CoreAgentData","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e0d3da505593bbb5"}},{"code_sha256_prefix":"c2fcc53f3ba06c25","entry":"CoreFunctionCall","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c2fcc53f3ba06c25"}},{"code_sha256_prefix":"199568b8bcc1a97d","entry":"CoreGenerationOutput","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"199568b8bcc1a97d"}},{"code_sha256_prefix":"9931a74ac2b2f3ab","entry":"CoreToolExecutionResult","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9931a74ac2b2f3ab"}},{"code_sha256_prefix":"57e264abc0d1e97f","entry":"InSightQwenAgentConfig","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"57e264abc0d1e97f"}},{"code_sha256_prefix":"d022d55393f96d9b","entry":"InSightQwenAgentResult","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d022d55393f96d9b"}},{"code_sha256_prefix":"c6f622ad7d76837d","entry":"InSightQwenExportPayload","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c6f622ad7d76837d"}},{"code_sha256_prefix":"b4825253d49300af","entry":"PresentedImageState","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b4825253d49300af"}},{"code_sha256_prefix":"612ac451d5d21f76","entry":"PromptLengthEstimate","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"612ac451d5d21f76"}},{"code_sha256_prefix":"98f77fab3577bf24","entry":"_content_text_length","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"98f77fab3577bf24"}},{"code_sha256_prefix":"fe84754faa2859f8","entry":"_relative_time_s","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fe84754faa2859f8"}},{"code_sha256_prefix":"91f3d21d12abd8d9","entry":"_timer","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"91f3d21d12abd8d9"}},{"code_sha256_prefix":"4d4cba8f278b36f0","entry":"available_new_tokens","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4d4cba8f278b36f0"}},{"code_sha256_prefix":"2cedeab55ac165ef","entry":"cap_size_by_area","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2cedeab55ac165ef"}},{"code_sha256_prefix":"ae10fd1f2b4c45be","entry":"clamp_bbox_to_image","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ae10fd1f2b4c45be"}},{"code_sha256_prefix":"c3861873f201c88c","entry":"image_aspect_ratio","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c3861873f201c88c"}},{"code_sha256_prefix":"41871231d55b76d9","entry":"load_prompt_image","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"41871231d55b76d9"}},{"code_sha256_prefix":"cbba9204dcd7dccf","entry":"presented_image_to_export_ref","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cbba9204dcd7dccf"}},{"code_sha256_prefix":"475fdbc70b64ef71","entry":"prompt_fits_context","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"475fdbc70b64ef71"}},{"code_sha256_prefix":"96a164a65b0aa31a","entry":"resize_dims_by_factor","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"96a164a65b0aa31a"}},{"code_sha256_prefix":"b13a332eff5632be","entry":"resolve_dynamic_initial_rescale","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b13a332eff5632be"}},{"code_sha256_prefix":"4c046107a2f3d661","entry":"scale_bbox_from_qwen_range","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4c046107a2f3d661"}},{"code_sha256_prefix":"5bfe854ea658c901","entry":"translate_bbox_to_original","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5bfe854ea658c901"}},{"code_sha256_prefix":"0a37bf153d1b6c30","entry":"truncate_tool_response_text","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0a37bf153d1b6c30"}},{"code_sha256_prefix":"353bf561f58e6045","entry":"CoreAgentState","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","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":"353bf561f58e6045"}},{"code_sha256_prefix":"27f90f8aad7567b6","entry":"CoreRuntime","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","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":"27f90f8aad7567b6"}},{"code_sha256_prefix":"ec9de9a20a901516","entry":"InSightQwenAgentRunner","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","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":"ec9de9a20a901516"}},{"code_sha256_prefix":"876bae24abda33db","entry":"_record_conversation_wall_time","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","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":"876bae24abda33db"}},{"code_sha256_prefix":"2359af33464b1345","entry":"_record_core_inference_metrics","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","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":"2359af33464b1345"}},{"code_sha256_prefix":"71efc97a404e9eae","entry":"validate_qwen_image_aspect_ratio","repo":"m-Just/InSight-doc","repo_kind":"found_in_text","path":"insight_agent_core/insight_qwen_agent.py","file_url":"https://github.com/m-Just/InSight-doc/blob/HEAD/insight_agent_core/insight_qwen_agent.py","link_basis":"first_harvest_node","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":"71efc97a404e9eae"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}