Source-linked AI summary

MRKL Systems: A modular, neuro-symbolic architecture that combines large language models, external knowledge sources and discrete reasoning

Ehud Karpas, Omri Abend, Yonatan Belinkov, Barak Lenz, Opher Lieber, Nir Ratner, Yoav Shoham, Hofit Bata, Yoav Levine, Kevin Leyton-Brown, Dor Muhlgay, Noam Rozen, Erez Schwartz, Gal Shachaf, Shai Shalev-Shwartz, Amnon Shashua, Moshe Tenenholtz

arXiv:2205.00445v1cs.CLcs.AI

TL;DR

Language models are essential but limited by missing information, weak symbolic reasoning, and costly adaptation to new tasks. The paper proposes MRKL, a modular neuro-symbolic architecture that routes inputs among neural and external knowledge or reasoning modules. Its arithmetic experiments show reliable generalization across many operations and digit lengths, while exposing specific cross-operation failures.

  • Problem

    Language models lack current and proprietary information, struggle with symbolic reasoning, and require costly retraining or lose versatility when adapted to new tasks.

  • Method

    MRKL combines a general-purpose language model with independently extensible neural and symbolic experts, using a router to direct inputs and extract module parameters.

  • Results

    Arithmetic training on single-digit operations generalized to all explored digit lengths, with accuracy > 0.99 on same-operation evaluations and strong generalization across many cross-operation cases.

  • Takeaways & Limitations

    MRKL retains language-model capabilities while adding external knowledge and dedicated reasoning modules to address missing information and symbolic-reasoning limitations.

  • Takeaways & Limitations

    Neural language models remain less robust than dedicated reasoning tools for certain tasks, and multi-task adaptation can require infeasible full retraining because of catastrophic forgetting.

Abstract

from arXiv · show

Huge language models (LMs) have ushered in a new era for AI, serving as a gateway to natural-language-based knowledge tasks. Although an essential element of modern AI, LMs are also inherently limited in a number of ways. We discuss these limitations and how they can be avoided by adopting a systems approach. Conceptualizing the challenge as one that involves knowledge and reasoning in addition to linguistic processing, we define a flexible architecture with multiple neural models, complemented by discrete knowledge and reasoning modules. We describe this neuro-symbolic architecture, dubbed the Modular Reasoning, Knowledge and Language (MRKL, pronounced "miracle") system, some of the technical challenges in implementing it, and Jurassic-X, AI21 Labs' MRKL system implementation.

1 Introduction

Current language models are versatile but limited by missing current or proprietary information, weak symbolic reasoning, and costly task-specific adaptation. MRKL addresses these limitations by routing inputs among neural and symbolic experts while retaining a general-purpose language model fallback.

  • Limitations: LMs can produce incorrect answers because they lack relevant knowledge and are ill-suited to some calculations.Examples include missing current dates, misunderstanding basic facts, and failing at simple mathematical reasoning.
  • Limitations: Pretrained LMs cannot keep up with dynamic information such as exchange rates, stock prices, weather, or current dates.Their design prevents continual access to changing data.
  • Limitations: LMs also lack access to proprietary sources, including company databases and online-game state.These sources are an important special case of information that models cannot access directly.
  • Deployment challenges: Fine-tuning improves task performance but reduces versatility, while multi-task models can deteriorate on tasks unlike those in their curated training sets.Repeatedly adding tasks is infeasible because it requires retraining the entire task set and risks catastrophic forgetting.
  • MRKL architecture: MRKL combines an extendable set of neural and symbolic experts with a router that directs each input to the appropriate module.Experts may include large or specialized language models, calculators, currency converters, and database APIs.
  • MRKL benefits: MRKL provides safe fallback, robust extensibility, interpretability, up-to-date and proprietary information access, and compositional multi-hop processing.The router can send unmatched inputs to the general-purpose LM, while independently trained experts can be added without compromising existing capabilities.

2 Jurassic-X: AI21 Labs’ MRKL system

Jurassic-X is AI21 Labs’ implementation of an MRKL system. It was being piloted by partners, with developer access and a demo described as forthcoming or available.

  • Jurassic-X is an implemented MRKL system being piloted by a few partners.
  • The paper says Jurassic-X would soon be available to developers through early access.
  • A demo was available for experiencing Jurassic-X.

3 Crossing the neuro-symbolic chasm: A calculator test case

The calculator case assigns language models the task of extracting arguments from varied natural-language arithmetic while delegating calculation to a symbolic module. Jurassic-X achieves strong generalization across digits, word forms, phrasings, operations, and some multi-operation expressions, though specific cases remain difficult.

  • Architecture: The MRKL approach trains a router to extract each module’s required discrete inputs, while a symbolic calculator performs the arithmetic.The language model is explicitly limited to argument extraction rather than calculation.
  • Training and evaluation: Data augmentation from a structured example space makes Jurassic-1’s arithmetic extraction near perfect, whereas few-shot performance remains far from perfect.The target is reliable extraction of simple expressions suitable for production-grade use, not maximal mathematical complexity.
  • Generalization: Training on single-digit operands generalizes to all tested operand lengths, including up to nine digits.The experiment evaluates addition and multiplication after training only on single-digit numbers.
  • Generalization: Training on numbers expressed as words generalizes well to digits, but training on digits transfers much less effectively to words.In-distribution performance for matching representations is close to 100% accuracy, while the inverse transfer is much lower.
  • Generalization: Training on one phrasing format generalizes perfectly in most cases, with the non-question format being the most challenging.Robustness to format variation is important because arithmetic questions can be phrased in many ways.
  • Generalization: Single-operation training generalizes strongly across many operations, while division is an exception; 22 of 29 two-operation combinations exceed 90% accuracy.When extending from single-operation training to two-operation tests, add–mul, sub–mul, and sub–div are the three reported failures, while add–div performs well.

4 Discussion

The paper introduces MRKL systems, which augment language models with extensible external knowledge and reasoning modules to address limitations in current and proprietary information access and symbolic reasoning.

  • MRKL systems combine large language models with an extensible set of external knowledge and reasoning modules.
  • The architecture preserves language-model advantages while addressing missing current or proprietary information and weak symbolic reasoning.
  • Jurassic-X implements the MRKL approach and demonstrates training methods for reliable basic arithmetic handling.

A Few-shot vs. prompt tuning

Few-shot prompting requires little training effort but performs poorly on some generalization tests, whereas prompt tuning provides a more systematic approach.

  • The limited few-shot performance demonstrates the need for a systematic approach.
  • Few-shot experiments use 10 training examples as a prompt and evaluate both methods on the same test set.
  • Both few-shot and prompt-tuning methods generalize to different numbers of digits in addition problems.
  • Few-shot performance greatly decreases as the number of digits increases when operands are written as words.
  • Few-shot generalization across question formats is much lower than with prompt tuning when training uses one format.

B Question formats

The experiments use multiple natural-language formats for arithmetic questions, including five single-operation formats and two-operation formulations with varied phrasings.

  • Single-operation problems use five different question formats for each operation type.
  • Two-operation problems include combinations of operations with operator precedence where relevant.
  • Table 12 provides the natural-language phrasings corresponding to the two-operation formulae.

C Amount of data in each experiment

The experiments vary arithmetic complexity through training and test samples for single- and two-operation problems, with formats, operations, digits, and words represented in the data design.

  • The first experiments specify separate training and test samples for digit-count and digit-versus-word conditions.
  • The experiment design covers two-operation formula combinations and their corresponding natural-language phrasings.
  • The two-operation experiment uses 700 single-operation training samples and evaluates 210 samples per each of 16 formula combinations.
Loading 2205.00445v1…