Beyond Imitation: Recovering Dense Rewards from Demonstrations

Jiangnan Li, Thuy-Trang Vu, Ehsan Abbasnejad, Gholamreza Haffari
10/2/2025
cs.LGcs.CL

No confident code implementation found for this paper.

Abstract

Conventionally, supervised fine-tuning (SFT) is treated as a simple imitation learning process that only trains a policy to imitate expert behavior on demonstration datasets. In this work, we challenge this view by establishing a fundamental equivalence between SFT and Inverse Reinforcement Learning. We prove that the SFT objective is a special case of Inverse Q-Learning, which implies that the SFT process does not just learn a policy, but also an implicit, dense, token-level reward model that explains the expert demonstrations. We then show how to recover this dense reward signal directly from the SFT model by formulating a baseline-relative reward function. The availability of such a dense reward model offers numerous benefits, providing granular credit assignment for each token generated. We demonstrate one key application by using these recovered rewards to further improve the policy with reinforcement learning. Our method, Dense-Path REINFORCE, consistently outperforms the original SFT models on instruction-following benchmarks. This work reframes SFT not merely as policy imitation but as a powerful reward learning mechanism, opening new possibilities for leveraging expert demonstrations.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2025beyond,
  title  = {Beyond Imitation: Recovering Dense Rewards from Demonstrations},
  author = {Jiangnan Li and Thuy-Trang Vu and Ehsan Abbasnejad and Gholamreza Haffari},
  year   = {2025},
  eprint = {2510.02493},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.02493v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.02493.svg)](https://codeofpaper.com/paper/2510.02493)

Discussion