Training a Semi-structured Model

Training a Semi-structured Model

Hyperscience extracts data from documents and converts them into a machine-readable format. We support Structured, Semi-structured, and Additional documents. To learn how to differentiate between the document types, see Understand Document Types.

Use Semi-structured layouts for documents where field positions might vary. They’re suitable for documents like invoices, pay stubs, and checks.

In this article, you’ll learn how to build a robust Semi-structured model corresponding to your business needs by using our Training Data Management tools.

Step 1 - Sampling Documents

Review your documents

Having a diverse, representative training set is crucial for a high-quality identification model. Selecting the appropriate documents for training will optimize your Semi-structured model’s performance.

Review your fields and columns

Step 2 - Build your layout and add it to a release

Build your layout

Once you’ve determined the information you want to extract, you need to build your Semi-structured layout. To learn more about Semi-Structured Layouts, see Determining Layout Type.

  1. Create your layout by following the steps in Creating Semi-Structured Layouts.

Assign to a release

  1. Add your layout to a release by following the steps described in Adding a New Release.

  2. Follow the steps in Assigning a Release to a Flow to match your release to the flow you are using.

Step 3 - Training Data Management

Using Training Data Management

Ground truth is manually annotated data used to train our machine-learning models.

Use the tools in TDM to control, manage, and adjust the ground truth of your training sets for Identification and Classification models. In this section, you will learn how to upload your data using TDM:

Upload your documents

  1. Go to the Model Management page for your layout ( Library > Models).
  2. Click Upload Training Documents and upload each document as its own file.
  3. Click Upload in the dialog box.

All uploaded documents will appear on the Training Documents card. Switch between the Field Identification and Table Identification tabs, depending on the type of model you want to train.

Step 4 - Analyze your data

Training Data Analysis allows you to group your training documents and receive recommendations to improve the quality of your dataset.

Analyze your data

Receive insights for improving your training data by clicking the Analyze Data button, located in the Training Data Health card.

Analysis results

The results show you the eligibility and importance of each document:

Step 5 - Annotate your documents

Consistent annotations are crucial for a high-performance locator model.

Best practices

Learn how to annotate your documents by following the best practices listed below:

General guidelines

  1. Once you analyze the data, you’ll be able to annotate by group.
  2. After annotating 2-3 documents per group, you’ll be able to use guided data labeling.
  3. Follow the general rule for annotating: left to right, top to bottom.
  4. Make sure to maintain consistent annotations for your fields or columns.
  5. Always use the machine predictions when drawing the bounding box.
  6. Adjust the machine predictions ONLY if the bounding boxes are overlapping.
  7. Do NOT interchange fields or columns.
  8. If a field or a cell is not present, do not replace it with a similar value.
  9. If you don’t see a box made of dashed lines around a value, do NOT annotate it.

Field Identification

  1. Annotate fields with Multiple Occurrences only when multiple instances of a field are present.
  2. Use multiple bounding boxes when a text is logically connected.
  3. If you don’t see a value for a field, do NOT annotate it.

Table Identification

  1. When annotating a table, make sure to select a row where all data is present.
  2. Always find the first and the last rows of your table and make sure they are properly annotated.
  3. Draw one large bounding box capturing all rows of your table, and use the Split tool to define or correct the rows of your table.

Next steps

Step 6 - Review your flow’s settings and train your model

Review the flow’s configurations:

For more precise control over the process, you can configure your flow’s settings.

Run Training

Initiate a model training by clicking the Run Training button.

Step 7 - Evaluate the training results

Deploy your model

Once the model training is complete, you’ll find the candidate model on the model details page. To deploy it, click on your candidate model, then click Deploy Model. The model is now live and ready for document processing.

Evaluate the performance

Use the documents you’ve chosen for testing purposes to evaluate the performance of your model.

Upload your testing documents

  1. Go to Submissions.
  2. Click Create Submission.
  3. Upload the testing documents.
  4. Click Next.
  5. Choose the flow you’re using for the model.
  6. Choose the layout used for the model.
  7. Click Upload.

Results

Observe the results based on your flow settings on the Document Output page.

If the model is performing poorly, we suggest going over the training documents to check for potential annotation errors and inconsistencies and fixing them.