Source-linked AI summary

CogFlow: Bridging Perception and Reasoning through Knowledge Internalization for Visual Mathematical Problem Solving

Shuhang Chen, Yunqiu Xu, Junjie Xie, Aojun Lu, Tao Feng, Zeying Huang, Ning Zhang, Yi Sun, Yi Yang, Hangjie Yuan

arXiv:2601.01874v3cs.CVcs.AI

TL;DR

Visual mathematical reasoning remains difficult for multimodal language models, and prior work focused on visual extraction without addressing whether cues are faithfully integrated into reasoning. COGFLOW adds an internalization stage and trains perception, internalization, and reasoning together. It reports consistent benchmark advantages over existing MLLMs, including 66.0% accuracy on FlowVerse.

  • Problem

    Prior visual-math methods improve visual extraction but leave open whether extracted cues are faithfully integrated and used in subsequent reasoning.

    Source: §1 · p. 2
  • Method

    COGFLOW uses a perception–internalization–reasoning pipeline, enhancing perception with Synergistic Visual Rewards, internalization with a Knowledge Internalization Reward, and grounded reasoning with Visual-Gated Policy Optimization.

    Source: §1 · pp. 2–3
  • Results

    COGFLOW shows consistent advantages over existing MLLMs on visual mathematical benchmarks, including 66.0% accuracy on FlowVerse.

    Source: §4.2 · p. 8, §5 · p. 10
  • Takeaways & Limitations

    The reported results support COGFLOW’s ability to mitigate reasoning drift and improve reasoning accuracy and interpretability on visual mathematical benchmarks.

    Source: §5 · p. 10

    Training is computationally demanding and may hinder broader adoption, especially in resource-constrained settings.

    Source: §A.4 · p. 17

Abstract

from arXiv · show

Despite significant progress, multimodal large language models continue to struggle with visual mathematical problem solving. Some recent works recognize that visual perception is a bottleneck in visual mathematical reasoning, but their solutions are limited to improving the extraction and interpretation of visual inputs. Notably, they all ignore the key issue of whether the extracted visual cues are faithfully integrated and properly utilized in subsequent reasoning. Motivated by this, we present CogFlow, a novel cognitive-inspired three-stage framework that incorporates a knowledge internalization stage, explicitly simulating the hierarchical flow of human reasoning: perception$\Rightarrow$internalization$\Rightarrow$reasoning. In line with this hierarchical flow, we holistically enhance all its stages. We devise Synergistic Visual Rewards to boost perception capabilities in parametric and semantic spaces, jointly improving visual information extraction from symbols and diagrams. To guarantee faithful integration of extracted visual cues into subsequent reasoning, we introduce a Knowledge Internalization Reward model in the internalization stage, bridging perception and reasoning. Moreover, we design a Visual-Gated Policy Optimization algorithm to further enforce the reasoning is grounded with the visual knowledge, preventing models seeking shortcuts that appear coherent but are visually ungrounded reasoning chains. Moreover, we contribute a new dataset MathCog for model training, which contains samples with over 120K high-quality perception-reasoning aligned annotations. Comprehensive experiments and analysis on commonly used visual mathematical reasoning benchmarks validate the superiority of the proposed CogFlow. Project page: https://shchen233.github.io/cogflow.

1 INTRODUCTION

Visual mathematical reasoning remains challenged by inaccurate perception and by reasoning that can drift from visual evidence. COGFLOW addresses both through a perception–internalization–reasoning pipeline, with stage-specific training and a new aligned dataset.

1 INTRODUCTION

  • COGFLOW models human reasoning as perception, knowledge internalization, then reasoning, transforming perceptual signals into structured, semantically grounded representations.For example, it maps facts that AB is a diameter and C lies on a circle to the knowledge that ∠ACB = 90°.Source: §1 · pp. 2–3
  • Synergistic Visual Rewards combine parameter-space measurement of points, lines, and circles with semantic-space comparison of rendered images.The two rewards target local geometric fidelity and global perceptual coherence, respectively.Source: §1 · p. 2
  • Existing approaches can make reasoning steps illogical or unwarranted and detached from perceptual evidence, motivating faithful integration of visual cues into reasoning.One-step methods can incur perception and reasoning errors, while decoupled pipelines can exhibit reasoning drift.Source: §1 · pp. 1–2, Figure 1 · p. 2
  • Knowledge Internalization Reward scores responses for fidelity to internalized visual representations, using positive and five typical negative trajectories.The method is reported to reduce hallucinations and improve interpretability and robustness.Source: §1 · pp. 2–3
  • Visual-Gated Policy Optimization filters perceptual trajectories by quality and regenerates alternatives when a trajectory is rejected before subsequent reasoning.It also uses an outcome-supervised Inference Reward to strengthen multi-step visual reasoning.Source: §1 · p. 3
  • COGFLOW consistently outperforms state-of-the-art MLLMs of comparable size and can match or exceed larger closed-source models on visual math benchmarks.The training dataset, MATHCOG, contains over 120K samples with high-quality perception–reasoning aligned annotations.Source: §1 · p. 3
  • MATHCOG provides three subsets and over 120K training samples with high-quality perception–reasoning aligned annotations.Experiments on multiple visual mathematical benchmarks report gains in answer accuracy and reasoning quality.Source: §1 · p. 3

2 RELATED WORK

Prior visual mathematical reasoning work has emphasized reasoning strategies or improving visual comprehension, while leaving faithful use of visual cues in subsequent reasoning unresolved. Related multimodal reinforcement-learning approaches likewise often lack explicit perception–reasoning alignment.

2 RELATED WORK

  • Prior visual mathematical reasoning methods address reasoning through chain-of-thought, tools, test-time scaling, or reinforcement learning, and perception through specialized encoders or auxiliary visual tasks.Several recent works identify inaccurate visual comprehension as a major bottleneck, but prior work still leaves open whether extracted cues are faithfully used in reasoning.Source: §2 · p. 3
  • COGFLOW’s framework combines Synergistic Visual Rewards for perception, Knowledge Internalization Reward between perception and reasoning, and Visual-Gated Policy Optimization with Inference Reward for grounded reasoning.Source: Figure 2 · p. 4
  • Multimodal reinforcement-learning methods include preference-augmented rewards and two-stage paradigms, but typically lack explicit mechanisms aligning perception with reasoning.GRPO is described as a lightweight alternative to computationally expensive actor–critic methods.Source: §2 · pp. 3–4

3 COGFLOW: A COGNITIVE-INSPIRED HIERARCHICAL FRAMEWORK

CogFlow follows a perception–internalization–reasoning hierarchy, with rewards and policy optimization designed to keep visual mathematical reasoning grounded in perceptual evidence.

3 COGFLOW: A COGNITIVE-INSPIRED HIERARCHICAL FRAMEWORK

  • CogFlow uses supervised fine-tuning followed by reinforcement learning, with MathCog datasets supporting initial perception and reasoning skills and visually grounded policy optimization.Its three stages are perception, internalization, and reasoning.Source: §3 · p. 4

3.1 FORMING TRUSTWORTHY PERCEPTION WITH SYNERGISTIC VISUAL REWARDS

  • SynVRs combine parametric and semantic rewards: VPR evaluates geometric primitives, while VSR compares renderings for global layout and style; their combined score also gates perception and rewards it during RL.The balance between local geometric precision and global visual consistency is controlled by α.Source: §3.1 · pp. 4–5

3.2 ALLEVIATING REASONING DRIFT WITH KNOWLEDGE INTERNALIZATION REWARD

  • IntlzR evaluates whether reasoning remains faithful to internalized visual representations, using positive–negative training pairs based on five recurring errors and stepwise rewards across reasoning chains.The errors include omitted or misbound primitives, fabricated facts, unjustified theorems, violated geometric constraints, and inconsistent references.Source: §3.2 · pp. 5–6

3.3 STRENGTHENING MULTI-STEP VISUAL REASONING WITH VGPO

  • VGPO combines perception, internalization, and inference rewards with group-level optimization; its gate forwards the first perception parse above threshold, or the highest-scoring parse after M trials.The authors describe this combination as stabilizing long-horizon training and encouraging interpretable reasoning chains.Source: §3.3 · pp. 6–7

4 EXPERIMENTS

Experiments evaluate COGFLOW on visual-math benchmarks and find strong accuracy across several datasets. Ablations report gains from its components, with VGPO the largest single-module contributor and combined components reducing all analyzed error types.

4.1 EXPERIMENTAL SETUP

  • Evaluation uses accuracy for final answers and CoT-E for intermediate reasoning across six visual-math benchmarks, with closed- and open-source MLLMs as baselines.COGFLOW is initialized from Qwen2.5-VL-7B and trained on MATHCOG using SFT followed by VGPO-based RL.Source: §4.1 · pp. 7–8

4.2 MAIN RESULTS

  • 66.0% accuracy on FlowVerse, 53.9% on MathVerse, 76.8% on MathVista, 64.1% on WeMath, and 46.2% on DynaMath; COGFLOW surpasses all open-source baselines by large margins.On LogicVista, it is competitive and trails only GLM-4.IV-9B.Source: §4.2 · p. 8, Table 3 · p. 8, Table 4 · p. 8

4.3 ABLATION STUDIES

  • VGPO provides the largest single-module gain; every component contributes positively, supporting the joint treatment of perception, internalization, and reasoning.Table 5’s ablation keeps the visual gate enabled during inference.Source: §4.3 · p. 8, Table 5 · p. 9
  • Combining VPR and VSR improves MathVerse CoT-E by up to +3.0% and accuracy by +1.7%, and FlowVerse CoT-E by +2.2% and accuracy by +2.1% over baseline.Either reward also improves CoT-E and final accuracy across both benchmarks; VPR supports geometric precision while VSR stabilizes global layout.Source: §4.3 · pp. 8–9, Figure 5 · p. 9
  • Removing any single internalization error type degrades performance; excluding omission/misbinding primitives or geometric-constraint contradictions causes the largest drops.Softmax-DPO reaches 66.0% / 56.2% on FlowVerse, outperforming the described Vanilla DPO strategy.Source: §4.3 · p. 9, Figure 6 · p. 9
  • Inference-time visual gating adds around 0.6–1% accuracy without VGPO, while VGPO provides a larger improvement by using the gate during training to shape the policy.VGPO also yields higher medians and a greater concentration of high visual-reward values across post-training methods.Source: §4.3 · p. 9, Figure 8 · p. 10, Figure 7 · p. 10
  • +SynVRs reduces Perception Errors by 2%, +IntlzR reduces Knowledge-Internalization Error by 2% relative to baseline, and combined COGFLOW minimizes each error type while maximizing correct predictions.The analysis classifies FlowVerse responses as perception errors, knowledge-internalization errors, reasoning errors, or correct.Source: §4.3 · pp. 9–10, Figure 9 · p. 10

5 CONCLUSION

The conclusion frames faithful integration of visual perception into reasoning as an overlooked challenge and presents COGFLOW as a three-stage response. The appendices describe the dataset and reproducibility materials, ethics considerations, and the limited use of an LLM in preparing the paper.

5 CONCLUSION

  • COGFLOW models perception, knowledge internalization, and reasoning to mitigate reasoning drift; experiments report consistent advantages over existing MLLMs on visual-math benchmarks.The conclusion says the framework improves reasoning accuracy and interpretability by jointly enhancing perceptual fidelity, internalization, and visually grounded reasoning.Source: §5 · p. 10

A.1 ETHICS STATEMENT

  • The study uses publicly available benchmarks and introduces MATHCOG training subsets; the authors report no foreseeable ethical risks or sensitive personal data in the dataset.They state that third-party attribution and redistribution constraints are respected.Source: §A.1 · p. 17

A.2 REPRODUCIBILITY STATEMENT

  • The authors report releasing COGFLOW code, configurations, training data, evaluation scripts, and runnable training recipes.The materials include dataset-construction scripts, reward formulations, hyperparameters, and ablation diagnostics.Source: §A.2 · p. 17

A.3 THE USE OF LARGE LANGUAGE MODELS

  • ChatGPT-5 assisted with writing polish and retrieval of related work, but not research ideation, experiment design, data analysis, or interpretation.The paper states that scientific content and decisions remained the authors’ responsibility.Source: §A.3 · p. 17

A.4 LIMITATIONS AND FUTURE WORKS

This section describes MATHCOG’s aligned dataset construction, its computational limitation, and proposed extensions beyond visual mathematics.

A.4 LIMITATIONS AND FUTURE WORKS

  • Stable improvements require substantial computation, which may hinder adoption in resource-constrained settings.Source: §A.4 · p. 17
  • Future work proposes extending visual primitives to natural scenes through instance detection or segmentation, normalized schemas, and knowledge internalization.Source: §A.4 · p. 18
  • COGFLOW’s performance on visual mathematics suggests potential transfer to other vision–language domains.Source: §A.4 · p. 18

B ADDITIONAL DETAILS OF MATHCOG DATASET

B.1 DATASET LICENSE AND INTENDED USE

  • MATHCOG is released under CC-BY-4.0 for credited academic and commercial reuse, and is intended for research and education rather than sensitive-domain decisions.Source: §B.1 · p. 19

B.2.1 DATA COLLECTION

  • Filtering existing geometry-problem corpora yields 111,752 problems after excluding weakly geometric or artistic content and diagrams outside the 64–2048 resolution range.Source: §B.2.1 · p. 19

B.2.2 MATHCOG-SFT AND MATHCOG-RL CURATION

  • OpenCV extracts geometric primitives, which are matched to labels and normalized into a fixed coordinate range of [−10, 10] for standardized annotations.Source: §B.2.2 · p. 20
  • GPT-5-assisted reasoning trajectories are human-refined; the resulting curation samples 100,000 SFT and 10,000 RL examples, with 31 annotators performing quality assurance.Source: §B.2.2 · p. 20

B.3 DATASET STATISTICS

MATHCOG contains 121,730 problems across training, reward-model, and validation data; question, watching, and thinking components also differ in average length.

B.3 DATASET STATISTICS

  • 121,730 problems comprise 100,000 MATHCOG-SFT, 10,000 MATHCOG-RL, 10,000 positive and 50,000 negative MATHCOG-IntlzR samples, plus 1,730 validation examples.Source: §B.3 · p. 21
  • 186 words is the average question length, compared with 463.03 for WATCHING and 527.79 for THINKING.Figure 12 plots word length on the horizontal axis and probability distribution on the vertical axis.Source: §B.3 · p. 22

B.4 DATASET EXAMPLES

The examples show how MATHCOG separates visual perception from reasoning, while the accompanying methods define primitive matching, reward-model training, and inference rewards.

B.4 DATASET EXAMPLES

  • Examples organize visual input and problem statements alongside WATCHING perception, THINKING reasoning, and the final ANSWER; one inference connects a perceived diameter to a right-angle deduction.Source: §B.4 · pp. 22–23

C.1 MODEL INITIALIZATION

  • COGFLOW starts from Qwen2.5-VL-7B and updates the vision encoder, perception modules, and language decoder without freezing components.Source: §C.1 · p. 24

C.2 THE DETAILS OF VPR

  • VPR measures parameter-space accuracy for points, lines, and circles by Hungarian-matching predicted and ground-truth primitives to minimize assignment cost.Source: §C.2 · p. 24

C.3 THE DETAILS OF INTLZR TRAINING

  • IntlzR learns hidden-representation scores for visual-evidence consistency, using Softmax-DPO to rank each positive trajectory above its five negatives.The reward model is trained on 10k pairs, with one positive and five negatives per pair.Source: §C.3 · p. 24

C.4 THE DETAILS OF INFR

  • Inference rewards separately check answer correctness and compliance with the required WATCHING, THINKING, and ANSWER schema, returning binary scores.Source: §C.4 · pp. 24–25

C.5 DETAILS OF SFT AND RL TRAINING

The training details specify supervised fine-tuning and reinforcement-learning settings, while the reasoning-drift metric checks visual grounding step by step.

C.5 DETAILS OF SFT AND RL TRAINING

  • 100,000 curated MATHCOG-SFT samples train the model for one epoch with batch size 64 and learning rate 1 × 10^-5.Source: §C.5 · p. 25
  • 10,000 MATHCOG-RL samples train for one epoch; eight trajectories are sampled per input and SynVRs, IntlzR, and InfR weights are (1, 1, 1).Source: §C.5 · pp. 25–26

C.6 DETAILS OF THE REASONING DRIFT PRECISION METRIC

  • Reasoning-drift precision measures the fraction of flagged steps that are truly ungrounded, checking visual claims against elements extracted from perception.Source: §C.6 · p. 26

D.1 ANALYSIS ON THE OVERALL EFFECTIVENESS OF COGFLOW

COGFLOW improves both answer accuracy and intermediate reasoning quality over the base and SFT models. Its perception-reward analysis finds that combining visual rewards yields the strongest perception fidelity.

D.1 ANALYSIS ON THE OVERALL EFFECTIVENESS OF COGFLOW

  • 66.01 CoT-E and 56.22 Acc: COGFLOW exceeds SFT by +15.31 and +13.32, respectively, on the reported overall comparison.It also exceeds the base model by +42.6%/+40.2%.Source: §D.1 · p. 27, Figure 14 · p. 27
  • 76.8 ALL: COGFLOW exceeds several general-purpose systems on MathVista and records the strongest category scores, though Doubao-pro-1.5 scores 79.5 ALL.The reported comparison includes GPT-4o at 63.8, Claude-3.5-Sonnet at 67.7, and Gemini-2.0-Flash at 73.4.Source: §D.1 · p. 27, Table 12 · p. 28

D.2 MORE ANALYSIS ON SYNERGISTIC VISUAL REWARDS

  • Perception fidelity is assessed by matching structured model outputs against gold geometric primitives, with predicted elements aligned by type and parameters.The matcher produces a set of aligned elements for the comparison.Source: §D.2 · p. 27
  • The W/SynVRs variant has the best perception F1 distribution; removing either visual reward lowers perception fidelity.The distribution is highest-centered when both VPR and VSR are enabled.Source: §D.2 · p. 27, Figure 15 · p. 27

D.3 THE IMPACT AND EFFICIENCY OF THE VISION GATE

The visual gate improves perceptual grounding by regenerating below-threshold perceptions, with only modest reported training overhead. At inference, selecting among perception samples offers a more favorable computation–performance trade-off than sampling full responses.

D.3 THE IMPACT AND EFFICIENCY OF THE VISION GATE

  • After visual-gate regeneration, visual-reward score mass shifts upward and concentrates increasingly above the acceptance threshold.The distributions track initial scores and scores after one and two regeneration rounds.Source: §D.3 · pp. 28–29, Figure 16 · p. 29
  • Enabling VGPO with the visual gate adds +1.3 training hours, an overhead described as modest for standard MLLM post-training.Source: §D.3 · p. 29
  • The visual-gate inference procedure selects the highest-scoring perception from k alternatives, then conditions one reasoning pass on that perception.The comparison evaluates COGFLOW and VLM-R1 at k = 3.Source: §D.3 · p. 29
  • The visual-gated inference scheme achieves nearly the accuracy of best-of-3 full responses while requiring substantially less inference time.The reported times are 2.72 h, 3.06 h, and 5.52 h across the compared schemes.Source: §D.3 · p. 29, Table 14 · p. 29

D.4 ANALYSIS ON VISUAL-GATED POLICY OPTIMIZATION

Across the analyses, VGPO outperforms the compared RL baselines, while the reward stages target distinct failure modes and support grounded reasoning. The reported gains extend across model sizes and architectures, and controlled ablations distinguish framework effects from dataset effects.

D.4 ANALYSIS ON VISUAL-GATED POLICY OPTIMIZATION

  • 66.0% on FlowVerse and 56.2% on MathVerse: VGPO surpasses the compared baselines and improves by over 6 points versus GRPO with VPR and IntlzR.VGPO incurs slightly higher training costs.Source: §D.4 · p. 30

D.5 CLARIFYING THE COGNITIVE-SCIENCE ANALOGY

  • Watching extracts low-level visual primitives, whereas internalization turns them into conceptually meaningful representations that align visual evidence with the evolving reasoning state.Omitting or misbinding correctly perceived primitives is described as an internalization error.Source: §D.5 · p. 30

D.6 DEEPER INSIGHTS INTO THE MECHANISM OF MULTI-STAGE REWARD STRUCTURE

  • SynVRs target perceptual failures, IntlzR targets reasoning drift, and InfR targets task-level correctness and output structure.Removing individual IntlzR error types degrades performance, with the largest drops for primitive omission/misbinding and geometric-constraint contradictions.Source: §D.6 · pp. 30–31

D.7 SIZES AND ARCHITECTURES ABLATION.

  • COGFLOW consistently outperforms comparable-size models across Qwen2.5-VL and InternVL3.5 scales, with gains maintained or amplified as model capacity increases.The evaluated models include Qwen2.5-VL at 3B and 7B and InternVL3.5 at 2B, 4B, and 8B.Source: Figure 17 · p. 30, §D.7 · p. 31

D.8 SOURCE OF PERFORMANCE IMPROVEMENT

  • With MATHCOG fixed as training data, VGPO performs best among the compared post-training methods, indicating gains are not attributable to the dataset alone.The analysis compares PPO, DAPO, and VGPO from the same base model.Source: §D.8 · p. 31

D.9 ABLATIONS ON INDIVIDUAL SYNVRS COMPONENTS

  • α = 0.6 yields peak FlowVerse performance; α = 0 underperforms α = 1, suggesting VPR contributes more to perceptual fidelity than VSR alone.IntlzR and the visual gate are kept enabled in this ablation.Source: §D.9 · p. 32, Figure 18 · p. 32

D.10 EVALUATING FG-CLIP FOR SIMILARITY REWARD

  • FG-CLIP with a ViT-L-14 backbone achieves the best overall FlowVerse performance among the compared pretrained similarity models.The alternatives include MetaCLIP2.Source: §D.10 · p. 32, Table 17 · p. 32

D.11 FURTHER ANALYSIS OF ERROR TYPES

The error analyses report that SynVRs reduce perception errors and that perception and internalization can support correct answers despite localized perception mistakes. Case studies illustrate primitive misbinding and error compensation across stages.

D.11 FURTHER ANALYSIS OF ERROR TYPES

  • SynVRs produce the largest Perception Error reduction among the compared single-reward configurations, while their reduction in perception errors overall is modest relative to reasoning-error reductions.The analysis attributes some reasoning-error reduction to improvements propagating across perception, internalization, and reasoning.Source: §D.11 · p. 32

D.12 CASE STUDIES

  • In the circle example, internalized primitives and visual rewards support the correct ∠ACB = 40° solution rather than misbinding the given angle or applying an invalid geometric inference.The reasoning uses OA = OB to derive ∠AOB = 80° before applying the inscribed-angle theorem.Source: §D.12 · pp. 32–33

D.13 ANALYSIS OF ERROR COMPENSATION MECHANISM

  • A correct answer is produced despite misidentified coordinates for A and corrupted lines AB and AD, using correctly perceived points B and C and precise internalization.The case illustrates error compensation despite partial perception failures.Source: §D.13 · p. 33, Figure 20 · p. 33
Loading 2601.01874v3…