Skip to main content
QUICK REVIEW

[Paper Review] ANLS* -- A Universal Document Processing Metric for Generative Large Language Models

David Peer, Philemon Schöpf|arXiv (Cornell University)|Feb 6, 2024
Natural Language Processing TechniquesComputer Science4 citations
TL;DR

This paper introduces ANLS*, a universal evaluation metric for generative large language models (GLLMs) in document processing tasks, extending the ANLS metric to handle structured outputs like dictionaries and lists while preserving backward compatibility. ANLS* enables consistent evaluation across diverse tasks—such as information extraction and classification—demonstrating superior performance with a novel prompting technique (SFT) that outperforms existing methods in 15 out of 21 cases, including gains of up to 15 percentage points.

ABSTRACT

Traditionally, discriminative models have been the predominant choice for tasks like document classification and information extraction. These models make predictions that fall into a limited number of predefined classes, facilitating a binary true or false evaluation and enabling the direct calculation of metrics such as the F1 score. However, recent advancements in generative large language models (GLLMs) have prompted a shift in the field due to their enhanced zero-shot capabilities, which eliminate the need for a downstream dataset and computationally expensive fine-tuning. However, evaluating GLLMs presents a challenge as the binary true or false evaluation used for discriminative models is not applicable to the predictions made by GLLMs. This paper introduces a new metric for generative models called ANLS* for evaluating a wide variety of tasks, including information extraction and classification tasks. The ANLS* metric extends existing ANLS metrics as a drop-in-replacement and is still compatible with previously reported ANLS scores. An evaluation of 7 different datasets, and more than 20 different GLLMs together with 3 different prompting methods using the ANLS* metric is also provided, demonstrating the importance of the proposed metric. We also benchmark a novel approach to generate prompts for documents, called SFT, against other prompting techniques such as LATIN. In almost all cases, SFT outperforms other techniques and improves the state-of-the-art, sometimes by as much as $10$ percentage points. Sources are available at https://github.com/deepopinion/anls_star_metric

Motivation & Objective

  • To address the lack of a unified evaluation metric for generative LLMs in document processing, especially for structured and complex outputs.
  • To extend the existing ANLS metric to support dictionaries, lists, and mixed-type outputs common in information extraction.
  • To enable direct comparison between discriminative and generative models using a single, consistent metric.
  • To evaluate the effectiveness of advanced prompting strategies like SFT against established methods such as LATIN.
  • To provide a publicly available benchmark with reproducible results across 7 datasets and 4 GLLMs using ANLS*.

Proposed method

  • ANLS* extends the Levenshtein-based similarity by recursively comparing nested structures (e.g., dictionaries, lists) using normalized string similarity at each level.
  • It applies a recursive normalization strategy that computes similarity across all comparable elements in complex output objects, preserving semantic structure.
  • The metric maintains backward compatibility with ANLS, ensuring previously reported ANLS scores remain unchanged when using ANLS*.
  • The authors implement ANLS* in a modular way, allowing it to be used as a drop-in replacement for ANLS in existing evaluation pipelines.
  • They introduce a novel prompting technique called SFT (Structured Fine-Tuning Prompting), which generates task-specific, structured prompts to improve GLLM output alignment with ground truth.
  • Evaluation is conducted across 7 diverse document processing datasets using 4 GLLMs, with ANLS* used to measure performance across classification, QA, and information extraction tasks.
(a) Ground truth.
(a) Ground truth.

Experimental results

Research questions

  • RQ1Can ANLS* serve as a universal evaluation metric for generative LLMs across diverse document processing tasks, including structured and unstructured outputs?
  • RQ2How does ANLS* compare to the original ANLS metric in terms of compatibility and performance on complex output types?
  • RQ3Does the proposed SFT prompting technique significantly outperform existing prompting strategies like LATIN in generating accurate, structured outputs?
  • RQ4To what extent do different GLLMs vary in performance when evaluated with ANLS* across real-world document datasets?
  • RQ5Can ANLS* enable fair and direct comparison between discriminative and generative models using a single evaluation framework?

Key findings

  • SFT outperformed the LATIN prompting technique in 15 out of 21 evaluated cases, with improvements of up to 15 percentage points on the DocVQA dataset.
  • GPT-3.5-turbo-16k outperformed GPT-4-turbo on two datasets—DocVQA and SROIE—suggesting model versioning and prompt engineering play critical roles.
  • Gemini-Pro showed significant performance degradation on certain tasks, with a drop of up to 60.5 percentage points compared to GPT models, likely due to safety filtering.
  • Mistral-large struggled with document processing, particularly on layout-dependent tasks, indicating limitations in its ability to handle 2D document structure.
  • The ANLS* metric successfully evaluated complex outputs including nested dictionaries and lists, demonstrating its versatility beyond simple string matching.
  • The authors confirmed that ANLS* is fully backward compatible with ANLS, ensuring consistency with prior benchmarking efforts.
(b) Prediction with $\text{ANLS*}=1.0$ .
(b) Prediction with $\text{ANLS*}=1.0$ .

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.