DAG-based parallel scheduler
Runs independent llm_query calls concurrently with optional speculative branching, relaxing the synchronous critical path.
Applied AI in Autonomous Systems
Independent research, January 2026
A design and analytical study of four extensions to Recursive Language Models. Empirical validation is a planned follow-up.
Four components
Each component relaxes a structural limitation in the reference RLM design while keeping its interface intact.
Runs independent llm_query calls concurrently with optional speculative branching, relaxing the synchronous critical path.
Routes each input to direct, REPL-only, or full hierarchical mode, removing uniform-strategy overhead on short inputs.
A three-tier cache that bounds any single aggregation context independent of recursion depth.
Distributes a global token budget by chunk size, information density, and query relevance.
Recursive Language Models (RLMs; Zhang, Kraska, and Khattab, 2025) treat the user prompt as an external variable inside a Python REPL and let the model emit code to answer the query. The emitted code can include recursive llm_query calls on substrings of the prompt. This paper examines the published RLM harness and identifies three structural inefficiencies: synchronous execution of independent sub-queries, a single level of recursion, and uniform application of the REPL even to inputs that fit in the base model's effective window.
I propose Hierarchical Adaptive Recursive Language Models (HARLM) as a design that addresses each issue while keeping the RLM interface unchanged. HARLM adds a DAG-based parallel scheduler, a learned router, a three-tier memory, and an information-weighted token budget.
Each component is analyzed formally: the scheduler against a parallel execution bound, the router against the scaling classes of Zhang and colleagues, the memory against an explicit context-size bound, and the allocator against a read-at-least-once lower bound on input tokens. The purpose of releasing the design before experiments is to make the analysis reviewable on its own terms.
Three structural properties stand out as inefficiencies whose cost, latency, or accuracy impact can be reasoned about without rerunning the original experiments.
HARLM extends RLMs with four integrated components. The scheduler relaxes the synchronous critical path. Hierarchical memory relaxes depth-one aggregation pressure. The adaptive router removes the uniform-strategy overhead. The token allocator connects resource decisions across all three.
When the HARLM agent emits multiple llm_query calls, a conservative AST walk builds a dependency DAG. Any call whose argument touches the output of another is declared dependent. Overestimating dependencies gives up parallelism but cannot introduce incorrect concurrent execution. Independent batches are dispatched with bounded parallelism.
For items where the best decomposition is ambiguous, the scheduler can run up to three candidate strategies in parallel and cancel pending ones when a strategy returns a high-confidence answer. This is a latency hedge, not a cost reducer.
The router maps prompt and query pairs to Direct, REPL-only, or Full HARLM mode. The proposed architecture is a T5-large encoder with a three-way classification head, mean-pooled token embeddings, and scalar features for input length, effective-window estimate, and task-class estimate.
The loss combines cross-entropy on oracle labels with cost and performance penalties. Misrouting up is penalized less than misrouting down. A router that occasionally over-routes costs more but preserves correctness.
If recursion proceeds beyond one level, a root aggregation step sees an exponentially growing number of sub-results. HARLM's three-tier memory bounds the context presented to any single aggregation call independent of depth.
Given a global token budget, the allocator distributes tokens to nodes in proportion to a score combining chunk size, learned information density, and query relevance. Density is a regression head on the router encoder. Relevance is a dot product between cached sub-result embeddings and the query embedding. The allocator is a heuristic, not a claim of optimality.
Each component is analyzed against the observation it is designed to relax. The assumptions behind each argument are explicit, along with where they fail.
Partitioning K independent queries into batches of size P produces an approximate factor-P speedup over the sequential bound. This relies on synchronization overhead being dominated by network latency and the provider concurrency cap being at least P.
The paper derives a condition on router accuracy under which routing reduces expected cost compared with always using full mode. When the cost ratio between full and cheaper modes is large, even a moderately accurate router should recover meaningful overhead.
Context for any aggregation call is bounded by the hot capacity, compressed warm capacity, and top retrieved cold entries, independent of recursion depth and the total number of sub-results. The cost is information lost through compression and retrieval recall.
Theorem 1, informal: under additive separability, no auxiliary oracle, and a per-call maximum context length W, any algorithm answering a task in scaling class C must perform enough base-model calls to consume every required input token at least once.
Proposition 6, informal: under additive separability, effective window W, and accurate routing, HARLM's expected input-token cost is within a log factor of the lower bound for constant, linear, and quadratic task classes. Long-range coreference is the assumption most likely to break this result.
If ablations distribute damage uniformly, the component decomposition is wrong.
HARLM is a narrow extension of the RLM idea. Synchronous sub-queries map to the parallel scheduler, single-level recursion maps to hierarchical memory, and uniform inference maps to the router. The analysis produces a falsifiable prediction about which component should dominate each metric. Whether that prediction holds remains an empirical question.
Mure, L. (2026). HARLM: Hierarchical Adaptive Recursive Language Models, A Design Study. SSRN. https://dx.doi.org/10.2139/ssrn.6397658