This is part of a weekly series covering generative AI as applied to investing, drawn from source material from the full-length book, Truth Engine: Applying AI to Investing.

It’s worth examining exactly how the RM is used in training generative AI, the so-called PPO (Proximal Policy Optimization) RL loop. Surprisingly, we’ve already assembled the pieces. Fundamentally, PPO comprises of two key components, the policy model and the value model. In simple terms, the policy model suggests the next word, and the value model assesses the quality. As you might infer, the value model is the RM we introduced earlier, and where our human judgement comes in. The policy model is exactly the fluency model, the decoder-based architecture.

RL mimics the processes of biological organisms. Unexpectedly, the struggle to learn is the same for the living and the silicon – when should a strategy be maintained and when should new methods be explored? The answer is convergent. Phases of exploration and exploitation should be interleaved. On the human front, Steven Kotler chronicles the millennia-old practice of shattering ossified thinking patterns in his text, “Stealing Fire”. Luckily for AI agents, exploration can be switched on cyclically via swapping in a different reward signal. Recent work from Stanford Education Professor Nick Haber’s laboratory added an elegant solution, making agents curious.77 In contrast to previous approaches, their Curious Replay approach uses curiosity as a guiding force, not for making decisions, but for selecting experiences to learn from. This curiosity-driven method improves AI performance in environments that undergo changes, while still maintaining effectiveness in stable environments.

Agent curiosity is beneficial in less obvious adaptation scenarios, like in an open-world game called Crafter. One key understanding behind Curious Replay is that an AI model needs to keep up with environmental changes to function effectively. If an AI model is inaccurate or outdated, it can make poor decisions, especially when encountering new situations, leading to a downward spiral of bad decision-making and data collection. This hints at the broad potential of this method in improving AI adaptability in a variety of situations.

Figure: Reinforcement Learning from Human Feedback (RLHF) incorporates the Reward Model (RM) and the LLM in a PPO loop.

Curious Replay addresses this by focusing the AI’s learning on the unfamiliar or challenging parts of its environment. This is a big shift from how AI usually learns, which is by randomly revisiting old experiences. This older approach can lead to AI focusing too much on experiences that are no longer relevant, and missing out on key updates to its understanding of the world. Building on the success of a technique called prioritized experience replay, Curious Replay further refines it by introducing curiosity into the equation, resulting in a significant leap in AI adaptability. Curious Replay improves AI performance in new tests, with a six-fold increase in object interaction tasks.

The RL loop balances fast learning with thorough understanding by iterating LLM predictions and RM ratings. Like Bayesian modeling, it’s important to update beliefs as new evidence becomes available. The NN update is extremely powerful with all pieces assembled (figure). We have finally unveiled the paradigm of RLHF.

By combining RL with generative GPT-based architectures, every word is subject to a Bayesian update, meaning human feedback trains the NN at every single utterance. Imagine listening critically to a speaker and hanging on every single word uttered. One single wrong word can disrupt the entire message. We’ve all had this experience listening to speeches, hanging on every word. RLHF has effectively recreated it. Every word matters – that’s the level of precision RLHF brings to the table.

This is part of a weekly series covering generative AI as applied to investing, drawn from source material from the full-length book, Truth Engine: Applying AI to Investing.