Inverse reinforcement learning (IRL) is a machine learning approach that observes demonstrations of an agent's behavior and infers a reward function under which that behavior is optimal. It reverses the direction of reinforcement learning, which learns a policy from a given reward function. Andrew Ng and Stuart Russell formalized the problem in their 2000 paper "Algorithms for Inverse Reinforcement Learning."
IRL is used in robot control, autonomous driving, and preference inference, where a reward function is hard to specify by hand. Unlike imitation learning, which copies expert behavior directly, it tries to recover the goal behind the behavior, and it forms part of the theoretical background of RLHF, which learns a reward model from human feedback.