Skip to main content
QUICK REVIEW

[Paper Review] Aviary: training language agents on challenging scientific tasks

S. Narayanan, James D. Braza|arXiv (Cornell University)|Dec 30, 2024
Natural Language Processing TechniquesComputer Science7 citations
TL;DR

Aviary introduces a gym framework for language agents and shows that open-source LLMs trained online with expert iteration can match or exceed frontier models on multi-step scientific tasks at much lower inference cost.

ABSTRACT

Solving complex real-world tasks requires cycles of actions and observations. This is particularly true in science, where tasks require many cycles of analysis, tool use, and experimentation. Language agents are promising for automating intellectual tasks in science because they can interact with tools via natural language or code. Yet their flexibility creates conceptual and practical challenges for software implementations, since agents may comprise non-standard components such as internal reasoning, planning, tool usage, as well as the inherent stochasticity of temperature-sampled language models. Here, we introduce Aviary, an extensible gymnasium for language agents. We formalize agents as policies solving language-grounded partially observable Markov decision processes, which we term language decision processes. We then implement five environments, including three challenging scientific environments: (1) manipulating DNA constructs for molecular cloning, (2) answering research questions by accessing scientific literature, and (3) engineering protein stability. These environments were selected for their focus on multi-step reasoning and their relevance to contemporary biology research. Finally, with online training and scaling inference-time compute, we show that language agents backed by open-source, non-frontier LLMs can match and exceed both frontier LLM agents and human experts on multiple tasks at up to 100x lower inference cost.

Motivation & Objective

  • Define language decision processes (LDPs) and frame language agents as stochastic computation graphs for training.
  • Develop Aviary with five environments including three scientific tasks to emphasize multi-step reasoning and tool use.
  • Demonstrate that non-frontier LLMs can match or exceed frontier models on several tasks with online training and sampling.
  • Provide open-source frameworks (Aviary and LDP) to enable modular experimentation across environments, agents, and optimizers.

Proposed method

  • Formalize LDPs as POMDPs with natural language state and action spaces.
  • Represent language agents as stochastic computation graphs combining deterministic and stochastic nodes.
  • Use behavior cloning and expert iteration to train agents with online data from environments.
  • Apply inference-time scaling via majority voting to improve task performance.
  • Implement five environments—including DNA construct engineering, literature QA, and protein stability tasks—within the Aviary gym.
Figure 1: An overview of the five implemented Aviary environments and the language decision process (LDP) framework. The term language decision process here jointly refers to our theoretical description of the class of problems solved by language agents, as well as a software framework for implement
Figure 1: An overview of the five implemented Aviary environments and the language decision process (LDP) framework. The term language decision process here jointly refers to our theoretical description of the class of problems solved by language agents, as well as a software framework for implement

Experimental results

Research questions

  • RQ1Can language agents grounded in language decision processes solve multi-step scientific tasks with tool use and observation feedback?
  • RQ2Do online training methods (behavior cloning and expert iteration) enable non-frontier LLMs to match frontier models on scientific tasks?
  • RQ3What is the impact of inference-time sampling strategies, such as majority voting, on the performance of language agents across tasks?

Key findings

  • Non-frontier LLMs trained online with majority sampling can exceed human experts and frontier LLMs on several tasks at up to 100x lower inference cost (as reported in abstract).
  • Behavior cloning provides a strong initial performance boost, followed by expert iteration which yields further improvements on SeqQA and LitQA2 tasks.
  • Majority voting significantly boosts accuracy on multiple-choice tasks like SeqQA and LitQA2, sometimes by about 20 percentage points.
  • Llama-3.1-8B-Instruct-based agents can reach performance comparable to Claude 3.5 Sonnet on challenging tasks after training (e.g., SeqQA, LitQA2).
  • Trained agents develop diverse tool-usage strategies; self-trained trajectories tend to be shorter and more direct than demonstrations.
Figure 3: Ability of LLMs and language agents to solve tasks using Aviary environments. All LDP-trained agents are optimized using behavior cloning and expert iteration. For GSM8K and hotpot QA, EI is performed on gpt-4o ; SeqQA and LitQA2 use Llama-3.1-8B-Instruct (see Section 5.1 ). The difference
Figure 3: Ability of LLMs and language agents to solve tasks using Aviary environments. All LDP-trained agents are optimized using behavior cloning and expert iteration. For GSM8K and hotpot QA, EI is performed on gpt-4o ; SeqQA and LitQA2 use Llama-3.1-8B-Instruct (see Section 5.1 ). The difference

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.