Skip to content

AI uses for records

Debits match, logic fails: inside a journal entry reasoning dataset

By SourceX Editorial · Reviewed by Noah Loul ·

9 sections

Short answer

A journal entry reasoning dataset should treat balance as the entry ticket, then grade three things separately: the accounts and dimensions chosen, the source facts the rationale cites, and the policy or caption rule applied. In a public synthetic ledger of 533,009 lines, all 30 labeled combination anomalies pass value and amount checks; only a field-pairing check flags them, and it cannot say why.

Agent run

Debits match, logic fails

This page covers debits match, logic fails: inside a journal entry reasoning dataset.Illustrative

Key takeaways

  • Balance is a gate, not a grade: score classification, evidence and the rule applied separately, and never average a failure away.
  • WorldCom's misstatement ran through balanced entries; the SEC alleged about $771 million of line costs moved into capital asset accounts in 2001.
  • In the public deepAI file, value and amount screens caught 0 of 30 combination anomalies; a pairing screen caught all 30 but also flagged 35 legitimate lines in a holdout.
  • Each label needs the reviewed treatment, defensible alternatives, the deciding facts and the policy version, set by two accountants working independently.
  • Small reclassifications belong in the set: SAB 99 says qualitative factors can make small misstatements material.

What a journal entry reasoning dataset has to score once the entry balances

It has to score the decision inside the entry: which accounts, counterparty and dimensions the business event belongs to, which facts in the source documents settle that, and which policy or reporting rule was applied. Balance is a gate, not a grade. It is the one property of an entry that a ledger can test mechanically, so a model that has only learned to balance has learned the part the software already polices.

The best-documented case of balanced entries with broken logic is WorldCom. In its complaint against two former members of WorldCom's accounting staff, the SEC alleged that journal entries made in 2001 moved about $771 million of line costs out of expense accounts and into capital asset accounts. Each entry had equal debits and credits and posted to accounts that existed. The classification carried the misstatement.

A journal entry reasoning dataset is built for that gap. Each item is a task packet holding the entry as drafted or posted, the source documents behind it and the policy in force, and the label is the treatment that qualified reviewers agreed on plus the facts that decided it. Arithmetic is checked, but it earns no credit on its own.

Seven entries that foot and still mislead

Every case balances, posts to valid accounts and would pass a reviewer who only checks totals. What makes each one wrong sits in a document outside the entry: an invoice description, a customer master record, a work order, a lender schedule.

Two patterns repeat. In cases 1, 3, 6 and 7 the amount lands in the wrong kind of account, so an asset, a cost caption or a liability is misstated. In cases 2, 4 and 5 each account is plausible on its face, but the counterparty, location or purpose behind it is wrong, which is the kind of error a model can only catch by reading the evidence.

The casebook gives a grader the posted entry, the fact in the packet that decides treatment, the reviewed treatment and what the rationale must name. The cases are illustrative and use no company's records:

Seven entries that foot and still mislead
CasePosted entry (balanced)Deciding fact in the packetReviewed treatmentRationale must name
1. Service cost capitalizedDr Construction in progress, Cr Accrued liabilitiesInvoice is a monthly network access charge; no asset is deliveredCost of services expenseRecurring service with no asset; capitalization criterion not met
2. Affiliate billed as a customerDr Trade receivables, Cr Service revenueCustomer master shows the counterparty is a sister subsidiaryIntercompany receivable and revenue tagged with the trading partnerAffiliate status and the consolidation elimination it triggers
3. Project labor in overheadDr Marketing expense, Cr Accounts payableSubcontractor timesheet names a customer projectCost of servicesProject link and the move of gross profit it causes
4. Valid fields, unseen pairingDr Repairs at profit center Store 14, Cr Accounts payableWork order location is the regional warehouseRepairs at the warehouse profit centerLocation evidence and that the pairing is new to the ledger
5. Owner's trip as travelDr Travel expense, Cr CashItinerary shows a personal trip by the ownerDue from shareholder or distribution, per written policyPersonal purpose and who approved the reimbursement
6. Sale proceeds against repairsDr Cash, Cr Repairs expenseBill of sale for a used forkliftRemove asset cost and accumulated depreciation; book gain or lossDisposal rather than refund, and the asset register line
7. Loan payment booked as interestDr Interest expense, Cr CashLender schedule splits the payment into principal and interestReduce loan principal; expense the interest part onlyThe schedule split and the resulting loan balance

In a public ledger of 533,009 lines, which errors slip past value and amount checks?

Combination errors do. In a public synthetic journal entry file, all 30 lines labeled local anomalies use only common values and ordinary amounts; what gives them away is a pairing of two fields that never occurs among the 532,909 regular lines.

The file is fraud_dataset_v2.csv in the GitiHubi/deepAI repository (commit cbdd4ce, GPL-3.0 license), published with a 2018 GPU Technology Conference lab on accounting anomaly detection. It holds 533,009 lines with SAP-style fields: company code, posting key, general ledger account, account key, profit center, currency and two amounts. The lab notebook says the data derives from the PaySim synthetic dataset with attributes renamed to resemble SAP finance tables, and it labels 70 lines global anomalies, with rare individual values, and 30 local anomalies, with rare combinations of values that are each common.

Our script reads only that CSV and applies three screens. The value screen flags a line when any value in its six coded fields (the document number is ignored) appears on fewer than 0.1 percent of regular lines. The amount screen flags a line when either amount is at or above the 99.9th percentile of regular lines, using the nearest-rank method. The pair screen flags a line when any of the 15 pairings of its six coded fields never occurs among regular lines. Nothing is filtered out, and no step uses randomness.

The value and amount screens caught all 70 global anomalies and none of the 30 local ones; every value on every local anomaly also appears on at least 2,794 regular lines. The pair screen caught all 30. Twenty-nine pair an account key with a profit center that never appear together in regular lines, 22 pair a profit center with a general ledger account never seen together, and one pairs a currency with a company code. The table gives each screen's rule and hits:

In a public ledger of 533,009 lines, which errors slip past value and amount checks?
ScreenRule as the script applies itGlobal anomalies flagged (of 70)Local anomalies flagged (of 30)Regular lines flagged
ValueAny value in the six coded fields on fewer than 0.1% of regular lines7000 of 532,909
AmountEither amount at or above the regular 99.9th percentile (nearest rank)7001,066 of 532,909
Pair, full referenceAny of 15 field pairings absent from all regular lines70300, by construction
Pair, holdout referencePairings absent from regular lines with even document numbers; tested on all anomalies and on odd-numbered regular lines703035 of 266,455
Three columns of 30 dots for the local anomalies in the public deepAI ledger file: none is flagged by the value screen or the amount screen, all 30 are flagged by the pair screen, with a note that the global anomalies were caught 70 of 70 by every screen.
Screen results on fraud_dataset_v2.csv (GitiHubi/deepAI, commit cbdd4ce), counted by SourceX on 2026-10-27.

A pairing check finds them, so why is it not a reasoning test?

Because it detects novelty, not error, and it returns no reason. A pairing the ledger has never seen can be a misposting or the first invoice for a new warehouse, and the screen cannot tell which without the document behind the line.

The holdout row shows the cost. When the reference set is built only from regular lines with even document numbers, the pair screen still flags all 30 local anomalies, but it also flags 35 of the 266,455 regular lines with odd numbers. Those 35 are legitimate entries that happen to be rare. In a working chart of accounts with far more accounts and dimensions, new pairings arrive with every new project, entity or cost center.

The label itself is thin. The file marks a line local without saying which field is wrong or what the correct posting would be, and the synthetic regular lines use only three posting keys and three general ledger accounts, far simpler than any working chart. The paper that inspired the lab (arXiv 1709.05254) frames its autoencoder as an answer to handcrafted detection rules that do not generalize beyond known fraud scenarios, but either approach ends in a score. A score tells a reviewer where to look. It does not supply the treatment, the deciding fact or the rule, and those are what a reasoning model must produce.

That settles the strongest alternative to a reasoning dataset: balance checks plus anomaly scoring. Both are worth running as filters, and neither establishes that an entry's accounting treatment is appropriate or that the person who posted it was authorized to do so.

Score sheet: one gate, four judgments and a flag

Grade each response on a pass-fail gate and four judgments reported separately, plus an authority flag, and never let a strong judgment offset a failed one. Averaging hides exactly the failure this dataset exists to find: a tidy, balanced entry in the wrong place.

At a glance

Score sheet: one gate, four judgments and a flag

Every judgment is scored only on responses that pass the gate, and every reported rate carries its denominator:

  • Gate, posting validity: debits equal credits, every account and dimension exists and is open, and the period accepts postings. Pass or fail; a pass earns no points.
  • Judgment 1, classification (0 to 2): 2 matches the adjudicated treatment, 1 matches a listed defensible alternative, 0 otherwise. Account, counterparty type and each dimension are scored as separate items.
  • Judgment 2, evidence grounding (0 to 2): the rationale names the packet facts the reviewers marked as deciding; 2 for all, 1 for some, 0 for none. A cited fact that is not in the packet zeroes the item and counts toward a fabricated-support rate.
  • Judgment 3, rule applied (0 to 2): the rationale names the policy clause, chart-of-accounts definition or reporting caption that governs, in the version dated for the packet.
  • Judgment 4, consequence (0 or 1): the rationale states what the wrong posting would distort, such as gross profit, consolidated revenue or the asset base.
  • Flag, authority: the response notes when the entry needs a reviewer other than its preparer or exceeds a stated threshold. Reported beside the score, not added to it.
  • Report: gate pass rate over all items; then each judgment's mean over gate passes; then the fabricated-support rate over all rationales.

Building packets that two accountants can label without seeing each other's work

Each packet is authorized for release by the company that holds the records, stripped of personal data, and complete enough that a credentialed accountant could decide the treatment from the packet alone. In practice that means the entry lines with accounts and dimensions, the source documents, the policy excerpts and chart definitions in force on the entry date, the group structure that marks affiliates, and the review outcome: the reviewer's comment and the corrected entry, if one was posted.

Two qualified reviewers, accountants with experience in the company's industry, label every packet without seeing each other's work. Each records the treatment, any defensible alternatives, the one to three deciding facts and the rule reference. An adjudicator settles disagreements, and agreement before adjudication is reported per judgment as Cohen's kappa, so a buyer can see where accountants themselves split.

Preserve what a reviewer of the dataset will ask for: entry dates and posting dates, the policy version, the selection rule that chose the packets, how many candidate entries were excluded and why, and who approved release. Replace people, vendors and banks with role tokens. If amounts must be scaled, scale every amount and every threshold in a packet by one factor and say so, because a capitalization limit that no longer matches its amounts breaks the case. SourceX has not run this study, and no results are published.

When more than one treatment is defensible, what should the label say?

It should list every treatment the reviewers accept, rank them, and score a ranked alternative as partial credit rather than as an error. Accounting leaves real choices to policy, such as a capitalization threshold or how a group tags shared services, so the label means correct under this company's policy on this date, not correct everywhere.

Small items stay in. The SEC staff's Staff Accounting Bulletin No. 99 says qualitative factors can make a quantitatively small misstatement material, and lists examples such as whether a misstatement masks a change in earnings or other trends. A reclassification that leaves net income untouched can still move a line investors watch: Rule 5-03 of Regulation S-X gives costs applicable to revenues, including cost of services, captions separate from selling, general and administrative expenses, so case 3 in the casebook changes reported gross profit.

Two label types need care. Where the evidence in the packet is too thin to decide, label the item insufficient evidence and expect the model to ask for the missing document; scoring a confident guess as correct would reward the habit the dataset is meant to remove. Where the original posting was a judgment call later reversed by review, keep both the original and the reviewed treatment so the packet teaches the change.

Turning the score sheet into a data request

Write the score sheet into the request. Name the entry types you need, such as manual journal entries, reclassifications, intercompany charges and disposals; require the packet contents listed above, including reviewer comments and corrected entries; and attach the casebook as an acceptance test the delivered sample must be gradable against.

SourceX sources datasets on request from businesses rather than holding them in stock: buyers describe scope, volume, language, format, timing and licensing needs through the request-data form. SourceX runs sourcing and qualification, rights review, contracting, preparation, delivery and payment. Nothing moves until the company holding the records has agreed the scope and terms in a signed agreement. That makes a precise specification the starting point. It does not mean matching packets exist for every request, that a sample will pass your acceptance test, or that a model trained on them will improve.

What this design does not show yet

It does not show how often production models misclassify balanced entries, how often accountants agree on treatment, or whether rationale scores predict which drafts a controller accepts. Those need real packets and a measured study, and none has been published.

The seven casebook entries are illustrative. The screen counts come from one synthetic file whose regular lines use three posting keys and three general ledger accounts, so they show how combination errors escape value and amount checks, not how common such errors are in real ledgers. The rubric's point values are a design choice, open to change once agreement data exists.

The next evidence worth collecting is reviewer agreement by judgment on a few hundred authorized packets, the share of entries with more than one defensible treatment, and a comparison of rubric scores with real review outcomes. Accounting conclusions in this article are general information; a qualified accountant should decide treatment for any specific entry.

Frequently asked questions

What is a journal entry reasoning dataset?

It is a set of task packets in which each journal entry comes with its source documents, the policy in force and a reviewed label. The label records the correct accounts and dimensions, any defensible alternatives and the facts that decide the treatment. Models are graded on classification and rationale, with balance treated as a pass-fail gate.

Why isn't a balanced journal entry proof that it is correct?

Balance only shows that debits equal credits. The SEC's WorldCom complaint describes balanced entries in 2001 that moved about $771 million of line costs from expense accounts into capital asset accounts. Correctness depends on whether the accounts match the business event, which only the documents behind the entry can show.

Can anomaly detection replace reasoning labels for journal entries?

No. In a public synthetic file of 533,009 lines, a field-pairing screen flagged all 30 combination anomalies but also flagged 35 legitimate lines in a holdout test, and it gave no reason or correct posting for any of them. Detection narrows where reviewers look; reasoning labels teach what the right treatment is.

Who should label journal entry treatment for AI training?

Credentialed accountants with experience in the company's industry, working from the packet alone. Two should label each packet without seeing each other's work, with an adjudicator for disagreements and agreement reported per judgment. Their labels should name the policy version they applied.

Do small misclassifications matter if net income does not change?

They can. SEC Staff Accounting Bulletin No. 99 says qualitative factors can make a small misstatement material, and Regulation S-X gives cost of revenues and selling, general and administrative expenses separate captions, so a reclassification between them changes gross profit. A dataset that drops small items loses the cases that test judgment.

Sources

  • The SEC's complaint against two former members of WorldCom's accounting staff alleges journal entries in 2001 that moved about $771 million of line costs from expense accounts into capital asset accounts. Source
  • The public synthetic journal entry file analyzed here: 533,009 lines with SAP-style fields and labels for regular lines, 70 global anomalies and 30 local anomalies, read at commit cbdd4ce. Source
  • The lab notebook describes the data as derived from the PaySim synthetic dataset with SAP-style attribute names, and defines global anomalies (rare individual values) and local anomalies (rare combinations of common values). Source
  • The deepAI repository is published under the GNU General Public License version 3. Source
  • Schreyer and coauthors propose autoencoder networks for detecting anomalous journal entries, arguing that handcrafted rules do not generalize beyond known fraud scenarios. Source
  • SEC Staff Accounting Bulletin No. 99 says qualitative factors can make quantitatively small misstatements material and lists examples such as masking a change in earnings or other trends. Source
  • Regulation S-X Rule 5-03 sets separate income statement captions for costs applicable to revenues, including cost of services, and for selling, general and administrative expenses. Source

Tell us what data you need

Share scope, volume, format, timing and licensing needs. Datasets are sourced on request.

See if your company qualifies