Machine learning project permission compliance analysis method based on semantic modeling and rule reasoning
By employing semantic modeling and rule-based reasoning, the complexity of license compliance analysis in machine learning workflows is addressed, enabling automated compliance checks during model training, combination, and deployment, thereby improving the accuracy and interpretability of the analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- EAST CHINA NORMAL UNIV
- Filing Date
- 2026-02-06
- Publication Date
- 2026-05-15
AI Technical Summary
Existing license compliance analysis technologies cannot effectively characterize the complex dependencies in machine learning workflows, resulting in unclear rights boundaries and ambiguous inheritance of obligations during the reuse and dissemination of model assets, making it difficult to meet the needs of systematic and automated compliance analysis.
By adopting a semantic modeling and rule-based reasoning approach, the machine learning workflow is abstracted into a unified semantic graph structure. The type, relationship, and license attributes of each component are represented by an RDF graph. An automatic reasoning engine is used to automatically infer the structure completion and license propagation relationship. Combined with license semantic rules, legal semantic interpretation and rights relationship inference are performed to achieve automated compliance detection throughout the entire process.
It enables systematic compliance testing of machine learning workflows, overcoming the limitations of traditional license analysis, significantly improving the accuracy and interpretability of compliance analysis, and providing clear compliance reporting support.
Smart Images

Figure CN122046316A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine learning and automatic detection technology, specifically a machine learning project license compliance analysis method based on semantic modeling and rule reasoning. Background Technology
[0002] With the rapid development of artificial intelligence technology, machine learning models are widely used in scientific research and industry. Current mainstream machine learning projects typically adopt a modular and pipelined development approach. Their development processes often include multiple stages such as pre-trained model invocation, dataset usage, model fine-tuning, model combination, and service deployment, forming a complex machine learning workflow with diverse dependencies. In this process, models, datasets, and software components usually originate from different rights holders and are subject to different types of licenses, such as open-source software licenses, data content licenses, and model-specific licenses. However, existing license systems are primarily designed for traditional software or content works and are difficult to directly adapt to the training, inference, distillation, model combination, and service distribution behaviors prevalent in the machine learning field. This leads to problems such as unclear rights boundaries and ambiguous inheritance of obligations during the reuse and dissemination of model assets.
[0003] Currently, license compliance analysis mainly focuses on dependency scanning at the software package level, determining compliance by identifying license statements in source code files. This type of technology relies on static code structures and cannot effectively characterize the complex dependencies inherent in machine learning workflows, such as knowledge transfer, model composition, and output services. It also fails to reflect the true propagation path of licenses during model training and deployment.
[0004] In summary, existing license compliance technologies cannot perform structured modeling of machine learning workflows, cannot automatically deduce license propagation relationships between model components, and are difficult to detect license conflicts in complex scenarios. Therefore, they cannot meet the need for systematic and automated license compliance analysis of machine learning projects. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing technologies by providing a machine learning project license compliance analysis method based on semantic modeling and rule reasoning. This method employs a unified semantic framework to model the machine learning workflow in a unified manner, and combines license semantic rules to automatically reason and analyze the rights relationships between various types of assets and their operational behaviors, including code, datasets, and models. This enables systematic compliance detection of complex machine learning workflows. The method is simple and effectively solves the problems of being unable to perform structured modeling of machine learning workflows, being unable to automatically deduce license propagation relationships between model components, and being difficult to detect license conflicts in complex scenarios. It achieves automated compliance detection throughout the entire process of model training, combination, and deployment.
[0006] The specific technical solution for achieving the objective of this invention is: a machine learning project license compliance analysis method based on semantic modeling and rule reasoning, characterized in that the method specifically includes the following steps: S1: Workflow Abstraction Modeling: Obtain the machine learning workflow described by the user in Python language, abstract the models, datasets, software components and their operation behaviors involved into Work entities and Action entities, and record the input-output relationships between each entity and the initial license information.
[0007] S2: Semantic Graph Construction Based on the predefined MG Vocabulary ontology structure, the above-mentioned work entities and operation entities are converted into a unified RDF workflow diagram using the Resource Description Framework (RDF) parsing tool, and the type, relationship and license attributes of each component are represented in the form of triples.
[0008] S3: Structural Completion Reasoning Steps Using Notation3 rule files, the automatic inference engine completes the structure of the RDF workflow graph, automatically deriving input-output chains, combination relationships, and inclusion relationships, so that the workflow graph achieves a closed state at the structural level.
[0009] S4: Definition-dependent reasoning Based on the semantic rules of licenses, the legal semantic interpretation of each operation is performed to determine the definitional relationship between the output work and the input work, and the legal attributes and applicable licenses of the intermediate work are recursively derived.
[0010] S5: Rights Use Dependency Reasoning After determining the licenses for each work, the required set of rights is derived based on the type of operation, and the request relationship between operation and rights is generated to describe the rights requirements of a specific operation.
[0011] S6: Basic Consistency Analysis The system checks the consistency between the license type and the work type, analyzes the revocability and potential uncertainties of the license, and generates basic compliance information.
[0012] S7: Permission Grant Analysis Verify whether the license explicitly grants the requested rights to the operation, and detect issues such as missing rights, invalid authorizations, or reserved rights.
[0013] S8: Conflict Analysis Conflict detection is performed on multi-license combination scenarios to identify issues such as re-licensing conflicts, license incompatibility, and conflicting restrictions.
[0014] S9: Output Results The reasoning and analysis results are filtered and organized to output a structured compliance analysis report and a visualized RDF workflow diagram.
[0015] Compared with the prior art, the present invention has the following beneficial technical effects and significant technical progress: 1) This invention achieves a unified expression of multiple types of assets, such as models, datasets, and software components, by modeling machine learning workflows as a unified semantic graph structure, breaking through the limitation of traditional software license analysis being applicable only to code dependencies.
[0016] 2) This invention introduces a rule-based reasoning mechanism, which can automatically deduce the definition dependencies and rights usage dependencies between components, thereby achieving automated analysis of license propagation relationships.
[0017] 3) This invention can cover complex application scenarios such as model training, fine-tuning, combination and service release, and significantly improve the accuracy and interpretability of license compliance analysis for machine learning projects.
[0018] 4) This invention outputs compliance analysis results through structured risk reports, providing clear and actionable technical support for model asset management and compliance decision-making. Attached Figure Description
[0019] Figure 1 This is the system architecture framework of the present invention; Figure 2 This is the rule-based reasoning workflow of the present invention; Figure 3 This is a component architecture diagram in an ML workflow. Detailed Implementation
[0020] See Figures 1-2This invention employs a method of constructing a unified semantic framework to uniformly model machine learning workflows. Combined with license semantic rules, it automatically infers and analyzes the rights relationships between various types of assets, including code, datasets, and models, and their operational behaviors. This enables systematic compliance detection of complex machine learning workflows. Specifically, it includes the following steps: S1: Workflow Abstraction Modeling Obtain the machine learning workflow described by the user in Python, abstract the models, datasets, software components and their operational behaviors involved into Work entities and Action entities, and record the input-output relationships between each entity and the initial license information.
[0021] S2: Semantic Graph Construction Steps Based on a predefined vocabulary, the above-mentioned work entities and operation entities are converted into a unified RDF workflow diagram using RDF parsing tools, representing the type, relationship, and license of each component in the form of triples.
[0022] S3: Structural Completion Reasoning Using Notation3 rule files, the automatic inference engine completes the structure of the RDF workflow graph, automatically deriving input-output chains, combination relationships, and inclusion relationships, so that the workflow graph achieves a closed state at the structural level.
[0023] S4: Definition-dependent reasoning Based on the semantic rules of licenses, the legal semantic interpretation of each operation is performed to determine the definitional relationship between the output work and the input work, and the legal attributes and applicable licenses of the intermediate work are recursively derived.
[0024] S5: Rights Use Dependency Reasoning After determining the licenses for each work, the required set of rights is derived based on the type of operation, and the request relationship between operation and rights is generated to describe the rights requirements of a specific operation.
[0025] S6: Basic Consistency Analysis The system checks the consistency between the license type and the work type, analyzes the revocability and potential uncertainties of the license, and generates basic compliance information.
[0026] S7: Permission Grant Analysis Verify whether the license explicitly grants the requested rights to the operation, and detect issues such as missing rights, invalid authorizations, or reserved rights.
[0027] S8: Conflict Analysis Conflict detection is performed on multi-license combination scenarios to identify issues such as re-licensing conflicts, license incompatibility, and conflicting restrictions.
[0028] S9: Output Results The reasoning and analysis results are filtered and organized to output a structured compliance analysis report and a visualized RDF workflow diagram.
[0029] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Example
[0030] See Figure 1 This invention consists of three layers: semantic modeling, rule reasoning, and compliance analysis, as detailed below: 1) In the semantic modeling phase, the system uniformly maps over 40 existing mainstream licenses to semi-structured semantic rules based on the Turtle format, covering three major categories: open-source software licenses, free content licenses (including dataset licenses), and model licenses. Addressing the issues of inconsistent terminology and significant differences in applicable objects among different licensing frameworks, this invention employs three techniques—fuzzy formal matching, combination-based rule alignment, and generalization of applicable terms—to uniformly abstract and encode license terms. This enables objects such as "source code" in the software domain, "work" in the content domain, and "weights or parameters" in the model domain to be expressed in the same semantic space and to form a reasonable correspondence with Action types in the workflow.
[0031] 2) In the rule reasoning phase, the system performs multi-stage reasoning processing on the RDF workflow graph based on Notation3 rules and the EYE inference engine. The reasoning process sequentially goes through the Construction Stage, Reasoning Stage, and Analysis Stage: the construction stage completes the structural relationships between components; the reasoning stage recursively derives and defines dependencies and usage rights dependencies; and the analysis stage performs rule matching and risk assessment on the reasoning results. This multi-stage mechanism ensures layer-by-layer abstraction and interpretable reasoning from low-level structural modeling to high-level legal semantic analysis.
[0032] 3) In the compliance analysis module, the system automatically identifies and classifies compliance risks in the model workflow based on the results of rule reasoning, from multiple dimensions such as license type consistency, authorization revocability, work type compatibility, and re-licensing compatibility, and generates corresponding structured risk report items according to three severity levels: error, warning, and notification.
[0033] See Figure 2 The rule-based reasoning workflow of this invention is mainly divided into a Construction Stage, a Reasoning Stage, and an Analysis Stage.
[0034] 1) The core function of the Construction Stage is to transform the machine learning workflow described by the user in programmatic form into a formalized, structured, and machine-understandable knowledge representation. This stage uses a unified semantic ontology to abstract the models, datasets, services, and operational behaviors that were originally scattered throughout the code into standardized work entities and operational nodes, explicitly depicting their input-output relationships and combinatorial structures. Simultaneously, the system uses rule-based reasoning to complete the implicit hierarchical and dependency relationships, enabling the entire workflow to achieve a structurally closed state, providing a semantically complete and unambiguous foundational workflow graph for subsequent legal semantic reasoning.
[0035] The rule-based reasoning workflow of this invention is as follows: S1: Describing ML workflows using Python Users write machine learning workflow scripts in Python, using a set of predefined APIs (such as Register, Combine, Train, Publish, etc.) to explicitly describe work entities such as models, datasets, code, and services, as well as the order of operations and data flow relationships between them.
[0036] S2: Convert to RDF graph This invention, based on the ontology structure defined in MG Vocabular, parses workflow objects in Python and converts them into Turtle-formatted RDF triples. This process generates a Work instance for each work entity, an Action instance for each operation, and explicitly establishes basic semantic information such as input-output relationships, operation types, initial licenses, and target objects, ultimately forming an initial RDF workflow graph.
[0037] S3: Complete composite dependencies The system uses Notation3 rule files and the EYE inference engine to perform structural completion inference on the RDF graph. This step automatically derives implicit structures such as input-output chains, inclusion and nesting relationships of composite structures, so that the entire workflow graph reaches a closed state at the structural level, that is, all combinations and hierarchical relationships are explicitly represented.
[0038] 2) The goal of the Reasoning Stage is to deduce all implicit legal semantic relationships and license dissemination results based on a well-structured workflow diagram. This stage simulates the logic of legal clauses through a rule system, mapping technical operational behaviors to legal semantic results such as "derivative relationships," "license dissemination," and "rights claims," thereby automatically determining the license status of intermediate works.
[0039] S4: Definition Dependencies Based on the rules defined in the LicenseRule, the system interprets the legal semantics of each Action, determining the legal relationship (e.g., derivative work, collective work, independent work) of its output work. By creating and propagating ruling relationships, the system recursively infers the legal attributes of intermediate works and ultimately automatically determines the applicable license for all Works that are not yet clearly defined.
[0040] S5: Reasoning about Rights-Using Dependencies After all work licenses are determined, the system further deduces the actual set of rights required for each Action type (such as usage rights, modification rights, redistribution rights, commercial rights, etc.). By generating request relationships, the system explicitly represents the specific rights required for a particular operation as inferable facts, providing a foundation for subsequent permission and license compliance analysis.
[0041] 3) The core function of the Analysis Stage is to conduct a systematic compliance review and risk assessment of the entire machine learning workflow based on the derived license status, defined relationships, and rights requirements. This stage uses multi-layered rules to detect fundamental consistency issues, authorization issues, and cross-license conflicts, transforming abstract legal semantics into interpretable compliance conclusions.
[0042] S6: Base Analysis The system checks the basic consistency between each work and its license, such as whether the license is suitable for this type of work, whether the license is revocable, and whether there are any potential uncertainties. This stage mainly outputs warning-level issues to indicate risks but does not directly determine illegality.
[0043] S7: Rights Granting Analysis The system matches each request to verify whether the corresponding license explicitly grants the requested rights, or whether there are any reservations, restrictions, or conditional authorizations. If an operation is found to request ungranted rights, an error or critical warning is generated, indicating a substantial compliance issue in the workflow.
[0044] S8: Conflict Analysis The system detects complex conflict scenarios involving multiple license combinations, including incompatible license combinations, illegal sublicensing, and derivative works violating upstream restrictions. This analysis relies on ruling relationships and license rules to uncover deep-seated legal conflicts across levels and components.
[0045] S9: Result Filtering and Output The system filters, aggregates, and categorizes all reasoning results and analysis conclusions, retaining only those crucial to the user's decision-making. The final output is a structured RDF report containing information such as Notices, Warnings, and Errors, helping users understand the overall compliance status of their workflow.
[0046] See Figure 3 In this invention, the machine learning (ML) workflow is uniformly abstracted into a directed graph structure to systematically characterize the dependencies and propagation paths between various components. The core idea is to treat models, datasets, and software components as work entities, and each step in the machine learning workflow as an action node in the graph, with data flow and dependencies between steps abstracted as directed edges. The workflow starts from the beginning, and each operation adds a new node to the graph, establishing a directed connection from the previous node to the current node. This layered approach allows the entire workflow to form a coherent graph structure, completely recording the entire path from raw resources to the final output.
[0047] Within this unified directed graph modeling framework, this invention further summarizes and generalizes three representative types of component dependencies: composition dependency, definition dependency, and right-use dependency. These three types are not an exhaustive classification of dependencies, but rather typical patterns abstracted from numerous real-world ML workflows, used to cover the most common and critical dependency propagation scenarios.
[0048] The aforementioned composite dependency describes the inclusion relationship and dissemination method of different works at the content level. Independent of any specific license terms, it is an objective depiction of the workflow structure itself, such as... Figure 3As shown by the red lines in the diagram, composition dependencies are further subdivided into four basic modes: Mixwork, Subwork, Auxwork, and Provenance. The term "hybrid work" refers to an output work that contains the content of an input work, either as a whole or in part, such as model merging, code splicing, or dataset assembly. This type of dependency means that any exercise of rights to the output work will inevitably affect the included input work, and the dependency relationship has strong propagation characteristics. The term "sub-work" refers to an input work used by the output work and designed to be released together with the output work, such as embedding a third-party model as a submodule into the overall system. In this case, not only the usage license of the input work itself needs to be considered, but also the licensing obligations that may arise in redistribution scenarios. The term "auxiliary work" refers to an input work used only as an auxiliary resource, such as training data, distilled teacher models, or evaluation benchmarks. This type of work is not released with the output work, and dependency propagation is limited to the training or generation stage, not directly affecting the release license of the output work. The term "source work" is used to indicate a situation where the input and output are essentially the same work during license registration or declaration, such as renaming or version registration of the same model. In this case, the dependency relationship terminates at this node and no longer propagates forward. By distinguishing the above-mentioned composite dependencies, the propagation path and boundaries of dependencies in the workflow can be accurately modeled without introducing legal semantics.
[0049] The defined dependencies are used to introduce license semantics, providing legal interpretation and constraints on composite dependencies, such as... Figure 3 As shown by the blue lines, the core of this approach lies in determining whether different works constitute derivative works, duplications, or independent works. At this layer, the system binds each work to its corresponding license type and, based on a predefined rule base, determines whether the output work inherits the licensing obligations of the input work under specific combinations. For example, under a strong copyleft license, hybrid works and partial sub-works are often considered derivative works, triggering the continued propagation of licensing obligations. However, under a lenient license or in scenarios where the work only constitutes an auxiliary work, it may still be considered an independent work, without requiring additional constraints on the output work. Definition dependencies exhibit recursive propagation characteristics; that is, a derivative of a derivative usually remains a derivative work, and its legal attributes continue to propagate down the workflow, forming a chain of obligations that can be automatically inferred.
[0050] The aforementioned rights-based dependence describes, from a behavioral perspective, the rights conditions required to perform specific operations, serving to connect the work-based dependence with the actual usage scenario, such as... Figure 3As shown by the light green lines, this type of dependency centers on operational entities, abstracting behaviors such as training, fine-tuning, publishing, selling, and deploying, and mapping them to corresponding sets of rights. For example, when performing a Train or Fine-tune action, the right to use or modify the input work is required; when performing a Publish or Sell action, the right to redistribute, commercial use, and possible sublicenses are required; when providing the model as an API, it is also necessary to further determine whether the remote access or network use terms in the license are triggered. Rights-based dependencies, by explicitly associating actions with rights, enable the system to determine whether an operation is permitted by the current license set in a specific scenario.
[0051] By unifying the modeling of compositional dependencies, definitional dependencies, and rights-based dependencies, this invention realizes a structured, rule-based, and automated ML workflow license analysis framework. This transforms the legal constraint problem in complex workflows into a dependency propagation and rights matching problem on a graph structure, thereby providing a technical foundation for large-scale model asset management and compliance review.
[0052] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements made without departing from the principle of the present invention should be considered within the scope of protection of the present invention.
Claims
1. A machine learning project license compliance analysis method based on semantic modeling and rule reasoning, characterized in that, The method specifically includes the following steps: Step S1: Workflow Abstraction Modeling Obtain the machine learning workflow described by the user in Python, abstract the models, datasets, software components and their operational behaviors involved into work entities and operation entities, and record the input / output relationships between each entity and the initial license information; Step S2: Semantic Graph Construction Based on a predefined vocabulary, the above-mentioned work entities and operation entities are converted into a unified RDF workflow diagram using a resource description framework parsing tool, and the type, relationship and license attributes of each component are represented in the form of triples. Step S3: Structural Completion Reasoning By using the rule file and the automatic reasoning engine, the RDF workflow graph is structurally completed, and the input / output chains, combination relationships and inclusion relationships are automatically derived, so that the workflow graph achieves a closed state at the structural level. Step S4: Define dependency reasoning Based on the semantic rules of licenses, the legal semantic interpretation of each operation is performed to determine the definitional relationship between the output work and the input work, and the legal attributes and applicable licenses of the intermediate work are recursively derived. Step S5: Rights Use Dependency Reasoning After determining the licenses for each work, the required set of rights is derived based on the type of operation, and the request relationship between operation and rights is generated to describe the specific operation's demand for rights; Step S6: Basic Consistency Analysis The system checks the consistency between the license type and the work type, analyzes the revocability and potential uncertainties of the license, and generates basic compliance information. Step S7: Permission Grant Analysis Verify whether the license explicitly grants the rights requested by the operation, and detect issues such as missing rights, invalid authorizations, or reserved rights. S8: Conflict Analysis Steps Perform conflict detection on multi-license combination scenarios to identify re-licensing conflicts, license incompatibility, and restriction conflicts; S9: Output Results The results of reasoning and analysis are filtered and organized to output structured compliance analysis reports and visualized RDF workflow diagrams.