LLM Fine-Tuning Code Generation Without IP Function Exposure
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for fine-tuning Large Language Models (LLMs) do not adequately address the security risk of generating proprietary Intellectual Property (IP) functions in code, which can lead to potential security breaches.
Innovation Solution
A method and system that identifies IP functions within a code file, iteratively replaces them with native reference codes, assigns unique identifiers, and generates a fine-tuned data file to ensure IP functions are not exposed, thereby ensuring secure code generation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Manufacturing precision
If LLM is fine-tuned with proprietary code to improve code generation capability, then code generation quality is improved, but IP functions may be exposed causing security breaches
Solution Approach 1:
The patent extracts and removes IP functions from the code before fine-tuning the LLM. The system identifies IP functions through pattern matching and replacement markers, then generates synthetic training data that excludes these sensitive functions, thereby preventing their exposure to the model while maintaining overall code generation capability
Solution Approach 2:
The patent introduces an intermediary processing layer between the original code and the LLM training data. This intermediary system includes an IP function detector that analyzes code, a replacer that substitutes IP functions with safe placeholders, and a synthetic data generator that creates training data from the processed code, thus mediating between code quality requirements and security concerns
2Object-affected harmful factors
If IP functions are removed from code to prevent security breaches, then security is improved, but code functionality may be lost
Solution Approach 1:
The patent creates synthetic copies of code functionality that exclude IP functions. Instead of removing all functional elements, the system generates artificial training data that replicates general coding patterns and logic while substituting specific IP functions with placeholders, thereby maintaining educational value and functional learning without exposing proprietary code
Solution Approach 2:
The patent changes the state of code from original proprietary form to processed synthetic form. The system modifies code parameters by replacing IP function identifiers with placeholder markers and generating variations of code structures that maintain functionality while removing sensitive information, thus balancing security and functionality
Data Source
AI summary
This disclosure relates to method and system for generating fine-tuning code for Large Language Models (LLMs). The method may include identifying one or more Intellectual Property (IP) functions within a code in a code file. Upon identifying the one or more IP functions, the method may further include flattening each of the one or more IP functions by replacing each of the one or more IP functions with a corresponding native reference code. The method may further include assigning a unique identifier to the corresponding native reference code associated with each of the one or more IP functions. The method further includes generating a fine-tuned data file comprising the fine-tuned code corresponding to the code file, in response to assigning.


