This disclosure relates generally to continual learning in slowly-varying environments, and more particularly, to providing an optimized action to an external system.
Many real-world situations involve sequential decision making where a decision making agent interacts with a stochastic environment. Typically at any time, the decision agent has a choice of actions to perform. Every time the agent performs an action, the environment provides a response (i.e. a reward), or an evaluative feedback, to the decision agent. For example, in order to maximize the time a user spends on a news website, a news website chooses to show particular content to the user and personalize the user's experience. In this case, the environment's response is the amount of time spent on the website by that user. In another example, in order to increase the amount of items a customer purchases from a store's website, an online retailer chooses a set of items to show the user on the landing page. In this case, the environment's response is the dollar amount of the purchases made by that user.
In addition to providing a response for an action performed by the decision agent, the environment can transition to a new state depending on the action performed by the decision agent. Typically, in a stochastic environment, even for the same state-action pair, the response of the environment is random but conforms to some underlying probability distribution. Additionally, the next state of the environment given a current state and action can be random with an underlying probability distribution. Assuming the environment is in an initial state, an action performed by the decision agent may affect not only the next state of the environment, but also all future states of the environment at subsequent time steps. The action performed at the initial state may affect not only the response received at the next step but also all future responses from the environment at subsequent time steps.
The response may be represented as a numerical value to reflect the response's desirability to the decision agent. To determine a maximized value of current and future responses, the decision agent may construct a policy to determine the best action at any given state.
Prior techniques, such as reinforcement learning, to construct desirable policies or models through interaction with the environment involve using a simple lookup table in cases where the state space is discrete and finite or a more sophisticated paradigm that uses function approximation methods such as decision trees or neural networks when the state space is continuous. In other techniques, such as an offline method, a model is built through offline processing of previously collected training data, which the decision agent later uses in live systems to make all future decisions. This offline method may be known as a “train once and use forever” paradigm. In yet other techniques, such as a batch update method that occurs online, the model is not updated after each interaction between the decision agent and the environment. Rather, the model is updated after a certain amount of time has elapsed or a certain amount of transactions have been completed. In this technique, the step size used by the learning algorithm to change the model parameters is gradually decreased, in which the model does not change after a sufficient time has elapsed. In this regard, this technique is similar to the offline method.
These prior techniques work well when the behavior of the environment does not change over time. However, typically in practice, the environment changes slowly over time relative to the rate of interaction between the decision agent and the environment. For example, clothing styles gradually change over several years whereas clothing retailers interact with customers on a daily basis.
In some exemplary embodiments, an apparatus configured to continually learn includes: at least one memory operable to store program instructions; at least one processor operable to read the stored program instructions; and according to the stored program instructions, the at least one processor is configured to be operated as: a decision engine configured to receive one or more action requests from a decision agent, and to select a model providing an optimized action; an orchestrator configured to deploy a first model to a decision engine, to initiate an observation period, and to initiate a test period; a model builder configured to build a second model, wherein the second model comprises collected transaction data from the observation period; and an evaluator configured to determine a performance score for the first model and a performance score for the second model.
In other exemplary embodiments, a continual learning method, implemented by one or more processors, includes: receiving one or more action requests from a decision agent; deploying a first model to a decision engine; initiating an observation period; building a second model, in which the second model comprises collected transaction data from the observation period; initiating a test period; determining a performance score for the first model and a performance score for the second model; and selecting the model providing an optimized action.
In yet other exemplary embodiments, a non-transitory computer readable storage medium, implemented by one or more processors, storing a continual learning system for causing a computer to function as: a decision engine configured to receive one or more action requests from a decision agent, and to select a model providing an optimized action; an orchestrator configured to deploy a first model to a decision engine, to initiate an observation period, and to initiate a test period; a model builder configured to build a second model, wherein the second model comprises collected transaction data from the observation period; and an evaluator configured to determine a performance score for the first model and a performance score for the second model.
Exemplary embodiments of the present invention relate generally to continual learning in slowly-varying environments, and more particularly, to providing an optimized action to an external system. Exemplary embodiments recognize without such a system to continually learn, human intervention and expertise is needed to monitor and adapt to changes in the environment. Exemplary embodiments for continual learning when the behavior of the environment varies slowly with time are described below with references to
Implementation of such exemplary embodiments may take a variety of forms, and exemplary implementation details are discussed subsequently with reference to the Figures.
Network 106 interconnects server 104 and decision agent 108. In general, network 106 can be any combination of connections and protocols capable of supporting communications between server 104, decision agent 108, and continual learning system 102. Network 106 can include wire cables, wireless communication links, fiber optic cables, routers, switches, firewalls, or any combination that can include wired, wireless, or fiber optic connections known by those skilled in the art.
Server 104 can be a web-based server hosting continual learning system 102, in accordance with exemplary embodiments of the present invention. In one exemplary embodiment, server 104 can be any programmable electronic device or computing system capable of receiving and sending data, via network 106, and performing computer-readable program instructions known by those skilled in the art. In some exemplary embodiments, server 104 can include a data storage repository (not shown) for storing data including, but not limited to, state information for all entities associated with an environment, transaction data, and various models or policies. Data storage repository can be any programmable electronic device or computing system capable of receiving, storing, and sending files and data, and performing computer readable program instructions capable of communicating with server 104 and decision agent 108, via network 106. In some exemplary embodiments, server 104 can be a cluster of computer nodes, in the distributed system, operating continual learning system 102, via network 106. In an exemplary embodiment, server 104 includes databases (not shown) that provides a service to external systems. In another exemplary embodiment, continual learning system 102 resides locally on server 104. In yet another exemplary embodiment, continual learning system 102 resides locally on one or more computer nodes.
In some exemplary embodiments, server 104 includes continual learning system 102 that utilizes components or models in order to select and provide an optimized action to decision agent 108. For example, continual learning system 102 utilizes a decision engine 202 to perform various functions for receiving one or more action requests from a decision agent 108. Continual learning system 102, utilizing the decision engine 202, can select a model providing an optimized action. Continual learning system 102, utilizing orchestrator 212, can deploy a first model to the decision engine 202, initiate an observation period, and initiate a test period. In another example, continual learning system 102 utilizes a model builder 210 to build the second model. In a final example, continual learning system 102 utilizes an evaluator 214 to determine a performance score for the first model and a performance score for the second model.
In some exemplary embodiments, continual learning system 102 operates on a central server, such as server 104, and can be utilized by one or more decision agents, such as decision agent 108, via a mobile application downloaded from the central server or a third-party application store, and executed on the one or more decision devices. In another exemplary embodiment, continual learning system 102 may be a software-based program, downloaded from a central server, such as server 104, and installed on one or more decision agents, such as decision agent 108. In yet another exemplary embodiment, continual learning system 102 can be utilized as a software service provided by a third-party cloud service provider (not shown).
In some exemplary embodiments, decision agent 108 is an agent to the server 104 and can be for example, a desktop computer, a laptop computer, a smart phone, or any other electronic device or computing system, known by those skilled in the art, capable of communicating with the server 104 through the network 106. For example, decision agent 108 may be a laptop computer capable of connecting to a network, such as network 106, to access continual learning system 102 and to provide requests for actions and rewards. In other exemplary embodiments, decision agent 108 can be any suitable types of mobile devices capable of running mobile applications or a mobile operating system.
In an exemplary embodiment, decision agent 108 interacts with an environment (e.g. a clothing retailer website or a news website). Decision agent 108 may request continual learning system 102 for an action. In another exemplary embodiment, decision agent 108 may provide the state of the environment (e.g. the duration of a user on articles of the news website, or the dollar amount of clothing purchases by a user) in the request. It can also be appreciated by those skilled in the art that decision agent 108 can provide an identifier of the entity corresponding to the request in lieu of the state of the environment.
In some exemplary embodiments, Decision Engine 202 receives a request for an action from Decision Agent 108. Decision Engine 202 retrieves parameters associated with a model from Model Database 208. Model Builder 210 builds a first model offline which it seeds to Model Database 208. Responsive to receiving a request for an action, Decision Engine 202 consults the current model and provides a recommended action to Decision Agent 108. Decision Agent 108 performs the recommended Action. In response to the performed action in the environment, Decision Agent 108 provides a response/reward to continual learning system 102.
In some exemplary embodiments, Decision Engine 202 notifies Archiver 204 that an action has been sent to Decision Agent 108 and Decision Agent 108 sent a response to the action. Archiver 204 writes transaction information to Transaction Database 206. In other exemplary embodiments, Archiver 204 can buffer transactions until a time or size limit is reached and then write to Transaction Database 206 in a bulk fashion.
In some exemplary embodiments, Orchestrator 212 is the central coordinator of continual learning system 102. Orchestrator 212 may contain one or more parameters, in which the parameters consist of an observation period and a test period. Orchestrator 212 may initiate the observation period and the test period. In an exemplary embodiment, the observation period may be the amount of time Decision Engine 202 uses a first model to prescribe actions for requests from Decision Agent 108. Archiver 204 writes transaction data to Transaction Database 206 during the observation period. In an exemplary embodiment, the test period is the amount of time Decision Engine 202 uses the first model and a second model to prescribe actions for requests from Decision Agent 108. In other exemplary embodiments, Decision Engine 202 can use more than two models during the test period. In yet other exemplary embodiments, Orchestrator 212 can be configured with a parameter to indicate the relative split of traffic across the models used during the test period, a parameter to specify the confidence level when comparing the performance of different models, and a parameter corresponding to the desired threshold to compare the difference in the average performance of models.
In some exemplary embodiments, Orchestrator 212 initiates Model Builder 210 to build models. Model Builder 210 may be executed at any time. In an exemplary embodiment, Model Builder 210 reads transaction data from Transaction Database 206 and trains a new model through various machine learning techniques for reinforcement learning known in the art, such as. Q-Learning, SARSA, and SARSA(λ). Model Builder 104 stores the new model in Model Database 208 after one is created.
In some exemplary embodiments, evaluator 214 can be at least one of an A/B Testing Evaluator, a Bandit Evaluator, or a Simulation Evaluator. In an exemplary embodiment in which Evaluator 214 implements an A/B Testing Evaluator, Evaluator 214 reads transaction data from Transaction Database 206 and compares the performance of the models in use during the test period using statistical hypothesis testing methods. In another exemplary embodiment in which Evaluator 214 implements a Bandit Evaluator, Evaluator 214 uses a two-arm or multi-arm Bandit approach to prescribe changes to the relative weights associated with each of the models being tested during the test period. In yet another exemplary embodiment in which Evaluator 214 implements a Simulation Evaluator, Evaluator 214 reads transaction data from Transaction Database 206, builds a model of the environment, and compares the performance of alternative models by testing them in the simulated environment.
Orchestrator 212 deploys a first model (302). In some exemplary embodiments, Orchestrator 212 retrieves a first model from Model Database 208 and deploys the first model, for example an initial seed model, to Decision Engine 202. Model Builder 210 may build the first model offline using transaction data collected from a legacy system, transaction data generated from a rule-based system designed by human experts, or any other method known in the art that uses available information. Model Builder 210 may store the first model in Model Database 208. In some exemplary embodiments, the first model may be referred to as model A.
Orchestrator 212 initiates an observation period (304). In some exemplary embodiments, Orchestrator 212 initiates the observation period using an observation period parameter. The observation period may be configured for a predetermined time period (e.g. an hour, a day, two weeks, a year). During the observation period, decision engine 202 services requests from Decision Agent 108 using the first model. Archiver 204 writes transaction data, regarding the requested services in the observation period (i.e. requested actions, actions, responses/rewards to the provided actions), to Transaction Database 206.
In some exemplary embodiments, during the observation period, continual learning system 102 periodically “wakes up” to determine if the observation period has expired. If continual learning system 102 determines the observation period has not expired, continual learning system goes back to “sleep” until the next predetermined polling time interval to determine if the observation period has expired. If continual learning system 102 determines the observation period has expired, continual learning system 102 proceeds as described below.
Responsive to the observation period ending, Model Builder 210 builds a second model (306). In some exemplary embodiments, Model Builder 210 builds a second model using transaction data collected during the observation period and stored in Transaction Database 206. In an exemplary embodiment, the second model may be referred to as model B. In other exemplary embodiments, Model Builder 210 builds more than one new model.
Orchestrator 212 deploys the second model (308). In some exemplary embodiments, Orchestrator 212 retrieves the second model from Model Database 208 and deploys the second model to Decision Engine 202. In some exemplary embodiments, Orchestrator 212 deploys the second model to a percentage of users of Decision Agent 108. For example, the first model can be configured to 80% of the users and the second model can be applied to the remaining 20% of the users. In another exemplary embodiment, Orchestrator 212 deploys the second model to all users of Decision Agent 108.
Responsive to a second model being deployed, Orchestrator 212 initiates a test period (310). In some exemplary embodiments, Orchestrator 212 initiates the test period using a test period parameter. The test period may be configured for a predetermined time period (e.g. an hour, a day, two weeks, a year). During the test period, decision engine 202 services requests from Decision Agent 108 using the first model and second model. Archiver 204 writes transaction data, regarding the requested services in the test period (i.e. action requests, actions, responses/rewards to the provided actions), to Transaction Database 206. In an exemplary embodiment, a transaction data log entry may include a model identifier to uniquely identify the model used in the corresponding transaction.
In some exemplary embodiments, during the test period, continual learning system 102 periodically “wakes up” to determine if the test period has expired. If continual learning system 102 determines the test period has not expired, continual learning system goes back to “sleep” until the next predetermined polling time interval to determine if the test period has expired. If continual learning system 102 determines the test period has expired, continual learning system 102 proceeds as described below.
Responsive to the test period ending, continual learning system 102 determines a first model score and a second model score (312). In some exemplary embodiments, Continual learning system 102 utilizes Evaluator 214 to determine the first model score and the second model score. Evaluator 214 can be an A/B testing evaluator, a bandit evaluator, or a simulation evaluator.
In an exemplary embodiment, in which Evaluator 214 implements an A/B Testing Evaluator, Evaluator 214 processes transaction data from Transaction Database 206 and computes a binary decision as to whether model B (i.e. the second model) is statistically better than model A (i.e. the first model). For example, Evaluator 214 can implement statistical hypothesis testing techniques such as Student's t-test, Welch's t-test, or any other hypothesis testing method known in the art. In another exemplary embodiment, Evaluator 214 can also test a hypothesis, in which model B is better than model A by a predetermined threshold (i.e. a magnitude) in the A/B Testing Evaluator.
Decision Engine 202 determines whether the second model outperforms the first model (decision block 318). If Decision Engine 202 determines the second model outperforms the first model (decision block 314, “YES” branch), the Decision Engine 202 selects the second model (316) and ends. In an exemplary embodiment, when model B statistically outperforms model A in A/B hypothesis testing, Decision Engine 202 replaces model B with model A. For the cases when Decision Engine 202 does not determine whether the second model outperforms the first model (decision block 314, “NO” branch), Decision Engine 202 selects the first model (318) and ends. In an exemplary embodiment, when Decision Engine 202 cannot determine whether model B outperforms model A, Decision Engine 202 discards model B and applies model A to all users.
In another exemplary embodiment, Evaluator 214 implements a bandit evaluator. Evaluator 214 implements a two-armed or multi-armed bandit approach to evaluate the first model and second model. Orchestrator 212 dynamically allocates a percentage of traffic (i.e. action requests) to the first and second models throughout the test period. If the desired confidence level is reached within the test period, Decision Engine 202 selects the second model for all users. For the cases in which the second model does not reach the desired confidence level, Decision Engine 202 selects the first model for all users.
In yet another exemplary embodiment, Evaluator 214 implements a simulation evaluator. For the cases in which Evaluator 214 implements a simulation evaluator, continual learning system 102 does not deploy the second model to Decision Engine 202 during the test period. Rather, Evaluator 214 tests the performance of the second model by comparing it to the performance of the first model in a simulated environment. In an exemplary embodiment, Evaluator 214 builds a simulation of an environment and decision agent 108 using transaction data stored in Transaction Database 206, in which the initial states are the states of users (e.g. the number of times a user has visited a website, the dollar amount of purchases made by the user, etc.) at the end of the observation period. In an exemplary embodiment, Evaluator 214 simulates a predetermined number of steps for the first and second model for each user. Evaluator 214 determines the average cumulative net rewards for each model at the end of the last step of each simulation run. Decision Engine 202 determines whether the average cumulative net rewards of the second model outperform the average cumulative net rewards of the first model. If Decision Engine 202 determines the second model outperforms the first model, the Decision Engine 202 selects the second model and ends. For the cases when Decision Engine 202 does not determine whether the second model outperforms the first model, Decision Engine 202 selects the first model and ends.
In some exemplary embodiments, Evaluator 214 implements two or more evaluators in sequence. For example, Evaluator 214 implements a simulation evaluator, and Evaluator 214 may then implement an A/B Testing Evaluator for Decision Engine 202 to determine whether the second model outperforms the first model.
Although the subject matter has been described in terms of exemplary embodiments, it is not limited thereto. Rather, the appended claims should be construed broadly, to include other variants and exemplary embodiments, which may be made by those skilled in the art without departing from the scope and range of equivalents of the subject matter.
Number | Date | Country | |
---|---|---|---|
62238821 | Oct 2015 | US |