On-policy Living

I thought this post from Jason Wei (@_jasonwei) was insightful. It makes an analogy between imitation learning and on-policy learning, and how imitation learning can only get you so far.

I think it rings true in various ways. Early in my career, I benefited immensely from emulating more senior researchers and engineers. But this can only take you so far; to level-up, you need to take yourself to a frontier and go it alone.

The same holds true for studying. When I study Anki flashcards, I quickly find out whether I can't explain something well, which is a sign that I don't understand the concept well. When that happens, I deepen my understanding of the concept, then improve on my study decks.

Here's a copy of the post:

Becoming an RL diehard in the past year and thinking about RL for most of my waking hours inadvertently taught me an important lesson about how to live my own life.

One of the big concepts in RL is that you always want to be โ€œon-policyโ€: instead of mimicking other peopleโ€™s successful trajectories, you should take your own actions and learn from the reward given by the environment. Obviously imitation learning is useful to bootstrap to nonzero pass rate initially, but once you can take reasonable trajectories, we generally avoid imitation learning because the best way to leverage the modelโ€™s own strengths (which are different from humans) is to only learn from its own trajectories. A well-accepted instantiation of this is that RL is a better way to train language models to solve math word problems compared to simple supervised finetuning on human-written chains of thought.

Similarly in life, we first bootstrap ourselves via imitation learning (school), which is very reasonable. But even after I graduated school, I had a habit of studying how other people found success and trying to imitate them. Sometimes it worked, but eventually I realized that I would never surpass the full ability of someone else because they were playing to their strengths which I didnโ€™t have. It could be anything from a researcher doing yolo runs more successfully than me because they built the codebase themselves and I didnโ€™t, or a non-AI example would be a soccer player keeping ball possession by leveraging strength that I didnโ€™t have.

The lesson of doing RL on policy is that beating the teacher requires walking your own path and taking risks and rewards from the environment. For example, two things I enjoy more than the average researcher are (1) reading a lot of data, and (2) doing ablations to understand the effect of individual components in a system. Once when collecting a dataset, I spent a few days reading data and giving each human annotator personalized feedback, and after that the data turned out great and I gained valuable insight into the task I was trying to solve. Earlier this year I spent a month going back and ablating each of the decisions that I previously yoloโ€™ed while working on deep research. It was a sizable amount of time spent, but through those experiments I learned unique lessons about what type of RL works well. Not only was leaning into my own passions more fulfilling, but I now feel like Iโ€™m on a path to carving a stronger niche for myself and my research.

In short, imitation is good and you have to do it initially. But once youโ€™re bootstrapped enough, if you want to beat the teacher you must do on-policy RL and play to your own strengths and weaknesses :)

Copyright Ricardo Decal. ricardodecal.com