Code performance optimization based on an information-enhanced diffusion model

US12217032B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-12217032-B2
Application numberUS-202318129288-A
CountryUS
Kind codeB2
Filing dateMar 31, 2023
Priority dateMar 31, 2023
Publication dateFeb 4, 2025
Grant dateFeb 4, 2025

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A given segment of computer code is obtained and modified to produce one or more inefficient versions of the given segment of computer code in comparison to the given segment of computer code. A code parse tree is generated for the given segment of computer code and each inefficient version of the given segment of computer code. Model embeddings are generated based on the generated code parse trees and a diffusion model is trained based on the generated model embeddings.

First claim

Opening claim text (preview).

What is claimed is: 1. A method comprising: obtaining, using a hardware processor, a given segment of computer code; modifying, using the hardware processor, the given segment of computer code to produce one or more inefficient versions of the given segment of computer code in comparison to the given segment of computer code; generating, using the hardware processor, a code parse tree for the given segment of computer code and each inefficient version of the given segment of computer code; generating, using the hardware processor, model embeddings based on the generated code parse trees; and training, using the hardware processor, a diffusion model based on the generated model embeddings. 2. The method of claim 1 , further comprising ordering the given segment of computer code and the one or more inefficient versions of the given segment of computer code by run time and wherein the training the diffusion model is based on the ordered segments of computer code. 3. The method of claim 1 , further comprising performing inferencing using the trained diffusion model to generate a more efficient version of an input computer code segment. 4. The method of claim 3 , further comprising deploying the more efficient version of the input computer code segment. 5. The method of claim 4 , further comprising executing the deployed more efficient version of the input computer code segment. 6. The method of claim 1 , wherein the modifying the given segment of computer code comprises integrating one or more FOR loops into one or more of the given segment of computer code and the one or more inefficient versions of the given segment of computer code. 7. The method of claim 1 , wherein the modifying the given segment of computer code comprises one or more of integrating code that refrains from performing a timely release of memory occupied by variables, integrating code for variable circular references, integrating code variable names that violate a program specification, and integrating code that causes a memory leak into one or more of the given segment of computer code and the one or more inefficient versions of the given segment of computer code. 8. A computer program product, comprising: one or more tangible computer-readable storage media and program instructions stored on at least one of the one or more tangible computer-readable storage media, the program instructions executable by a processor, the program instructions comprising: obtaining a given segment of computer code; modifying the given segment of computer code to produce one or more inefficient versions of the given segment of computer code in comparison to the given segment of computer code; generating a code parse tree for the given segment of computer code and each inefficient version of the given segment of computer code; generating model embeddings based on the generated code parse trees; and training a diffusion model based on the generated model embeddings. 9. The computer program product of claim 8 , further comprising ordering the given segment of computer code and the one or more inefficient versions of the given segment of computer code by run time and wherein the training the diffusion model is based on the ordered segments of computer code. 10. The computer program product of claim 8 , further comprising performing inferencing using the trained diffusion model to generate a more efficient version of an input computer code segment. 11. The computer program product of claim 10 , further comprising deploying the more efficient version of the input computer code segment. 12. The computer program product of claim 11 , further comprising executing the deployed more efficient version of the input computer code segment. 13. The computer program product of claim 8 , wherein the modifying the given segment of computer code comprises integrating one or more FOR loops into one or more of the given segments of computer code and the one or more inefficient versions of the given segment of computer code. 14. A system comprising: a memory; and at least one processor, coupled to said memory, and operative to perform operations comprising: obtaining a given segment of computer code; modifying the given segment of computer code to produce one or more inefficient versions of the given segment of computer code in comparison to the given segment of computer code; generating a code parse tree for the given segment of computer code and each inefficient version of the given segment of computer code; generating model embeddings based on the generated code parse trees; and training a diffusion model based on the generated model embeddings. 15. The system of claim 14 , further comprising ordering the given segment of computer code and the one or more inefficient versions of the given segment of computer code by run time and wherein the training the diffusion model is based on the ordered segments of computer code. 16. The system of claim 14 , further comprising performing inferencing using the trained diffusion model to generate a more efficient version of an input computer code segment. 17. The system of claim 16 , further comprising deploying the more efficient version of the input computer code segment. 18. The system of claim 17 , further comprising executing the deployed more efficient version of the input computer code segment. 19. The system of claim 14 , wherein the modifying the given segment of computer code comprises integrating one or more FOR loops into one or more of the given segments of computer code and the one or more inefficient versions of the given segment of computer code. 20. The system of claim 14 , wherein the modifying the given segment of computer code comprises one or more of integrating code that refrains from performing a timely release of memory occupied by variables, integrating code for variable circular references, integrating code variable names that violate a program specification, and integrating code that causes a memory leak into one or more of the given segment of computer code and the one or more inefficient versions of the given segment of computer code.

Assignees

Inventors

Classifications

  • Version control (security arrangements therefor G06F21/57); Configuration management · CPC title

  • G06F8/4441Primary

    Reducing the execution time required by the program code · CPC title

  • Machine learning · CPC title

  • Recurrent networks, e.g. Hopfield networks · CPC title

  • Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US12217032B2 cover?
A given segment of computer code is obtained and modified to produce one or more inefficient versions of the given segment of computer code in comparison to the given segment of computer code. A code parse tree is generated for the given segment of computer code and each inefficient version of the given segment of computer code. Model embeddings are generated based on the generated code parse t…
Who is the assignee on this patent?
IBM
What technology area does this patent fall under?
Primary CPC classification G06F8/4441. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Feb 04 2025 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 8 related publications on this page (citations in our corpus or others sharing the same primary CPC).