Best Document Intelligence model for extracting fields when bill layouts and field positions change

IT Cognity 0 Reputation points
2026-09-04T09:36:48.36+00:00

Hello,

We are currently evaluating Azure AI Document Intelligence for extracting specific fields from electricity and natural gas bills.

Our main requirement is to build an extraction model that is robust to changes in the document layout, especially changes in the position of the fields we want to extract.

For example, a supplier may change the structure of its bill and move fields such as the supply number, meter number, billing period, or other required information to a different part of the document.

Ideally, we would like the model to identify and extract these fields primarily based on signals such as:

  • the field label/name,
  • the semantic meaning of the field,
  • the expected value structure or format,
  • and the general document context,

rather than relying heavily on the field's absolute position or the exact fields surrounding it.

PoC test

As a proof of concept, we trained a Custom Neural extraction model using sample documents.

We then modified one of the test documents by moving one of the required fields, together with its label, to a different position on the page.

The field itself, its label, and its expected value remained the same; only its position within the document changed.

When we analyzed the modified document, the model did not extract the field.

This raised some questions regarding the expected level of layout generalization of Custom Neural models.

Questions

  1. How layout-independent is a Custom Neural extraction model expected to be? If a field that was included in the training dataset later appears in a significantly different position on the document, should a properly trained Custom Neural model still be able to identify and extract it?
  2. What is the recommended training strategy for handling future field-position changes? Would it help to include multiple variations of the same document during training, where the required fields appear in different positions and with different surrounding layouts? For example, if the same field is shown in several different positions across the training documents, will the model learn to rely more on the field label, semantic context, and expected value structure instead of its location?
  3. Would this type of training improve generalization to previously unseen layouts? Our objective is not only to support the layouts already included in the training set, but also to reduce the need for retraining whenever a supplier makes relatively small structural changes to its bill.
  4. Is there any Microsoft guidance regarding the number and diversity of layout variations that should be included in the training dataset in order to achieve this?
  5. Given this requirement, is Custom Neural the most appropriate Document Intelligence model? Or would another capability, such as Custom Generative extraction, be better suited when the extraction should depend more on the semantic meaning and expected structure of the fields and less on their visual location?

Our main objective is for changes in the location of a field within the bill to have minimal impact on extraction accuracy.

We understand that significant document changes may sometimes require retraining, but we would like to minimize that dependency and choose the model and training strategy that provide the best possible generalization across changing supplier layouts.

What would Microsoft recommend for this type of use case?

Thank you.

Azure Machine Learning

1 answer

Sort by: Most helpful
  1. Vinodh247-1375 44,396 Reputation points Volunteer Moderator
    2026-09-04T11:47:19.6666667+00:00

    The key issue is that Custom Neural models are not purely semantic models. They learn from a combination of text, language, and document layout signals. Therefore, moving a field and its label to a completely different location can impact extraction even when the label and value remain unchanged.

    For your scenario, Custom Neural is generally the recommended starting point, as it is designed for structured, semi-structured, and unstructured documents and can generalise across document variations better than Template models. Microsoft also recommends starting with a Neural model where supported.

    Regarding your specific questions:

    1. Custom Neural is not fully layout-independent. Neural models use both language and layout features during training and inference. As a result, a field that appears in a significantly different location than the patterns observed during training may not always be extracted, even if the label and value remain unchanged. Your PoC result is therefore an expected behaviour rather than necessarily a model defect.
    2. Including multiple real layout variations in training is the correct strategy. If suppliers use different bill formats, or if the same field appears in different locations across document versions, include those variations in the labelled training set. Neural models are specifically intended for documents that contain the same business information but differ in presentation and structure. [learn.microsoft.com]
    3. Yes, greater layout diversity generally improves generalisation. While no model can guarantee extraction from completely unseen layouts, training with representative variations helps the model learn broader patterns instead of overfitting to a single document structure. [learn.microsoft.com], [learn.microsoft.com]
    4. Microsoft's guidance is to include sufficient examples for each variation. A commonly recommended starting point is at least five labelled samples per layout variation, while larger and more diverse datasets typically produce better results.
    5. Custom Generative extraction is worth benchmarking if layout volatility is expected to be high. Your requirement is fundamentally semantic:"find the supply number regardless of where it appears, provided the surrounding context indicates it is the supply number." In scenarios where suppliers frequently change layouts, Generative extraction may prove more resilient because it is oriented toward understanding document content rather than relying predominantly on learned document structure. However, the best approach is to benchmark it against Custom Neural using representative production documents rather than assuming it will automatically perform better.

    Things to consider additionally:

    One aspect that is often overlooked is that artificially moving fields within a document is not always representative of real-world layout evolution. When suppliers redesign bills, they usually change multiple elements simultaneously, including section headings, neighbouring content, table structures, typography, and page organisation. Training and testing with genuine supplier versions typically provides a more realistic measure of model robustness than synthetically relocating individual fields.

    Overall, for your use case, I would recommend:

    • Custom Neural as the primary extraction model
    • Training with diverse, real supplier layouts and bill versions
    • Including multiple examples where key fields appear in different locations
    • Benchmarking Custom Generative extraction if supplier layouts change frequently and unpredictably

    This approach provides the best balance between accuracy, maintainability, and resilience to future layout changes.

    Help make this community better for everyone: if this answer resolved your issue, please accept it or leave an upvote. If not, share more details in a comment so we can continue the discussion and find the right solution.

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.