用AI解决电路分析难题,准确率从79%提升至97.6%
Enhancing Large Language Model-Based Systems for End-to-End Circuit Analysis Problem Solving
- 结合目标检测与仿真验证,纠正大模型对电路图的误识别
- 在真实电路图上准确率提升至93.9%以上,显著优于原模型
- 适合工程教育、自动作业批改等需要高可靠性的场景
大语言模型在编程等数据丰富领域表现优异,但在需多模态理解与精确数学推理的工程任务中仍不可靠。电路分析尤其凸显此问题——尽管Gemini 2.5 Pro在图示解析和模拟电路推理方面有改进,但面对文本描述与电路图并存的问题时,仍难以持续生成正确解。工程教育亟需可扩展的AI工具,用于自动作业反馈等应用。本文提出基于Gemini的端到端电路分析增强框架。我们首先对本科生电路题进行系统性基准测试,发现两大关键失败模式:1)电路识别幻觉,如电源极性误判;2)推理过程幻觉,如错误假设电流方向。为解决识别错误,引入微调后的YOLO检测器与OpenCV处理,裁剪电源区域,使Gemini能准确重识别极性。为缓解推理错误,设计ngspice驱动的验证循环,仿真差异触发迭代修正,并支持人工介入反馈。实验表明,该流程在标准测试中准确率达97.59%,远超Gemini基线的79.52%。在四类手绘电路图上,准确率从56.06%–71.21%提升至93.94%–95.45%,统计显著。结果表明该框架在工程教育与实际电路分析中具备鲁棒性、可扩展性与实用性。
原文摘要 · Abstract (English)
LLMs have demonstrated strong performance in data-rich domains such as programming, yet their reliability in engineering tasks remains limited. Circuit analysis--requiring multimodal understanding and precise mathematical reasoning--highlights these challenges. Although Gemini 2.5 Pro shows improved capabilities in diagram interpretation and analog-circuit reasoning, it still struggles to consistently produce correct solutions when given both textual problem descriptions and circuit diagrams. Meanwhile, engineering education demands scalable AI tools capable of generating accurate solutions for applications such as automated homework feedback. This paper presents an enhanced end-to-end circuit problem-solving framework built upon Gemini. We first conduct a systematic benchmark on undergraduate circuit problems and identify two key failure modes: 1) circuit-recognition hallucinations, particularly incorrect source polarity detection, and 2) reasoning-process hallucinations, such as incorrect current direction assumptions. To address recognition errors, we integrate a fine-tuned YOLO detector and OpenCV-based processing to isolate voltage and current sources, enabling Gemini to accurately re-identify source polarities from cropped images. To mitigate reasoning errors, we introduce an ngspice-driven verification loop, in which simulation discrepancies trigger iterative solution refinement with optional HITL feedback. Experimental results demonstrate that the proposed pipeline achieves 97.59% accuracy, substantially outperforming Gemini's baseline of 79.52%. Furthermore, on four variations of hand-drawn circuit diagrams, accuracy improves from 56.06%--71.21% to 93.94%--95.45% with statistically significant gains. These results highlight the robustness, scalability, and practical applicability of the proposed framework for engineering education and real-world circuit analysis tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。