Skip to content

Instantly share code, notes, and snippets.

@niquola
Created January 25, 2026 00:13
Show Gist options
  • Select an option

  • Save niquola/c3f066162cd9067ad2b25ba2229b7a6c to your computer and use it in GitHub Desktop.

Select an option

Save niquola/c3f066162cd9067ad2b25ba2229b7a6c to your computer and use it in GitHub Desktop.
RLM for Agents - Deep Research Report (RL + LLM Agents)

RLM для агентов: глубокий обзор

Дата: 2026-01-25
Автор: Research by Claude

TL;DR

RLM — это НЕ один термин, а два разных концепта:

  1. Recursive Language Model — архитектура управления контекстом через делегирование (Prime Intellect, 2025)
  2. Reasoning Language Model — модели типа o1/DeepSeek-R1, обученные рассуждать через RL

Общий тренд: Reinforcement Learning стал ключевой технологией для создания reasoning и agentic capabilities в LLM.


1. Два значения RLM

1.1 Recursive Language Model (Prime Intellect)

Источник: Prime Intellect Blog, arXiv:2512.24601

Ключевая идея: Модель активно управляет своим контекстом вместо пассивного потребления.

┌─────────────────────────────────────────────────────────┐
│                    Main LLM                              │
│  - Никогда не видит сырые данные напрямую               │
│  - Имеет доступ к Python REPL                           │
│  - Делегирует работу sub-LLMs                           │
└─────────────────────────────────────────────────────────┘
          │                           │
          ▼                           ▼
    ┌───────────┐             ┌───────────┐
    │  Python   │             │  Sub-LLM  │
    │   REPL    │             │  (tools)  │
    └───────────┘             └───────────┘

Отличие от summarization:

  • AgentFold и другие → сжимают контекст → теряют информацию
  • RLM → делегирует обработку → сохраняет информацию

Преимущества:

  • Работа с огромными датасетами (PDF, databases)
  • Token efficiency — main LLM остаётся "lean"
  • Масштабируется на long-horizon tasks (недели → месяцы)
  • Можно обучать через RL

1.2 Reasoning Language Model (o1/DeepSeek-R1)

Источник: arXiv:2501.11223 — Survey paper

Определение: LLM с продвинутыми reasoning capabilities, полученными через RL-training.

Примеры:

  • OpenAI o1, o3
  • DeepSeek-R1
  • Alibaba QwQ
  • LLaMA-Berry

Ключевые компоненты:

  • Chain-of-Thought reasoning
  • Self-verification
  • Dynamic strategy adaptation
  • Test-time compute scaling

2. Reinforcement Learning для LLM Agents

2.1 Эволюция парадигмы

2022-2023: RLHF (alignment)
    │
    ▼
2024: DPO (упрощение)
    │
    ▼
2025: RLVR + GRPO (reasoning)
    │
    ▼
2025-2026: Agentic RL (autonomous agents)

2.2 RLVR — Reinforcement Learning with Verifiable Rewards

Источник: DeepSeek-R1, arXiv:2506.14245

Прорыв DeepSeek-R1:

"Reasoning abilities can be incentivized through pure RL, without human-labeled reasoning trajectories"

Как работает:

  1. Модель генерирует multiple reasoning paths
  2. Verifiable reward (math: правильный ответ, code: тесты проходят)
  3. Контрастивное обучение: правильные пути усиливаются

Emergent behaviors:

  • Self-reflection
  • Verification
  • Dynamic strategy adaptation
  • НЕ запрограммированы — возникают из RL

GRPO (Group Relative Policy Optimization):

# Вместо PPO с value network:
# - Sample K completions per prompt
# - Compute relative advantage within group
# - No critic model needed

advantage[i] = (reward[i] - mean(rewards)) / std(rewards)

Преимущества GRPO:

  • Нет value network → меньше памяти
  • Проще PPO (4 LLM → 2 LLM)
  • Эффективен для verifiable tasks

2.3 PPO vs DPO vs GRPO

Метод Reward Model Value Model Use Case
PPO Production LLMs (ChatGPT, Claude)
DPO Academic benchmarks, simple alignment
GRPO ✅ (verifiable) Reasoning tasks

Вердикт исследований:

"PPO outperforms DPO across varied datasets... PPO is able to surpass other alignment methods in all cases" — arXiv:2404.10719


3. Ключевые Agentic RL Papers (2024-2025)

3.1 Agent-R1

Источник: arXiv:2511.14460

Проблема: RL для LLM agents — nascent stage, много challenges.

Решение: Modular framework для RL-based LLM agents:

  • Расширенный MDP framework для агентов
  • Поддержка diverse task scenarios
  • Validated на Multihop QA

3.2 LOOP — Long-Horizon Interactive Agents

Источник: arXiv:2502.01600

Результат:

"32B agent trained with LOOP outperforms OpenAI o1 by 9 percentage points (15% relative)"

Особенности:

  • Memory-efficient PPO variant
  • NO value network
  • Single LLM copy in memory
  • Trains directly in target environment

Emergent behaviors:

  • Consult API documentation
  • Avoid unfounded assumptions
  • Minimize confabulation
  • Recover from setbacks

3.3 ArCHer — Hierarchical Multi-Turn RL

Источник: arXiv:2402.19446

Архитектура:

┌─────────────────────────────────────────┐
│         High-Level RL                    │
│  (Off-policy, reward aggregation)        │
└─────────────────────────────────────────┘
                    │
                    ▼
┌─────────────────────────────────────────┐
│         Low-Level RL                     │
│  (Token policy within each turn)         │
└─────────────────────────────────────────┘

Результат: 100x sample efficiency vs existing methods

3.4 ReMA — Meta-Thinking

Источник: arXiv:2503.09501

Идея: Два агента — meta-thinking + execution:

  • High-level: strategic oversight, planning
  • Low-level: detailed reasoning execution

"Think about thinking" — метакогнитивный подход

3.5 AgentGym-RL

Источник: arXiv:2509.08755

Проблема: Нет unified RL framework для agents from scratch (без SFT).

Решение: ScalingInter-RL:

  1. Начало: exploitation (ограничен # interactions)
  2. Постепенно: exploration (увеличиваем horizon)

Результат: Matches или exceeds commercial models на 27 tasks


4. Test-Time Compute Scaling

Источник: arXiv:2408.03314, arXiv:2506.12928

Ключевое открытие:

"Performance consistently improves with more RL (train-time) AND more thinking (test-time compute)"

Стратегии test-time scaling:

  • Parallel sampling (generate N solutions)
  • Sequential revision
  • Verifiers + merging
  • Rollout diversification

Результаты:

  • RL^V: +20% на MATH с parallel sampling
  • 8-32x efficient test-time compute scaling

OpenAI o3 insight:

"Sophisticated test-time techniques emerged during training — generating brute-force solutions to verify outputs"


5. Landscape Survey: Agentic RL

Источник: arXiv:2509.02547

Paradigm shift:

Classic LLM-RL:        Single-step MDP
                           │
                           ▼
Agentic RL:           POMDP (Partially Observable)
                      + Multi-turn
                      + Tool use
                      + Memory

Core capabilities (enabled by RL):

  1. Planning — long-horizon reasoning
  2. Tool utilization — API calls, code execution
  3. Memory systems — episodic, semantic
  4. Reasoning — CoT, self-correction
  5. Self-improvement — learning from mistakes
  6. Perception — multimodal understanding

6. Практические Frameworks

Framework Focus Key Feature
Agent-R1 General agents Modular MDP
LOOP Long-horizon Memory-efficient PPO
ArCHer Multi-turn Hierarchical RL
AgentGym-RL From scratch ScalingInter-RL
Memory-R1 Memory-augmented RAG + PPO/GRPO

7. Key Takeaways

Для reasoning:

  1. RLVR + GRPO — основной подход (DeepSeek-R1)
  2. Emergent behaviors — возникают из RL, не программируются
  3. Test-time compute — scaling law работает

Для agents:

  1. Multi-turn RL — ключевой challenge
  2. Hierarchical approaches — ArCHer, ReMA
  3. Environment training — LOOP показывает превосходство

Trends 2026:

  1. Context management через RL (Recursive LM)
  2. Long-horizon agents (weeks → months)
  3. Unified frameworks (AgentGym-RL)

8. Ссылки

Surveys

Core Papers

Test-Time Compute

Comparison Papers

Architecture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment