NeurIPS 2026Coming to NeurIPS in Sydney?Explore papers, orals & directions

Versatile page numbering analysis

Hervé Déjean, Jean-Luc MeunierDrr 2008

TL;DR

This paper introduces a novel, versatile method for detecting and analyzing page numbering schemes in documents, moving beyond simple number spotting to understand the underlying logic. Their approach combines functional analysis of number sequences with a formal, machine-learning-based refinement, achieving robust performance across diverse document types.

What Problem Does This Paper Address?

Digitizing vast collections of documents, like those in digital libraries, requires robust automated techniques for understanding their structure. A fundamental aspect of this understanding is page numbering, which enables navigation and information retrieval. However, detecting page numbers is surprisingly challenging due to the wide variety of numbering schemes (Arabic, Roman, composite, etc.), their placement (headers, footers, integrated into text), and the possibility of omitted numbers (e.g., at chapter beginnings). Existing methods often rely on document-specific heuristics or struggle with heterogeneous collections. This paper aims to provide a single, generic method that can handle this diversity by analyzing the sequence and logic of page numbers, not just their appearance.

Methods

The proposed method operates in two main stages:

  1. Functional Approach: This stage focuses on the "what it does" of page numbering.
  2. Sequence Enumeration: It identifies all possible sequences of text fragments that fit predefined numbering schemes (Arabic, Roman, composite, generic ASCII) and exhibit a monotonic increase across consecutive pages.
  3. Sequence Selection: A dynamic programming algorithm (inspired by Viterbi) selects the optimal, non-overlapping subset of these sequences that best covers the entire document. This step accounts for "holes" (missing numbers) and can extrapolate them.
  4. Association: Pages are associated with their corresponding number within the selected sequences.
  5. Formal Approach (Optional Refinement): This stage focuses on the "how it looks" and refines the functional results, particularly for short sequences or ambiguous cases.
  6. Machine Learning Model: A logistic regression model is trained using tokens identified as page numbers by the functional approach as positive examples, and other tokens as negative examples. This model is trained per document.
  7. Filtering and Re-application: The functional approach is re-applied with a low length factor (F=1), using the ML model's predictions to filter tokens and improve recall for short sequences and disambiguate potential page numbers.

Datasets

The authors evaluated their method on a test collection of 44 randomly selected PDF documents from the internet, totaling 3083 pages. This collection was intentionally heterogeneous, including various document types (thesis, reports, novels, magazines, etc.) and languages (English, French, Arabic, Chinese). The documents were converted to XML and manually annotated to record numbering schemes and page number tokens.

Key Insights and Ideas

  • Sequence is Key: The core idea is that page numbering is fundamentally about sequences and logical progression, not just isolated visual elements. This functional perspective is more robust than purely layout-based approaches.
  • Functional + Formal Synergy: The combination of a functional approach (understanding the sequence logic) and a formal approach (using visual/typographical features via ML) provides a powerful, complementary solution. The functional part handles the broad structure, while the formal part refines it for tricky cases.
  • Per-Document ML: Training the machine learning model on a per-document basis, rather than a global model, is crucial for adapting to the diverse features and noise present in heterogeneous collections.
  • Robustness to OCR Errors: The sequence-based approach inherently handles OCR errors by treating missing numbers as "holes" that can be inferred from the sequence, making it more resilient than methods that fail on a single incorrect detection.

Key Results

  • The functional approach alone achieved high precision and recall, with performance improving as the length factor (F) increased, up to F=3. Blank accuracy (correctly identifying pages without numbers) was particularly high for larger F values (98.5% for F=3).
  • The functional + formal approach showed significant improvements, especially in recall, recovering many missed numbers from short sequences. For F=3, recall increased by 3.2% and F1 score by 0.2% compared to the functional-only approach.
  • The formal pass (ML-based) was effective in improving recall, particularly for short sequences, and helped disambiguate tokens.
  • An alternative "overlap" heuristic for the formal pass yielded comparable results to the ML approach, suggesting that geometric features might be dominant.
  • The method demonstrated robustness across a heterogeneous test set, with a "blank accuracy" of 98.5% for F=3 in the functional+formal approach, indicating it rarely misidentifies non-page numbers.

Limitations and Future Work

  • Document Granularity: The method requires a whole document (or a logical part of it) to function, as it relies on sequences across pages. It cannot detect page numbers when only a single page is presented.
  • Unsupported Schemes: While versatile, the method can still be challenged by highly unusual or unsupported numbering schemes (e.g., double-page numbering, inconsistent numbering within a document).
  • Speed Trade-off: The functional+formal approach is approximately twice as slow as the purely functional approach (6 pages/second vs. 12 pages/second).
  • Future Work: The authors suggest improving precision and recall by supporting more numbering patterns, fixing issues with composite numberers, dealing with specific functional assumption violations, and improving the choice between alternative numbers for a page. They also note that tangential methods for header/footer detection could complement their work.

Summary updated

BibTeX
@inproceedings{dejean2008versatile,
  author = {Hervé Déjean and Jean-Luc Meunier},
  title = {{Versatile page numbering analysis}},
  booktitle = {Drr},
  year = {2008},
  doi = {10.1117/12.764839},
}
Figure