Updated

Auch auf Deutsch lesen

Anomaly detection in accounting: what rules catch and what they miss

Agent F Team 7 min read

Anomaly detection in accounting: what rules catch and what they miss

Anomaly detection in accounting means checking every invoice, payment and booking against what is normal for your company and flagging what is not: a duplicate invoice, a supplier whose bank details changed last week, an amount far outside the usual range, a booking at an odd time. Fixed rules catch the obvious cases reliably. Learned patterns catch the near misses rules cannot describe. Both need a person to decide.

Most finance teams already run a few rules without calling them anomaly detection: an approval limit, a duplicate check on invoice numbers, a second signature on large payments. They work until someone behaves slightly differently from what the rule expects. This guide shows where that boundary sits for a German SME, and how to keep the real cases from drowning in false alarms.


Which anomalies cost a German SME real money?

Four patterns come up again and again in companies of 30 to 300 people.

Duplicate invoices. The same supplier invoice is paid twice. In Germany this has become more likely during the e-invoicing transition, because one invoice can arrive as a PDF by email and again as an XRechnung or ZUGFeRD file through a portal, each with slightly different metadata.

Changed bank details. An email, apparently from a known supplier, announces a new account. The next payment run sends the money to a fraudster. The loss is immediate and often hard to recover.

Unusual amounts and splits. An invoice ten times the supplier's normal size, or three invoices from the same supplier on the same day, each just under the approval limit.

Unusual timing and authorship. A booking on a Sunday night, a manual journal entry to a revenue account by someone who never books revenue, a credit note issued right after a period was closed.

Not every anomaly is fraud. Most are honest mistakes, and many are legitimate business that simply looks different from last month. That is the problem the rest of this article deals with.

What do fixed rules catch?

Rules are precise, cheap and easy to explain to an auditor. They suit any check you can write as a sentence with no exceptions.

Banks now add one more rule on their side. Since 9 October 2025, banks in the euro area must offer verification of payee under the EU Instant Payments Regulation, for standard and instant euro transfers: before you send, the bank compares the payee name you entered with the account holder and warns you of a mismatch. Business customers may opt out for payments submitted as a batch, and some do so to keep payment runs moving. If you have, the check is not protecting your largest supplier payments. How to keep the run safe is in our guide to the batch payment run.

The German digital bookkeeping rules (GoBD) also expect controls. They ask companies to set up, carry out and document an internal control system, and name plausibility checks among its examples. Rules are the natural way to meet that, because they are easy to document.

What do fixed rules miss?

Rules fail at the edges, and fraud and error both live there.

A duplicate with the invoice number "2026-0412" and "RE 2026-412" passes an exact-match rule. So does the same invoice arriving once as a PDF with a gross amount and once as an e-invoice with a net amount and VAT split out. A changed IBAN set up properly in the master data, perhaps by a colleague who was persuaded by a convincing email and called the number in that email, passes the hold. Three invoices of 4,900 euros under a 5,000 euro limit pass every single check.

Rules also have no sense of context. An invoice of 40,000 euros is normal for your contract manufacturer and absurd for your office cleaner. A single threshold either fires constantly or never, and a threshold per supplier and account is something nobody maintains.

Finally, rules know only what someone thought of when writing them. A new pattern, such as a supplier that suddenly invoices from a different country, goes through until someone adds a rule after the loss. Clean supplier data makes many of these checks possible in the first place, as we explain in master data management.

Fixed rules versus learned patterns for duplicate invoices, changed bank details, unusual amounts, split invoices and timing

How do learned patterns differ, and where do they fail?

A learned approach builds a baseline from your own history: for each supplier, the usual amounts, frequency, accounts, cost centres, bank details, VAT treatment and who approves. A new transaction is compared against that baseline, and the system reports how far it deviates and why.

That catches what rules miss. Near-duplicates are found by similarity across number, date, amount and line items. A first invoice from a new IBAN is flagged even when the master data change was approved. A run of invoices just under a limit stands out as a pattern. The 40,000 euro invoice is judged against that supplier's own history.

Learned patterns have their own weaknesses, and you should ask about each one.

The sensible design uses both: rules for the checks that must never fail, learned patterns for everything that depends on context. The broader question of how much to trust an AI suggestion is covered in AI accounting accuracy.

How do you keep false positives from burying the real cases?

An anomaly system that flags forty items a day trains people to click "dismiss". After a month the real case goes through with the rest. Each false positive costs attention that the next flag needed.

Four practices keep the volume useful:

  1. Score and tier. Combine how unusual the item is with how much money is at stake. A slightly odd 80 euro receipt and a new IBAN on a 60,000 euro payment do not belong in the same queue.
  2. Route to the person who knows. The buyer knows whether a supplier changed its pricing. The finance lead knows whether a journal entry belongs. Generic queues produce generic answers.
  3. Measure precision. Track what share of flags led to a correction or a stopped payment. If it falls, tune the thresholds rather than adding more rules.
  4. Review during the month. Anomalies found during the month are cheap to fix. Found in the close, they delay it, which is the problem discussed in faster month-end close.
How a flag is handled: detect, score confidence and amount, route to the right person, decide, measure how many flags led to a correction

How does Agent F flag anomalies?

Agent F runs its checks on the same data model that holds invoices, purchase orders, supplier master data, bank transactions and the general ledger. A supplier invoice goes through three-way match against its purchase order and goods receipt. Rules run first: three rule-based checks flag a possible duplicate supplier invoice, an open item overdue by more than 30 days and the first use of an account, and each flag cites the records behind it.

Where the rules leave a case open, such as a bank match or the coding of an invoice line, AI proposes, and the proposal carries a confidence band (High, Medium or Low) set by the rules engine. A flag reads, for example, as a possible duplicate of an invoice received nine days earlier, with both invoices linked. A person decides: release, correct or stop. Nothing is paid or booked on the system's judgement alone, and every flag, decision and override lands in the immutable audit trail, which is the documentation the GoBD control requirement asks for.

To start, list the three payments you would least like to lose, check whether verification of payee is switched off for your batch payments, and ask how many of last month's flags led to a correction. If the answer is none, the rules are running and nobody is learning from them.

Learn how Agent F works, or see it on your own data at agent-f.ai/demo.

This article is for general information only and does not constitute tax or legal advice. Parts of it were generated with AI. Please consult your tax advisor or legal counsel before acting on it, and feel free to reach out at team@agent-f.com with any questions or for support.