DEV Community

Cover image for Red Flags in the Ledger - hf26 Challenge
Dakshata
Dakshata

Posted on AI-assisted

Red Flags in the Ledger - hf26 Challenge

Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle Submission πŸ’Έ

TinyGuard AI β€” Simple AI Powered Expense Anomaly Detector

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle

What I Built

TinyGuard AI is a lightweight, AI-powered anomaly detection tool that helps users spot unusual expenses and suspicious-looking transactions in their CSV data.

Small businesses, freelancers, and independent professionals often manage their expenses using spreadsheets. Manually reviewing every transaction can be tedious, and unusual amounts can easily go unnoticed.

TinyGuard AI makes this process simpler. Upload a CSV file, select numerical features, and let the application analyze the data.

It currently includes two separate AI-powered analysis sections:

  • Isolation Forest: Detects unusual patterns in numerical transaction data without requiring labelled training examples.
  • TabPFN: Demonstrates tabular classification by predicting Normal/Review categories using a separate synthetic, labelled training dataset.

The application also provides visualizations, a results table, and downloadable analysis results.

The idea is simple: make useful AI-based data analysis accessible without requiring users to build their own machine learning pipeline.

Who would pay for it?

Freelancers, small businesses, independent consultants, and bookkeeping teams could benefit from a simple tool that helps them review expense data faster. A future version could offer recurring CSV analysis, automated reports, and integrations with accounting workflows.

Demo

TabPFN Prediction Results: Displays the model's classification output for the selected numerical features, showcasing the integration of TabPFN into TinyGuard AI.

TabPFN Predictions: Demonstrates TabPFN-based classification of transactions into Normal and Review categories using a labelled training dataset.

Isolation Forest Predictions: Detects unusual patterns in uploaded expense data and highlights potentially anomalous transactions.

Code

TinyGuard AI

A beginner-friendly web app that detects unusual records in CSV files using machine learning.

Built with Streamlit, Pandas, and Scikit-learn's Isolation Forest.


Quick Start

1. Create & activate a virtual environment

# Windows
py -m venv .venv
.venv\Scripts\activate

# macOS / Linux
python3 -m venv .venv
source .venv/bin/activate
Enter fullscreen mode Exit fullscreen mode

2. Install dependencies

pip install -r requirements.txt
Enter fullscreen mode Exit fullscreen mode

3. Run the app

streamlit run app.py
Enter fullscreen mode Exit fullscreen mode

The app opens at http://localhost:8501 in your browser.


How to Use

  1. Upload any CSV file (or use the included sample_expenses.csv).
  2. Select the numeric columns you want to analyze.
  3. Adjust the anomaly ratio slider if needed.
  4. Click Analyze Data.
  5. Review the results and download the annotated CSV.

Project Structure

spill_the_tea/
β”œβ”€β”€ app.py                 # Main application
β”œβ”€β”€ requirements.txt       # Python dependencies
β”œβ”€β”€ sample_expenses.csv    # Sample data for testing
└── README.md              # This file

Requirements

  • Python 3.10+
  • See requirements.txt for…

How I Built It

I built TinyGuard AI using Python and Streamlit, with a focus on keeping the application lightweight, accessible, and easy to run locally.

Tech stack:

  • Python β€” core application logic.
  • Streamlit β€” interactive web interface.
  • Pandas β€” CSV processing and data manipulation.
  • Scikit-learn β€” Isolation Forest anomaly detection.
  • TabPFN by Prior Labs β€” tabular machine learning classification.
  • Matplotlib β€” data visualization.

The application has two independent analysis pipelines. Isolation Forest identifies unusual observations, while TabPFN demonstrates classification using labelled synthetic training data. Keeping these pipelines separate makes their different purposes clear.

I also designed the interface with a soft pink and ivory aesthetic, including CSV upload, feature selection, result visualization, and downloadable outputs.

TabPFN's model weights are accessed through the required Prior Labs authentication and licensing process. The current implementation is designed as a small-data prototype and runs on CPU.

Why Does Open Innovation Matter?

Open innovation makes it possible for individual developers and small teams to experiment with powerful machine learning tools without building every component from scratch.

For TinyGuard AI, open-source libraries such as Pandas, Scikit-learn, Matplotlib, and Streamlit provided the foundation for data processing, anomaly detection, visualization, and the application interface.
Integrating TabPFN gave me an opportunity to explore a specialized tabular machine learning model alongside a conventional anomaly detection approach.

Instead of depending entirely on a closed, general-purpose AI API, I could build around tools designed for specific tasks, understand how the components work together, and customize the application for a practical use case.

My First User

One of the first things I wanted to validate with TinyGuard AI was whether someone could upload an expense CSV and understand the results without needing a machine learning background.
The idea is genuinely useful: instead of manually scanning rows of expenses, users can get a quick overview of unusual transactions through Isolation Forest, with a separate TabPFN classification demo.

What could be improved next? I'd want clearer explanations of why a transaction was flagged, an easier way to compare the two models, and testing against real, appropriately labelled data before relying on the results for financial decisions.

For me, the most valuable next step would be making the flagged transactions easier to investigate, rather than simply showing predictions.

Prize Categories

  • Prior Labs β€” Best Use of TabPFN: Uses TabPFN for a separate tabular classification demonstration alongside Isolation Forest anomaly detection.

Show your love and support !!!

Top comments (0)