IP Library Granted Patent US 12,682,249
Granted Patent B1
US 12,682,249 · App. 19/459,984 · Granted Jul 14, 2026

Agentic-based approach for reducing false positives in machine learning model output classifications

Inventor: Julian Collado Umana (Irvine, CA)
Assignee: HiddenLayer, Inc.
G06N3/094G06N3/04
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,682,249
App. No.
19/459,984
Filed
Jan 26, 2026
Granted
Jul 14, 2026
Kind
B1
Art Unit
2142
USPC
706/15
Abstract

Techniques are provided for adjudicating suspected-malicious samples using in-context gating and an appeals stage to reduce false positives. A first-stage classifier generates a benign-or-malicious verdict. When malicious is indicated, a context-gating model determines whether the sample is in-context for a target application domain. If out-of-context, the initial verdict is finalized. If in-context, contextual information is assembled by retrieving and condensing items from a knowledge base via similarity search. The sample and the contextual information are then supplied to an appeals model, distinct from the first-stage classifier and the context-gating model, which issues a context-sensitive verdict. The appeals verdict is emitted as the final decision. This architecture separates fast screening from domain-aware reasoning, enabling dynamic incorporation of deployment-specific knowledge without retraining the first-stage classifier, improving accuracy, and providing a principled fallback when the sample is out-of-scope for the application domain.

Claims (65)

1 . A computer-implemented method for adjudicating suspected-malicious samples with context gating, the method comprising:

receiving, by one or more computing devices, a sample;

generating, by a first-stage classifier, a first verdict classifying the sample as malicious;

invoking a context-gating model distinct from the first-stage classifier and an appeals model, the context-gating model evaluating whether the sample is in-context for a specific application domain by computing an embedding for the sample and an embedding for context descriptors, comparing a distance between the embeddings against a threshold, and outputting an in-context or out-of-context label;

emitting, as a final verdict, the first verdict if the context-gating model determines the sample is out-of-context;

assembling, if the context-gating model determines the sample is in-context, contextual information by retrieving, via a similarity search over a knowledge base using dense vector retrieval with a distance threshold to select knowledge-base items, one or more items related to the sample;

providing the sample and the contextual information to the appeals model;

generating, by the appeals model, a second verdict based on the contextual information; and

emitting, as the final verdict, the second verdict in preference to the first verdict.

2 . The method of claim 1 , further comprising providing the first verdict and, optionally, first-stage rationale to the appeals model as additional inputs.

3 . The method of claim 1 , wherein the appeals model is an application programming interface-accessed large language model and only processes samples pre-flagged as malicious.

4 . The method of claim 1 , wherein the contextual information includes a deployment-specific system prompt describing the application environment.

5 . The method of claim 1 , wherein the context-gating model is implemented as a two-tower neural network.

6 . The method of claim 1 , wherein the appeals model outputs a natural-language explanation for its verdict.

7 . The method of claim 1 , wherein the knowledge base comprises public or private articles related to the application domain.

8 . The method of claim 1 , wherein the similarity search is performed using a retrieval-augmented generation (RAG) model.

9 . The method of claim 1 , wherein the context-gating model is trained using labeled data indicating in-context and out-of-context samples.

10 . The method of claim 1 , wherein the appeals model is fine-tuned for the application domain.

11 . The method of claim 1 , wherein the method further comprises updating the knowledge base with new context information over time.

12 . The method of claim 1 , further comprising:

initiating, in response to the emitted verdict indicating that the sample is malicious, one or more remediation actions to prevent a machine learning model from behaving in an undesired manner.

13 . The method of claim 1 , further comprising orchestrating, by one or more autonomous software agents, at least one of:

routing the sample among the first-stage classifier, the context-gating model, and the appeals model;

performing semantic task decomposition of the sample;

coordinating data flow among the first-stage classifier, the context-gating model, and the appeals model; or

dynamically selecting and parameterizing the appeals model based on the sample.

14 . The method of claim 1 , further comprising, prior to invoking the context-gating model, preprocessing the sample to extract modality-specific features, the sample comprising at least one of text, image, audio, video, or a multimodal combination thereof, and the preprocessing comprising at least one of tokenization, normalization, sentence embedding generation, or transformation into embedded representations using a pre-trained model.

15 . The method of claim 1 , further comprising, after the context-gating model determines the sample is in-context, invoking an intermediary model configured to validate whether the sample is genuinely relevant to the application domain before providing the sample to the appeals model, the intermediary model operating as a bureaucrat agent that ensures only appropriate cases are escalated to the appeals model.

16 . The method of claim 1 , further comprising, in response to the final verdict indicating that the sample is malicious, initiating one or more remediation actions comprising at least one of:

blocking the sample from ingestion by a machine learning model; redacting personally identifiable information from the sample;

constraining decoding parameters of the machine learning model;

disabling tool invocation capabilities;

rate limiting requests; or

escalating the sample for human review.

17 . The method of claim 1 , further comprising, during the assembling of the contextual information, invoking a context engine that performs a semantic search over a knowledge base to retrieve one or more documents related to the sample, and processing the retrieved documents using a summarizer to generate a condensed summary that is provided to the appeals model as part of the contextual information.

18 . The method of claim 1 , further comprising logging, by a logging module, the first verdict, the second verdict, the contextual information, and process status for audit and retraining purposes.

19 . The method of claim 1 , wherein the context-gating model incorporates an output of the first-stage classifier, including at least one of a verdict and associated reasoning, as additional input features that are integrated with representations of the sample and context descriptors.

20 . The method of claim 1 , wherein the context engine provides different contextual information to the context-gating model and the appeals model, the contextual information provided to each model being selected based on requirements of the respective model's task.

21 . A system for adjudicating suspected-malicious samples with context gating, comprising:

at least one processor; and

at least one non-transitory computer-readable medium storing instructions that, when executed by the at least one processor, cause the system to perform operations comprising:

receiving a sample;

generating, by a first-stage classifier, a first verdict classifying the sample as malicious;

invoking a context-gating model distinct from the first-stage classifier and an appeals model, the context-gating model evaluating whether the sample is in-context for a specific application domain by computing an embedding for the sample and an embedding for context descriptors, comparing a distance between the embeddings against a threshold, and outputting an in-context or out-of-context label;

emitting, as a final verdict, the first verdict if the context-gating model determines the sample is out-of-context;

assembling, if the context-gating model determines the sample is in-context, contextual information by retrieving, via a similarity search over a knowledge base using dense vector retrieval with a distance threshold to select knowledge-base items, one or more items related to the sample;

providing the sample and the contextual information to the appeals model;

generating, by the appeals model, a second verdict based on the contextual information; and

emitting, as the final verdict, the second verdict in preference to the first verdict.

22 . The system of claim 21 , wherein the instructions further cause the system to perform operations comprising: providing the first verdict and, optionally, first-stage rationale to the appeals model as additional inputs.

23 . The system of claim 21 , wherein the appeals model is an application programming interface-accessed large language model and only processes samples pre-flagged as malicious.

24 . The system of claim 21 , wherein the contextual information includes a deployment-specific system prompt describing the application environment.

25 . The system of claim 21 , wherein the context-gating model is implemented as a two-tower neural network.

26 . The system of claim 21 , wherein the appeals model outputs a natural-language explanation for its verdict.

27 . The system of claim 21 , wherein the knowledge base comprises public or private articles related to the application domain.

28 . The system of claim 21 , wherein the similarity search is performed using a retrieval-augmented generation (RAG) model.

29 . The system of claim 21 , wherein the instructions further cause the system to perform operations comprising:

initiating, in response to the emitted verdict indicating that the sample is malicious, one or more remediation actions to prevent a machine learning model from behaving in an undesired manner.

30 . The system of claim 29 , wherein the one or more remediation actions comprise at least one of:

blocking the sample from ingestion by the machine learning model;

redacting personally identifiable information from the sample;

constraining decoding parameters of the machine learning model;

disabling tool invocation capabilities;

rate limiting requests; or

escalating the sample for human review.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 26, 2026
From: COLLADO UMANA, JULIAN
To: HIDDENLAYER, INC.
Reel/Frame 074201/0038 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 9, 2026
From: COLLADO UMANA, JULIAN
To: HIDDENLAYER, INC.
Reel/Frame 073737/0965 →
References Cited (76)
US 7673147B2 · Moghe et al. · 2010 [cited by applicant]
US 10089482B2 · Skipper et al. · 2018 [cited by applicant]
US 10397255B1 · Bhalotra et al. · 2019 [cited by applicant]
US 10721247B2 · Komashinskiy et al. · 2020 [cited by applicant]
US 10902111B2 · Stolfo et al. · 2021 [cited by applicant]
US 11288369B1 · Grzonkowski et al. · 2022 [cited by applicant]
US 11475375B1 · Al-Khayet et al. · 2022 [cited by applicant]
US 11520829B2 · Rosenthal et al. · 2022 [cited by applicant]
US 11526601B2 · Rouhani et al. · 2022 [cited by applicant]
US 11551137B1 · Echauz et al. · 2023 [cited by applicant]
US 11601444B1 · Vashisht · 2023 [cited by examiner]
US 11665201B2 · Kinder et al. · 2023 [cited by applicant]
US 11936686B2 · Freire et al. · 2024 [cited by applicant]
US 11971914B1 · Watson et al. · 2024 [cited by applicant]
US 11983271B2 · dos Santos Silva et al. · 2024 [cited by applicant]
US 11991199B2 · Achleitner et al. · 2024 [cited by applicant]
US 11997059B1 · Su et al. · 2024 [cited by applicant]
US 12026255B1 · Burns et al. · 2024 [cited by applicant]
US 12034751B2 · Borges · 2024 [cited by applicant]
US 12174954B1 · Yeung et al. · 2024 [cited by applicant]
US 12254120B2 · Beveridge et al. · 2025 [cited by applicant]
US 12314380B2 · Burns et al. · 2025 [cited by applicant]
US 12475705B2 · Das et al. · 2025 [cited by applicant]
US 12500909B1 · Westenberger · 2025 [cited by examiner]
US 20080086775A1 · Repasi et al. · 2008 [cited by applicant]
US 20080244690A1 · Kulkarni et al. · 2008 [cited by applicant]
US 20150264058A1 · Locasto et al. · 2015 [cited by applicant]
US 20170185675A1 · Arngren · 2017 [cited by applicant]
US 20190268245A1 · Roth et al. · 2019 [cited by applicant]
US 20200074336A1 · Saxe et al. · 2020 [cited by applicant]
US 20200320438A1 · Lin · 2020 [cited by examiner]
US 20200351307A1 · Vidas et al. · 2020 [cited by applicant]
US 20200394466A1 · Jia et al. · 2020 [cited by applicant]
US 20210157912A1 · Sai et al. · 2021 [cited by applicant]
US 20210203674A1 · Azaria et al. · 2021 [cited by applicant]
US 20210224425A1 · Nasr-Azadani et al. · 2021 [cited by applicant]
US 20210279336A1 · Cmielowski et al. · 2021 [cited by applicant]
US 20210319093A1 · Molloy et al. · 2021 [cited by applicant]
US 20210385232A1 · Kutt · 2021 [cited by examiner]
US 20220038474A1 · Nag · 2022 [cited by applicant]
US 20220043910A1 · Chistyakov et al. · 2022 [cited by applicant]
US 20220046057A1 · Kutt · 2022 [cited by examiner]
US 20220174089A1 · Piegert et al. · 2022 [cited by applicant]
US 20220385675A1 · Tora et al. · 2022 [cited by applicant]
US 20230004654A1 · Jurzak et al. · 2023 [cited by applicant]
US 20230148116A1 · Stokes et al. · 2023 [cited by applicant]
US 20230222363A1 · Bernat et al. · 2023 [cited by applicant]
US 20230325678A1 · Fradkin et al. · 2023 [cited by applicant]
US 20240022600A1 · Zhang et al. · 2024 [cited by applicant]
US 20240031387A1 · Reynolds et al. · 2024 [cited by applicant]
US 20240039934A1 · Zoldi et al. · 2024 [cited by applicant]
US 20240054233A1 · Ohayon et al. · 2024 [cited by applicant]
US 20240111868A1 · Da Silva et al. · 2024 [cited by applicant]
US 20250307418A1 · Spencer et al. · 2025 [cited by applicant]
US 20250307419A1 · Belgi et al. · 2025 [cited by applicant]
US 20250307462A1 · Bhonsle et al. · 2025 [cited by applicant]
US 20250322244A1 · Mysore et al. · 2025 [cited by applicant]
US 20250335573A1 · Kale et al. · 2025 [cited by applicant]
US 20250336204A1 · Park et al. · 2025 [cited by applicant]
US 20250337775A1 · Kawasaki et al. · 2025 [cited by applicant]
US 20250363200A1 · Reagan et al. · 2025 [cited by applicant]
US 20250373627A1 · Hu et al. · 2025 [cited by applicant]
US 20250384400A1 · Chakravarthula et al. · 2025 [cited by applicant]
US 20250390603A1 · Kamyshenko et al. · 2025 [cited by applicant]
US 20260010562A1 · Peterson · 2026 [cited by applicant]
US 20260017386A1 · Ohayon et al. · 2026 [cited by applicant]
US 20260030247A1 · Zhang · 2026 [cited by examiner]
US 20260058995A1 · Purathepparambil et al. · 2026 [cited by applicant]
US 20260067314A1 · Reddy et al. · 2026 [cited by applicant]
US 20260087387A1 · Williamson · 2026 [cited by applicant]
US 20260087406A1 · Ghosh et al. · 2026 [cited by applicant]
“Safety is Not Only About Refusal: Reasoning-Enhanced Fine-tuning for Interpretable LLM Safety”, Zhang et al. [cited by examiner]
“Adversarially Robust and Interpretable Magecart Malware Detection”, Pereira et al, 2025. [cited by examiner]
“A Multi-Agent System for Cybersecurity Threat Detection and Correlation Using Large Language Models”, Hmimou et al, 2025. [cited by examiner]
Enhancing Contextual Understanding in Large Language Models through Contrastive Decoding, Zhao et al, Jun. 2024. [cited by examiner]
“Contextualized Evaluations: Judging language model responses to underspecified queries”, Malaviya et al, Jul. 22, 2025. [cited by examiner]