# US 2025/0384292 A1 · Detection and mitigation of hazards in machine learning foundation models

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

- Number: US 2025/0384292 A1
- Document ID: US20250384292A1
- Status: Published application
- Kind: A1
- Application number: 18/746,244
- Filed: 2024-06-18
- Published: 2025-12-18
- Earliest claimed: 2024-06-18
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Jeremy R. Fox; Krishna Manish Sheth; Andrew T. Penrose; Jonathan D. Dunne
- Web page: https://patentgrep.com/patent/US20250384292A1

## CPC

- G06F 16/90332: {Natural language query formulation or dialogue systems}
- G06N 3/094: Adversarial learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

An embodiment of the present invention includes a system for detecting and mitigating vulnerabilities in machine learning models. The system produces, via a machine learning model, responses to input data. The input data includes data that causes the machine learning model to produce proper and improper responses. Information associated with the input data and responses is maintained. The information includes timing information for the responses. A probability for a time to an improper response for the machine learning model is determined based on the maintained information. A hazard level for the machine learning model is identified based on the probability for the time to an improper response. Embodiments of the present invention further include a method and computer program product for detecting and mitigating vulnerabilities for machine learning models in substantially the same manner described above.

## Claims

### Claim 1

A method of detecting and mitigating vulnerabilities in machine learning models comprising:
producing, via a machine learning model of a processor, responses to input data, wherein the input data includes data that causes the machine learning model to produce proper and improper responses;
maintaining, via the processor, information associated with the input data and responses, wherein the information includes timing information for the responses;
determining, via the processor, a probability for a time to an improper response for the machine learning model based on the maintained information; and
identifying, via the processor, a hazard level for the machine learning model based on the probability for the time to an improper response.

### Claim 2 (depends on 1)

The method of claim 1, wherein the machine learning model is configured for a specific domain.

### Claim 3 (depends on 2)

The method of claim 2, wherein the machine learning model is pre-trained, and the responses are produced during additional training to fine-tune the machine learning model for the domain.

### Claim 4 (depends on 1)

The method of claim 1, wherein the machine learning model includes a large language model.

### Claim 5 (depends on 4)

The method of claim 4, wherein the input data includes clean data and clean prompts that cause the machine learning model to produce a proper response, and attack data and attack prompts that cause the machine learning model to produce an improper response.

### Claim 6 (depends on 5)

The method of claim 5, wherein the responses are produced for a first trial including the clean data and clean prompts and a second trial including the attack data and attack prompts, and wherein determining the probability for the time to an improper response comprises:
determining the probability for the time to an improper response for the machine learning model based on probabilities for the time to an improper response determined for the first and second trials.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
identifying, via the processor, the input data causing the improper responses;
modifying, via the processor, a training set for the machine learning model to compensate for the identified input data; and
re-training, via the processor, the machine learning model with the modified training set to mitigate the improper responses.

### Claim 8

A system for detecting and mitigating vulnerabilities in machine learning models comprising:
one or more memories; and
a processor coupled to the one or more memories and configured to:
produce, via a machine learning model, responses to input data, wherein the input data includes data that causes the machine learning model to produce proper and improper responses;
maintain information associated with the input data and responses, wherein the information includes timing information for the responses;
determine a probability for a time to an improper response for the machine learning model based on the maintained information; and
identify a hazard level for the machine learning model based on the probability for the time to an improper response.

### Claim 9 (depends on 8)

The system of claim 8, wherein the machine learning model is pre-trained, and the responses are produced during additional training to fine-tune the machine learning model for a domain.

### Claim 10 (depends on 8)

The system of claim 8, wherein the machine learning model includes a large language model.

### Claim 11 (depends on 10)

The system of claim 10, wherein the input data includes clean data and clean prompts that cause the machine learning model to produce a proper response, and attack data and attack prompts that cause the machine learning model to produce an improper response.

### Claim 12 (depends on 11)

The system of claim 11, wherein the responses are produced for a first trial including the clean data and clean prompts and a second trial including the attack data and attack prompts, and wherein determining the probability for the time to an improper response comprises:
determining the probability for the time to an improper response for the machine learning model based on probabilities for the time to an improper response determined for the first and second trials.

### Claim 13 (depends on 8)

The system of claim 8, wherein the processor is further configured to:
identify the input data causing the improper responses;
modify a training set for the machine learning model to compensate for the identified input data; and
re-train the machine learning model with the modified training set to mitigate the improper responses.

### Claim 14

A computer program product for detecting and mitigating vulnerabilities in machine learning models, the computer program product comprising one or more computer readable storage media having program instructions collectively stored on the one or more computer readable storage media, the program instructions executable by a processor to cause the processor to:
produce, via a machine learning model, responses to input data, wherein the input data includes data that causes the machine learning model to produce proper and improper responses;
maintain information associated with the input data and responses, wherein the information includes timing information for the responses;
determine a probability for a time to an improper response for the machine learning model based on the maintained information; and
identify a hazard level for the machine learning model based on the probability for the time to an improper response.

### Claim 15 (depends on 14)

The computer program product of claim 14, wherein the machine learning model is configured for a specific domain.

### Claim 16 (depends on 15)

The computer program product of claim 15, wherein the machine learning model is pre-trained, and the responses are produced during additional training to fine-tune the machine learning model for the domain.

### Claim 17 (depends on 14)

The computer program product of claim 14, wherein the machine learning model includes a large language model.

### Claim 18 (depends on 17)

The computer program product of claim 17, wherein the input data includes clean data and clean prompts that cause the machine learning model to produce a proper response, and attack data and attack prompts that cause the machine learning model to produce an improper response.

### Claim 19 (depends on 18)

The computer program product of claim 18, wherein the responses are produced for a first trial including the clean data and clean prompts and a second trial including the attack data and attack prompts, and wherein determining the probability for the time to an improper response comprises:
determining the probability for the time to an improper response for the machine learning model based on probabilities for the time to an improper response determined for the first and second trials.

### Claim 20 (depends on 14)

The computer program product of claim 14, wherein the program instructions further cause the processor to:
identify the input data causing the improper responses;
modify a training set for the machine learning model to compensate for the identified input data; and
re-train the machine learning model with the modified training set to mitigate the improper responses.
