Alan Mohan

Projects

Written up in full. The index is on the home page.

All projects

Sentiment steering against RAG

Published research First author IEEE ICC 2026

A retrieval-augmented system repeats what is in its corpus. So an attacker who can add a handful of documents can change what the model says about a person or a topic without ever touching the question being asked.

What I did

I built the black-box attack simulation and the detector that answers it. The attack poisons a slice of the corpus with sentiment-shifted passages about public officials; the defence inspects retrieved passages before they ever reach the generator, so it does not depend on which model is generating.

Approach

Passages are embedded with a MiniLM sentence encoder and retrieved through a FAISS index, then generated with Llama 3.1. Detection is two independent signals over the retrieved set: cosine similarity, which catches the near-duplicate phrasing that poisoning tends to introduce, and a z-score on the sentiment distribution, which catches passages whose polarity sits outside the corpus baseline. Either signal can flag a passage, which is what keeps recall high.

Why it matters

Retrieval is how most deployed language models get their facts, and a corpus is far easier to edit than a model. The detector works on retrieved passages rather than generations, so it transfers across generators and retrievers instead of being tuned to one stack.

Poisoned share of corpus needed
0.04%
Attack success rate
81.26%
Polarity flip rate
65.21%
Recall on poisoned passages
97.75%

Built with Python, FAISS, Sentence-Transformers (MiniLM-L6-v2), Llama 3.1, scikit-learn, PyTorch

Publication

Alan Mohan, Shalaka S. Mahadik, Mithun Mukherjee, Pranav M. Pawar, Raja Muthalagu, Jaime Lloret

ICC 2026 — IEEE International Conference on Communications pp. 1–6 May 2026

Corpus WikiASP OfficeHolder Poisoned 0.04% Retriever MiniLM-L6-v2 FAISS top-k Detector cosine similarity sentiment z-score 97.75% recall flagged, dropped Generator Llama 3.1 answer
How the attack and the defence fit together. Original diagram.
  1. The corpus is the attack surface

    Retrieval treats the corpus as ground truth. Nothing in a standard RAG stack asks whether a passage deserves that trust.

  2. 0.04% is enough

    Poisoning a fraction of a percent of the corpus with sentiment-shifted passages produced an 81.26% attack success rate and flipped polarity on 65.21% of queries.

  3. Retrieval concentrates the damage

    Because poisoned passages are written to match the query closely, top-k retrieval pulls them in preferentially. The attacker never has to touch the query.

  4. Two cheap signals catch them

    Cosine similarity flags the repetitive phrasing poisoning introduces; a z-score on sentiment flags passages outside the corpus baseline. Together they reach 97.75% recall at about 18.5 seconds per query.

  5. The model never sees them

    Filtering happens before generation, so the defence is model-agnostic — swap the generator and it still holds.

All projects

Explainable intrusion detection for IoT

Published research Third of five authors Computers and Electrical Engineering

An intrusion detection system that flags traffic without saying why cannot be acted on. A network administrator needs to know which features drove the call before shutting down a device.

What I did

I built and evaluated the deep classifiers and the SHAP-driven feature selection step. The useful finding was not the accuracy — it was that the explanations were good enough to act on: the fifteen features SHAP ranked highest were sufficient on their own.

Approach

One-dimensional CNN, LSTM and Bi-LSTM classifiers, trained across four benchmark datasets so the result would not be an artefact of one capture: NSL-KDD, UNSW-NB15, TON-IoT and X-IIoTID. SMOTE handles the class imbalance that makes rare attacks look like noise. SHAP then produces global and local explanations, and retraining on only the top fifteen features tests whether those explanations are faithful.

Why it matters

A model that needs the full feature vector cannot run on the hardware IoT networks actually use. The fifteen-feature subset detected attacks including denial of service, ransomware and cross-site scripting above 92% accuracy on every one of the four datasets — evidence that the explanations were faithful, not decorative.

Accuracy across four datasets
up to 99%
NSL-KDD, reduced features
98.21%
Features retained of the full set
15
TON-IoT training time
−90%

Built with Python, TensorFlow, Keras, SHAP, LIME, imbalanced-learn, pandas, NumPy

Publication

Sapna Sadhwani, Ameya Navare, Alan Mohan, Raja Muthalagu, Pranav M. Pawar

Computers and Electrical Engineering (Elsevier) vol. 123, art. 110256 April 2025

Four benchmark datasets NSL-KDD UNSW-NB15 TON-IoT X-IIoTID SMOTE Classifiers 1D-CNN, LSTM Bi-LSTM SHAP global + local attributions top 15 retrain on 15 features only TON-IoT training time full feature set 37,486 s top 15 features 3,794 s Bars to scale. Detection accuracy held.
Explanations used as a feature-selection step, then tested by retraining. Original diagram.

All projects

HOPE

Product Lead developer Multi-agent CBT platform

Cognitive behavioural therapy works and costs more than most people can pay. Most software answers to that are a single chatbot that forgets you between sessions.

What I did

I designed HOPE as an orchestrated team of agents rather than one prompt. A session coordinator decides which stage of a CBT session the conversation is in and hands off to specialists: a memory extractor that parses each message into thought patterns, therapy goals and session insights; a reply drafter grounded in a library of cognitive distortions and homework exercises; and a crisis detector that reads every inbound message for self-harm indicators before any reply is generated.

Approach

Long-term context lives in a vector store, with a rolling summary keeping sessions coherent without paying for the whole transcript on every turn. The crisis check sits in the message pipeline rather than in the model prompt, so it cannot be talked around.

Monthly active users
60+
Backing
GDSC Solution Challenge selection; Microsoft for Startups

Built with PHP, MySQL, OpenAI GPT and Whisper, vector embeddings, Heroku

No public repository or live instance; the platform is not open source.

message in Crisis detector Session coordinator stage analyser memory extractor reply drafter read and write Vector memory thought patterns therapy goals session insights
Orchestrator and specialists. Original diagram.

All projects

This site

Build Designed and built it 2026

I needed somewhere to publish work that a technical reader could check rather than take on trust.

What I did

Three hand-written pages of semantic HTML, one stylesheet built on a custom-property design system, and a small amount of vanilla JavaScript for the theme toggle, the mobile menu, the project index you just came through, and the pipeline explainer above. Every diagram is inline SVG I drew, so it inherits the theme instead of shipping as a second set of images.

Approach

No framework, no build step, no dependency beyond two webfonts. The typographic rule underneath it: the serif makes claims, the monospace holds facts you can check. Everything JavaScript does is an enhancement — with it disabled the navigation is fully expanded, every project write-up is on the page, and the theme follows the operating system. Built with AI assistance, logged in full in the repository's prompt log.

Runtime dependencies
0
All HTML, CSS and JS, gzipped
17 KB

Built with HTML, CSS custom properties and grid, vanilla JavaScript, inline SVG, GitHub Pages

Screenshot of this site's home page: the name Alan Mohan set large in a serif face beside a portrait photograph, with a short statement of focus beneath it.
This page, photographed from the browser at 1440 px.