Real-Time Tamper-Detection Protection for Source Code Using LSTM and QLSTM with Quantum Cache

US2025232037A1 · US · A1

Patent metadata
FieldValue
Publication numberUS-2025232037-A1
Application numberUS-202418414717-A
CountryUS
Kind codeA1
Filing dateJan 17, 2024
Priority dateJan 17, 2024
Publication dateJul 17, 2025
Grant date

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.

Systems and methods for detecting tampering in software are disclosed. The system includes a preprocessor that converts source code into a minimal intermediate representation and extracts semantic and syntactic features using word embedding algorithms. The preprocessed data is then fed into two machine learning models: a classical LSTM model and a quantum LSTM model. The classical LSTM model detects basic tampering patterns, while the QLSTM model leverages quantum principles to enhance analysis and prediction of more complex tampering attempts. The system also includes a quantum cache for efficient data retrieval and manipulation, enabling real-time or near-real-time analysis. The combination of these features provides improved accuracy and effectiveness in detecting tampering, enabling timely intervention and mitigation of security threats. Remediation may be performed automatically or manually and can be based on historically determined or dynamically generated solutions.

First claim

Opening claim text (preview).

1 . A method for real-time tamper detection in software code and remediation of software code vulnerabilities, comprising the steps of: retrieving, by a data processing layer, sample datasets of vulnerable code examples and non-vulnerable code examples; tokenizing, by the data processing layer, the sample datasets into tokenized code examples suitable for long-term short-term memory (LSTM) modeling and quantum long short-term memory (QLSTM) modeling; splitting, by the data processing layer, the tokenized code examples into a training dataset, a validation dataset, and a test dataset; transmitting, by the data processing layer to a model training layer, the training dataset, the validation dataset, and the test dataset, said model training layer including an LSTM model and a QLSTM model; LSTM training, by the model training layer, the LSTM model by: inputting the training datasets; executing, by the LSTM model, the training dataset; calculating actual outputs at each time step during execution; determining a loss function based on predicted outputs and desired outputs; calculating gradients for the loss function; propagating the gradients back into the LSTM model by back propagation through time (BPTT) or truncated back propagation through time (TBPTT); repeating the LSTM training until the LSTM model converges to a desired level of performance; validating, by the model training layer, the LSTM model based on the validation dataset to monitor performance of the LSTM model and prevent overfitting; testing, by the model training layer, the LSTM model based on the test dataset to access effectiveness in identifying tampered code; QLSTM training, by the model training layer, the QLSTM model by: mapping the tokenized code samples onto a quantum state using quantum encoding into quantum-encoded code data; implementing, based on the LSTM model, a quantum circuit to analyze the quantum-encoded code data to identify patterns or features related to said software code vulnerabilities; evaluating the QLSTM model using the validation dataset and the test dataset; receiving, by the data processing layer, source code to test for said software code vulnerabilities; pre-processing, by the data processing layer, the source code to remove irrelevant characters, remove comments, remove whitespaces, and normalize code structure; tokenizing, by the data processing layer, the source code to convert code snippets into a sequence of tokens; encoding, by the data processing layer, the sequence of tokens into numerical sequences that can be analyzed by the LSTM model and the QLSTM model; executing, by a code vulnerability detection layer, the LSTM model on the numerical sequences if the source code is below a complexity threshold or the source code contains structured code; executing, by the code vulnerability detection layer, the QLSTM model on the numerical sequences if the source code is above the complexity threshold or the source code contains unstructured code; storing, by the code vulnerability detection layer, LSTM results from the LSTM model in a memory cache; storing, by the code vulnerability detection layer, QLSTM results from the QLSTM model in a quantum cache; predicting, by the code vulnerability detection layer using the memory cache or the quantum cache, tampered code in the source code; detecting, by the code vulnerability detection layer using the memory cache or the quantum cache, potential vulnerabilities in the source code; and remediating, automatically by a remediation module, the tampered code or the potential vulnerabilities in the source code. 2 . The method of claim 1 further comprising the step of dynamically switching between the LSTM model and the QLSTM model based on real-time analysis code complexity, code volume, and whether the source code contains said structured code or said unstructured code. 3 . The method of claim 2 further comprising the step of dynamically switching between the LSTM model and the QLSTM model based on a frequency of tamper detection analysis requests. 4 . The method of claim 3 further comprising the step of generating, by the code vulnerability detection layer, a report that identifies each area of the source code that contains tampered code or the potential vulnerabilities. 5 . The method of claim 4 further comprising the step of converting, by the QLSTM model the QLSTM results from a quantum format into a classical format that can be read by a non-quantum computing system. 6 . The method of claim 5 wherein the gradients are propagated back into the LSTM model by BPTT. 7 . The method of claim 6 wherein the loss function is mean squared error (MSE), cross-entropy, or negative log-likelihood. 8 . The method of claim 7 wherein the mapping of the tokenized code samples uses quantum embedding techniques to represent the tokenized code samples in the quantum state, said quantum embedding techniques including: amplitude encoding, phase encoding, quantum feature maps, or quantum convolutional neural networks. 9 . The method of claim 8 wherein the quantum embedding techniques are said quantum feature maps. 10 . The method of claim 5 wherein the gradients are propagated back into the LSTM model by TBPTT. 11 . The method of claim 9 wherein the loss function is mean squared error (MSE), cross-entropy, or negative log-likelihood. 12 . The method of claim 10 wherein the mapping of the tokenized code samples uses quantum embedding techniques to represent the tokenized code samples in the quantum state, said quantum embedding techniques including: amplitude encoding, phase encoding, quantum feature maps, or quantum convolutional neural networks. 13 . The method of claim 12 wherein the quantum embedding techniques are said quantum feature maps. 14 . A method for real-time tamper detection in software code and remediation of software code vulnerabilities, comprising the steps of: retrieving, by a data processing layer, sample datasets of vulnerable code examples and non-vulnerable code examples; tokenizing, by the data processing layer, the sample datasets into tokenized code examples suitable for long-term short-term memory (LSTM) modeling and quantum long short-term memory (QLSTM) modeling; splitting, by the data processing layer, the tokenized code examples into a training dataset, a validation dataset, and a test dataset; transmitting, by the data processing layer to a model training layer, the training dataset, the validation dataset, and the test dataset, said model training layer including an LSTM model and a QLSTM model; LSTM training, by the model training layer, the LSTM model by: inputting the training datasets; executing, by the LSTM model, the training dataset; calculating actual outputs at each time step during execution; determining, based on predicted outputs and desired outputs, a loss function of mean squared error (MSE), cross-entropy, or negative log-likelihood; calculating gradients for the loss function; propagating the gradients back into the LSTM model by back propagation through time (BPTT); repeating the LSTM training until the LSTM model converges to a desired level of performance; validating, by the model training layer, the LSTM model based on the validation dataset to monitor performance of the LSTM model and prevent overfitting; testing, by the model training layer, the LSTM model based on the test dataset to access effectiveness in identifying tampered code; QLSTM training, by the model training layer, the QLSTM model by: mapping the tokenized code samples onto a quantum state using quantum encoding into quant

Assignees

Inventors

Classifications

  • G06F21/577Primary

    Assessing vulnerabilities and evaluating computer system security · 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 US2025232037A1 cover?
Systems and methods for detecting tampering in software are disclosed. The system includes a preprocessor that converts source code into a minimal intermediate representation and extracts semantic and syntactic features using word embedding algorithms. The preprocessed data is then fed into two machine learning models: a classical LSTM model and a quantum LSTM model. The classical LSTM model de…
Who is the assignee on this patent?
Bank Of America
What technology area does this patent fall under?
Primary CPC classification G06F21/577. Mapped technology areas include Physics.
When was this patent published?
Publication date Thu Jul 17 2025 00:00:00 GMT+0000 (Coordinated Universal Time) (A1). 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).