# US 2025/0378377 A1 · Detecting model memorization with local intrinsic dimensionality

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

- Number: US 2025/0378377 A1
- Document ID: US20250378377A1
- Status: Published application
- Kind: A1
- Application number: 19/219,299
- Filed: 2025-05-27
- Published: 2025-12-11
- Earliest claimed: 2024-06-06
- Assignees: The Toronto-Dominion Bank
- Applicants: The Toronto-Dominion Bank
- Inventors: Brendan Leigh Ross; Hamidreza Kamkari; Zhaoyan Liu; Tongzi Wu; George Frazer Stein; Gabriel Loaiza Ganem; Jesse Cole Cresswell; Maksims Volkovs
- Web page: https://patentgrep.com/patent/US20250378377A1

## CPC

- G06N 20/00: Machine learning
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Local intrinsic dimensionality (LID), when evaluated on a data sample for a generative model, can be used to detect model memorization by comparing the LID determined according to the model parameters with a threshold. This allows detection of memorization by the generative model that reproduces a training data sample as well as memorization that presents low degrees of freedom relative to a ground truth dimensionality of the data set. When data samples are generated by the generative model, the LID of the data samples is evaluated to detect memorization, and memorized data samples may be prevented from delivery as generated data samples. During training, training data samples are evaluated for memorization and may be used to modify the training process to reduce memorization.

## Claims

### Claim 1

A system, comprising:
one or more processors that execute instructions; and
one or more computer-readable media having instructions executable by the one or more processors for:
identifying a data sample generated responsive to a query by a trained generative model having a set of trained parameters;
estimating a local intrinsic dimensionality of the data sample according to the set of trained parameters of the trained generative model;
determining that the data sample is memorized by the trained generative model when the local intrinsic dimensionality of the data sample is below a threshold; and
responsive to determining that the data sample is memorized, preventing delivery of the data sample as a response to the query.

### Claim 2 (depends on 1)

The system of claim 1, wherein the threshold is in a range from zero to five.

### Claim 3 (depends on 1)

The system of claim 1, wherein the threshold is determined based on an estimated dimensionality of a training data set of the trained generative model.

### Claim 4 (depends on 1)

The system of claim 1, wherein the instructions executable by the one or more processors are further for:
modifying the query to a modified query;
determining a modified data sample by applying the generative model to the modified query; and
providing the modified data sample as the response to the query.

### Claim 5 (depends on 4)

The system of claim 4, wherein modifying the query to the modified query comprises:
determining a contribution of one or more tokens in the query to the local intrinsic dimensionality; and
modifying the query based on the contribution of the one or more tokens.

### Claim 6 (depends on 5)

The system of claim 5, wherein determining the contribution of one or more tokens in the query to the local intrinsic dimensionality comprises differentiating the local intrinsic dimensionality with respect to the one or more tokens.

### Claim 7 (depends on 5)

The system of claim 5, wherein modifying the query comprises providing the query to a large language model.

### Claim 8

A method, comprising:
identifying a data sample generated responsive to a query by a trained generative model having a set of trained parameters;
estimating a local intrinsic dimensionality of the data sample according to the set of trained parameters of the trained generative model;
determining that the data sample is memorized by the trained generative model when the local intrinsic dimensionality of the data sample is below a threshold; and
responsive to determining that the data sample is memorized, preventing delivery of the data sample as a response to the query.

### Claim 9 (depends on 8)

The method of claim 8, wherein the threshold is in a range from zero to five.

### Claim 10 (depends on 8)

The method of claim 8, wherein the threshold is determined based on an estimated dimensionality of a training data set of the trained generative model.

### Claim 11 (depends on 8)

The method of claim 8, the method further comprising:
modifying the query to a modified query;
determining a modified data sample by applying the generative model to the modified query; and
providing the modified data sample as the response to the query.

### Claim 12 (depends on 11)

The method of claim 11, wherein modifying the query to the modified query comprises:
determining a contribution of one or more tokens in the query to the local intrinsic dimensionality; and
modifying the query based on the contribution of the one or more tokens.

### Claim 13 (depends on 12)

The method of claim 12, wherein determining the contribution of one or more tokens in the query to the local intrinsic dimensionality comprises differentiating the local intrinsic dimensionality with respect to the one or more tokens.

### Claim 14 (depends on 12)

The method of claim 12, wherein modifying the query comprises providing the query to a large language model.

### Claim 15

A non-transitory computer-readable medium, the non-transitory computer-readable medium, comprising instructions executable by a processor for:
identifying a data sample generated responsive to a query by a trained generative model having a set of trained parameters;
estimating a local intrinsic dimensionality of the data sample according to the set of trained parameters of the trained generative model;
determining that the data sample is memorized by the trained generative model when the local intrinsic dimensionality of the data sample is below a threshold; and
responsive to determining that the data sample is memorized, preventing delivery of the data sample as a response to the query.

### Claim 16 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the threshold is in a range from zero to five.

### Claim 17 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the threshold is determined based on an estimated dimensionality of a training data set of the trained generative model.

### Claim 18 (depends on 15)

The non-transitory computer-readable medium of claim 15, the instructions being further executable for:
modifying the query to a modified query;
determining a modified data sample by applying the generative model to the modified query; and
providing the modified data sample as the response to the query.

### Claim 19 (depends on 18)

The non-transitory computer-readable medium of claim 18, wherein modifying the query to the modified query comprises:
determining a contribution of one or more tokens in the query to the local intrinsic dimensionality; and
modifying the query based on the contribution of the one or more tokens.

### Claim 20 (depends on 19)

The non-transitory computer-readable medium of claim 19, wherein determining the contribution of one or more tokens in the query to the local intrinsic dimensionality comprises differentiating the local intrinsic dimensionality with respect to the one or more tokens.
