Grounded and Faithful P&ID Reasoning: Constraining Vision-Language Models with Recovered Evidence Graphs
Organizations: Tata Research Development and Design Center, Pune, India 411057
Abstract
Piping and Instrumentation Diagrams (P&IDs) are the authoritative maps of process plants: isolation, maintenance, and HAZOP decisions depend on what connects to what. Vision-language models describe these sheets fluently, yet they often invent or miss process connections---and an invented or missed link can reverse an isolation or reachability call, so a plant decision cannot trust a fluent answer that was never checked against the linework. We instead recover an explicit graph of the drawing---its symbols, the process connections between them, and the tags that name them---and then require the model to answer only by querying that graph through seven read-only operators, so a topology claim is returned only when it cites the query results that support it. On TopoPID-VQA, a new suite of 3000 topology questions over these sheets, Graph-Grounded Harness (Ours) raises exact match accuracy from 36.7--41.3% under image-only prompting to 74.3--76.0% for Qwen3-VL-4B, Qwen3-VL-8B, and Gemma-4-E4B. It does so on an imperfect substrate: on Digitize-PID dataset the recovered graph scores F1 0.742 on exact process connections, and 0.801 once symbols and tags are pooled in. The residual errors track that gap---grounding pays off where the recovered graph is right, and perception error still breaks topology questions where it is not.
Figures & tables
| Qwen3-VL-4B | Qwen3-VL-8B | Gemma-4-E4B | ||||
| Level | Img. | Agent | Img. | Agent | Img. | Agent |
| Easy | ||||||
| Medium | ||||||
| Hard | ||||||
| Layer | |||
| Symbols (class-aware) | 0.969 | 0.999 | 0.984 |
| Exact edges | 0.677 | 0.820 | 0.742 |
| Conn. consistency | — | — | 0.958 |
| Symbol tags | 0.792 | 0.954 | 0.866 |
| Line tags | 0.599 | 0.935 | 0.730 |
| Combined tags | — | — | 0.798 |
| Layer / rule | Exact | Exact | Exact | Conn. cons. |
| Process connections | 0.677 | 0.820 | 0.742 | 0.958 |
| Signal (pred. fixed ) | 0.828 | 0.483 | 0.610 | 0.646 |
| Signal (pred. adaptive) | 0.808 | 0.840 | 0.824 | 0.869 |
| Typed complete (adaptive signal) | 0.686 | 0.822 | 0.748 | — |
Appendix figures & tables35 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Mode | mAP50 | mAP50–95 | ||
| Ours (YOLO11s) | tiles | 0.992 | 0.982 | 0.994 | 0.987 |
| YOLOv10n | tiles | 0.989 | 0.979 | 0.994 | 0.983 |
| RT-DETR-L | letterbox | 0.838 | 0.845 | 0.883 | 0.677 |
| YOLO11s | letterbox | 0.784 | 0.783 | 0.824 | 0.613 |
| YOLOv10n | letterbox | 0.291 | 0.488 | 0.281 | 0.180 |
| NMS IoU | Det. | ||
| 0.50 | 0.810 | 1.000 | 0.895 |
| 0.20 | 0.925 | 0.999 | 0.961 |
| 0.10 | 0.969 | 0.998 | 0.983 |
| Backbone | Dice μ | IoU μ | Dice sol | Dice dash | IoU sol | IoU dash |
| Ours (EffNet-B0) | 0.982 | 0.966 | 0.983 | 0.971 | 0.968 | 0.946 |
| MobileNetV2 | 0.980 | 0.961 | 0.981 | 0.969 | 0.963 | 0.942 |
| Setting | Det. | Exact | CER | ||
| YOLO-text (det.) | 0.712 | 0.999 | 0.831 | — | — |
| + pretrained TrOCR (GT crops) | — | — | — | 0.857 | 0.031 |
| Finetuned TrOCR (GT crops) | — | — | — | 0.995 | 0.001 |
| Ours (YOLO-text + finetuned TrOCR) | 0.772 | 0.906 | 0.833 | — | — |
| Qwen3-VL-4B | Qwen3-VL-8B | Gemma-4-E4B | ||||
| Level | Img. | Agent | Img. | Agent | Img. | Agent |
| Easy | 49.0 | 10.0 | 21.0 | 9.7 | 33.3 | 9.0 |
| Medium | 66.7 | 0.0 | 76.5 | 0.0 | 100.0 | 9.8 |
| Hard | 5.1 | 34.1 | 70.6 | 40.8 | 52.2 | 42.0 |
| Setting | Exact edge |
| P&ID Graph Recovery Stack (Ours) | 0.742 |
| Without intersection noding | 0.729 |
| Fixed snap on predicted solids (no adaptive) | 0.193 |
| Predicted boxes + GT lines | 0.777 |
| GT boxes + GT lines (topology) | 1.000 |
| Signal: pred. fixed | 0.610 |
| Stage | Device | s/sheet | 100-sheet total |
| Symbol stitch (YOLO11s) | 2 16 GB GPU | 1.2 | 2 min |
| Line U-Net (EffNet-B0) | 2 16 GB GPU | 4.6 | 8 min |
| Text det. + OCR | 2 16 GB GPU | 22.7 | 38 min |
| Vectorize + graph + tags | CPU | 4 | minutes |
| Oracle re-score | CPU | 0.03 | 3 s |
| Task | System | Primary score |
| OCR | Ours (YOLO-text + TrOCR) | Joint 0.810 |
| OCR | Azure Read | Joint 0.779 |
| OCR | AWS Textract | Joint 0.663 |
| OCR | GCP Vision | Joint 0.151 |
| Symbols | Ours (YOLO11s tiles) | Class-agnostic det. 0.961 |
| Symbols | Azure / GCP / AWS | Nil / Nil / 0.001 |
| System | Det. | Joint | Exact | CER | Pred./sheet |
| Ours (YOLO-text + TrOCR) | 0.833 | 0.810 | 0.971 | 0.008 | 183.3 |
| Azure Read | 0.818 | 0.779 | 0.954 | 0.021 | 163.1 |
| AWS Textract | 0.824 | 0.663 | 0.807 | 0.142 | 162.5 |
| GCP Vision | 0.174 | 0.151 | 0.872 | 0.055 | 385.2 |
| System | Det. | Det. | Det. | Joint | Joint | Joint |
| Ours (YOLO-text + TrOCR) | 0.772 | 0.906 | 0.833 | 0.750 | 0.880 | 0.810 |
| Azure Read | 0.801 | 0.836 | 0.818 | 0.762 | 0.796 | 0.779 |
| AWS Textract | 0.808 | 0.841 | 0.824 | 0.650 | 0.677 | 0.663 |
| GCP Vision | 0.122 | 0.302 | 0.174 | 0.106 | 0.261 | 0.151 |
| System | Det. | Det. | Det. | Class-aware | Pred./sheet |
| Ours (YOLO11s tiles) | 0.925 | 0.999 | 0.961 | 0.961 | 127.76 |
| Azure objects | Nil | Nil | Nil | Nil | Nil |
| GCP Object Localization | Nil | Nil | Nil | Nil | Nil |
| AWS Rekognition | 0.115 | 0.001 | 0.001 | Nil | 0.61 |
| System | Dice micro | IoU micro | Dice mean | |
| Ours (U-Net EffNet-B0) | 0.9823 | 0.9658 | 0.9823 | 100 |
| SAM 2 AMG (union) | 0.0121 | 0.0061 | 0.0098 | 100 |
| SAM 2 AMG (elongated) | 0.0005 | 0.0003 | 0.0006 | 100 |
| DeepLabV3 (COCO) | Nil | Nil | Nil | 100 |
| DeepLabV3+ (VOC) | 0.0009 | 0.0004 | 0.0003 | 100 |
| Group | Tool | Arguments | Behavior |
| Nodes | node_info | {id} | Class name, OCR tag, degree, and sheet coordinates for one node. |
| neighbors | {id} | One-hop neighbor ids with class, tag, degree, and coordinates. | |
| Search | find_nodes | {attr, match, value} | All node ids whose class or tag matches value ( equals or case-insensitive prefix ), with count and a compact attribute table. |
| Paths | bfs | {id, ids?, exclude_ids?, max_hops?} | Hop distances from id ; optional ids restricts the returned map. Unreachable targets receive null . |
| shortest_path | {a, b, exclude_ids?} | Shortest node path a..b (inclusive), or null if none. Optional exclude_ids are not traversed. | |
| edge_exists | {a, b} | Boolean: true iff an undirected process-connection edge is present in . |
| Family | Ans. | Example |
| connected_process | bool | Are marks A and B directly connected by a process line? |
| connection_exists_tag | bool | Is symbol MN-46505 directly connected to symbol RO-10 181? |
| tag_connected_to_mark | bool | Is symbol CS-25 directly connected to mark A? |
| share_neighbor | bool | Do marks A and B share a common directly connected neighbor? |
| has_same_class_neighbor | bool | Does mark A connect to a same-type neighbor? |
| is_branch | bool | Is mark A a branch point ( direct connections)? |
| Family | Ans. | Example |
| reachable_within_k | bool | Is B reachable from A in connections? |
| same_network | bool | Are A and B on the same connected network? |
| same_type_neighbors_at_least_n | bool | Does A have same-type neighbor? |
| exists_type_within_k | bool | Within 2 hops of A, any symbol of B’s type? |
| shared_junction_within_k | bool | A symbol within 2 hops of both A and B? |
| route_via_tag_family | bool | Route A B in hops through a tag family? |
| Family | Ans. | Example |
| more_options_near_a | bool | More named symbols within 3 hops of A than of B? |
| path_avoiding_type | bool | Can A reach B while bypassing C’s component class? |
| counterfactual_reconnect | bool | If A were removed, would B still connect to C? |
| route_comparison | bool | Is A closer to C than B is (hop count)? |
| multi_constraint_option | tag | Tag near A and same type as B (4 options)? |
| all_prefix_in_network | bool | All AB-* tags on same network as A? |
| Level | Boolean | Integer | String | Total |
| Easy | 600 | 400 | 0 | 1000 |
| Medium | 699 | 100 | 201 | 1000 |
| Hard | 699 | 101 | 200 | 1000 |
| Pooled | 1998 | 601 | 401 | 3000 |
| Split | Majority (by answer type) | Random (by answer type) |
| Easy | 64.8 | 35.0 |
| Medium | 42.4 | 37.2 |
| Hard | 39.7 | 37.2 |
| Pooled | 48.1 | 35.6 |
| Model | System | Bool | Int | Str |
| Qwen3-VL-4B | Image-only | 50.3 | 9.7 | 34.9 |
| Graph-Grounded Harness (Ours) | 75.3 | 84.7 | 66.8 | |
| Gold-query ceiling | 89.9 | 92.0 | 79.1 | |
| Qwen3-VL-8B | Image-only | 51.2 | 12.6 | 35.2 |
| Graph-Grounded Harness (Ours) | 75.7 | 82.2 | 61.1 | |
| Gold-query ceiling | 89.9 | 92.0 | 79.1 |
| Level | System | Bool | Int | Str |
| Easy | Image-only | 52.0 | 4.2 | — |
| Graph-Grounded Harness (Ours) | 87.0 | 83.8 | — | |
| Gold-query ceiling | 90.7 | 89.2 | — | |
| Medium | Image-only | 48.8 | 25.0 | 39.3 |
| Graph-Grounded Harness (Ours) | 77.1 | 91.0 | 77.1 | |
| Gold-query ceiling | 92.0 | 100.0 | 82.1 |
| Qwen3-VL-4B | Qwen3-VL-8B | Gemma-4-E4B | |||||||
| Level | |||||||||
| Image-only | |||||||||
| Easy | 52.0 | 53.0 | 52.5 | 57.7 | 28.7 | 38.3 | 53.9 | 39.0 | 45.3 |
| Medium | 48.7 | 66.2 | 56.1 | 50.0 | 69.1 | 58.0 | 50.9 | 69.9 | 59.0 |
| Hard | 51.9 | 4.0 | 7.5 | 49.4 | 62.1 | 55.0 | 50.8 | 52.9 | 51.8 |
| Pooled | 50.1 | 40.4 | 44.7 | 50.8 | 54.4 | 52.6 | 51.5 | 54.6 | 53.0 |
| Level | Category | Image-only | Graph-Grounded Harness (Ours) |
| Easy | |||
| simple_counting | 4.2 | 83.8 | |
| spatial_connections | 52.3 | 90.7 | |
| structural | 51.7 | 83.3 | |
| Medium | |||
| reachability | 50.5 | 91.1 | |
| Level | Category | Image-only | Graph-Grounded Harness (Ours) |
| Easy | |||
| simple_counting | 5.8 | 75.0 | |
| spatial_connections | 54.7 | 91.3 | |
| structural | 53.0 | 85.7 | |
| Medium | |||
| reachability | 44.1 | 81.7 | |
| Level | Category | Image-only | Graph-Grounded Harness (Ours) |
| Easy | |||
| simple_counting | 5.9 | 80.5 | |
| spatial_connections | 53.8 | 88.0 | |
| structural | 52.4 | 80.0 | |
| Medium | |||
| reachability | 49.5 | 95.0 | |
VLM Reasoning
Vision-language model reasoning studies how multimodal systems use visual evidence and language to answer questions, plan, and explain.
See all 853 papers