Indian Bank Transaction Categorizer (SetFit)

A SetFit text classifier that categorizes Indian bank/credit-card transaction narrations (UPI, NEFT, IMPS, ACH, POS) into everyday personal-finance spending categories.

It was built for a personal local-first finance tracker, after an explicit search turned up no public dataset that pairs real Indian narration formats with category labels — datasets either have real-looking Indian bank text with no labels (built for OCR/document-AI), or have category labels attached to generic Western merchant names with an "India" tag that doesn't reflect the actual UPI/NEFT/IMPS text shape. This model closes that specific gap using entirely synthetic, privacy-safe training data — see the companion training dataset, which also includes the generator script.

What it does

Classifies a transaction description into one of 18 categories:

Groceries · Eating Out · Kids Activities · Shopping & Clothing · Medicine & Pharmacy · Hospital & Medical · Utilities · Rent & Mortgage · Transportation & Gas · Entertainment & Subscriptions · Travel · Insurance · Education · Personal Care · Investments & Savings Transfer · ATM & Cash · Fees & Interest · Income & Deposits

It handles two input styles, both seen during training:

  • Bank-narration shapes, e.g. UPI/Swiggy Instamart/swiggy123@ybl/Payment/HDFC, NEFT Dr-HDFC0000953-SURESH VERMA-Blinkit
  • Plain-language descriptions, e.g. "paid electricity bill BESCOM online", "SIP auto debit HDFC Flexicap fund"

Training data

810 rows, entirely synthetic, generated from:

  • Real public brand names (Swiggy, Zomato, BigBasket, PharmEasy, Netflix, Zerodha, IRCTC, etc.) — these are just facts about which businesses exist, not personal data.
  • Randomly generated reference numbers, UPI VPAs, and person names (drawn from a generic name pool) — nothing here corresponds to any real person or real transaction.
  • Templates mirror narration shapes reverse-engineered while building statement parsers for ICICI, HDFC, Axis, and Scapia (India) — not copied from any real statement content.

Nothing in this model was trained on real user transaction data. The generator script is included in the [Budgeter repo] (synthetic_indian_generator.py) if you want to inspect or extend it.

Evaluation

Test set Accuracy High-confidence wrong (≥0.6, would slip past a review gate)
Held-out synthetic (unseen seed, 270 rows) 94.4% 0
Hand-crafted natural-language set, not from the generator's templates (20 rows) 100% 0

The held-out misses are concentrated in genuinely ambiguous cases (e.g. "Refund Credit" / "Interest Credit" vs. Investments & Savings Transfer; grocery-delivery apps vs. Eating Out) and land at low confidence — in the source app these get flagged for human review rather than silently applied.

Honest limitation: this is trained entirely on synthetic data. It has not been evaluated against real bank statements (for privacy reasons, it never will be by the original author) — treat the numbers above as a reasonable proxy, not a guarantee, and validate against your own data before relying on it.

Usage

from setfit import SetFitModel

model = SetFitModel.from_pretrained("Sumeetgpt/indian-transaction-categorizer")
model.predict(["UPI/Swiggy Instamart/swiggy@ybl/Payment/HDFC"])
# ['Groceries']

probs = model.predict_proba(["UPI/Swiggy Instamart/swiggy@ybl/Payment/HDFC"])[0]
# use max(probs) as a confidence score; gate low-confidence predictions for human review

Model Details

  • Model Type: SetFit
  • Sentence Transformer body: sentence-transformers/all-MiniLM-L6-v2
  • Classification head: LogisticRegression
  • Training: contrastive fine-tuning, 2 epochs, 20 iterations, batch size 16
  • License: MIT
Downloads last month
-
Safetensors
Model size
22.7M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Sumeetgpt/indian-transaction-categorizer