File size: 4,395 Bytes
5edc085 bb865e2 5edc085 71feb13 8dcc26f 71feb13 8dcc26f 71feb13 8dcc26f 71feb13 8dcc26f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | ---
tags:
- regression
- pytorch
license: apache-2.0
---
## Model Description
`NumAdd-v2.0` is an optimized feed-forward neural network (FNN) in PyTorch for numerical sum prediction.
**Architecture:** 2-input, 1-output, with two hidden layers (32, 64 neurons) and ReLU activations.
**Parameters:** 2,273 trainable.
**Precision:** Requires `torch.float64` (double precision).
**Training Config:** Optimal batch size: 2048, Final tuning learning rate: 1.0e-12.
## Evaluation
Benchmarked on 120,000 samples across six input magnitude ranges. Metrics: MAE, MSE, RMSE, R2.
| Range (Input Max) | MAE | MSE | RMSE | R2 |
|-------------------|---------|----------|---------|---------|
| 0-50 | 0.004 | 0.000 | 0.004 | 1.000 |
| 51-500 | 0.003 | 0.000 | 0.004 | 1.000 |
| 501-5000 | 0.004 | 0.000 | 0.004 | 1.000 |
| 5001-50000 | 0.004 | 0.000 | 0.005 | 1.000 |
| 50001-500000 | 0.010 | 0.001 | 0.028 | 1.000 |
| 500001-50000000 | 0.706 | 6.333 | 2.517 | 1.000 |
## Limitations
Precision degrades for extremely large magnitude inputs (e.g., >500,000), indicated by increased MAE/MSE, although R2 remains high.
## Crucial Safety Warning, Disclaimers, & Liability Limitation
This model is an experimental statistical prototype provided strictly "as is" and "with all faults." The developers, distributors, and contributors disclaim all warranties, express or implied, including but not limited to any implied warranties of merchantability, fitness for a particular purpose, or non-infringement.
* **Approximation vs. Deterministic Arithmetic:** Despite utilizing double-precision float optimization (`torch.float64`), this model remains a statistical regression estimator. It does not perform hardware-level or logical arithmetic. Even at its lowest error rates, the model produces mathematically incorrect results (e.g., an absolute error of 0.706 at scale). Under no circumstances should this model be deployed in accounting, critical infrastructure, flight systems, medical dosage software, or any environment where a non-zero margin of mathematical error is unacceptable.
* **Strict Precision and Type Constraints:** This model is strictly compiled for double precision (`torch.float64`). Providing standard single-precision tensors (`torch.float32`) or integers will result in casting mismatches, runtime exceptions, or silent, extreme numerical corruption of the output. The responsibility for input validation and strict type casting rests entirely on the user.
* **Unpredictable Boundary and Edge-Case Behavior:** The model’s behavior on extreme mathematical boundaries (such as zero, negative values, infinity, subnormal numbers, or NaN inputs) has not been audited or verified. The model may yield highly unstable or volatile outputs when exposed to these values.
* **Computational and Operational Overhead:** Performing basic arithmetic operations via a neural network introduces severe computational, memory, and runtime latency overhead compared to native CPU/ALU instructions. It also introduces a massive attack and failure surface, requiring heavy dependencies (such as Python, PyTorch, C++ runtimes, and specific CUDA drivers), all of which can fail independently.
* **Statistical Metric Deception ($R^2$):** Users are explicitly warned that the reported $R^2$ score of `1.000` is a statistical artifact of scale variance. It is mathematically deceptive and must not be used to justify the model’s safety, precision, or operational readiness.
* **Arbitrary Code Execution (Security Vulnerability):** The serialized model file is saved in PyTorch's default pickle-based format. Loading untrusted `.pt` or `.pth` files can execute arbitrary, malicious code on your system. To mitigate the risk of remote code execution (RCE) and system compromise, you must enforce strict sandboxing and use `weights_only=True`:
```python
torch.load("model.pth", map_location=device, weights_only=True)
```
* **Complete Assumption of Risk:** The end-user assumes 100% of the risk associated with integrating this model into any system. The creators shall not be held liable for any direct, indirect, incidental, special, or consequential damages (including but not limited to financial loss, hardware damage, or system downtime) arising from its use. |