Table of Contents
Fetching ...

Memory-Based Advantage Shaping for LLM-Guided Reinforcement Learning

Narjes Nourzad, Carlee Joe-Wong

TL;DR

This work constructing a memory graph that encodes subgoals and trajectories from both LLM guidance and the agent's own successful rollouts and derives a utility function that evaluates how closely the agent's trajectories align with prior successful strategies, which shapes the advantage function.

Abstract

In environments with sparse or delayed rewards, reinforcement learning (RL) incurs high sample complexity due to the large number of interactions needed for learning. This limitation has motivated the use of large language models (LLMs) for subgoal discovery and trajectory guidance. While LLMs can support exploration, frequent reliance on LLM calls raises concerns about scalability and reliability. We address these challenges by constructing a memory graph that encodes subgoals and trajectories from both LLM guidance and the agent's own successful rollouts. From this graph, we derive a utility function that evaluates how closely the agent's trajectories align with prior successful strategies. This utility shapes the advantage function, providing the critic with additional guidance without altering the reward. Our method relies primarily on offline input and only occasional online queries, avoiding dependence on continuous LLM supervision. Preliminary experiments in benchmark environments show improved sample efficiency and faster early learning compared to baseline RL methods, with final returns comparable to methods that require frequent LLM interaction.

Memory-Based Advantage Shaping for LLM-Guided Reinforcement Learning

TL;DR

This work constructing a memory graph that encodes subgoals and trajectories from both LLM guidance and the agent's own successful rollouts and derives a utility function that evaluates how closely the agent's trajectories align with prior successful strategies, which shapes the advantage function.

Abstract

In environments with sparse or delayed rewards, reinforcement learning (RL) incurs high sample complexity due to the large number of interactions needed for learning. This limitation has motivated the use of large language models (LLMs) for subgoal discovery and trajectory guidance. While LLMs can support exploration, frequent reliance on LLM calls raises concerns about scalability and reliability. We address these challenges by constructing a memory graph that encodes subgoals and trajectories from both LLM guidance and the agent's own successful rollouts. From this graph, we derive a utility function that evaluates how closely the agent's trajectories align with prior successful strategies. This utility shapes the advantage function, providing the critic with additional guidance without altering the reward. Our method relies primarily on offline input and only occasional online queries, avoiding dependence on continuous LLM supervision. Preliminary experiments in benchmark environments show improved sample efficiency and faster early learning compared to baseline RL methods, with final returns comparable to methods that require frequent LLM interaction.
Paper Structure (4 sections, 1 equation, 2 figures, 1 table, 1 algorithm)

This paper contains 4 sections, 1 equation, 2 figures, 1 table, 1 algorithm.

Figures (2)

  • Figure 1: Overview of the proposed method.
  • Figure 2: Mean return on FrozenLake-8x8 (top) and Doorkey (bottom). Our method has the highest return.