# US 2023/0267284 A1 · Systems and Methods for Automated Response to Natural Language Instructions

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

- Number: US 2023/0267284 A1
- Document ID: US20230267284A1
- Status: Published application
- Kind: A1
- Application number: 18/172,969
- Filed: 2023-02-22
- Published: 2023-08-24
- Earliest claimed: 2022-02-22
- Assignees: The Board of Trustees of the Leland Stanford Junior University
- Applicants: The Board of Trustees of the Leland Stanford Junior University
- Inventors: Divyansh Garg; Skanda Vaidyanath
- Web page: https://patentgrep.com/patent/US20230267284A1

## CPC

- G06F 40/44: Statistical methods, e.g. probability models
- G06F 40/216: using statistical methods
- G06F 40/30: Semantic analysis
- G06F 40/35: Discourse or dialogue representation
- G06N 3/045: Combinations of networks
- G06N 20/00: Machine learning
- G06N 20/20: Ensemble learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Systems and methods for automated response to natural language instructions in accordance with embodiments of the invention are illustrated. One embodiment includes a method for training an agent, the method including sampling an instruction and observation pair from a dataset, predicting a skill code, using a skill predictor, based on the instruction and observation pair, predicting, for each of a plurality of timesteps, a set of one or more actions based on the predicted skill code and a state history using a policy, and updating the skill predictor and the policy based on a comparison of the predicted set of actions and the observation. In many embodiments, the trained agent can then be used to carry out natural language instructions.

## Claims

### Claim 1

A method for training an agent, the method comprising:
sampling an instruction and observation pair from a dataset;
predicting a skill code, using a skill predictor, based on the instruction and observation pair;
predicting, for each of a plurality of timesteps, a set of one or more actions based on the predicted skill code and a state history using a policy; and
updating the skill predictor and the policy based on a comparison of the predicted set of actions and the observation.

### Claim 2 (depends on 1)

The method of claim 1 further comprising:
predicting a second skill code, using the skill predictor, based on the instruction and observation pair and the state history;
predicting, for each of a plurality of timesteps, a second set of one or more actions based on the second predicted skill code and the state history using the policy; and
updating the skill predictor and the policy based on a comparison of predicted second set of actions and the observation.

### Claim 3 (depends on 1)

The method of claim 1, wherein the instruction and observation pair comprises a natural language instruction and a sequence of one or more observations.

### Claim 4 (depends on 3)

The method of claim 3, wherein the sequence of observations includes a set of one or more state-action pairs that describe a state and a corresponding action.

### Claim 5 (depends on 1)

The method of claim 1, wherein predicting the skill code comprises:
generating an instruction embedding based on the instruction of the instruction and observation pair;
generating an observation embedding based on the observation of the instruction and observation pair;
generating a skill embedding based on the instruction embedding and the observation embedding; and
identifying a skill code from a codebook of skill codes based on the generated skill embedding.

### Claim 6 (depends on 5)

The method of claim 5, wherein identifying the skill code from the codebook of skill codes is performed using a vector quantization process.

### Claim 7 (depends on 1)

The method of claim 1, wherein updating the skill predictor and the policy is based on an objective, wherein the objective comprises a behavior-cloning loss and a vector quantization loss, and wherein the vector quantization loss minimizes the conditional entropy of skill predictor embeddings given a codebook of skill embeddings.

### Claim 8 (depends on 1)

The method of claim 1, wherein updating the skill predictor and the policy comprises using a straight-through gradient estimator to backpropagate changes to the skill predictor.

### Claim 9

A method for enabling a machine to act upon natural language instructions, comprising:
obtaining a plurality of instruction and observation pairs;
generating language embeddings for each instruction in the plurality of instruction and observation pairs using a language encoder;
generating observation embeddings for each observation in the plurality of instruction and observation pairs;
predicting a set of skill codes for each given pair in the plurality of instruction and observation pairs based on a given language embedding and a given observation embedding generated from the given pair using a skill predictor;
predicting an action to correctly resolve the instruction of the given pair using a policy based on the set of skill codes; and
controlling a device to perform the predicted action.

### Claim 10 (depends on 9)

The method of claim 9, wherein the set of skill codes are human interpretable.

### Claim 11 (depends on 9)

The method of claim 9, wherein vector quantization is used to translate the predicted set of skill codes into enumerated skill codes from a digital codebook.

### Claim 12 (depends on 9)

The method of claim 9, wherein the controlled device is a robot.

### Claim 13 (depends on 9)

The method of claim 9, wherein the controlled device is an autonomous vehicle.

### Claim 14 (depends on 9)

The method of claim 9, wherein the controlled device is a virtual avatar.

### Claim 15

A system for enabling a machine to act upon natural language instructions, comprising:
a processor;
a controllable device; and
a memory, comprising a natural language processing application that configures the processor to:
obtain a plurality of instruction and observation pairs;
generate language embeddings for each instruction in the plurality of instruction and observation pairs using a language encoder;
generate observation embeddings for each observation in the plurality of instruction and observation pairs;
predict a set of skill codes for each given pair in the plurality of instruction and observation pairs based on a given language embedding and a given observation embedding generated from the given pair using a skill predictor;
predict an action to correctly resolve the instruction of the given pair using a policy based on the set of skill codes; and
control the controllable device to perform the predicted action.

### Claim 16 (depends on 15)

The system of claim 15, wherein the set of skill codes are human interpretable.

### Claim 17 (depends on 15)

The system of claim 15, wherein vector quantization is used to translate the predicted set of skill codes into enumerated skill codes from a digital codebook.

### Claim 18 (depends on 15)

The system of claim 15, wherein the controlled device is a robot.

### Claim 19 (depends on 15)

The system of claim 15, wherein the controlled device is an autonomous vehicle.

### Claim 20 (depends on 15)

The system of claim 15, wherein the controlled device is a virtual avatar.
