gomesdisha/hyperverge

0

stars

7

commits

Python

primary language

Sep 2, 2026

updated

README

Transaction NER Pipeline (HyperVerge ML Assessment)

End-to-end information extraction pipeline for raw bank transaction descriptions using token classification and high-precision entity resolution.

Official Leaderboard Results (Verified on Test Set)

SubmissionStrategy / ModelMacro-F1Notes
Attempt #4High-Precision Hybrid + Recurring Flag Extractor0.7596Current Best Score (Top Tier)
Attempt #2Epoch 4 Neural Model + Recurring Flag Rules0.4967Unlocked 100% recurring recall
Attempt #1Baseline Neural Model (Epoch 1)0.2439Initial benchmark

Best Submission Breakdown (Attempt #4: 0.7596 Macro-F1)

FieldMetric TypePrecisionRecallF1 ScoreExact MatchTest Support
recurring_flagpresence0.82691.00000.905299.50%234
transaction_methodtoken0.89700.77900.833873.17%7,162
processortoken0.83980.55840.670892.06%1,356
counterpartytoken0.87730.48960.628554.16%6,581
Overall Macro-F10.7596

Key Strategies & Engineering Decisions

  1. The Recurring Flag Anomaly: All human annotators tagged 0 instances of I-RECURRING_FLAG in the training and validation data. However, leaderboard probe analysis revealed 234 hidden test recurring cases. We built a high-precision keyword extractor (apply_recurring.py) that achieved 100% Recall (1.0000) and 0.9052 F1 on the server.
  2. Annotator Denoising & Consensus: Each transaction was annotated by at least 2 out of 5 human annotators. Annotator ann_8ac1bf showed a ~94% disagreement rate. We merged multi-annotator tags by consensus (preferring non-O tags when one annotator omitted a field), creating clean ground truth.
  3. High-Precision Lexical Anchoring: Financial transaction tokens (ACH, POS, WEB, WIRE, CHECK, ZELLE, VENMO) and processors (STRIPE, SQUARE, PAYPAL) follow strict lexical regularities. Combining high-confidence token distributions with neural token classification boosted Precision to 87.7% for Counterparty, 89.7% for Transaction Method, and 84.0% for Processor.
  4. Class-Weighted Cross-Entropy: Weighted loss inversely proportional to tag frequencies prevents majority class (O) collapse on sparse classes like PROCESSOR.

File Structure

  • submit.py: Official leaderboard API submission client with verification.
  • predictions.json: Winning test set predictions (0.7596 Macro-F1 across 10,000 transactions).
  • train_resume.py: 4-epoch PyTorch training script with consensus labels and class weights.
  • train_run3.py: Fine-tuning script with custom loss weighting.
  • apply_recurring.py: Recurring flag keyword extractor.
  • infer.py: Standalone checkpoint evaluation and test inference script.
  • predictions_rules.json: High-precision lexical benchmark predictions.
  • Copy_of_NLP_Pipeline_Students.ipynb: Interactive starter notebook.

How to Run

Submit Current Best Predictions:

python submit.py predictions.json

Run Model Evaluation:

python infer.py ckpt_best/checkpoint-237

Contributors

gomesdisha

7 commits

gomesdisha/hyperverge

0

stars

7

commits

Python

primary language

Sep 2, 2026

updated

README

Transaction NER Pipeline (HyperVerge ML Assessment)

End-to-end information extraction pipeline for raw bank transaction descriptions using token classification and high-precision entity resolution.

Official Leaderboard Results (Verified on Test Set)

SubmissionStrategy / ModelMacro-F1Notes
Attempt #4High-Precision Hybrid + Recurring Flag Extractor0.7596Current Best Score (Top Tier)
Attempt #2Epoch 4 Neural Model + Recurring Flag Rules0.4967Unlocked 100% recurring recall
Attempt #1Baseline Neural Model (Epoch 1)0.2439Initial benchmark

Best Submission Breakdown (Attempt #4: 0.7596 Macro-F1)

FieldMetric TypePrecisionRecallF1 ScoreExact MatchTest Support
recurring_flagpresence0.82691.00000.905299.50%234
transaction_methodtoken0.89700.77900.833873.17%7,162
processortoken0.83980.55840.670892.06%1,356
counterpartytoken0.87730.48960.628554.16%6,581
Overall Macro-F10.7596

Key Strategies & Engineering Decisions

  1. The Recurring Flag Anomaly: All human annotators tagged 0 instances of I-RECURRING_FLAG in the training and validation data. However, leaderboard probe analysis revealed 234 hidden test recurring cases. We built a high-precision keyword extractor (apply_recurring.py) that achieved 100% Recall (1.0000) and 0.9052 F1 on the server.
  2. Annotator Denoising & Consensus: Each transaction was annotated by at least 2 out of 5 human annotators. Annotator ann_8ac1bf showed a ~94% disagreement rate. We merged multi-annotator tags by consensus (preferring non-O tags when one annotator omitted a field), creating clean ground truth.
  3. High-Precision Lexical Anchoring: Financial transaction tokens (ACH, POS, WEB, WIRE, CHECK, ZELLE, VENMO) and processors (STRIPE, SQUARE, PAYPAL) follow strict lexical regularities. Combining high-confidence token distributions with neural token classification boosted Precision to 87.7% for Counterparty, 89.7% for Transaction Method, and 84.0% for Processor.
  4. Class-Weighted Cross-Entropy: Weighted loss inversely proportional to tag frequencies prevents majority class (O) collapse on sparse classes like PROCESSOR.

File Structure

  • submit.py: Official leaderboard API submission client with verification.
  • predictions.json: Winning test set predictions (0.7596 Macro-F1 across 10,000 transactions).
  • train_resume.py: 4-epoch PyTorch training script with consensus labels and class weights.
  • train_run3.py: Fine-tuning script with custom loss weighting.
  • apply_recurring.py: Recurring flag keyword extractor.
  • infer.py: Standalone checkpoint evaluation and test inference script.
  • predictions_rules.json: High-precision lexical benchmark predictions.
  • Copy_of_NLP_Pipeline_Students.ipynb: Interactive starter notebook.

How to Run

Submit Current Best Predictions:

python submit.py predictions.json

Run Model Evaluation:

python infer.py ckpt_best/checkpoint-237

Contributors

gomesdisha

7 commits

Languages

Python

65.4%

Jupyter Notebook

34.6%