Graph Edit Distance for LLM Optimization Model Evaluation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing evaluation methods for machine learning models, particularly those using large language models (LLMs), struggle with permutation invariance and accurately identifying model equivalence when solving optimization problems like linear programming word problems (LPWPs).

Innovation Solution

A computer-implemented method is introduced to evaluate the accuracy of hypothesis models (HMs) generated by LLMs by transforming their graphs into the graphs of ground truth models (GTM) using graph edit distance algorithms, allowing for permutation invariance and precise model equivalence assessment.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If existing evaluation methods are used to assess LLM-generated optimization models, then the evaluation process is simple, but the evaluation accuracy is insufficient due to permutation invariance issues and inability to confidently identify model equivalence

Engineering Contradiction:
Improveevaluation accuracyVSAvoidevaluation complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent segments the optimization model into distinct graph components (variables, constraints, objective function) and represents their relationships as graph edges. This segmentation allows for precise comparison of individual model elements while accounting for permutations, thereby improving evaluation accuracy without requiring complex overall model transformations.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces graph edit distance as an intermediary metric to bridge the hypothesis model and ground truth model. This intermediary measurement mechanism enables accurate assessment of model equivalence by quantifying the minimum transformations needed, resolving the issue of confidently identifying whether models are equivalent while maintaining a systematic evaluation framework.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If graph edit distance algorithms are used to transform hypothesis model graphs into ground truth model graphs, then model equivalence can be accurately assessed with permutation invariance, but the computational complexity increases

Engineering Contradiction:
Improvemodel equivalence assessment reliabilityVSAvoidtransformation process complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the graph transformation process into atomic edit operations (node insertions, deletions, substitutions, and edge modifications). By breaking down the complex transformation into discrete, countable steps, the system achieves reliable model equivalence assessment while maintaining a manageable computational framework that can be systematically executed.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes the evaluation parameter from simple model matching to graph edit distance calculation. This parameter transformation enables the system to account for permutations and structural variations in optimization models, significantly improving reliability in equivalence assessment while providing a clear computational metric for the transformation complexity.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20250131059A1Systems and methods for towards human-aligned evaluation for auto-formulating optimization modeling with large language models
Publication Date: 2025.04.24 HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
  • US20250131059A1 patent drawing
  • US20250131059A1 patent drawing
  • US20250131059A1 patent drawing

AI summary

A method of evaluating an ability of a large language model (LLM) to generate an accurate hypothesis model (HM) of a linear programming word problem (LPWP) is provided. An attributed bipartite graph of the HM is transformed into an attributed bipartite graph of the ground truth model of the LPWP. The number of transformation steps required for the transformation effectively measures the ability of the LLM to generate an accurate HM. The use of attributed bipartite graphs provide invariance in the order to LPWP variables and constraints. Corresponding apparatus and systems are also provided.