Imagine sorting hundreds of receipts by hand — office supplies, travel, meals, software, rent. It's slow, boring, and error‑prone. Yet every business does it, because without categories you can't answer "where is our money going?"
Machine learning can read a transaction like "AMZN Mktp US" and instantly tag it "Office Supplies." Automating this frees accountants to focus on analysis and strategy — the interesting work.
Transaction descriptions are short and messy: "STARBUCKS #123 SEATTLE", "AMZN MKTP US*AB12", "SQ *COFFEE SHOP". Turning these into clean categories is a text classification problem.
Classic models: bag‑of‑words + logistic regression. Modern models: transformers like BERT, which understand context and can classify with very few labels. Start simple, then upgrade as your data grows.
Invoices and receipts arrive as images and PDFs. Document AI combines OCR (Optical Character Recognition — reading the text) with ML (understanding the structure) to extract the vendor, amount, date, and line items automatically.
This is a huge boost for accounting: invoices get read in seconds, not typed in by hand. Errors plummet. Modern tools like Google Document AI, AWS Textract, and Azure Document Intelligence make this accessible.
A single transaction can belong to more than one category. "Dinner with clients in Paris" is travel AND meals AND business development.
Multi‑label classification handles this. Each transaction gets a set of labels, not just one. The challenge? Categories often have a hierarchy: Travel → Flights → International. Hierarchical models respect that structure.
| Type | Choices | Example |
|---|---|---|
| Binary | 1 of 2 | Fraud / Not Fraud |
| Multi‑class | 1 of many | Travel, Food, or Rent |
| Multi‑label | Many of many | Travel + Meals + Business |
When a payment arrives in the bank account, the accountant must match it to the right invoice. But the description rarely matches exactly: "ACME Corp" in the bank vs. "Acme Corporation Inc." on the invoice.
Record linkage (or fuzzy matching) uses ML to decide when two records refer to the same real‑world event. Techniques: string similarity, embeddings, and learned matching rules.
ML models are never 100% accurate. Human‑in‑the‑loop design means the model makes predictions, but humans review uncertain cases before they affect the books.
The trick: only ask humans to review high‑uncertainty predictions (e.g., confidence < 80%). This keeps humans doing 10% of the work — but the model improves and the books stay clean. It's the best of both worlds.
Every time an accountant corrects the model's prediction, that's gold — a labelled training example. A well‑designed system captures these corrections and periodically retrains the model, so it gets better every day.
This is active learning: the model asks humans about uncertain cases, learns from their answers, and improves. Over months, the accuracy can jump dramatically — because the model learns the company's unique patterns.
Categorization challenge: Get 15 real transaction descriptions (from a mock dataset or your own inventing). Manually tag each with a category (Travel, Food, Office, Utilities, Other). Then write 5 rules that would classify most of them — what % does your rule set get right?
OCR play: Take a photo of a real receipt (or use an image from the web). Write down everything you can read from it. Then think: how would a machine distinguish the total from the tax, date, or line items?
Multi‑label practice: Given 10 transactions, decide which should have 1 label and which should have 2 or more. For each multi‑label transaction, explain why the second label matters.
Fuzzy matching: Write down 5 pairs of names that mean the same vendor but look different (e.g., "Amazon.com" vs. "AMZN Mktp US"). Then design a simple rule that would catch most of them (e.g., "match on the first 5 letters").
Human-in-the-loop design: A model predicts a category with 55% confidence for one transaction and 99% for another. Which would you send for human review? Write a one‑sentence rule for when to ask a human.
Feedback loop sketch: Sketch (on paper or in a diagram) how a correction from an accountant could flow back into the model's next training. What data gets captured? Who triggers the retrain?
By the end of this module, you'll be able to: classify transaction descriptions with text ML, explain how Document AI reads invoices, use multi‑label classification for chart of accounts, match payments to invoices, and design a human‑in‑the‑loop system that keeps improving.