A Scalable Framework for Table of Contents Extraction from Complex ESG Annual Reports (2023)

Abstract: Table of contents (ToC) extraction centres on structuring documents in a hierarchical manner. In this paper, we propose a new dataset, ESGDoc, comprising 1,093 ESG annual reports from 563 companies spanning from 2001 to 2022. These reports pose significant challenges due to their diverse structures and extensive length. To address these challenges, we propose a new framework for Toc extraction, consisting of three steps: (1) Constructing an initial tree of text blocks based on reading order and font sizes; (2) Modelling each tree node (or text block) independently by considering its contextual information captured in node-centric subtree; (3) Modifying the original tree by taking appropriate action on each tree node (Keep, Delete, or Move). This construction-modelling-modification (CMM) process offers several benefits. It eliminates the need for pairwise modelling of section headings as in previous approaches, making document segmentation practically feasible. By incorporating structured information, each section heading can leverage both local and long-distance context relevant to itself. Experimental results show that our approach outperforms the previous state-of-the-art baseline with a fraction of running time. Our framework proves its scalability by effectively handling documents of any length.

## introduction a considerable amount of research has been proposed to comprehend documents @xcite @xcite @xcite @xcite @xcite , which typically involves the classification of different parts of a document such as title, caption, table, footer, and so on. however, such prevailing classification often centres on a document's local layout structure, sidelining a holistic comprehension of its content and organisation. while traditional summarisation offers a concise representation of a document's content, a table of contents (toc) presents a structured and hierarchical summary. this structural organisation in a toc provides a comprehensive pathway for pinpointing specific information. for example, when seeking information about a company's carbon dioxide emissions, a toc enables a systematic navigation through the information hierarchy. in contrast, conventional summarisation might only provide a vague indication of such information, requiring sifting through the entire document for precise detail. several datasets have been proposed to facilitate the research in document understanding @xcite @xcite . most of these studies lack a structured construction of documents and primarily focus on wellstructured scientific papers. a dataset called hier-doc (hierarchical academic document) @xcite was introduced to facilitate the development of methods for extracting the table of contents (toc) from documents. this dataset was compiled from scientific papers downloaded from arxiv foot_1 , which are typically short and well-structured. the hierarchical structure can often be inferred directly from the headings themselves. for example, the heading "1. introduction" can be easily identified as a first-level heading based on the section numbering. moreover, due to the relatively short length of scientific papers, it is feasible to process the entire document as a whole. @xcite proposed the multimodal tree decoder (mtd) for toc extraction from hierdoc. mtd first utilises text, visual, and layout information to encode text blocks identified by a pdf parser; then classifies all text blocks into two categories, headings and non-headings; and finally predicts the relationship of each pair of headings, facilitating the parsing of these headings into a tree structure representing toc. however, understanding long documents such as esg (environmental, social, and governance) annual reports poses significant challenges compared to commonly used scientific papers. first, esg reports tend to be extensive, often exceeding 100 pages, which is uncommon for scientific papers. second, while scientific papers generally adhere to a standard structure that includes abstract, introduction, methods, results, discussion, and conclusion sections, esg reports exhibit more diverse structures with a wide range of font types and sizes. third, esg reports often include visual elements such as charts, graphs, tables, and infographics to present data and key findings in a visually appealing manner, which adds complexity to the document parsing process. some example esg reports are illustrated in figure 1 . in this paper, we develop a new dataset, esgdoc, collected from public esg annual reports 3 from 563 companies spanning from 2001 to 2022 for the task of toc extraction. the existing approach, mtd @xcite , faces difficulties when dealing with challenges presented in esgdoc. mtd models relationships of every possible heading pairs and thus requires the processing of the entire document simultaneously, making it impractical for lengthy documents. as will be discussed in our experiments section, mtd run into out-of-memory issue when processing some lengthy documents in esgdoc. moreover, mtd only uses gated recurrent unit (gru) @xcite to capture the context of a section heading, lacking long-distance interaction, particularly for high-level headings that may be tens of pages apart. this approach allows higher-level headings to focus on capturing high-level and long-distance information, while lower-level headings focus more on local information. additionally, cmm also models each heading independently, removing the need for modelling pairwise relationships among headings and enabling more effective document segmentation. here, we can divide documents based on the tree structure instead of relying on page divisions. this ensures that each segment maintains both local and long-distance relationships, preserving the long-distance connections that would be lost if division were based on page boundaries. as cmm does not require the processing of a document as a whole, it can be easily scaled to deal with lengthy documents. experimental results show that our approach outperforms the previous state-of-theart baseline with only a fraction of running time, verifying the scalability of our model as it is applicable to documents of any length. our main contributions are summarised as follows: approaches for document understanding in terms of methods for document understanding, a common approach is the fusion of text, visual, and layout features @xcite @xcite @xcite , where visual features represent images of texts and the document, and layout features comprise bounding box positions of texts. some methods also introduced additional features. for instance, xy-layoutlm @xcite incorporates the reading order, vila @xcite utilises visual layout group, formnet @xcite employs graph learning and contrastive learning. the aforementioned methods focus on classifying individual parts of the document rather than understanding the structure of the entire document. ## dataset construction to tackle the more challenging task of toc extraction from complex esg reports, we construct a new dataset, esgdoc, from responsibilityreports.com foot_2 . initially, we have downloaded 10,639 reports in the pdf format. however, only less than 2,000 reports have toc in their original reports. to facilitate the development of an automated method for toc extraction from esg reports, we selectively retrain reports that already possess a toc. the existing toc serves as the reference label for each esg report, while the report with the toc removed is used for training our framework specifically designed for toc extraction. our final dataset comprises 1,093 publicly available esg annual reports, sourced from 563 distinct companies, and spans the period from 2001 to 2022. the reports vary in length, ranging from 4 pages to 521 pages, with an average of 72 pages. in contrast, hierdoc @xcite has a total of 650 scientific papers, which have an average of 19 pages in length. we randomly partitioned the dataset into a training set with 765 reports, a development set with 110 reports, and a test set with 218 reports. text content from esg reports was extracted using pymupdf 5 in a format referred to as "block". a block, defined as a text object in the pdf stan-dard, which is usually a paragraph, can encompass multiple lines of text. we assume that the text within a text object is coherent and should be interpreted as a cohesive unit. each block comprises the following elements: text content, font, size, colour, position, and id. the id is a unique identifier assigned to each block to distinguish blocks that contain identical text content. the position refers to the position of the block within a page in the esg pdf report, represented by four coordinates that denote the top-left and bottom-right points of the block bounding box. other elements, such as font, size, and colour, provide additional information about the text. ## methodology we propose a framework for toc extraction based on the following assumptions: assumption 1 humans typically read documents in a left-to-right, top-to-bottom order, and a higherlevel heading is read before its corresponding subheading and body text. assumption 2 in a table of contents, the font size of a higher-level heading is no smaller than that of a lower-level heading or body text. assumption 3 in a table of contents, headings of the same hierarchical level share the same font size. in our task, a document is defined as a set of blocks. to replicate the reading order of humans, we reorder the blocks from the top-left to the bottom-right of the document. we employ the xycut algorithm @xcite to sort the blocks. the sorted blocks are denoted as {x i } n b @xmath0, where {@xmath1. here, n b represents the total number of blocks. for each block x i , we define s i as its size. problem setup given a list of blocks, toc extraction aims to generate a tree structure representing the table of contents, where each node corresponds to a specific block x. we introduce a pseudo root node r as the root of the toc tree. we propose to initially construct a full tree containing all the blocks, where the hierarchical relation between blocks is simply determined by their respective font sizes. specifically, when two blocks, x i and x j , are read in sequence, if they are close to each other and their font sizes s @xmath2, then x j becomes a child of x i . we then modify the tree by removing or rearranging nodes as necessary. essentially, for a node (i.e., a block) x i , we need to learn a function which determines the operation ('keep', 'delete', or 'move') to be performed on the node. in order to enable document segmentation and capture the contextual information relating to the node, our approach involves extracting a subtree encompassing its neighbourhood including the parent, children and siblings, within a range of n d hops. subsequently, we use graph attention networks (gats) @xcite to update the node information within the subtree. an overview of our proposed framework is illustrated in figure 2 . before delving into the detail of our proposed framework, we first define some notations relating to node operations. p a(x i ) as the parent node of node x i , p r(x i ) as the preceding sibling node of x i . su (x i ) as the subsequent sibling node of x i . we also define p rs(x i ) as all the preceding sibling nodes of x i . ## conclusion and future work in this paper, we have constructed a new dataset, esgdoc, and proposed a novel framework, cmm, for table of contents extraction. our pipeline, consisting of tree construction, node-centric subtree modelling, and tree modification stages, effectively addresses the challenges posed by the diverse structures and lengthy nature of documents in esgdoc. the methodology of representing a document as an initial full tree, and subsequently predicting node operations for tree modification, and further leveraging the tree structure for document segmentation, can provide valuable insights for other document analysis tasks.