# US 2026/0228220 A1 · Logical implication steering

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

- Number: US 2026/0228220 A1
- Document ID: US20260228220A1
- Status: Published application
- Kind: A1
- Application number: 19/070,555
- Filed: 2025-03-05
- Published: 2026-08-06
- Earliest claimed: 2025-01-31
- Assignees: Salesforce, Inc.
- Applicants: Salesforce, Inc.
- Inventors: Damjan Kalajdzievski
- Web page: https://patentgrep.com/patent/US20260228220A1

## CPC

- G06F 16/2455: Query execution
- G06N 3/045: Combinations of networks
- G06F 16/258: {Data format conversion from or to a database}
- G06F 40/20: Natural language analysis (semantic analysis of natural language G06F40/30)
- G06F 40/216: using statistical methods
- G06F 40/284: Lexical analysis, e.g. tokenisation or collocates
- G06F 40/30: Semantic analysis
- G06F 40/35: Discourse or dialogue representation
- G06F 40/40: Processing or translation of natural language (natural language analysis G06F40/20; semantic analysis G06F40/30)
- G06F 40/56: Natural language generation
- G06N 3/042: Knowledge-based neural networks; Logical representations of neural networks
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/047: Probabilistic or stochastic networks
- G06N 3/08: Learning methods
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 3/088: Non-supervised learning, e.g. competitive learning
- G06N 3/09: Supervised learning
- G06N 3/096: Transfer learning
- G06N 5/02: Knowledge representation; Symbolic representation
- G06N 5/022: Knowledge engineering; Knowledge acquisition
- G06N 20/00: Machine learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Logical implication steering in a machine learning model. In some implementations, a machine learning model with a logical implication circuit installed receives a text-based version of a prompt. The text-based version of the prompt is tokenized in an input embedding layer of the machine learning model to generate a token-based version of the prompt. From the token-based version of the prompt, a token-based version of a response is generated. This generation includes iteratively predictively selecting tokens for the token-based version of the response. The iteratively predictively selecting tokens comprises applying the logical implication circuit that, when a first vector is similar to a representation on an input to a linear mapping operation in the machine learning model, steers the generating toward a second vector. The token-based version of the response is converted to a text-based version of the response and output by the machine learning model.

## Claims

### Claim 1

A method comprising:
receiving, by a machine learning model with a logical implication circuit installed, a text-based version of a prompt;
tokenizing, in an input embedding layer of the machine learning model, the text-based version of the prompt to generate a token-based version of the prompt;
generating a token-based version of a response based on the token-based version of the prompt, the generating comprising:
iteratively, by the machine learning model, predictively selecting tokens for the token-based version of the response, wherein the iteratively predictively selecting tokens comprises:
applying the logical implication circuit that, when a first vector is similar to a representation on an input to a linear mapping operation in the machine learning model, steers the generating toward a second vector;
converting, in an output embedding layer of the machine learning model, the token-based version of the response to a text-based version of the response, and
outputting, by the machine learning model, the text-based version of the response.

### Claim 2 (depends on 1)

The method of claim 1, wherein:
the iteratively predictively selecting tokens comprises:
applying, by the machine learning model, the linear mapping operation on the input and a matrix to generate a first output;
the applying the logical implication circuit comprises:
calculating, by a feed forward network installed as the logical implication circuit in the machine learning model, a second output based on the input, wherein the feed forward network was trained to produce outputs that steer toward the second vector only when the first vector is similar to a representation on inputs to the feed forward network; and
the method further comprises:
adding the first output and the second output to a residual stream.

### Claim 3 (depends on 1)

The method of claim 1, wherein:
the applying the logical implication circuit comprises:
applying, by the machine learning model, the linear mapping operation to the input and a matrix to generate an output, wherein the matrix was modified to cause the output to steer toward the second vector based on a magnitude of similarly of the first vector and the representation on the input to the linear mapping operation; and
the method further comprises:
adding the output to a residual stream.

### Claim 4 (depends on 1)

The method of claim 1, wherein the linear mapping operation is in an attention layer of the machine learning model.

### Claim 5 (depends on 4)

The method of claim 4, wherein the attention layer is part of a first of a plurality of blocks of the machine learning model, wherein the plurality of blocks is between the input embedding layer and the output embedding layer.

### Claim 6 (depends on 5)

The method of claim 5, wherein the plurality of blocks are in an order, and wherein at least one quarter of the plurality of blocks come before the first of the plurality of blocks.

### Claim 7 (depends on 4)

The method of claim 4, wherein the attention layer is a multi-head attention layer, and the linear mapping operation is on the input and an output attention project matrix.

### Claim 8 (depends on 1)

The method of claim 1, wherein the first vector was extracted from a first predicate, and wherein the second vector was extracted from a second predicate.

### Claim 9 (depends on 1)

The method of claim 1, wherein the second vector is scaled with an optimized hyperparameter.

### Claim 10 (depends on 1)

The method of claim 1, wherein the logical implication circuit reduces hallucinations even when trained using less than or equal to 100 training data points.

### Claim 11

A non-transitory machine-readable storage medium that provides instructions that, if executed by one or any combination of a set of processors, are configurable to cause a system to perform operations comprising:
receiving, by a machine learning model with a logical implication circuit installed, a text-based version of a prompt;
tokenizing, in an input embedding layer of the machine learning model, the text-based version of the prompt to generate a token-based version of the prompt;
generating a token-based version of a response based on the token-based version of the prompt, the generating comprising:
iteratively, by the machine learning model, predictively selecting tokens for the token-based version of the response, wherein the iteratively predictively selecting tokens comprises:
applying the logical implication circuit that, when a first vector is similar to a representation on an input to a linear mapping operation in the machine learning model, steers the generating toward a second vector;
converting, in an output embedding layer of the machine learning model, the token-based version of the response to a text-based version of the response, and
outputting, by the machine learning model, the text-based version of the response.

### Claim 12 (depends on 11)

The non-transitory machine-readable storage medium of claim 11, wherein:
the iteratively predictively selecting tokens comprises:
applying, by the machine learning model, the linear mapping operation on the input and a matrix to generate a first output;
the applying the logical implication circuit comprises:
calculating, by a feed forward network installed as the logical implication circuit in the machine learning model, a second output based on the input, wherein the feed forward network was trained to produce outputs that steer toward the second vector only when the first vector is similar to a representation on inputs to the feed forward network; and
the method further comprises:
adding the first output and the second output to a residual stream.

### Claim 13 (depends on 11)

The non-transitory machine-readable storage medium of claim 11, wherein:
the applying the logical implication circuit comprises:
applying, by the machine learning model, the linear mapping operation to the input and a matrix to generate an output, wherein the matrix was modified to cause the output to steer toward the second vector based on a magnitude of similarly of the first vector and the representation on the input to the linear mapping operation; and
the method further comprises:
adding the output to a residual stream.

### Claim 14 (depends on 11)

The non-transitory machine-readable storage medium of claim 11, wherein the linear mapping operation is in an attention layer of the machine learning model.

### Claim 15 (depends on 14)

The non-transitory machine-readable storage medium of claim 14, wherein the attention layer is part of a first of a plurality of blocks of the machine learning model, wherein the plurality of blocks is between the input embedding layer and the output embedding layer.

### Claim 16 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the plurality of blocks are in an order, and wherein at least one quarter of the plurality of blocks come before the first of the plurality of blocks.

### Claim 17 (depends on 14)

The non-transitory machine-readable storage medium of claim 14, wherein the attention layer is a multi-head attention layer, and the linear mapping operation is on the input and an output attention project matrix.

### Claim 18 (depends on 11)

The non-transitory machine-readable storage medium of claim 11, wherein the first vector was extracted from a first predicate, and wherein the second vector was extracted from a second predicate.

### Claim 19 (depends on 11)

The non-transitory machine-readable storage medium of claim 11, wherein the second vector is scaled with an optimized hyperparameter.

### Claim 20 (depends on 11)

The non-transitory machine-readable storage medium of claim 11, wherein the logical implication circuit reduces hallucinations even when trained using less than or equal to 100 training data points.
