# US 2025/0384679 A1 · Classifier-guided dataset compression using distribution-aware selection

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

- Number: US 2025/0384679 A1
- Document ID: US20250384679A1
- Status: Published application
- Kind: A1
- Application number: 19/239,571
- Filed: 2025-06-16
- Published: 2025-12-18
- Earliest claimed: 2024-06-14
- Assignees: The Toronto-Dominion Bank
- Applicants: The Toronto-Dominion Bank
- Inventors: Cheng Chang; Keyu Long; Ted Li; Himanshu Rai; Maksims Volkovs
- Web page: https://patentgrep.com/patent/US20250384679A1

## CPC

- G06V 10/764: using classification, e.g. of video objects
- G06F 16/215: Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
- G06N 3/08: Learning methods
- G06V 10/25: Determination of region of interest [ROI] or a volume of interest [VOI]
- G06V 10/44: Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
- G06V 10/761: {Proximity, similarity or dissimilarity measures}
- G06V 10/762: using clustering, e.g. of similar faces in social networks
- G06V 10/771: Feature selection, e.g. selecting representative features from a multi-dimensional feature space
- G06V 10/7715: {Feature extraction, e.g. by transforming the feature space, e.g. multi-dimensional scaling [MDS]; Mappings, e.g. subspace methods}
- G06V 10/774: Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
- G06V 10/82: using neural networks
- G06V 10/776: Validation; Performance evaluation
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

An example operation may include at least one of determining, by a transformer encoder trained on annotated image-text data, first latents for a first dataset stored in a memory, and second latents for a second dataset stored in the memory, generating a similarity matrix based on comparisons between the first latents and the second latents, constructing a graph comprising nodes corresponding to the first latents and edges based on pairwise similarity exceeding a threshold, identifying connected components in the graph and selecting, from each component, at least one latent having a highest score from a classifier trained to approximate divergence between the first dataset and the second dataset, forming a reduced dataset comprising the at least one latent, providing the reduced dataset to a model training module, and training an image classifier using the reduced dataset and the second dataset.

## Claims

### Claim 1

A system, comprising:
a memory; and
at least one processor communicatively coupled to the memory, wherein the at least one processor is configured to:
determine first latents for a first dataset stored in the memory and second latents for a second dataset stored in the memory that uses a transformer encoder trained on annotated image-text data;
generate a similarity matrix based on comparisons between the first latents and the second latents;
construct a graph comprising nodes that corresponds to the first latents and edges based on pairwise similarity that exceeds a threshold;
identify connected components in the graph and select, from each component, at least one latent that has a highest score from a classifier trained to approximate divergence between the first dataset and the second dataset;
form a reduced dataset comprising the at least one latent;
provide the reduced dataset to a model training module; and
train an image classifier that uses the reduced dataset and the second dataset.

### Claim 2 (depends on 1)

The system of claim 1, wherein the at least one processor is configured to generate the similarity matrix that compares each of the first latents to each of the second latents that uses a feature-based similarity scoring function.

### Claim 3 (depends on 1)

The system of claim 1, wherein the at least one processor is configured to construct the graph by an omission of edges between latents whose pairwise similarity is below a defined similarity threshold.

### Claim 4 (depends on 1)

The system of claim 1, wherein the classifier is a binary neural network trained to differentiate distributions based on divergence between the first dataset and the second dataset.

### Claim 5 (depends on 1)

The system of claim 1, wherein the at least one processor is configured to select a latent from each connected component by rank of latents within each component based on divergence probability scores and select a top-scoring latent.

### Claim 6 (depends on 1)

The system of claim 1, wherein the at least one processor is further configured to receive an image that belongs to the second dataset from a user device and encode the image into a second latent that uses the transformer encoder.

### Claim 7 (depends on 1)

The system of claim 1, wherein the at least one processor is further configured to receive, via a user interface on a computing device, a feedback signal that selects an incorrectly classified image from the reduced dataset, and remove the incorrectly classified image from the train.

### Claim 8 (depends on 1)

The system of claim 1, wherein the at least one processor is further configured to transmit the image classifier to a user device for local inference after training is completed that uses the reduced dataset and the second dataset.

### Claim 9 (depends on 1)

The system of claim 1, wherein the second dataset comprises prompt messages received by a chatbot service, and the image classifier assigns content moderation or routing labels to received chatbot messages based on visual context or associated imagery.

### Claim 10

A method, comprising:
determining, by a transformer encoder trained on annotated image-text data, first latents for a first dataset stored in a memory, and second latents for a second dataset stored in the memory;
generating a similarity matrix based on comparisons between the first latents and the second latents;
constructing a graph comprising nodes corresponding to the first latents and edges based on pairwise similarity exceeding a threshold;
identifying connected components in the graph and selecting, from each component, at least one latent having a highest score from a classifier trained to approximate divergence between the first dataset and the second dataset;
forming a reduced dataset comprising the at least one latent;
providing the reduced dataset to a model training module; and
training an image classifier using the reduced dataset and the second dataset.

### Claim 11 (depends on 10)

The method of claim 10, wherein generating the similarity matrix comprises comparing each of the first latents to each of the second latents using a feature-based similarity scoring function.

### Claim 12 (depends on 10)

The method of claim 10, wherein constructing the graph further comprises omitting edges between latents whose pairwise similarity is below a defined similarity threshold.

### Claim 13 (depends on 10)

The method of claim 10, wherein the classifier is a binary neural network trained to differentiate distributions based on divergence between the first dataset and the second dataset.

### Claim 14 (depends on 10)

The method of claim 10, wherein selecting a latent from each connected component comprises ranking latents within each component based on divergence probability scores and selecting a top-scoring latent.

### Claim 15 (depends on 10)

The method of claim 10, further comprising receiving, from a user device, an image belonging to the second dataset and encoding the image into a second latent using the transformer encoder.

### Claim 16 (depends on 10)

The method of claim 10, further comprising receiving, via a user interface on a computing device, a feedback signal selecting an incorrectly classified image from the reduced dataset, wherein the incorrectly classified image is removed from the training.

### Claim 17 (depends on 10)

The method of claim 10, further comprising transmitting the image classifier to a user device for local inference after training is completed using the reduced dataset and the second dataset.

### Claim 18 (depends on 10)

The method of claim 10, wherein the second dataset comprises prompt messages received by a chatbot service, and the image classifier assigns content moderation or routing labels to incoming chatbot messages based on visual context or associated imagery.

### Claim 19

A computer program product, comprising:
at least one computer-readable storage media; and
program instructions stored on the at least one computer-readable storage media to perform operations comprising:
determining, by a transformer encoder trained on annotated image-text data, first latents for a first dataset stored in a memory, and second latents for a second dataset stored in the memory;
generating a similarity matrix based on comparisons between the first latents and the second latents;
constructing a graph comprising nodes corresponding to the first latents and edges based on pairwise similarity exceeding a threshold;
identifying connected components in the graph and selecting, from each component, at least one latent having a highest score from a classifier trained to approximate divergence between the first dataset and the second dataset;
forming a reduced dataset comprising the at least one latent;
providing the reduced dataset to a model training module; and
training an image classifier using the reduced dataset and the second dataset.

### Claim 20 (depends on 19)

The computer program product of claim 19, wherein generating the similarity matrix comprises comparing each of the first latents to each of the second latents using a feature-based similarity scoring function.
