Rule Structure Embedding for Code Reuse

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Converting thousands of natural language rules into computer program code is challenging due to the difficulty in finding structurally similar rules for code reuse, as existing methods struggle to effectively embed the structure of complex rules into machine-readable vectors.

Innovation Solution

A method using machine learning models to preprocess natural language rules by replacing terms with dummy tokens, generating dependency graphs, canonical graphs, and machine-readable vectors that represent the rule structure, allowing for comparison and identification of structurally similar rules for code reuse.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If natural language rules are converted directly into computer program code, then the conversion process is simple, but the ability to find structurally similar rules for code reuse is poor

Engineering Contradiction:
Improvecode conversion simplicityVSAvoidcode reuse capability
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

The patent introduces an intermediary representation layer (dependency graph with dummy tokens) between natural language rules and machine-readable vectors. This intermediary structure captures semantic relationships and enables structural similarity comparison, allowing code reuse while maintaining conversion simplicity through automated processing pipelines.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent transforms rules through multiple parameter changes: replacing terms with dummy tokens, generating dependency graphs, creating canonical versions, and converting to machine-readable vectors. These parameter transformations enable structural comparison and code reuse while maintaining the original rule semantics.

Inventive Principle:
Principle #35Parameter changes

2Adaptability or versatility

If multiple processing steps are applied to embed rule structure into machine-readable vectors, then the ability to compare and reuse code improves, but the processing complexity increases

Engineering Contradiction:
Improvestructural similarity comparisonVSAvoidprocessing pipeline complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent segments the complex processing pipeline into distinct functional modules: pre-processing (term replacement), dependency graph generation, canonicalization, and vector embedding. Each module handles a specific transformation step, making the overall complex process manageable and maintainable while achieving effective structural comparison.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent replaces manual rule comparison mechanisms with automated machine learning models that generate machine-readable vectors. This substitution eliminates the need for complex manual similarity assessment while handling the computational complexity of processing thousands of rules.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

3Manufacturing precision

If manual conversion of natural language rules into code is performed, then the quality of code generation is high, but the conversion speed and productivity are low

Engineering Contradiction:
Improvecode generation qualityVSAvoidconversion speed
Core Design Contradiction:
Manufacturing precisionVSProductivity

Solution Approach 1:

The patent implements self-service through automated processing where the system converts natural language rules into code without requiring manual intervention for each conversion. The automated pipeline maintains quality through structured processing while dramatically increasing productivity by handling thousands of rules efficiently.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent enables code reuse by generating machine-readable vectors that capture rule structures, allowing the system to copy and adapt existing code patterns to similar rules. This copying mechanism maintains code generation quality while significantly improving productivity through reuse rather than rewriting.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS11409959B2Representation learning for tax rule bootstrapping
Publication Date: 2022.08.09 INTUIT INC
  • US11409959B2 patent drawing
  • US11409959B2 patent drawing
  • US11409959B2 patent drawing

AI summary

A rule having text is pre-processed by replacing terms with dummy tokens. A first machine learning model (MLM) uses the dummy tokens to generate a dependency graph with nodes related by edges tagged with dependency tags. A second MLM uses the dependency graph to generate a canonical version with node labels. The node labels are sorted into a lexicographic order to form a document. A third MLM uses the document to generate a machine readable vector (MRV) that embeds the document as a sequence of numbers representative of a structure of the rule. The MRV is compared to additional MRVs corresponding to additional rules for which computer useable program code blocks have been generated. A set of MRVs is identified that match the MRV within a range. The set of MRVs correspond to a set of rules from the additional rules. The set of rules is displayed to a user.