From Struggle to Discovery: Learned Helplessness, Reward Prediction Error, and My Path to ML Research

The day after graduation, I began exploring machine learning research. I had completed a degree in Chemical Engineering, and this transition wasn’t planned. It was sparked by a question that had troubled me throughout those four years: how could I struggle so profoundly in chemical engineering when I had always considered myself a capable learner?

The contrast was stark. I could make meaning out of complex Go routines, understand concurrency patterns, and reason about distributed systems. But chemical processes? CRE (Chemical Reaction Engineering)? Barely anything happening in the lecture hall seemed to stick. I had withered into what I perceived as a 'bad' student, yet I remembered learning, or at least trying to. Was I simply a bad student?

Perhaps most painfully, mathematics, a subject I had excelled at from childhood, something that had always felt natural and intuitive, had become one of my weakest spots. The equations that once flowed effortlessly now seemed to resist understanding. This wasn't just about struggling with new material. It was about losing ground in something that had once been a source of confidence.

The Puzzle: Cognitive Dissonance in Learning

This question gnawed at me because it didn't align with my self-perception. I could grasp abstract concepts in computer science, reason about algorithms, and build systems. Yet, when faced with material that others seemed to master, I found myself struggling. Even mathematics, my childhood strength, had become a weakness. The material. Was it simply too much for me? Or was something else at play?

The cognitive dissonance was profound. On one hand, I could reason about complex technical systems. On the other, I couldn't seem to internalize concepts that appeared to come naturally to my peers. This wasn't just about difficulty. It was about a fundamental disconnect between my perceived capabilities and my performance in a specific domain.

Discovering Learned Helplessness

Then I stumbled upon the theories of learned helplessness. The concept, originally developed by Martin Seligman through experiments with dogs, describes a psychological state where an organism learns that it has no control over negative outcomes, leading to a failure to attempt escape or avoidance even when opportunities become available.

In the context of learning, learned helplessness manifests when students repeatedly experience failure despite effort, eventually leading them to believe that their actions don't matter. They stop trying, not because they're incapable, but because they've learned that trying doesn't lead to success.

This resonated deeply. Could my struggles with chemical engineering be less about intellectual capacity and more about a learned pattern of helplessness? Had I, through repeated failures or near-failures, developed a cognitive framework that told me "this won't work, so why try?"

The Connection: Reward Prediction Error and Reinforcement Learning

To my delight, I discovered that this psychological phenomenon has a computational analog in machine learning: reward prediction error and reinforcement learning.

In reinforcement learning, an agent learns to maximize cumulative reward through trial and error. The learning signal comes from the reward prediction error (RPE), which is the difference between expected and actual rewards:

$$\delta_t = r_t + \gamma V(s_{t+1}) - V(s_t)$$

where $\delta_t$ is the prediction error at time $t$, $r_t$ is the immediate reward, $\gamma$ is the discount factor, and $V(s)$ is the value function estimating expected future rewards from state $s$.

When an agent consistently receives negative or zero rewards despite taking actions, the value function $V(s)$ for those states converges to low or negative values. The agent learns that certain states or actions don't lead to positive outcomes, and it stops exploring those paths. Essentially, it learns helplessness.

Modeling the Learning Process

This connection lit a fire in me. I realized I could use machine learning models to simulate and understand what might have happened during my learning process. Could I build a model that captures how learned helplessness develops? Could I test interventions that might prevent or reverse it?

Consider a simple reinforcement learning scenario: an agent (student) in an environment (course material) trying to maximize reward (understanding/mastery). If the reward signal is sparse, delayed, or consistently negative despite effort, the agent's policy $\pi(a|s)$, its strategy for choosing actions, will converge to avoid those states.

import numpy as np

class LearningAgent:
    """Simple Q-learning agent modeling student learning"""
    
    def __init__(self, n_states, n_actions, learning_rate=0.1, discount=0.9):
        self.q_table = np.zeros((n_states, n_actions))
        self.learning_rate = learning_rate
        self.discount = discount
        self.epsilon = 1.0  # Exploration rate
        
    def update(self, state, action, reward, next_state):
        """Update Q-value using reward prediction error"""
        # Current Q-value
        current_q = self.q_table[state, action]
        
        # Maximum Q-value for next state (optimal future value)
        max_future_q = np.max(self.q_table[next_state])
        
        # Reward prediction error
        prediction_error = reward + self.discount * max_future_q - current_q
        
        # Update Q-value
        self.q_table[state, action] += self.learning_rate * prediction_error
        
        return prediction_error
    
    def get_policy(self, state):
        """Get action selection policy for a state"""
        # If all Q-values are negative/low, agent avoids this state
        if np.all(self.q_table[state] < 0):
            return "avoid"  # Learned helplessness
        return "explore" if np.random.random() < self.epsilon else "exploit"

In this model, if a student repeatedly encounters states (concepts) where all actions (study strategies) lead to negative rewards (poor performance), the Q-values for those states become negative. The agent learns to avoid those states entirely, manifesting as learned helplessness.

Interventions and Hope

The beauty of this computational framework is that it allows us to test interventions. What happens if we:

These aren't just theoretical questions. They're testable hypotheses. We can run simulations, collect data, and validate whether these interventions actually prevent or reverse learned helplessness in learning environments.

Why This Matters

This connection between psychology and machine learning isn't just academically interesting. It's deeply personal. It offered me a framework to understand my own experience without defaulting to "I'm just bad at this" or "the material was too hard." Instead, it suggested that learning outcomes are influenced by complex interactions between:

Understanding this didn't erase my struggles, but it reframed them. It suggested that the problem wasn't necessarily my intellect or the material's difficulty, but rather the interaction between my learning process and the environment in which I was learning.

The Path Forward

I was very willing to take that shot. To use machine learning models to investigate what happened, to understand the mechanisms behind learned helplessness, and to explore interventions that might help others avoid similar struggles.

This isn't just about my personal journey. It's about using computational tools to understand human learning, to design better educational systems, and to help students who find themselves in similar situations. The intersection of reinforcement learning, cognitive psychology, and education is rich with research questions:

These questions drive my research. They connect my personal experience to broader scientific inquiry, and they offer hope that we can build better learning systems. Systems that don't just teach content, but that understand and adapt to how humans actually learn.

Conclusion

My journey from struggling with chemical engineering to discovering machine learning research wasn't a linear path. It was born from questioning my own experience, discovering psychological theories that resonated, and finding computational frameworks that could model and investigate those theories.

The connection between learned helplessness and reward prediction error isn't just a theoretical curiosity. It's a lens through which I understand my own learning journey, and it's a framework for research that might help others. Sometimes, the most personal questions lead to the most universal insights.

I'm still early in this research journey, but I'm driven by the possibility that we can use machine learning not just to build intelligent systems, but to understand and improve how humans learn. And that, for me, makes all the difference.