Papers › Direction-Preserving Number Representations

Direction-Preserving Number Representations

8 May 2026arXiv:2605.07662added by Syntology

Bardia Zadeh, George A. Constantinides

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

Low-precision number formats are widely used in modern machine learning systems due to their efficiency. Accurate direction representation is key to the accuracy of vector operations. This work precisely explores the extent to which the direction of a vector can be represented by selecting its scalar elements from a common finite alphabet of a given size. This is standard practice in machine learning, where low-precision significands may be narrow-width floating-point or integer values. A geometric framework is introduced for analyzing the directional coverage of such product-structured codes. This work analytically quantifies the suboptimality gap between such product-structured codes and spherical codes for the vector as a whole, in both low and asymptotically high dimensions. Furthermore, within the product code class, it is proven that the standard formats of two's complement, fixed-point, and floating-point are suboptimal, again with quantified gap, pointing to the potential to develop new scalar number formats. Such scalar alphabets are numerically optimized across multiple block dimensions for directional coverage, including the dimension used in NVIDIA's NVFP4 format. Experimental results are presented comparing the performance of standard formats and the optimized alphabet. We find that for four bits, NVIDIA's choice of E2M1 closely approximates the optimized alphabet, providing a geometric explanation for its strong performance in low-precision machine learning workloads and an analytical understanding of the link between that superiority and block size. We provide open-source formal proofs in Lean for the theorems in this work, along with the experimental code and the optimized alphabets obtained.

PaperPDFCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 16 code samples harvested from 1 repository linked to this paper: 16 ran (of which 0 constructed an object rather than computing a result; 8 with no instrument failure: 7 honoured, 1 violated, 0 with no contract checked; 8 where Syntology's instrument failed) · 0 unverified. Where Syntology's instrument failed: 8 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: found in paper text by Syntology: 16 samples from 1 repository, 16 ran (8 with no instrument failure; 8 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written on 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

bardia01/Direction-Preserving-Number-Representations found in paper text by SyntologySyntology: 16 samples, 16 ran (8 instrument-failed) · 0 unverified report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

16 samples harvested: 16 ran (of which 0 constructed an object rather than computing a result; 8 with no instrument failure: 7 honoured, 1 violated, 0 with no contract checked; 8 where Syntology's instrument failed) · 0 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

7ran · honoured contract
1ran · violated contract
8ran · our draft was wrong

Licence: 0 of the 16 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from bardia01/Direction-Preserving-Number-Representations. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

bardia01/Direction-Preserving-Number-Representations found in paper text by Syntology 16 samples, 16 ran (8 instrument-failed) · 0 unverified
angle_from_dot Experiments/src/utils.py ran · honoured contract fingerprinted MIT (permissive) · 388828a34b71e47a · report fixture: signature dot_values:ndarray/2/float · returned ndarray · level recorded 2026-09-24
build_optimized_code_details_path Experiments/src/runner.py ran · our draft was wrong MIT (permissive) · 5d9e15309df6a41e · report fixture: signature stage_1_number_of_targets:int/0/int, stage_2_number_of_targets:int/0/int · returned PosixPath · level recorded 2026-09-24
build_output_bundle_paths Experiments/src/runner.py ran · our draft was wrong MIT (permissive) · c42455728cf11119 · report fixture: signature output_dir:PosixPath/0/? · returned tuple · level recorded 2026-09-24
fp4_e2m1_values Experiments/src/datatypes.py ran · honoured contract fingerprinted MIT (permissive) · cb1bdd08fac1c44a · report fixture: signature _dimension:int/0/int · returned ndarray · level recorded 2026-09-24
fp8_e4m3_values Experiments/src/datatypes.py ran · honoured contract fingerprinted MIT (permissive) · afbb5e7a1c55e116 · report fixture: signature _dimension:int/0/int · returned ndarray · level recorded 2026-09-24
fp8_e5m2_values Experiments/src/datatypes.py ran · honoured contract fingerprinted MIT (permissive) · 86f6616e2162a751 · report fixture: signature _dimension:int/0/int · returned ndarray · level recorded 2026-09-24
golomb_differences Experiments/src/directional_coverage_optimizer.py ran · violated contract MIT (permissive) · 57b4c0c2d74ce77b · report fixture: signature a:list/1/float · returned ndarray · level recorded 2026-09-24
nearest_direction_cosines_batch Experiments/src/oracle_batch.py ran · our draft was wrong MIT (permissive) · 8c8f63d85faa6c31 · report fixture: signature targets:ndarray/2/float, levels:ndarray/1/float, batch_size:int/0/int, dedup_rtol:float/0/float · returned ndarray · level recorded 2026-09-24
normalize_rows in 7 papers Experiments/src/utils.py ran · our draft was wrong fingerprinted MIT (permissive) · bccecdf3cf099a03 · report fixture: signature x:ndarray/2/float · returned tuple · level recorded 2026-09-24
prepare_unit_vectors_for_backend Experiments/src/oracle_batch.py ran · our draft was wrong fingerprinted MIT (permissive) · 465e86b2c77e8e7f · report fixture: signature vectors:ndarray/2/float, backend:NoneType/0/? · returned ndarray · level recorded 2026-09-24
random_unit_vectors Experiments/src/utils.py ran · honoured contract MIT (permissive) · 33a11520d4c82d13 · report fixture: signature count:int/0/int, dimension:int/0/int, rng:Generator/0/? · returned ndarray · level recorded 2026-09-24
resolve_metric_backend Experiments/src/metrics.py ran · our draft was wrong MIT (permissive) · f0bbc33005da429d · report fixture: signature metric_device:str/0/str · returned MetricBackend · level recorded 2026-09-24
resolve_oracle_backend Experiments/src/oracle_batch.py ran · our draft was wrong MIT (permissive) · 93472d1be482046e · report fixture: signature device:str/0/str · returned OracleBackend · level recorded 2026-09-24
resolve_output_dir Experiments/src/runner.py ran · our draft was wrong MIT (permissive) · 6e7a28fa11c79f78 · report fixture: returned PosixPath · level recorded 2026-09-24
softmax in 240 papers
census: 53 implementations from 63 papers, 16 distinct outputs across 8 buckets, one shared input per bucket
Experiments/src/directional_coverage_optimizer.py ran · honoured contract fingerprinted MIT (permissive) · d96b021db8902f1e · report fixture: signature x:ndarray/2/float · returned ndarray · level recorded 2026-09-24
unit_sphere_samples Experiments/src/directional_coverage_optimizer.py ran · honoured contract MIT (permissive) · 262483b927638a17 · report fixture: signature num_samples:int/0/int, dim:int/0/int, rng:Generator/0/? · returned ndarray · level recorded 2026-09-24

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2605.07662, was issued in May 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections