Prefix-Tuning Custom Source Code Models

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Deep learning models require extensive time and resources for training, and fine-tuning these models on downstream tasks can be impractical due to the need to store and update gradients for all parameters, especially when computing resources are limited.

Innovation Solution

The development of a custom deep learning model by prefix-tuning a pre-trained model, where only the prefix embeddings or weights are updated while freezing the model parameters, allowing for distributed tuning across user and model spaces to preserve data privacy.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If all parameters of the deep learning model are updated during fine-tuning, then the model can be tailored for a particular downstream task, but the computational resources and memory required become impractical when the model utilizes a large number of parameters

Engineering Contradiction:
Improvemodel customization for downstream taskVSAvoidcomputational resources
Core Design Contradiction:
Adaptability or versatilityVSUse of energy by moving object

Solution Approach 1:

The patent segments the model parameters into two distinct groups: task-specific parameters that are updated during fine-tuning and pre-trained parameters that are frozen. This segmentation allows the model to be customized for downstream tasks while avoiding the computational burden of updating all parameters, thus resolving the contradiction between adaptability and computational resource usage.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies local quality by updating only the specific parameters that are most relevant to the downstream task (embedding layers, output layers, and task-specific layers) while keeping the majority of pre-trained parameters frozen. This localized parameter update approach enables effective task adaptation with significantly reduced computational resources compared to updating all parameters.

Inventive Principle:
Principle #3Local quality

2Adaptability or versatility

If all parameters of the deep learning model are updated during fine-tuning, then the model can be optimized for the downstream task, but the training time and cost increase significantly

Engineering Contradiction:
Improvemodel optimization for downstream taskVSAvoidtraining time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

By segmenting parameters into task-specific and pre-trained groups, the patent reduces the number of parameters that require gradient computation and updates during fine-tuning. This segmentation dramatically decreases training time while still achieving effective optimization for the downstream task through focused updates on the task-specific parameter subsets.

Inventive Principle:
Principle #1Segmentation

3Manufacturing precision

If the entire training dataset is passed through the neural network in multiple iterations, then the hyperparameters can be optimized to meet the target objective, but the training process becomes iterative and time-consuming

Engineering Contradiction:
Improvehyperparameter optimizationVSAvoidtraining efficiency
Core Design Contradiction:
Manufacturing precisionVSProductivity

Solution Approach 1:

The patent applies partial action by updating only a subset of parameters (task-specific parameters) rather than all parameters during fine-tuning. This partial parameter update approach maintains sufficient optimization capability for hyperparameter tuning while dramatically improving training efficiency by reducing the computational workload in each iteration.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS12242822B2Custom models for source code generation via prefix-tuning
Publication Date: 2025.03.04 MICROSOFT TECHNOLOGY LICENSING LLC
  • US12242822B2 patent drawing
  • US12242822B2 patent drawing
  • US12242822B2 patent drawing

AI summary

Custom source code generation models are generated by tuning a pre-trained deep learning model by freezing the model parameters and optimizing a prefix. The tuning process is distributed across a user space and a model space where the embedding and output layers are performed in the user space and the execution of the model is performed in a model space that is isolated from the user space. The tuning process updates the embeddings of the prefix across the separate execution spaces in a manner that preserves the privacy of the data used in the tuning process.