HyperAIHyperAI

Command Palette

Search for a command to run...

HRM-Text: 규모 확장 이상의 효율적 사전 학습

Guan Wang Changling Liu Chenyu Wang Cai Zhou Yuhao Sun Yifei Wu Shuai Zhen Luca Scimeca Yasin Abbasi Yadkori

초록

대규모 언어 모델(Large Language Model, LLM)의 현재 사전 학습(pretraining) 패러다임은 막대한 컴퓨팅 자원과 인터넷 규모의 원시 텍스트(raw text)에 의존함으로써 기초 연구에 상당한 장벽을 야기합니다. 반면, 생물학적 시스템은 전두엽-두정엽 회로(frontoparietal loop)의 기능적 조직화와 같은 다중 시간 척도(multi-timescale) 처리를 통해 매우 샘플 효율적인(sample-efficient) 학습을 보여줍니다. 이를 영감 삼아, 우리는 표준 Transformer를 대체하고 계산을 느리게 진화하는 전략적 계층과 빠르게 진화하는 실행 계층으로 분리하는 계층적 순환 모델(Hierarchical Recurrent Model, HRM)을 탑재한 'HRM-Text'를 도입합니다. 언어 모델링을 위해 이러한 깊은 순환(deep recurrence)을 안정화하기 위해, 우리는 MagicNorm과 웜업 디크레딧 어선먼트(warmup deep credit assignment)를 제안합니다. 또한, 표준 원시 텍스트 사전 학습 대신, 작업 완료(task-completion) 목적 함수와 PrefixLM 마스킹(prefixLM masking)을 사용하여 명령어-응답 쌍(instruction-response pairs)으로만 학습합니다. 이는 효율적인 사전 학습의 경험적 존재 증명(empirical existence proof)으로 작용하며, 새로 구축된 1B 파라미터 HRM-Text 모델은 고작 400억 개의 고유 토큰(unique tokens)과 1,500달러의 예산으로 학습되었음에도 불구하고 MMLU에서 60.7%, ARC-C에서 81.9%, DROP에서 82.2%, GSM8K에서 84.5%, MATH에서 56.2%의 성능을 기록했습니다. 표준 기준선(baselines) 대비 훈련 토큰 사용량이 약 100900배 적고 추정 컴퓨팅 자원이 96432배 적음에도 불구하고, HRM-Text는 2~7B 파라미터를 가진 오픈 모델들과 경쟁적인 성능을 발휘합니다.

One-sentence Summary

HRM-Text replaces standard Transformers with a Hierarchical Recurrent Model that decouples computation into slow-evolving strategic and fast-evolving execution layers stabilized by MagicNorm and warmup deep credit assignment, utilizing exclusively instruction-response pairs with a task-completion objective and PrefixLM masking to enable a 1B-parameter model trained from scratch on 40 billion unique tokens and a $1,500 budget to achieve 60.7% on MMLU, 81.9% on ARC-C, 82.2% on DROP, 84.5% on GSM8K, and 56.2% on MATH while performing competitively with 2-7B parameter open models despite employing roughly 100-900x fewer training tokens and 96-432x less estimated compute.

Key Contributions

  • HRM-Text replaces standard Transformers with a Hierarchical Recurrent Model that decouples computation into slow-evolving strategic and fast-evolving execution layers.
  • The method stabilizes deep recurrence using MagicNorm and warmup deep credit assignment, while training exclusively on instruction-response pairs via a task-completion objective and PrefixLM masking.
  • A 1B-parameter HRM-Text model trained from scratch on 40 billion unique tokens achieves competitive performance on benchmarks including MMLU and GSM8K with roughly 100 to 900 times fewer training tokens and 96 to 432 times less compute than standard baselines.

Introduction

Current large language model pretraining relies on massive compute and internet-scale raw text, creating a barrier that limits foundational research to resource-rich institutions. This brute-force scaling paradigm is inefficient in data-limited regimes, and prior recurrent architectures often suffer from severe gradient instability. To overcome these challenges, the authors introduce HRM-Text, which replaces standard Transformers with a Hierarchical Recurrent Model inspired by biological multi-timescale processing. They stabilize deep recurrence through techniques like MagicNorm and warmup deep credit assignment while training exclusively on instruction-response pairs using a task-completion objective. This co-design enables a 1B-parameter model to achieve competitive performance with 2 to 7B baselines using up to 900 times fewer training tokens and significantly less compute.

Dataset

  • The authors train HRM-Text on open-source datasets including general instructions, rewritten knowledge, mathematical tasks, textbook exercises, and web-extracted questions. The initial corpus holds 176.5B tokens across 593.7M documents.
  • They sample 40B unique tokens for a total training duration of 60B tokens. Stratified sampling treats each dataset as an independent stratum with caps on document counts to prevent over-representation of massive sources.
  • Specific sampling limits and multipliers ensure a balanced training mixture while smaller datasets are upsampled according to the stratified schedule.
  • The authors prepend condition tags for direct, chain-of-thought, synthetic, and noisy styles to control output format. Text within ... boundaries is stripped to eliminate explicit reasoning traces.

Method

The HRM-Text model is built upon an improved HRM architecture featuring a dual-timescale recurrence. The forward pass is initialized with a high-level state zH0z_{H}^{0}zH0 derived from input token embeddings, alongside a fixed low-level state zL0z_{L}^{0}zL0. The core processing sequence consists of two high-level cycles. Each cycle executes three fast LLL module updates followed by a single slow HHH module update. Token logits are generated by applying a linear head to the output of the final HHH module state.

Internally, both the HHH and LLL recurrent modules are structured using MagicNorm to address gradient instability. This design exploits the asymmetry between the forward and backward computational horizons induced by truncated backpropagation through time. Each recurrent module is composed of LLL internal PreNorm blocks but is capped with a final normalization layer at its exit. During the forward pass, the recurrent state zzz is subjected to module-level normalization operations at the end of every recurrent step, bounding activation variance. Conversely, during the backward pass, the truncated gradient horizon means the error signal passes through the module-level normalization fewer times than the internal PreNorm identity connections. Additionally, the modules utilize parameterless RMSNorm, SwiGLU activation functions, Rotary Position Embeddings, and a sigmoid-gated self-attention mechanism. This attention mechanism employs linear projections for query, key, and value vectors, followed by a masked attention block where a sigmoid gate modulates the output before the final projection.

The model optimizes a task-completion objective rather than standard autoregressive pretraining on raw text. It is pretrained directly on instruction-response pairs from scratch using a negative log-likelihood loss computed exclusively over the response. This objective is naturally paired with a PrefixLM attention mask, enabling full bidirectional attention across the instruction tokens while maintaining standard causal masking over the response sequence. To ensure stability during optimization, the authors employ a warmup deep credit assignment strategy. Gradients are initially backpropagated through only the final two recurrent steps, expanding to the final five steps as training progresses. This progressive deepening allows the model to exploit longer recurrent computation while reducing exposure to optimization pathologies at initialization.

Experiment

The experiments evaluate the HRM architecture against standard and recurrent baselines under matched training compute to validate architectural efficiency and the impact of specific training objectives. Results demonstrate that recurrent designs coupled with task-completion objectives significantly improve benchmark yield, allowing HRM to compete with much larger models using substantially less training compute. Qualitative analysis confirms these gains stem from greater effective depth and stable gradient dynamics rather than data contamination or training instability.

The authors investigate how training objectives and attention mechanisms affect model performance by comparing standard Transformers with HRM. The data indicates that shifting to a task-completion objective and utilizing PrefixLM attention consistently improves results for both architectures. Additionally, the HRM architecture demonstrates superior capabilities compared to the standard Transformer, achieving peak performance when combined with the task-completion objective and PrefixLM attention. HRM 1B consistently outperforms the Transformer 1B baseline across all tested configurations. The task-completion objective yields significant performance gains over the standard objective for both model types. Switching to PrefixLM attention further enhances results, producing the highest scores when paired with the HRM architecture.

The authors compare the proposed HRM architecture against a variant called TRM across different parameter scales to evaluate stability and compute efficiency. Results indicate that HRM maintains stable training dynamics at the larger scale where TRM becomes unstable and underperforms, while at the smaller scale, HRM achieves competitive benchmark performance with substantially lower computational cost. HRM maintains stable training dynamics across all scales, whereas the TRM variant suffers from severe instability at the larger parameter scale. At the smaller scale, HRM achieves competitive performance across most benchmarks while requiring substantially less compute than TRM. HRM demonstrates consistent performance gains over the unstable TRM variant at the larger parameter scale.

The the the table presents a statistical analysis of dataset contamination on the DROP benchmark, categorizing samples into subsets based on their contamination levels. Results indicate that subsets with higher contamination percentages tend to achieve higher average performance scores compared to those with lower contamination. Despite these trends, the model demonstrates robust performance on the strictly clean subset, suggesting its capabilities are not solely driven by data overlap. The subset with the highest contamination levels achieves the highest average performance. Statistical test values are positive for contaminated groups and negative for cleaner groups. Strong performance is maintained on the subset with no detected contamination.

The authors evaluate architecture efficiency by comparing HRM against standard Transformers, Looped Transformers, and RINS under matched training compute budgets. Results indicate that HRM achieves superior performance across most benchmarks compared to both standard and other recurrent architectures with similar computational costs. Notably, the HRM model outperforms larger standard Transformer models and other recurrent baselines. HRM achieves the highest scores across nearly all evaluated benchmarks compared to the baselines. Recurrent architectures generally outperform standard Transformers of the same parameter size, with HRM showing the strongest gains. The proposed model maintains a performance advantage even when compared against larger standard Transformer models with matched FLOPs.

The authors investigate an inference-time auto-guidance mechanism that interpolates or extrapolates logits from various recursion depths to improve model performance. Results show that applying this guidance consistently yields slight performance gains across all evaluated benchmarks compared to standard inference. The optimal guidance parameter varies depending on the specific task, indicating that different problems benefit from different effective recurrent depths. Guidance consistently improves scores across MMLU, ARC-C, and other benchmarks. The method leverages intermediate hidden states without incurring additional computation overhead. Optimal guidance weights differ per task, ranging from interpolation to extrapolation.

The study evaluates the HRM architecture against standard Transformers and recurrent baselines by varying training objectives, attention mechanisms, and parameter scales. Results indicate that HRM ensures stable training dynamics and superior performance, particularly when combined with task-completion objectives and PrefixLM attention. Furthermore, the model demonstrates robustness against data contamination and maintains efficiency advantages over larger baselines, while an inference-time auto-guidance mechanism improves accuracy without additional overhead.


AI로 AI 구축

아이디어에서 출시까지 — 무료 AI 코코딩, 즉시 사용 가능한 환경, 최적의 GPU 가격으로 AI 개발을 가속화하세요.

AI 협업 코딩
바로 사용 가능한 GPU
최적의 가격

HyperAI Newsletters

최신 정보 구독하기
한국 시간 매주 월요일 오전 9시 에 이번 주의 최신 업데이트를 메일로 발송합니다
이메일 서비스 제공: MailChimp