Atharv Pathak is a Python developer, full-stack web developer, and IT engineering student based in India.

MedNote

CLINICAL NLP / FULL-STACK AI

Scroll to explore↓
MedNoteCLINICAL NLP / FULL-STACK AI
The work

MedNoteClassifier — Clinical Feature Span Extraction

A full-stack clinical NLP solution for automated span extraction on the NBME® Clinical Patient Notes dataset, pairing PyTorch sequence tagging with a React 19 interactive annotation dashboard.

ACTIVE BUILDClinical NLP Suite & Benchmark Platform•2026
NLPPYTORCHREACT 19FASTAPITRANSFORMERS
01 // The Problem

Unstructured clinical patient notes contain vital diagnostic criteria buried in free-text prose, making manual grading, rubric alignment, and standardized extraction tedious and prone to inter-annotator variance.

02 // The Solution

An end-to-end clinical NLP span extraction pipeline combining lexicon matching, hybrid n-gram classification, and deep transformer sequence tagging, served through a real-time annotation and benchmarking web interface.

03 // Engineering Deep Dive

MedNoteClassifier is a clinical NLP solution designed for automated span extraction on the NBME® — Score Clinical Patient Notes dataset (USMLE® Step 2 Clinical Skills). The system identifies exact character offsets [start, end] in unstructured patient notes corresponding to standardized rubric concepts (e.g., 'heart pounding', 'family history of MI').

The workspace bundles a high-performance Python machine learning engine with a modern React 19 & Vite web application. The ML pipeline ensembles an Exact Lexicon Matcher with strict word-boundary enforcement, a Hybrid Character N-Gram Logistic Regression model, a PyTorch BIO sequence Transformer, and hooks for fine-tuned PubMedBERT models.

The interactive web dashboard provides clinicians and researchers with real-time text tokenization, span visual highlighting, and comparative micro-F1 benchmark evaluation across candidate model checkpoints.

04 // System Architecture & Visual Breakdown

Architecture in Action

Visual walk-through of the operational pipeline, core algorithmic stages, and execution telemetry. Click any diagram to inspect in full resolution.

Exact Character Offset Extraction & Highlight Inspector
Click to enlarge view
FIGURE 01 // 03CLINICAL SPAN ANNOTATOR

Exact Character Offset Extraction & Highlight Inspector

Interactive clinical annotation workspace displaying patient note free-text with real-time character-level offset boundaries [start, end]. Color-coded highlights isolate clinical entities (palpitations, substernal chest pressure, exertional dyspnea, family MI history) mapped directly against standardized NBME rubric concepts.

Ensemble Architecture: Lexicon Matcher, N-Gram & PyTorch BIO Transformer
Click to enlarge view
FIGURE 02 // 03MULTI-MODEL INFERENCE PIPELINE

Ensemble Architecture: Lexicon Matcher, N-Gram & PyTorch BIO Transformer

End-to-end inference ensemble fusing an Exact Lexicon Matcher with strict boundary enforcement, a Character N-Gram Logistic Regression classifier for irregular typos, and a deep PyTorch BIO sequence Transformer (PubMedBERT). An arbitration decoder merges candidate probabilities into contiguous and discontinuous span offsets.

Kaggle Benchmark Evaluation & Validation Micro-F1 Analytics
Click to enlarge view
FIGURE 03 // 03BENCHMARK PLATFORM

Kaggle Benchmark Evaluation & Validation Micro-F1 Analytics

Comprehensive model evaluation dashboard displaying test set character-level Micro-F1 scores (0.893 test score), precision-recall curves, and cross-entropy loss trajectories across DistilBERT, PubMedBERT, and the final ensemble checkpoint.

05 // Architecture Stack

System Components

Client / UI

React 19, Vite, TanStack Router, and Tailwind CSS v4

Backend & API

Node.js & Express API bridge with Python 3.10+ subprocess execution

Data & Storage

NBME patient notes corpus, Kaggle evaluation rubrics, and serialized PyTorch checkpoints

Protocols / Services

PyTorch BIO Transformer, DistilBERT / PubMedBERT fine-tuning, Character-level Micro-F1 evaluation engine

06 // Capabilities

Core Implemented Features

  • Exact character-level offset decoder ([start, end]) for unstructured clinical patient notes
  • Multi-model inference ensemble: Exact Lexicon Matcher, Hybrid Char N-Gram LogReg, and PyTorch BIO Transformer
  • Interactive clinical span annotator with real-time text highlighting and prediction visualizer
  • Character-level Micro-F1 evaluation engine and automated model comparison benchmarking suite
  • Extensible training harness for fine-tuning PubMedBERT and DistilBERT on specialized clinical ontologies
  • Streamlit standalone interactive demo app alongside modern React 19 web dashboard
07 // Technical Challenge & Retrospective

Overcoming Bottlenecks

Clinical patient notes feature complex medical abbreviations, misspellings, and discontinuous symptom mentions. Mapping exact character offsets from subword transformer tokens back to raw character slices required a custom offset indexer to prevent prediction drift.

Project Gallery

Visual Artifacts & Diagrams

MedNote preview
Enlarge
MedNote preview
Enlarge
MedNote preview
Enlarge
MedNote preview
Enlarge
Back to theall works.