CONE: Embeddings for Complex Numerical Data Preserving Unit and Variable Semantics
Organizations: Florida State University · University of South Florida
Abstract
Large pre-trained models (LMs) and Large Language Models (LLMs) are typically effective at capturing language semantics and contextual relationships. However, these models encounter challenges in maintaining optimal performance on tasks involving numbers. Blindly treating numerical or structured data as terms is inadequate -- their semantics must be well understood and encoded by the models. In this paper, we propose CONE, a hybrid transformer encoder pre-trained model that encodes numbers, ranges, and gaussians into an embedding vector space preserving distance. We introduce a novel composite embedding construction algorithm that integrates numerical values, ranges or gaussians together with their associated units and attribute names to precisely capture their intricate semantics. We conduct extensive experimental evaluation on large-scale datasets across diverse domains (web, medical, finance, and government) that justifies CONE's strong numerical reasoning capabilities, achieving an F1 score of 87.28% on DROP, a remarkable improvement of up to 9.37% in F1 over state-of-the-art (SOTA) baselines, and outperforming major SOTA models with a significant Recall@10 gain of up to 25%.
Figures & tables
| Features | BERT | ELMo | NumBERT | BioBERT | DICE | AeNER | GenBERT | NumNet | CONE |
| Numeration | limited | limited | yes | limited | yes | yes | yes | yes | yes |
| Magnitude | yes | yes | yes | yes | yes | yes | yes | yes | yes |
| List maximum | limited | better than BERT | - | limited | yes | yes | yes | yes | yes |
| Decoding | limited | better than BERT | - | Limited | yes | yes | yes | yes | yes |
| Addition | limited | limited | - | limited | yes | yes | yes | yes | yes |
| Scalar Probing | some | limited | good | limited | - | - | - | - | yes |
| Age | Sex | Tumor Stage | Operating time | Blood loss | Follow-up (months) | BP (mmHg) | BMI (kg/ ) |
| 28 | F | S1–3 | 7 hrs | 3,000 mL | 30 | 76-118 | 21.8 2.9 |
| 34 | F | S1–3 | 580 min | 5 L | 32 | 80-122 | 23.4 3.2 |
| 36 | F | S1–3 | 6 hrs | 3.5 L | 28 | 82-125 | 22.5 3.17 |
| 42 | M | S1–2 | 500 min | 3,000 mL | 25 | 85-130 | 24.1 3.5 |
| 33 | F | S1–3 | 400 min | 3.2 L | 20 | 78-120 | 22.2 3.0 |
| 31 | M | S1–2 | 500 min | 3,000 mL | 15 | 84-128 | 23.6 3.4 |
| Numbers | Ranges | Gaussians | ||||||
| Abs. Diff. | Euclidean | Jaccard IoU | Wasserstein | |||||
| Method | ||||||||
| BioBERT | 0.067 | 0.064 | 0.398 | 0.355 | 0.267 | 0.248 | 0.038 | 0.039 |
| CONE | 0.989 | 0.798 | 0.997 | 0.786 | 0.498 | 0.465 | 0.689 | 0.663 |
| List Maximum (accuracy) | Decoding (RMSE) | Addition (RMSE) | |||||||||||||
| Integer range | |||||||||||||||
| Random vectors | 0.17 0.030 | 0.22 0.030 | 0.20 0.035 | 0.18 0.038 | 0.16 0.039 | 30.1 1.80 | 295.88 15 | 2888.62 42 | 28k 1k | 280k 5k | 41.80 0.50 | 412.33 12 | 4400.39 55 | 40k 2k | 405k 8k |
| BioBERT | 0.94 0.025 | 0.63 0.028 | 0.50 0.022 | 0.47 0.030 | 0.42 0.032 | 3.28 0.10 | 29.7 0.80 | 434 10 | 4.1k 0.2k | 40.5k 2k | 4.61 0.20 | 69.2 2.10 | 461 12 | 4.2k 0.3k | 42.1k 3k |
| DICE | 0.97 0.002 | 0.96 0.001 | 0.96 0.002 | 0.95 0.002 | 0.94 0.003 | 0.45 0.03 | 0.83 0.03 | 3.02 0.08 | 5.42 0.15 | 11.2 0.4 | 0.64 0.02 | 3.80 0.15 | 29.2 1.2 | 55.1 2.1 | 108.4 4 |
| NTL-WAS | 0.95 0.003 | 0.94 0.003 | 0.92 0.002 | 0.91 0.002 | 0.88 0.003 | 0.30 0.03 | 0.49 0.12 | 2.75 0.15 | 18.4 1.20 | 45.0 2.5 | 1.26 0.03 | 4.25 0.25 | 36.4 1.8 | 82.4 4.1 | 158.2 8 |
| CONE | 0.98 0.002 | 0.95 0.002 | 0.97 0.001 | 0.96 0.001 | 0.95 0.003 | 0.42 0.02 | 0.73 0.03 | 2.71 0.05 | 4.89 0.10 | 9.85 0.3 | 0.64 0.02 | 2.18 0.08 | 26.10 0.9 | 48.9 1.8 | 95.1 3 |
| Method | Dev | Test | ||
| EM | F1 | EM | F1 | |
| NumNet ( Ran et al., 2019 ) | 83.34 0.2 | 86.00 0.38 | 83.40 0.18 | 86.42 0.4 |
| NC-BERT ( Kim et al., 2022 ) | 75.18 1.2 | 77.68 0.75 | 76.02 0.9 | 77.91 0.8 |
| AeNER ( Yarullin and Isaev, 2023 ) | 83.72 | 86.56 | 83.69 | 86.98 |
| CONE | 83.71 0.12 | 86.70 0.2 | 83.74 0.12 | 87.28 0.3 |
| Method | Task | CancerKG | CovidKG | WebTable | CIUS | SAUS | ||||||||||
| R | MAP | MRR | R | MAP | MRR | R | MAP | MRR | R | MAP | MRR | R | MAP | MRR | ||
| TAPAS | CM | 0.783 | 0.728 | 0.742 | 0.734 | 0.669 | 0.688 | 0.800 | 0.736 | 0.753 | 0.820 | 0.771 | 0.789 | 0.820 | 0.774 | 0.787 |
| TM | 0.736 | 0.683 | 0.701 | 0.700 | 0.642 | 0.658 | 0.800 | 0.733 | 0.745 | 0.800 | 0.751 | 0.764 | 0.800 | 0.752 | 0.767 | |
| NumNet | CM | 0.650 | 0.581 | 0.596 | 0.700 | 0.628 | 0.641 | 0.700 | 0.612 | 0.628 | 0.758 | 0.686 | 0.703 | 0.780 | 0.707 | 0.724 |
| TM | 0.700 | 0.619 | 0.634 | 0.667 | 0.598 | 0.611 | 0.723 | 0.629 | 0.639 | 0.750 | 0.675 | 0.686 | 0.700 | 0.624 | 0.641 | |
| NC-BERT | CM | 0.792 | 0.758 | 0.768 | 0.750 | 0.694 | 0.712 | 0.850 | 0.788 | 0.795 | 0.850 | 0.792 | 0.809 | 0.850 | 0.793 | 0.804 |
| Dataset | ISResMat | SimFlooding | Magneto | CONE | ||||
| R | MRR | R | MRR | R | MRR | R | MRR | |
| GDC | 0.24 | 0.30 | 0.24 | 0.29 | 0.50 | 0.87 | 0.65 | 0.85 |
| Magellan | 0.98 | 0.99 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| WikiData | 0.85 | 0.96 | 0.65 | 0.85 | 0.90 | 0.95 | 0.94 | 0.95 |
| Open Data | 0.60 | 0.78 | 0.45 | 0.75 | 0.75 | 0.95 | 0.88 | 0.90 |
| ChEMBL | 0.65 | 0.82 | 0.45 | 0.68 | 0.86 | 0.97 | 0.91 | 0.95 |
| CONE 1 | CONE 2 | CONE 3 | CONE 4 | CONE | ||||||||||||
| Dataset | Task | R | MAP | MRR | R | MAP | MRR | R | MAP | MRR | R | MAP | MRR | R | MAP | MRR |
| CancerKG | CM | 0.800 | 0.789 | 0.808 | 0.766 | 0.764 | 0.772 | 0.790 | 0.773 | 0.786 | 0.797 | 0.782 | 0.790 | 0.833 | 0.817 | 0.831 |
| TM | 0.833 | 0.800 | 0.804 | 0.700 | 0.783 | 0.791 | 0.820 | 0.790 | 0.802 | 0.830 | 0.796 | 0.807 | 0.867 | 0.844 | 0.853 | |
| CovidKG | CM | 0.767 | 0.752 | 0.770 | 0.733 | 0.732 | 0.746 | 0.760 | 0.748 | 0.771 | 0.765 | 0.754 | 0.768 | 0.800 | 0.782 | 0.798 |
| TM | 0.700 | 0.724 | 0.736 | 0.700 | 0.658 | 0.688 | 0.720 | 0.705 | 0.725 | 0.752 | 0.723 | 0.755 | 0.800 | 0.781 | 0.792 | |
| WebTable | CM | 0.900 | 0.806 | 0.814 | 0.900 | 0.801 | 0.802 | 0.920 | 0.818 | 0.832 | 0.920 | 0.821 | 0.835 | 0.950 | 0.842 | 0.858 |
Numerical Reasoning in Language Models
Numerical reasoning in language models studies how systems represent, calculate with, and explain numbers across mathematical and real-world tasks.
See all 150 papers