paper-with-me

홈 › Papers

CosmoCore Affective Dream-Replay Reinforcement Learning for Code Generation

2025-10-20 · Santhosh Kumar Ravindran arxiv

We introduce CosmoCore, a neuroscience-inspired reinforcement learning (RL) architecture that integrates affective signals to enhance code generation in large language models (LLMs). Motivated by human and animal learning where embarrassment from mistakes drives rapid correction, as observed in training a puppy to avoid repeating errors after a single scolding CosmoCore tags code generation trajectories with valence and surprise using a lightweight multi-layer perceptron (MLP). High-negative valence (cringe) episodes, such as buggy code outputs, are prioritized in a Dream Queue for five-fold replay during off-policy updates, while low-surprise successes are pruned to prevent overconfidence and buffer bloat. Evaluated on code generation benchmarks like HumanEval and BigCodeBench, alongside simulations with a custom data pipeline environment, CosmoCore reduces hallucinated code (e.g., syntax errors or logical bugs) by 48\% and accelerates self-correction by 45\%. Local experiments using Hugging Face models in a PySpark environment validate these gains, with code snippets provided for replication. Ablations confirm valence tagging boosts curiosity in exploration, and pruning mitigates inefficiency. This framework extends RL from human feedback (RLHF) for more emotionally aware code assistants, with applications in IDEs and data pipelines. Code and the custom mini-world simulation are released.

📄 PDF Abstract BibTeX arXiv:2510.18895

Code (0)

등록된 구현이 없습니다.

Tasks

Reinforcement LearningCode Generation

Similar Papers 제목 키워드 기반

CosmoCore-Evo: Evolutionary Dream-Replay Reinforcement Learning for Adaptive Code Generation

2025-12-20 · Santhosh Kumar Ravindran arxiv

Building on the affective dream-replay reinforcement learning framework of CosmoCore, we introduce CosmoCore-Evo, an extension that incorporates evolutionary algorithms to enhance adaptability and novelty in code generat…

Reinforcement LearningCode Generation

Curious Replay for Model-based Adaptation

2023-06-28 · Isaac Kauvar, Chris Doyle, Linqi Zhou, Nick Haber

Agents must be able to adapt quickly as an environment changes. We find that existing model-based reinforcement learning agents are unable to do this well, in part because of how they use past experiences to train their …

modelModel-based Reinforcement Learning

Lucid Dreaming for Experience Replay: Refreshing Past States with the Current Policy

2020-09-29 · Yunshu Du, Garrett Warnell, Assefaw Gebremedhin, Peter Stone 외

Experience replay (ER) improves the data efficiency of off-policy reinforcement learning (RL) algorithms by allowing an agent to store and reuse its past experiences in a replay buffer. While many techniques have been pr…

Atari GamesReinforcement Learning (RL)

The content and structure of dreams are coupled to affect

2024-09-22 · Luke Leckie, Anya K. Bershad, Jes Heppler, Mason McClay 외

Dreams offer a unique window into the cognitive and affective dynamics of the sleeping and the waking mind. Recent quantitative linguistic approaches have shown promise in obtaining corpus-level measures of dream sentime…

The Effectiveness of World Models for Continual Reinforcement Learning

2022-11-29 · Samuel Kessler, Mateusz Ostaszewski, Michał Bortkiewicz, Mateusz Żarski 외

World models power some of the most efficient reinforcement learning algorithms. In this work, we showcase that they can be harnessed for continual learning - a situation when the agent faces changing environments. World…

Continual LearningModel-based Reinforcement Learningreinforcement-learningReinforcement Learning+1