<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Imitation Learning |</title><link>https://changshenghsun.com/tags/imitation-learning/</link><atom:link href="https://changshenghsun.com/tags/imitation-learning/index.xml" rel="self" type="application/rss+xml"/><description>Imitation Learning</description><generator>HugoBlox Kit (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Mon, 01 Sep 2025 00:00:00 +0000</lastBuildDate><image><url>https://changshenghsun.com/media/icon_hu_d41247041d33f7ba.png</url><title>Imitation Learning</title><link>https://changshenghsun.com/tags/imitation-learning/</link></image><item><title>RecoveryDAgger</title><link>https://changshenghsun.com/projects/recoverydagger/</link><pubDate>Mon, 01 Sep 2025 00:00:00 +0000</pubDate><guid>https://changshenghsun.com/projects/recoverydagger/</guid><description>&lt;p&gt;&lt;strong&gt;Sep – Dec 2025&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id="the-problem"&gt;The problem&lt;/h2&gt;
&lt;p&gt;Imitation learning lets an agent pick up complex behaviour from expert
demonstrations, but plain behaviour cloning drifts. Small errors push the agent
into states the expert never demonstrated, and from there the mistakes compound.&lt;/p&gt;
&lt;p&gt;DAgger fixes the drift by querying the expert on the states the learner actually
visits. That works, but it asks constantly — and expert supervision is the
expensive part of the whole setup.&lt;/p&gt;
&lt;h2 id="what-we-built"&gt;What we built&lt;/h2&gt;
&lt;p&gt;RecoveryDAgger keeps DAgger&amp;rsquo;s interactive loop but adds a cheaper first response
to trouble. In a risky state the agent does not call the expert straight away.
It first runs a &lt;strong&gt;recovery policy&lt;/strong&gt; that corrects itself locally by ascending the
gradient of a learned &lt;strong&gt;Success Q-function&lt;/strong&gt; — a network that estimates the
probability the task will still be completed from the current state. The expert
is queried only when recovery is unreliable, which is to say only when the state
is genuinely novel.&lt;/p&gt;
&lt;p&gt;The point is to spend expert supervision on new information, rather than on
situations the agent could have dug itself out of.&lt;/p&gt;
&lt;h2 id="my-role"&gt;My role&lt;/h2&gt;
&lt;p&gt;I led a four-person team and built the expert policy and the training pipeline
myself, in PyTorch and Stable-Baselines3. The expert is a rule-based controller
that steers toward the goal from the current state — deterministic, 100% success
on the task — and it generates the 100-trajectory offline dataset every method
in the paper starts from. Behaviour cloning on that dataset lands at roughly 26%
success, which is exactly the gap online training has to close.&lt;/p&gt;
&lt;p&gt;The design decision I care most about is how recovery actually produces an
action. PointMaze has a continuous action space (forces along x and y), so the
obvious version of recovery — enumerate candidate actions, take the arg max of
the Success Q-function — is not available. We instead start from the action the
imitation policy already proposed and run a few steps of gradient ascent on the
Success Q-function with respect to the action, projecting back into the valid
range after each step. Recovery is a local correction of the policy&amp;rsquo;s own
intent, not a second controller fighting it.&lt;/p&gt;
&lt;p&gt;The other decision was to stop trusting a single Q-network. One learned Success
Q is only an approximation, and recovery follows its gradient, so its errors get
amplified rather than averaged out. We trained an ensemble instead: the ensemble
mean defines risk, the ensemble variance defines novelty, and the recovery
objective subtracts a penalty λ·Var(Q) so recovery never climbs toward states
the ensemble disagrees about. One family of networks ends up serving all three
roles — risk detector, novelty detector, and recovery direction.&lt;/p&gt;
&lt;h2 id="results"&gt;Results&lt;/h2&gt;
&lt;p&gt;Evaluated on a four-room PointMaze navigation task against ThriftyDAgger, the
standard query-efficient baseline. Every method starts from the same
behaviour-cloned policy.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;Expert queries&lt;/th&gt;
&lt;th&gt;Recovery queries&lt;/th&gt;
&lt;th&gt;Success rate&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Behaviour cloning&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;0.26&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ThriftyDAgger (baseline)&lt;/td&gt;
&lt;td&gt;20,048&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;0.81&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Single-Q recovery (ours)&lt;/td&gt;
&lt;td&gt;2,504&lt;/td&gt;
&lt;td&gt;9,232&lt;/td&gt;
&lt;td&gt;0.86&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ensemble-Q recovery (ours)&lt;/td&gt;
&lt;td&gt;2,693&lt;/td&gt;
&lt;td&gt;9,296&lt;/td&gt;
&lt;td&gt;0.88&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Ensemble-Q recovery ends up more accurate than the baseline while querying the
expert &lt;strong&gt;7.4× less often&lt;/strong&gt;. Partway through training the gap is even wider: both
recovery variants reach ~0.7 success after about 2k expert queries, where
ThriftyDAgger needs roughly 20k to get to the same place.&lt;/p&gt;
&lt;p&gt;The interesting part is &lt;em&gt;where&lt;/em&gt; the savings come from. Most of what a risk-gated
method spends its query budget on is not genuinely unfamiliar — it is
recoverable: local deviations near a doorway or a wall that the agent could fix
by itself. Separating &amp;ldquo;novel&amp;rdquo; from &amp;ldquo;merely risky&amp;rdquo; is what buys the 7.4×.&lt;/p&gt;
&lt;p&gt;The project placed 3rd among 30 teams, most of them graduate students, and the
work has been accepted to IEEE Potentials.&lt;/p&gt;</description></item></channel></rss>