Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NASH: Numerically Aware Scoring Heuristic for Robust Semantic Similarity

Abstract

Numerical precision is critical in financial NLP, yet embedding-based semantic similarity metrics exhibit numerical blindness—failing to distinguish contradictory values within similar contexts. We introduce NASH (Numerically Aware Scoring Heuristic), a model-agnostic metric that decouples numerical verification from textual semantic evaluation through a three-stage pipeline: (1) modal separation via numeric masking, (2) dual-channel similarity estimation through masked-text similarity and context-aware numeric alignment, and (3) IDF-weighted aggregation. NASH functions as a drop-in enhancement to existing embedding-based metrics. Validated on our proposed NumFinE financial numerical evaluation benchmark and established semantic similarity datasets (STS-B, Financial-STS), NASH achieves substantial improvements in numerical sensitivity (up to +159.6% on listwise ranking) while preserving general semantic performance, establishing a reliable standard for numeracy-aware evaluation.


Overview

This repository provides a paper-aligned public implementation of NASH along with the evaluation datasets used in our experiments.


Repository Structure

nash_public_release/
├── nash/
├── scripts/
├── data/
├── run_triplet.sh
├── run_crosspair.sh
├── run_listwise.sh
├── requirements.txt
└── README.md

Installation

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Running

We provide executable scripts for all evaluation settings:

bash run_triplet.sh
bash run_crosspair.sh
bash run_listwise.sh

Please refer to these scripts for detailed configurations.


Notes

  • This release follows the pipeline described in the paper.
  • The dataset used in our experiments is included in the repository.
  • The implementation is intended for reproducibility and evaluation purposes.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages