Papers › Code2Logic: Game-Code-Driven Data Synthesis for Enhancing VLMs General Reasoning

Code2Logic: Game-Code-Driven Data Synthesis for Enhancing VLMs General Reasoning

20 May 2025arXiv:2505.13886archive 2025-07-28

Jingqi Tong, Jixin Tang, Hangcheng Li, Yurong Mou, Ming Zhang, Jun Zhao, Yanbo Wen, Fan Song, Jiahao Zhan, Yuyang Lu, Chaoran Tao, Zhiyuan Guo, Jizhou Yu, Tianhao Cheng, Changhao Jiang, Zhen Wang, Tao Liang, Zhihui Fei, Mingyang Wan, Guojun Ma, Weifeng Ge, Guanhua Chen, Tao Gui, Xipeng Qiu, Qi Zhang, Xuanjing Huang

Visual-language Chain-of-Thought (CoT) data resources are relatively scarce compared to text-only counterparts, limiting the improvement of reasoning capabilities in Vision Language Models (VLMs). However, high-quality vision-language reasoning data is expensive and labor-intensive to annotate. To address this issue, we leverage a promising resource: game code, which naturally contains logical structures and state transition processes. Therefore, we propose Code2Logic, a novel game-code-driven approach for multimodal reasoning data synthesis. Our approach leverages Large Language Models (LLMs) to adapt game code, enabling automatic acquisition of reasoning processes and results through code execution. Using the Code2Logic approach, we developed the GameQA dataset to train and evaluate VLMs. GameQA is cost-effective and scalable to produce, challenging for state-of-the-art models, and diverse with 30 games and 158 tasks. Surprisingly, despite training solely on game data, VLMs demonstrated out of domain generalization, specifically Qwen2.5-VL-7B improving performance by 2.33\% across 7 diverse vision-language benchmarks. Our code and dataset are available at https://github.com/tongjingqi/Code2Logic.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2505.13886")

Code

Syntology Ran 0 of 15 code samples harvested from 1 repository linked to this paper; 15 have no recorded run.

By repository: official repository: 15 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

tongjingqi/code2logic officialmentioned in papermentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

15 samples harvested; 0 ran; 0 honoured the contract we drafted; 15 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

15unverified

Licence: 0 of the 15 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from tongjingqi/code2logic. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

convert_dict_to_str tongjingqi/code2logic/src/Code_for_text_data_derivative/PyramidChess_to_text_que.py official repository unverified Apache-2.0 (permissive) · 1d244c428cfcce3e · report
find_dataset tongjingqi/code2logic/src/Code_for_text_data_derivative/convert_all_text_data.py official repository unverified Apache-2.0 (permissive) · 8dcbaaa6688eb529 · report
format_3d_array tongjingqi/code2logic/src/Code_for_text_data_derivative/3dreconstruction_to_text_que.py official repository unverified Apache-2.0 (permissive) · d6952ca5b815db52 · report
format_projection tongjingqi/code2logic/src/Code_for_text_data_derivative/3dreconstruction_to_text_que.py official repository unverified Apache-2.0 (permissive) · caa903bbddc7a8fc · report
format_state_json tongjingqi/code2logic/src/Code_for_text_data_derivative/3dreconstruction_to_text_que.py official repository unverified Apache-2.0 (permissive) · 3f8d4d08a237ecbf · report
generate_piece_description tongjingqi/code2logic/src/Code_for_text_data_derivative/chess_ranger_to_text_que.py official repository unverified Apache-2.0 (permissive) · dcbfb1a3a7994497 · report
index_to_chess_coord tongjingqi/code2logic/src/Code_for_text_data_derivative/chess_ranger_to_text_que.py official repository unverified Apache-2.0 (permissive) · f596283a08d42eb5 · report
load_data tongjingqi/code2logic/src/Code_for_text_data_derivative/chess_ranger_to_text_que.py official repository unverified Apache-2.0 (permissive) · e32d5a06526a3f69 · report
parse_ratio_string tongjingqi/code2logic/src/3DReconstruction/multi_gen.py official repository unverified Apache-2.0 (permissive) · 38c2dbe09a7e2650 · report
read_json tongjingqi/code2logic/src/Code_for_text_data_derivative/PyramidChess_to_text_que.py official repository unverified Apache-2.0 (permissive) · 8bce38b2e33c7d8d · report
read_json tongjingqi/code2logic/src/Code_for_text_data_derivative/convert_text_data.py official repository unverified Apache-2.0 (permissive) · 968481e75edb953d · report
resolve_state_path tongjingqi/code2logic/src/Code_for_text_data_derivative/convert_text_data.py official repository unverified Apache-2.0 (permissive) · 7aff8928b0094fa3 · report
text_2d_turing_machine tongjingqi/code2logic/src/Code_for_text_data_derivative/game_text_adapters.py official repository unverified Apache-2.0 (permissive) · a7e84d87f71728fd · report
text_3d_maze tongjingqi/code2logic/src/Code_for_text_data_derivative/game_text_adapters.py official repository unverified Apache-2.0 (permissive) · 8f75acbbd517e7b0 · report
text_3d_reconstruction tongjingqi/code2logic/src/Code_for_text_data_derivative/game_text_adapters.py official repository unverified Apache-2.0 (permissive) · 6bb820e87a88f47a · report

Tasks

Domain GeneralizationMultimodal Reasoning

Datasets

Introduced by this paper, per the archive.

GameQA

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections