Semi-structured Document Classification

Semi-structured Document Classification

Classification models in Hyperscience

Classification models are a crucial part of document processing as they help the system determine which layout should be used to process each page you upload. In Hyperscience, we have two types of document classification:

Semi-structured Document Classification - Automatically classifies documents that don’t follow a consistent layout pattern (e.g., invoices, bank statements, etc.).

Structured Document Classification - Automatically classifies documents that follow a consistent layout pattern (e.g., tax forms, standardized applications) by assigning them to the correct layout in Hyperscience. To learn more, see Structured Document Classification.

In this article, you’ll learn when and how to use Semi-structured document classification.

How it works

Semi-structured classification is handled by the Non-Structured Layout Classifier (NLC), which relies on the words in the document to predict the most likely layout group. Note that the NLC works on a page-level.

For each page, the model outputs a confidence score that reflects its certainty about the classification. This score is then compared against the configured Target Accuracy Threshold:

This approach ensures that high-confidence predictions are automated, while low-confidence cases get the necessary human validation to maintain accuracy. To learn more about target accuracy, see our Accuracy article.

Semi-structured Classification Grouping Logic

When classifying Semi-structured documents, the system needs to decide how to group consecutive pages that are matched to the same layout. This behavior is controlled by the Semi-structured Classification Grouping Logic setting in your flow. Learn more in Document Processing Subflow Settings.

You can choose between three options:

By default, the flow-level grouping logic inherits the grouping configuration defined at the layout level. To learn more, see Auto-Splitting.

Releases and Classification models

Each release in Hyperscience contains a set of layouts. Learn more in our What is a Release? article.

When you create a new release, the system automatically generates a new model for all Semi-structured and Additional layouts in that release.

Over time, as you add layouts and retrain, your Semi-structured Classification model evolves to handle a wider range of documents.

Training the Classification model

To classify Semi-structured and Additional layouts accurately, the system needs to be trained on examples of these documents. Training data comes from three sources:

Model performance depends on how close new submissions are to the training data:

To maintain accuracy, a percentage of classified documents is sampled for Classification QA. These tasks ask users to confirm that the model’s predictions are correct and are required for reporting automation and accuracy.

Well-trained models reduce manual workload. If the model isn’t trained enough, more pages fall below the threshold and generate Supervision tasks.

In rare cases, the model may make high-confidence mistakes, which can be flagged as incorrect during any ID or Transcription Supervision task. To learn more, see the Reprocessing section of Structured Document Classification article.

Learn more about improving the model’s performance in Model Validation Tasks.

Finds the correct Semi-structured or Additional layout for a given set of submission pages based on the words in the submitted documents. Note that NLC works on a page level.

A setting specified by the user. It indicates the desired overall system accuracy, including tasks performed by humans. It allows you to evaluate how well the system is expected to perform. See also Field-Level Accuracy Targets (FLAT).

The confidence limit used to decide if a machine prediction should be sent for human review to ensure accuracy.

The first step in Supervision. It is used to categorize and combine pages that were not classified by the machine.

No Layout Found indicates that neither the system nor a human in a Supervision task could match the document to a layout. It often happens with “shifting forms” - forms that look structured but contain many small variations that break the match. Semi-structured documents can also end up with this status if they can’t be recognized by either the system or a human reviewer.

Accuracy measures the effectiveness of the models based on the proportion of correct predictions out of all predictions made. It helps you understand how often the system correctly predicts values compared to the actual values that reached consensus during QA. Accuracy can be influenced by factors like imbalanced datasets or inconsistent annotations.

Additional Layout is a layout type used to categorize pages where no data is extracted (e.g., a fax cover sheet). These layouts allow users to define custom categories for unmatched pages, improving classification accuracy. Additional layouts can apply to Structured, Semi-structured, or Unstructured documents.

The input used to teach machine learning models how to process documents accurately. Its structure depends on the model type:

Quality Assurance (QA) is a process that ensures the accuracy and reliability of system outputs. In Hyperscience, QA tasks allow users to review and correct errors in classification, identification, VLM extraction and transcription. Documents may enter QA after processing through Submissions, depending on the workflow configuration.

A set of files uploaded together for processing. The system interprets each file as a page, matches it to existing layouts, and groups it into documents based on these matches.

A tool used to annotate, manage, import, and export training documents. It is also used to train models by working directly with the training data (“ground truth”) obtained from each document in the training set.

Automation refers to the processing of data without the need for human intervention.