Skip to content

zezeze97/DFE-GPS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Diagram Formalization Enhanced Multi-Modal Geometry Problem Solver

Dataset: 🤗 SynthGeo-228k | Diagram Formalizer: 🤗 Diagram Formalizer | Reasoning Model: 🤗 DFE-GPS-9B | 🤗 DFE-GPS-34B

Alt text

Click to expand the detailed description

In this study, we introduce the Diagram Formalization Enhanced Geometry Problem Solver (DFE-GPS), a multi-modal architecture with three core components: a Diagram Formalizer, a Projection module, and a LLM. The LLM processes three types of inputs: diagram features $\mathcal{F}_{D}$ from the Diagram Encoder, formal diagram language representations (ConsCDL and ImgCDL) from the Diagram Formalizer, and natural language inputs containing problem statements and instructions. The Projection module aligns this information in the LLM's semantic space, enabling effective fusion. The LLM then refines the formal representations and generates reasoning steps for problem-solving. We used pre-trained SigLIP-0.4B as the Vision Encoder, Qwen2-0.5B-Instruct as the Lightweight LLM, and Yi-1.5-Chat (9B or 34B) as the primary LLM. The training process is divided into three stages, all of which focus on auto-regressive generation tasks.

  • Stage 1: The first stage focuses on training the Diagram Formalizer module, with training objective of generating formalized language descriptions corresponding to geometric diagrams. During this stage, all parameters of the Vision Encoder and part of the parameters of the Lightweight LLM (via the LoRA) are trainable to enhance the ability to extract visual features.
  • Stage 2: The second stage emphasizes training the Projection modules, aligning vision feature $\mathcal{F}_{D}$ with the semantic space of the LLM by generating natural language descriptions and formalized language expressions for the geometric diagrams. During training, the parameters of the Diagram Encoder and LLM are frozen, with only the MLP parameters connecting the visual features and the language model being trainable.
  • Stage 3: In the third stage, instruction fine-tuning enables the model to calibrate formalized diagram representations and solve problems. The input consists of geometric diagrams, formalized descriptions with random perturbations simulating Diagram Formalizer errors, and problem text accompanied by calibration and reasoning directives. The model learns to refine ConsCDL and ImgCDL, generating coherent natural language reasoning. During this phase, the parameters of the Diagram Encoder remain fixed, while the MLP and LLM parameters are trainable. Full parameter tuning is applied to the 9B model, whereas LoRA tuning is employed for the 34B model.

Quick Start

Before running the script, install the following necessary dependencies.

pip install torch==2.4.0 transformers==4.40.0 accelerate pillow sentencepiece

You can solve geometric problems using the following script. First, formalize the geometric images with the diagram formalizer, and then use the multi-modal reasing model for problem-solving:

python simple_infer.py
# image path: ./images/6173.png
# question: As shown in the diagram, ∠DOB=130°, and the center of circle O is O. Find the measure of ∠BCD.

Case Study

This section lists some test cases that feature a single problem with solutions generated by different models to illustrate the evaluation process using GPT-4o-mini. Based on experimental results and case studies, it is found that utilizing large language models (LLMs) to assess the solution generation process is reliable.

Problem Statement

As shown in the diagram, ∠DOB=130°, and the center of circle O is O. Find the measure of ∠BCD.

Alt text

Reference Answer

由题意得,∠DOB=130°(1),O是圆O的圆心(2); 由弧的性质(圆内接四边形对角互补)可得,∠BCD = -⌒OBD/2 + 180°(3); 已知条件(2),由常识可得,∠DOB = ⌒OBD(4); 已知条件(1)(4),计算可得,⌒OBD = 130°(5); 已知条件(3)(5),计算可得,∠BCD = 115°(6); 完成解题。

Evaluation Instruction

Please first check the reference answer and then the student answer, and make sure you carefully examine each reasoning step with your reason.

1. **Check both the reference answer and the student's answer:**
   - Initially verify if the student’s response aligns with the reference answer, focusing particularly on key steps and outcomes

2. **Carefully review each reasoning step:**
   - **Accuracy of Calculations (0-10 points):** Examine the accuracy of the computational steps in the student's answer. Adjust the score based on the number and severity of errors.
   - **Logical Reasoning (0-10 points):** Assess whether the logic in the student's answer is sound and coherent, and if it correctly transitions from one step to the next.
   - **Redundancy (0-10 points):** Analyze whether the answer contains unnecessary repetitive steps or explanations. More concise and elegant answers should score higher.

3. **Verify each step:** Check each step to ensure it complies with mathematical principles and logic. If any step contains logical or computational errors, mark it as “INCORRECT.” If all steps are correct, mark it as “CORRECT.”

4. **Output Format: Score Summary:**
   - Calculation Accuracy: [Score]/10
   - Logical Reasoning: [Score]/10
   - Redundancy: [Score]/10

5. **Final Judgment:** Either 'CORRECT' or 'INCORRECT' based on the step verifications.

DFE-GPS-9B

Click to expand the generated solution
**Step 1:** Identify that ∠DOB = 130° is given.

**Step 2:** Recognize that O is the center of the circle, which implies that ∠DOB is an angle subtended by the arc DB at the center of the circle.

**Step 3:** Apply the property of arcs that states the diagonals of a quadrilateral inscribed in a circle are supplementary. This means that ∠BCD = -⌒OBD/2 + 180°.

**Step 4:** Since O is the center of the circle, the arc OBD is equal to the angle DOB (∠DOB = ⌒OBD).

**Step 5:** Given that ∠DOB = 130°, it follows that ⌒OBD = 130°.

**Step 6:** Substitute the value of ⌒OBD into the equation from Step 3: ∠BCD = -130°/2 + 180°.

**Step 7:** Calculate the value of ∠BCD: ∠BCD = -65° + 180° = 115°.

Answer: The final answer is: 115
Click to expand the gpt4-o-mini evaluation result
1. **Check both the reference answer and the student's answer:**
   - The student has correctly followed the steps provided in the reference answer. They stated that ∠DOB = 130°, recognized that O is the center of the circle, indicated that the relationship between angles in a cyclic quadrilateral applies here, and correctly derived the measure of ∠BCD. The final answer given by the student is 115°, which matches the reference answer.

2. **Carefully review each reasoning step:**
   - **Step 1:** Identify that ∠DOB = 130° is given.
     - Status: CORRECT
     - Reason: Appropriately states the initial condition.
   - **Step 2:** Recognize that O is the center of the circle, which implies that ∠DOB is an angle subtended by the arc DB at the center of the circle.
     - Status: CORRECT
     - Reason: This correctly applies the concept of central angles relating to arcs.
   - **Step 3:** Apply the property of arcs that states the diagonals of a quadrilateral inscribed in a circle are supplementary. This means that ∠BCD and -⌒OBD/2 are supplementary, so ∠BCD = -⌒OBD/2 + 180°.
     - Status: CORRECT
     - Reason: This accurately states the relationship between the angles in the cyclic quadrilateral.
   - **Step 4:** Since O is the center of the circle, the arc OBD is equal to the angle DOB (∠DOB = ⌒OBD).
     - Status: CORRECT
     - Reason: Properly utilizes the definition of central angles.
   - **Step 5:** Given that ∠DOB = 130°, it follows that ⌒OBD = 130°.
     - Status: CORRECT
     - Reason: This follows logically after establishing the equivalence of angles and arcs in the previous step.
   - **Step 6:** Substitute the value of ⌒OBD into the equation from Step 3: ∠BCD = -130°/2 + 180°.
     - Status: CORRECT
     - Reason: Correctly substitutes the value into the previously established relationship.
   - **Step 7:** Calculate the value of ∠BCD: ∠BCD = -65° + 180° = 115°.
     - Status: CORRECT
     - Reason: There is no computational error in this calculation.

3. **Score Summary:**
   - Calculation Accuracy: 10/10
   - Logical Reasoning: 10/10
   - Redundancy: 10/10

4. **Final Judgment:** CORRECT
   - The student provided a complete and accurate solution with correct reasoning and calculations that align with the reference answer.

GPT-4-turbo

Click to expand the generated solution
To find the measure of ∠BCD given that ∠DOB = 130° in a circle centered at O, here are the steps:

1. **Identify Key Points and Angles**:
   - O is the center of the circle.
   - Points D and B lie on the circle.
   - ∠DOB is the angle subtended by arc DB at the center of the circle.

2. **Determine the Measure of the Arc DB**:
   - Since ∠DOB (an angle at the center) is 130°, the arc DB across the circle opposite this angle also measures 130°.

3. **Relate Central Angle to Inscribed Angle**:
   - For any circle, an angle inscribed in the circle is half the measure of the central angle that subtends the same arc. Here, ∠BCD is an inscribed angle that subtends the same arc DB as ∠DOB.

4. **Calculate ∠BCD**:
   - Given that ∠BCD subtends arc DB just like ∠DOB, and knowing the relationship between an inscribed angle and a central angle subtending the same arc:
     \[
     \text{Measure of } ∠BCD = \frac{1}{2} \times \text{Measure of } ∠DOB = \frac{1}{2} \times 130° = 65°.
     \]
The final answer is: **65°**.
Click to expand the gpt4-o-mini evaluation result
Let's examine and evaluate the student's answer against the reference answer.

##### Step 1: Reference Answer vs. Student's Answer

1. **Reference Answer Steps**:
   - States that ∠DOB = 130°.
   - Uses the property that an inscribed angle is half of the central angle that subtends the same arc.
   - Concludes that ∠BCD = 115°.

2. **Student's Answer Steps**:
   - States that ∠DOB = 130°.
   - Correctly identifies that arc DB also measures 130°.
   - States that ∠BCD is half of ∠DOB, hence calculating it as 65°.

##### Step 2: Review Each Reasoning Step

1. **Accuracy of Calculations**:
   - The student states that the measure of ∠BCD = ½ × 130° = 65°. This is **CALCULATIVELY INCORRECT** because the correct angle based on the inscribed angle theorem concerning arc DB from the reference answer equals 115°.
   - **Score**: 3/10

2. **Logical Reasoning**:
   - The student follows the logic of inscribed angles being half of the central angle correctly but fails to recognize that the inscribed angle ∠BCD relates to the opposite arc, which is not arc DB based on the provided context. Thus, while the reasoning about inscribed angles is applied, it’s based on a misunderstanding of the angles involved.
   - **Score**: 4/10

3. **Redundancy**:
   - The answer is somewhat concise but could clarify the connection to the arcs better. There are no unnecessary repetitions, thus this aspect seems properly managed.
   - **Score**: 8/10

##### Final Judgment
Given the errors in calculation and identifying the angles involved in relation to arc DB, the final determination is categorized as:

**Score Summary**:
- Calculation Accuracy: 3/10
- Logical Reasoning: 4/10
- Redundancy: 8/10

#### Final Judgment: **INCORRECT**

#### Conclusion
The student's answer is incorrect because they arrived at the wrong measure for ∠BCD due to misapprehending the relationship between the angles and arcs. The final answer should be concluded as **115°** based on the reference answer and proper calculations related to circles.

**The final answer is: 115°.**

InternVL-Chat-V1-5

Click to expand the generated solution
To find the measure of ∠BCD, we can use the fact that the sum of the angles around a point on a circle is 360 degrees. Since ∠DOB is an inscribed angle (an angle formed by two chords that have a common endpoint on the circle), the measure of ∠BCD is half the measure of ∠DOB.

**Step 1: Find the measure of ∠BCD.**
   - ∠BCD = (1/2) * ∠DOB

**Step 2: Plug in the given value for ∠DOB.**
   - ∠BCD = (1/2) * 130°

**Step 3: Calculate the value of ∠BCD.**
   - ∠BCD = 65°

##### Final Answer:
The final answer is: **65°**
Click to expand the gpt4-o-mini evaluation result
##### Checking Both the Reference Answer and the Student's Answer

1. **Reference Answer Breakdown**:
   - States that ∠DOB = 130° (1), and O is the center (2).
   - Uses the property of angles involving arcs to determine ∠BCD.
   - States that ∠BCD = -∠OBD/2 + 180° (3), based on the properties of cyclic quadrilaterals.
   - Asserts that ∠DOB = ∠OBD (4).
   - Computes ∠OBD = 130° based on (1) and (4) (5).
   - Finally deduces ∠BCD = 115° using (3) and (5) (6).

2. **Student's Answer Breakdown**:
   - States that ∠BCD is half of ∠DOB.
   - The computation shows ∠BCD = (1/2) * 130° = 65°.
   - Concludes with the final answer of 65°.

#### Review of Reasoning Steps

1. **Calculation Accuracy**:
   - The student's formula assumes ∠BCD is half of ∠DOB. However, ∠DOB is not an inscribed angle directly corresponding to ∠BCD, thus using this assumption incorrectly leads to an error. The final calculation is incorrect.
   - **Score**: 3/10

2. **Logical Reasoning**:
   - While the student correctly recognizes that angles in a circle relate to each other, they misapplied the relationship. This shows a misunderstanding of the properties involving angles and arcs, leading to an incorrect conclusion.
   - **Score**: 4/10

3. **Redundancy**:
   - The student's answer is relatively straightforward without unnecessary repetition. However, it misses a critical piece of reasoning leading to a wrong outcome. Still, it could have benefited from a clearer explanation of why they believe ∠BCD is one-half of ∠DOB.
   - **Score**: 7/10

#### Final Judgment
The student's answer is fundamentally flawed due to incorrect reasoning about the relationship between the angles, leading to an incorrect and miscalculated final answer.

#### Score Summary:
- Calculation Accuracy: 3/10
- Logical Reasoning: 4/10
- Redundancy: 7/10

**Final Judgment: INCORRECT**

deepseek-math-7b

Click to expand the generated solution
Since the sum of the angles in a triangle is 180°, we have ∠BOD = 180° - ∠DOB = 180° - 130° = 50°.Since ∠BOD and ∠BCD are inscribed angles that intercept the same arc, they are congruent.\nTherefore, ∠BCD = ∠BOD = 50°. The measure of ∠BCD is ${50°}$. The answer is ${50}$.
Click to expand the gpt4-o-mini evaluation result
#### LLM Evaluation
Let's break down both the reference answer and the student's answer step by step, focusing on the reasoning behind the computations to determine accuracy, logical reasoning, and potential redundancy.

##### Reference Answer Analysis:
1. **Given Information**: ∠DOB = 130° (1), O is the center of circle O (2).
2. **Using Inscribed Angle Theorem**: 
   - The angles in a cyclic quadrilateral (where points A, B, C, and D are concyclic) are such that opposite angles sum up to 180°. Hence, for angles BCD and ∠DBO: ∠BCD = -⌒OBD/2 + 180° (3). This shows the connection between the inscribed angle BCD and the central angle OBD.
3. **Establishing Relationships**:
   - By intuition or knowledge, we conclude ∠DOB = ⌒OBD (4), which means that the arc subtended by angle DOB is equal to angle DOB itself when considering the circle.
4. **Calculating Arc**: Using (1) and (4), we find ⌒OBD = 130° (5), leading to:
5. **Final Calculation**: Substituting (5) into (3) gives ∠BCD = 115° (6).
6. **Conclusion**: The measure of ∠BCD is concluded to be \( \boxed{115} \).

##### Student Answer Analysis:
1. **Initial Calculation**: The student believes ∠BOD = 180° - ∠DOB = 50°, which is somewhat relevant but ultimately misidentifies the relationships between angles.
2. **Misapplication of Angle Relationships**: The student incorrectly states that ∠BOD and ∠BCD are congruent due to them being inscribed angles intercepting the same arc. However, ∠BOD is a central angle, not an inscribed angle.
3. **Final Conclusion**: They conclude that ∠BCD = ∠BOD = 50°, which is incorrect as it misrepresents the geometry of the circle.

#### Step-by-Step Verification:
- **Reference Answer**:
   1. Correctly identifies all given information.
   2. Uses the inscribed angle theorem correctly.
   3. Correctly calculates arc degrees using the known angle.
   4. Correctly finds the inscribed angle measure.
   5. Overall, the calculations align and step through logically.

- **Student Answer**:
   1. The first step of calculating ∠BOD is calculated correctly but does not follow through with correctly understanding the relationships in the circle.
   2. The students’ logic that central angle BOD and inscribed angle BCD are equal is flawed.
   3. Misapplied reasoning leads to an incorrect conclusion.

#### Scores:
- **Calculation Accuracy**: 3/10 (The initial calculation of BOD was correct, but the final answer is wrong)
- **Logical Reasoning**: 3/10 (Misunderstanding of angle relationships leads to incorrect conclusions)
- **Redundancy**: 5/10 (Adequate logical flow but erroneous conclusion)

#### Final Judgment:
Considering the steps followed by the student contained substantial errors in reasoning about angle relationships, the overall judgment is:

**Final Judgment**: INCORRECT

Meta-Llama-3.1-8B

Click to expand the generated solution
#### Solution: Finding the Measure of ∠BCD Using Properties of Circles and Angles

##### Steps to Solution

1. **Identify Given Information**:
   - We are given that ∠DOB = 130°. Since ∠DOB is an inscribed angle, it is half the measure of the central angle subtended by the same arc.

2. **Determine the Central Angle**:
   - Let's denote the central angle subtended by arc BD as ∠BOD. Since ∠DOB is half of ∠BOD, we can calculate:
     \[
     ∠BOD = 2 \times ∠DOB = 2 \times 130° = 260°.
     \]

3. **Measure of Arc BD**:
   - Now, we need to find the measure of arc BD. Since the measure of a central angle is equal to the measure of the arc it subtends, the measure of arc BD is also 260°.

4. **Calculate Remaining Arc**:
   - Since arc BD is a part of the circle, the remaining part of the circle is:
     \[
     360° - 260° = 100°.
     \]

5. **Measure of ∠BCD**:
   - Since ∠BCD is an inscribed angle, it is half the measure of the arc it subtends. Therefore, the measure of ∠BCD is half of the remaining part of the circle:
     \[
     (1/2) \times 100° = 50°.
     \]

6. **Conclusion**:
   - Hence, the measure of ∠BCD is 50°.

##### Final Answer

The final answer is: **50°**
Click to expand the gpt4-o-mini evaluation result
##### Step Verifications

1. **Step 1**: The student correctly identifies that ∠DOB = 130°.
   - **Assessment**: CORRECT

2. **Step 2**: The student claims that ∠BOD = 2 * ∠DOB = 2 * 130° = 260°.
   - **Assessment**: INCORRECT. The student misunderstands the relationship between ∠DOB and ∠BOD. Since ∠DOB is a central angle, we should utilize the relationship of inscribed angles. The correct reasoning would conclude that ∠BOD is not 260° as it exceeds 360° and does not correspond to the arc BD.

3. **Step 3**: Based on the previous incorrect step, the claim that the measure of arc BD is 260° cannot be validated.
   - **Assessment**: INCORRECT.

4. **Step 4**: The student calculates the remaining part of the circle as 100° (from the claim).
   - **Assessment**: INCORRECT. This is based on the previous incorrect interpretation of arc BD.

5. **Step 5**: The student states that ∠BCD = (1/2) * 100° = 50°.
   - **Assessment**: INCORRECT. Given all previous errors, this conclusion is also based on flawed logic.

6. **Step 6**: The student states the final answer as 50°.
   - **Assessment**: INCORRECT. The final answer is incorrect based on all preceding reasoning errors.

##### Scoring Summary

- **Calculation Accuracy**: 0/10 (All calculations are based on incorrect assumptions or errors).
- **Logical Reasoning**: 0/10 (The logical connections made are fundamentally flawed).
- **Redundancy**: 5/10 (While the steps follow a basic logical process, the reliance on incorrect math doesn’t add useful verbosity).

#### Final Judgment

Based on the evaluations of the reasoning and calculations:

**Final Judgment: INCORRECT**

Performance

Alt text

Citation

@inproceedings{zhang2025diagram,
  title={Diagram formalization enhanced multi-modal geometry problem solver},
  author={Zhang, Zeren and Cheng, Jo-Ku and Deng, Jingyang and Tian, Lu and Ma, Jinwen and Qin, Ziran and Zhang, Xiaokai and Zhu, Na and Leng, Tuo},
  booktitle={ICASSP 2025-2025 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},
  pages={1--5},
  year={2025},
  organization={IEEE}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages