Back-Testing Structural PDF Checks on Approved Files

This article is a snapshot – content was accurate as of November 2026 (code examples tested against the API as of October 2026). The product evolves actively; specific counts, examples, and detection rules may have changed since publication – see the changelog for the current state.
Early defaults are up, and someone in the portfolio review has asked the obvious question: were any of last quarter’s approved files altered before they reached us? A structural PDF check run on the stored files now answers part of it. You get the files that show evidence of a change after creation, with named markers. They are leads for human review, not verdicts on borrowers, and the share flagged is not an accuracy figure or a fraud rate.
In this article, a back-test means a retrospective re-run of a structural file check over documents you have already approved. It is not credit-model backtesting or scorecard validation. Nothing below tests whether a signal predicts default.
This guide is for the fraud or risk lead who owns the review and the backend developer who runs it.
When a back-test is worth running
Run one when you have a concrete question about a defined set of files: early defaults have risen in one period, channel or product; a broker relationship is under review; or a review has named document integrity as a hypothesis to test. Without a question, you get markers and nothing to compare them with.
Two situations need slightly different handling:
- You never checked these files at intake. This is the common case. The back-test is a first check, run now, on the stored copies.
- You did check them at intake with HTPBE?. You already hold a result for each file. You can read those again with
GET /result/{id}at no cost, and you can find them withGET /checks, which filters bystatusand byfrom_dateandto_date– the date the check ran, not the approval date. Each stored result shows bothalgorithm_versionandcurrent_algorithm_version, so you can compare them and see which intake checks ran on an older algorithm before you spend credits re-running them. A re-run is a new analysis, covered below.
Define the cohort before you scan anything
Use files that are byte-identical to what the applicant submitted. The check describes the file it receives. If your intake process changed the stored copy, the result describes your copy, not what the applicant sent. If unsure, ask the document store’s owner and record the answer.
Freeze the list. Write down the window (for example, applications approved between two dates), the document types in scope and the count, then run that list and nothing else. Adding a file halfway through because it ‘looks interesting’ turns review into confirmation-seeking.
Include performing loans, not just defaulted ones. Analytically, a marker among defaulted loans means little unless you know how often the same marker appears among loans that are paying normally. For fairness, re-checking only one group of borrowers can amount to unequal treatment. Apply the same criteria to everyone in the window – defaulted and performing alike.
Narrow by window and document type, never by borrower. Data-protection rules (below) ask you to process only what the review needs. You meet that by choosing a shorter window or fewer document types. You do not meet it by picking out borrowers by outcome, postcode or any personal characteristic.
Mind the volume. A quarter of approved files can easily run past a plan’s monthly allowance. As of November 2026, the Growth plan includes 350 checks a month. If your cohort is larger, take a defined sample, stage the run across months, or add one-time credit packs or a larger plan. A staged run can span several algorithm versions, so record algorithm_version with each result. Every delivered result uses one credit or quota unit, including an inconclusive one; a request that ends in an error uses nothing.
Run the re-scan
The batch queue guide explains worker design, backoff, Idempotency-Key handling and credit-exhaustion behaviour. If your files sit in a private bucket, the presigned URL guide shows how to give the API a short-lived link without making anything public.
Three points are specific to a back-test.
Run it through the API. Every result is tied to a check id you can store in the loan file, and it is covered by the Data Processing Agreement.
Use neutral filenames. The filename is stored and returned with the result. If you do not pass original_filename, the name is taken from the URL. Use object keys and an original_filename that carry a loan-file reference, not a borrower’s name.
If you checked at intake, keep both results. A re-run with no Idempotency-Key, or a new one, is a new analysis and may use another credit or quota unit. Do not reuse the intake key: a replay returns the original result only for the same key and the same url, and a fresh presigned URL with an old key is rejected. Generate a new key per file so retries of the re-run stay safe, and store the new result next to the old one rather than overwriting it.
Read the output as leads
Each file comes back as one of three outcomes:
modified– the file shows structural evidence that it was changed after it was created. The result names the markers, such asHTPBE_DATES_DISAGREE(recorded dates showing the document was changed after creation),HTPBE_POST_SIGNATURE_EDIT(content changed after the document was digitally signed) orHTPBE_PAGES_FROM_MULTIPLE_SOURCES(pages assembled from more than one source). A modification is a fact about the file. Many edits are harmless, and the result does not say who made the change or why.intact–intactmeans no modification was detected, not that the document is genuine. Content that was false from the start carries no evidence of a later edit, so a statement fabricated before it was saved can returnintact.inconclusive– no modification was established, and the check cannot confirm the file is unchanged.status_reasonsays why, from the document class toanalysis_incomplete, which means the file was not fully examined. Treat it as its own bucket: a limit of the evidence, not a finding of modification – and not a pass either. HTPBE? cannot confirm the file as an untouched original, so for a document the loan relied on, the useful next step, once your review process agrees, is to confirm it with the issuer.
Every result carries algorithm_version. Detection can change between versions, so a re-run today may differ from a check made at the time. If you hold an intake result and a re-run result that disagree – because the algorithm changed, or because the stored copy is not the file checked at intake – that disagreement is itself a case for review. Do not treat either one as automatically right.
The payload carries the same caution. Every result includes a usage_caution object whose safe_for_automated_adverse_decision field is always false. On a funded loan, read its recommended_action – route to human review, request from the issuer, or no action – through your review process first. Any contact with the borrower or an issuer then follows your servicing and contact policy, not the field.
If modified files cluster by channel, broker, document type or period, that is a lead about a process or a source, not proof. Slice by operational dimensions only.
An illustrative layout for what goes into the loan file, with placeholders rather than results:
| Field (illustrative) | Example entry |
|---|---|
| Loan-file reference | [loan ref] |
Check id | [id] |
algorithm_version | [version] |
| Status | [intact / modified / inconclusive] |
status_reason | [reason, if inconclusive] |
| Markers | [marker IDs, if modified] |
| Reviewer and date | [name, date] |
| Recorded outcome | [reason for the decision, in the reviewer’s words] |
Triage, human review and customer contact
Every flagged file is a reason for a person to look, nothing more. Before anything happens on a loan, a trained reviewer looks at the file and the result together, considers the ordinary explanations, and records the reason for whatever they decide. No automatic action – calling in the loan, freezing, reporting, repricing or closing an account – should follow from a verdict.
The loan contract and the law that applies to it decide what remedies are available, not the check. Take the review plan to counsel and compliance before you start; whether a finding creates any obligation, to act on the loan or to report it, is their question, not the check’s. As general context only: in the US, adverse action notice rules under ECOA/Regulation B and the FCRA may apply. In the UK, FCA rules, including the Consumer Duty, may apply. In the EU, GDPR Article 22 limits decisions based solely on automated processing; in the UK, Articles 22A–22D of the UK GDPR set safeguards for such decisions. Your counsel will know which apply. This is not legal advice.
If a review leads to contacting a borrower, confirm with compliance first – a reporting obligation can restrict what you may tell them – and do not accuse. Ask for an original, or a copy obtained directly from the source – their bank, employer or tax portal – and handle the contact through your existing servicing rules, contact policy and complaints process, plus collections rules where relevant. Only the source can confirm what the document says; a structural check does not assess content.
What not to conclude
A flagged share is not accuracy and not a fraud rate. It is the share of files in this cohort that returned modified under the algorithm versions in force when you ran it. Our guide to reading denominators and flagged shares explains why that number cannot measure detector quality or how often fraud happened.
A higher share among defaulted loans does not validate anything. This is the trap in the word ‘back-test’. In lending, a back-test usually checks whether a signal predicted outcomes. This exercise is not model validation. A gap between defaulted and performing cohorts can come from document mix, channel, period, algorithm version or simply small counts, rather than from anything about the borrowers. Treat it as a hypothesis to examine, not a finding.
A low share does not mean intake was fine. A structural check looks for evidence of later edits, not false content or a false identity. HTPBE? does not verify identity or document content. It complements manual review, identity checks, bank-data connections and confirmation from the issuer; it does not replace them.
A back-test result is not an input for your fraud rate. If you are building a business case, the loss model needs a fraud-rate assumption from your own confirmed cases, not from a flagged share.
Data protection and retention
Re-checking files collected for underwriting can be a new use of personal data, so involve your privacy team before you run it. They will want to confirm that the new purpose is compatible with the original one (GDPR Article 5(1)(b) and Article 6(4)); Recital 47 recognises processing strictly necessary for fraud prevention as a legitimate interest, subject to the usual balancing test. They will also check that your privacy notice covers fraud prevention, assess whether the processing is likely to be high-risk, in which case a DPIA is required (Article 35), and keep the batch to what the review needs (Article 5(1)(c)).
For files sent through the API, HTPBE? acts as a processor under the Data Processing Agreement. For what HTPBE? stores and for how long, see our Privacy Policy and DPA.
On your side, results belong in the loan file, under your existing retention schedule and access controls. Avoid a separate export or spreadsheet that outlives the files it describes.
Start with a sample
If early defaults have raised the question, a small pilot answers whether a full back-test is worth the effort. Take a defined sample of last quarter’s approved files – defaulted and performing, same criteria for all – run it through the HTPBE? API, and have one reviewer work through the modified and inconclusive results with reasons recorded. Size the sample to fit your plan’s monthly allowance. You will learn what your stored copies look like, how much review time the leads take, and whether the question deserves a larger run.
For a sense of how flagged shares behave in a self-selected sample, and why they are not a fraud rate, see the February, March and April 2026 integrity reports.