# US 2023/0067364 A1 · Transfer learning system for automated software engineering tasks

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0067364 A1
- Document ID: US20230067364A1
- Status: Published application
- Kind: A1
- Application number: 17/981,440
- Filed: 2022-11-06
- Published: 2023-03-02
- Earliest claimed: 2020-05-15
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC.
- Inventors: COLIN BRUCE CLEMENT; DAWN DRAIN; NEELAKANTAN SUNDARESAN; ALEXEY SVYATKOVSKIY
- Web page: https://patentgrep.com/patent/US20230067364A1

## CPC

- G06F 8/20: Software design
- G06N 3/088: Non-supervised learning, e.g. competitive learning
- G06F 8/30: Creation or generation of source code
- G06F 8/35: model driven
- G06F 8/51: Source to source
- G06F 40/30: Semantic analysis
- G06F 40/40: Processing or translation of natural language (natural language analysis G06F40/20; semantic analysis G06F40/30)
- G06N 3/045: Combinations of networks
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/0495: Quantised networks; Sparse networks; Compressed networks
- G06N 3/0499: Feedforward networks
- G06N 3/082: modifying the architecture, e.g. adding, deleting or silencing nodes or connections
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 3/09: Supervised learning
- G06N 3/096: Transfer learning
- G06F 8/427: {Parsing}
- G06F 8/71: Version control (security arrangements therefor G06F21/57); Configuration management
- G06F 8/73: Program documentation
- G06N 3/04: Architecture, e.g. interconnection topology
- G06N 3/063: using electronic means
- G06N 3/08: Learning methods
- G06N 20/00: Machine learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A transfer learning system is used for the development of neural transformer models pertaining to software engineering tasks. The transfer learning system trains source code domain neural transformer models with attention in various configurations on a large corpus of unsupervised training dataset of source code programs and/or source code-related natural language text. A web service provides the trained models for use in developing a model that may be fine-tuned on a supervised training dataset associated with a software engineering task thereby generating a tool to perform the software engineering task.

## Claims

### Claim 1

A web service, comprising:
a storage server including a custom training dataset;
a first computing device having a first processor and a first memory device, wherein the first memory device includes a plurality of source code domain neural transformer models with attention, the plurality of source code domain neural transformer models with attention including an encoder-only neural transformer with attention, a decoder-only neural transformer with attention and/or an encoder-decoder neural transformer with attention, wherein each of the plurality of source code domain neural transformer models with attention associated with a select software engineering task;
wherein the first memory device includes a program including instructions that perform actions to:
receive a request for a custom neural transformer model with attention to perform a requested software engineering task;
obtain the custom training dataset;
select one of the plurality of source code domain neural transformer models with attention associated with the requested software engineering task; and
fine-tune the select one of the plurality of source code domain neural transformer models with attention with the custom training dataset to generate the custom neural transformer model with attention.

### Claim 2 (depends on 1)

The web service of claim 1,
wherein each of the plurality of source code domain neural transformer models with attention includes a standard memory size and a standard model size, wherein the standard model size indicates a number of transformer blocks.

### Claim 3 (depends on 2)

The web service of claim 2,
wherein the request includes a requested memory size that differs from the standard memory size of the plurality of source code domain neural transformer models with attention, and
wherein the program includes instructions that perform actions to:
prior to fine-tune the select one of the plurality of source code domain neural transformer models with attention with the custom training dataset:
choose the selected one of the plurality of source code domain neural transformer model with attention with a largest standard memory size closest to the requested memory size; and
reduce a number of transformer blocks of the selected one of the plurality of source code domain neural transformer models with attention to fit the requested memory size.

### Claim 4 (depends on 2)

The web service of claim 2,
wherein the request includes a requested model size that differs from the standard model size of the plurality of source code domain neural transformer models with attention, and
wherein the program includes instructions that perform actions to:
prior to fine-tune the select one of the plurality of source code domain neural transformer models with attention with the custom training dataset:
choose the selected one of the plurality of source code domain neural transformer model with attention with a largest standard model size closest to the requested model size; and
reduce a number of transformer blocks of the selected one of the plurality of source code domain neural transformer model with attention to fit the requested model size.

### Claim 5 (depends on 3)

The web service of claim 3,
wherein the program includes instructions that perform actions to:
calculate a scaling factor to determine the model size to accommodate the requested memory size; and
reduce the number of transformer blocks based on the scaling factor.

### Claim 6 (depends on 1)

The web service of claim 1,
wherein each of the plurality of source code domain neural transformer models with attention is pre-trained on an unsupervised training dataset of source code.

### Claim 7

A computer-implemented method, comprising:
providing a plurality of source code domain neural transformer models with attention, wherein each of the plurality of source code domain neural transformer models includes a memory size and a model size, wherein the model size indicates a number of transformer blocks;
receiving, through a network, a request for a custom neural transformer model with attention, wherein the request includes a configuration of transformer blocks of the custom neural transformer model with attention; and
when none of the plurality of source code domain neural transformer models with attention meets the requested configuration of transformer blocks:
selecting one of the plurality of source code domain neural transformer models with attention associated with a larger model size closest to the requested configuration of transformer blocks;
eliminating select ones of the transformer blocks of the selected one of the plurality of source code domain neural transformer models with attention; and
fine-tuning the select one of the plurality of source code domain neural transformer models with attention with the custom training dataset to generate the custom neural transformer model with attention.

### Claim 8 (depends on 7)

The computer-implemented method of claim 7, comprising:
when at least one of the plurality of source code domain neural transformer models with attention meets the requested configuration, fine-tuning the at least one of the plurality of source code domain neural transformer models with attention with the custom training dataset to generate the custom neural transformer model with attention.

### Claim 9 (depends on 7)

The computer-implemented method of claim 7,
wherein eliminating select ones of the transformer blocks of the selected one of the plurality of source code domain neural transformer models with attention, further comprises:
computing a scaling factor to determine a number of transformer blocks to eliminate from the selected one of the plurality of source code domain neural transformer models with attention.

### Claim 10 (depends on 7)

The computer-implemented method of claim 7, wherein fine-tuning the select one of the plurality of source code domain neural transformer models with attention comprises:
distilling the select one of the plurality of source code domain neural transformer models with attention to fit the model size and/or the memory size.

### Claim 11 (depends on 9)

The computer-implemented method of claim 9, wherein the plurality of source code domain neural transformer models with attention includes an encoder-only neural transformer with attention, a decoder-only neural transformer with attention and/or an encoder-decoder neural transformer with attention, wherein each of the plurality of source code domain neural transformer models with attention associated with a select software engineering task.

### Claim 12 (depends on 7)

The computer-implemented method of claim 7,
wherein the select one of the plurality of source code domain neural transformer models with attention is an encoder-only neural transformer with attention associated with a software classification task,

### Claim 13 (depends on 12)

The computer-implemented method of claim 12,
wherein fine-tuning the select one of the plurality of source code domain neural transformer models with attention with the custom training dataset to generate the custom neural transformer model with attention, further comprises:
replacing an output layer of the encoder-only neural transformer with attention with a classification layer.

### Claim 14 (depends on 11)

The computer-implemented method of claim 11, wherein the decoder-only neural transformer model with attention is associated with an auto-regressive software task.

### Claim 15 (depends on 11)

The computer-implemented method of claim 11, wherein the encoder-decoder neural transformer model with attention is associated with sequence-to-sequence software translation tasks.

### Claim 16

A computer-implemented method, comprising:
accessing a plurality of pre-trained source code domain neural transformer models with attention, the plurality of source code domain neural transformer models with attention including an encoder-only neural transformer with attention, a decoder-only neural transformer with attention and/or an encoder-decoder neural transformer with attention, each of the plurality of pre-trained source code domain neural transformer models associated with a software engineering task;
obtaining a supervised training dataset for a specific software engineering task;
selecting one of the plurality of pre-trained source code domain neural transformer models with attention associated with the specific software engineering task; and
fine-tuning the selected one of the plurality of pre-trained source code domain neural transformer models with attention with the supervised training dataset to perform the specific software engineering task.

### Claim 17 (depends on 16)

The computer-implemented method of claim 16,
wherein the selected one of the plurality of pre-trained source code domain neural transformer models with attention includes a model size, and
wherein the fine-tuning the selected one of the plurality of source code domain neural transformer models with attention further comprises distilling the selected one of the plurality of pre-trained source code domain neural transformer models with attention to accommodate a requested model size prior to performing the fine-tuning.

### Claim 18 (depends on 17)

The computer-implemented method of claim 17, further comprising:
computing a scaling factor to determine a number of transformer blocks to meet the requested model size.

### Claim 19 (depends on 16)

The computer-implemented method of claim 16,
wherein the selected one of the plurality of source code domain neural transformer models with attention includes a memory size, and
wherein the fine-tuning the selected one of the pre-trained plurality of source code domain neural transformer models with attention further comprises distilling the selected one of the plurality of pre-trained source code domain neural transformer models with attention to accommodate a requested memory size prior to performing the fine-tuning.

### Claim 20 (depends on 19)

The computer-implemented method of claim 19, further comprising:
prior to fine-tuning the selected one of the pre-trained source code domain neural transformer models with attention, altering configuration of the selected one of the pre-trained source code domain neural transformer model with attention to fit the requested memory size.
