An “EPIC” Way To Evaluate Reward Functions In Reinforcement Learning

“Specifying a reward function can be one of the trickiest parts of applying RL to a problem.”


At the guts of a profitable reinforcement studying algorithm sits a well-coded reward perform. Reward features for many real-world duties are difficult to specify procedurally. Most real-world duties have advanced reward features. In specific, duties involving human interplay rely on advanced and user-dependent preferences. A well-liked perception inside the RL neighborhood is that it’s often easier and extra strong to specify a reward perform, fairly than a coverage maximising that reward perform.

Today there are various methods to be taught a reward perform from knowledge as different because the preliminary state, demonstrations, corrections, choice comparisons, and plenty of different knowledge sources. A gaggle of researchers from DeepMind, Berkeley and OpenAI have introduced EPIC, a brand new option to consider reward features and reward studying algorithms.

EPIC overview

Source: DeepMind Safety Research

RL coaching is computationally costly. For occasion, if the coverage performs poorly, you’ll be able to’t inform whether it is as a result of discovered reward failing to match person preferences or the RL algorithm failing to optimise the discovered reward. According to the researchers, Equivalent-Policy Invariant Comparison or (EPIC) works by evaluating reward features immediately, with out coaching a coverage. EPIC is a quick and dependable option to compute the similarity of two reward features work. EPIC can be utilized to benchmark reinforcement studying algorithms by evaluating discovered reward features to a ground-truth reward. 

In a paper titled “Quantifying difference in reward functions” (not too long ago accepted on the prestigious ICLR convention), the researchers claimed EPIC resulted in 1,000 instances sooner resolution than different analysis strategies. Furthermore, it requires little to no hyperparameter tuning. The researchers confirmed reward features judged as comparable by EPIC induce insurance policies with comparable returns, even in unseen environments.

How EPIC works:

  •  As proven within the illustration above, EPIC compares reward features Rᵤ and Rᵥ by first mapping them to canonical representatives.
  •  It then computes the Pearson distance between the canonical representatives on a protection distribution 𝒟. 

Note: Pearson distance between two random variables X and Y is calculated as follows:

EPIC distance is outlined utilizing Pearson distance as follows:

Where, D: distance, R: rewards, S: present state, A: motion carried out, S1 : modified state

The distance calculated utilizing this strategy can then be used to foretell the result of utilizing a sure reward perform. According to the researchers, canonicalisation removes the impact of potential shaping, and Pearson distance is invariant to optimistic affine transformations.

RL brokers try to maximise reward. This is nice so long as the excessive reward is discovered solely in states that the person finds fascinating. However, in programs employed in the actual world, there could also be undesired shortcuts to excessive reward involving the agent tampering with the method that determines agent reward, the reward perform. For occasion, a self-driving automotive; a optimistic reward could also be given as soon as it reaches the proper vacation spot and unfavorable rewards for breaking visitors guidelines and inflicting accidents. Standardised metrics are an vital driver of progress in machine studying. Unfortunately, conventional policy-based metrics don’t assure the constancy of the discovered reward perform. A reward is non-zero solely on the finish, the place it’s both −1, 0, or 1, relying on who received. In any virtually applied system, agent reward might not coincide with person utility.

To consider EPIC, the researchers developed two options as baselines: Episode Return Correlation (ERC) and Nearest Point in Equivalence Class (NPEC). On evaluating procedurally specified reward features in 4 duties, the researchers discovered EPIC is extra dependable than the baselines NPEC and ERC, and extra computationally environment friendly than NPEC. The experimental outcomes confirmed  EPIC appropriately infers zero distance between equal reward features that the NPEC and ERC baselines wrongly thought of dissimilar.

Source: DeepMind

Reinforcement studying by no means received the eye it deserved; the principle purpose being its areas of utility. Unlike a typical convolutional neural community, used for picture tagging on social media, RL’s use circumstances — self driving, robotics for medical surgical procedures and so forth — are extra crucial. This make reward perform analysis much more vital. There can’t be sufficient stress exams for an RL algorithm given the unsure nature of the actual world. But, the analysis of reward features is an effective place to start out. As RL is more and more utilized to advanced and user-facing functions resembling recommender programs, chatbots and autonomous autos, reward features analysis will want extra consideration. Since there are numerous methods to specify a reward perform, the researchers consider EPIC can play an important position right here.

Key Takeaways

  • Current reward studying algorithms have appreciable limitations
  • The distance between reward features is a extremely informative addition for analysis
  • EPIC distance compares reward features immediately, with out coaching a coverage.
  • EPIC is quick, dependable and may predict return even in unseen deployment environments.

EPIC is now out there as a library. Check the Github repo.

Subscribe to our Newsletter

Get the most recent updates and related affords by sharing your e-mail.

Join Our Telegram Group. Be a part of an interesting on-line neighborhood. Join Here.


Please enter your comment!
Please enter your name here