{"id":"83b9753e-41b5-49ef-a50c-f9cde2328f03","arxiv_id":"2505.15391","paper_version":1,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":4.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":0,"one_line_summary":"A code-generation framework makes decision tree inference integer-only by converting leaf probabilities to scaled integers, enabling FPU-free deployment.","lead":"InTreeger converts random forest classifiers into integer-only C code so they can run on microcontrollers without floating-point hardware. It reports up to 2.1x faster inference and 21.3% lower energy use, while keeping predictions identical to the floating-point version on the tested datasets.","discovery_kind":"extension","skeptic_critique":{"model":"deepseek-v4-flash","headline":"No proof that accumulated rounding error (≤ n/2^32) is always below the class margin; a small-margin input can flip the argmax, so the 'no accuracy loss' claim rests on two datasets, not a guarantee.","rationale":"The paper's main contribution is the claim of lossless integer-only inference. The conversion itself is simple and the performance data are plausible. But the accuracy-preservation claim is a universal statement derived from a per-class error bound. A bound on absolute error of probabilities does not imply a bound on classification error; the missing link is the margin. The empirical section tests only two datasets, so it cannot establish the universal claim. The n=1 overflow is a related concrete bug, but the margin gap is the deeper issue because it affects arbitrary RF sizes. If the synthetic test flips a prediction, the paper's central claim is false as stated; if it does not, the concern is weakened but not eliminated, because a finite test cannot prove the universal claim. Either way, the paper should soften the claim to 'no accuracy loss observed on tested datasets' or add a runtime margin check and use wider accumulators. The performance and framework contributions remain valuable; the verdict stays conditional, consistent with the reader.","tokens_in":12199,"tokens_out":7968,"duration_ms":70999,"concrete_test":"Construct an RF with n=100 trees where, for a fixed test vector, every tree outputs class probabilities 0.50000001 and 0.49999999 (top-two margin 2e-8, below 100·2^-32≈2.3e-8). Compile the model with InTreeger and run the generated integer code and the original float predictor on that vector. If the predicted class differs, the §III-A claim is falsified. For robustness, sweep the margin across 1e-9..1e-7 and n∈{10,100,256}; any flip at margin < n/2^32 demonstrates the missing guarantee.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The central guarantee in §III-A is that integer conversion 'will not impact the accuracy performance of the RF model in any realistic scenario.' The derivation bounds the absolute error in each accumulated class score by n/2^32, but classification is decided by the argmax, not by the score magnitude. The paper never bounds the margin between the top two classes. For n=100 the error bound is ≈2.3e-8; any input whose top-two average probabilities differ by less than that can be misclassified after rounding. §IV-B checks only two datasets (Shuttle, ESA) with up to 100 trees and finds no mismatches, which is evidence but not a guarantee. A concrete manifestation of the fragility is the unhandled n=1 case: a pure leaf with p=1.0 is multiplied by 2^32 and stored as uint32, wrapping to 0, so the majority class receives zero weight; the paper's scaling formula does not define this case. Both issues attack the 'without loss of precision' headline directly.","agreement_with_reader":"agree"},"referee_report":{"model":"deepseek-v4-flash","summary":"InTreeger is an end-to-end framework that trains a tree ensemble (or accepts a trained model) and compiles it into an integer-only C if-else tree. Threshold comparisons are handled by FlInt's bit-reinterpretation trick, and leaf class probabilities are converted to uint32 fixed-point values scaled by 2^32/n, where n is the number of trees, to avoid overflow when accumulating votes from the forest. The paper evaluates generated code on ARMv7, RISC-V, and x86 for the Shuttle and ESA datasets with up to 100 trees, reporting inference latency improvements up to 2.1x and a 21.3% energy reduction on a Raspberry Pi setup, and presents a FE310 microcontroller use case. The central claim is that this integer-only conversion preserves classification accuracy without loss of precision.","tokens_in":12355,"tokens_out":8325,"duration_ms":73465,"significance":"If the accuracy-preservation guarantee held, InTreeger would be a useful, low-friction deployment tool for tree models on FPU-less microcontrollers; the end-to-end pipeline, the parameter-free derivation of the scaling factor from overflow avoidance and a precision target rather than from fitted data, and the evaluation across three ISAs with energy measurements are all strengths. The method is simple and the engineering results are promising. However, the paper's headline guarantee is currently stronger than its evidence: the fixed-point conversion is not proven to preserve the argmax for all inputs, and the n=1 case can overflow. With a corrected and qualified accuracy claim, the contribution would be a solid and practically relevant systems result.","major_comments":[{"comment":"The scaling formula 2^32/n has an unhandled overflow case for n=1. A pure leaf with p=1.0 converts to floor(2^32)=2^32, which does not fit in a uint32 and wraps to 0 in C, so the majority class receives zero weight in the accumulated result. Since Section II-A states that the framework supports all existing tree-based classification models, a single decision tree or a forest with one tree is in scope, and this is a concrete counterexample to the claimed 'without loss of precision' behavior. The paper's edge-case discussion covers precision loss for n>256 and for small probabilities, but not this n=1 overflow. Please add explicit handling for n=1 or restrict the claim to ensembles with at least two trees.","section":"Section III-A"},{"comment":"The analysis bounds the absolute error in each accumulated class score by n/2^32, but classification is decided by the argmax of those scores. No lower bound on the margin between the top two classes is provided, so the error bound alone does not establish that the argmax is preserved; for n=100 the bound is about 2.3e-8, and an input whose top-two average probabilities differ by less than that can be flipped in the worst case. Section IV-B's evaluation on two datasets, 10 splits, and up to 100 trees is useful evidence but does not justify the statement 'This transformation will not impact the accuracy performance of the RF model in any realistic scenario.' Please supply a margin-aware argument, add a broader empirical search that includes small-margin inputs, or soften the claim to a property demonstrated for the tested configurations.","section":"Section III-A and Section IV-B"},{"comment":"The statement 'Therefore, we deem the obtained results to be generalizable to other datasets' is not supported by evaluating only two datasets. The accuracy-preservation question depends on worst-case rounding relative to classification margins, which is a function of leaf purity, tree depth, and class distribution, not merely dataset size, number of features, and number of classes. Please present this as a limitation or add datasets that stress small-margin predictions before claiming generalization.","section":"Section IV-A"}],"minor_comments":[{"comment":"The text uses 'without loss of precision' and 'without loss of accuracy' interchangeably, while also conceding that the fixed-point representation is less precise than IEEE 754 for probabilities below about 0.001 and for forests with more than 256 trees. Please qualify the abstract's phrasing, for example to 'without loss of classification accuracy in the evaluated settings.'","section":"Abstract and Section III-A"},{"comment":"The paper claims support for all existing tree-based classification models, but the evaluation covers only Random Forests. Either provide an example with gradient-boosted or extra-trees models, or state that other models are supported by the code path but not benchmarked in this work.","section":"Section II-A"},{"comment":"The y-axis appears to be logarithmic but is not labeled as such; please add an explicit 'log scale' label or state it in the caption.","section":"Figure 2"},{"comment":"The energy measurement reports a single 14.5-million-inference run for each implementation; please report the number of repetitions and the standard deviation of the power measurements so the reader can assess the 21.3% energy-saving figure.","section":"Section IV-F"},{"comment":"The anonymous repository is mentioned only as a URL; for reproducibility, please include a fixed commit hash, a license, and a brief README with the exact commands needed to regenerate the C code and reproduce the reported measurements.","section":"Artifact availability"}],"recommendation":"major_revision","confidential_remarks":"The paper is within scope for a systems/edge-ML venue and the engineering contribution is sound in spirit. The main risk is the overbroad 'without loss of precision' guarantee, and the n=1 overflow is a concrete flaw in the central claim. I recommend major revision rather than reject because the issue is local and fixable: special-case n=1, add a margin analysis or a softened claim, and improve the empirical generalization argument."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Colleague,\n\nQuick take on arXiv:2505.15391 (InTreeger). The core idea is simple and genuinely useful: convert leaf probabilities to fixed-point integers using a code-generation-time scale factor of 2^32/n (n trees), reusing FlInt for thresholds. This is new relative to FlInt, which keeps leaves as floats, and to Daghero's symmetric min-max quantizer. The parameter-free derivation is a plus. I also credit the authors for integrating this into tl2cgen and for testing on three ISAs, including a real RISC-V MCU. Speedups of up to 2.1x and the 21% energy saving are plausible; the energy section is honest about baseline power effects.\n\nThe soft spots are real but fixable. The abstract says \"without loss of precision,\" but Section III-A itself concedes two accuracy edge cases, and the empirical check is only on two datasets (Shuttle, ESA) with up to 100 trees. The deeper issue is that the accumulated rounding error bound n/2^32 is never compared to the class-margin distribution. Nothing prevents a near-tie input from flipping the argmax, so the guarantee \"will not impact accuracy in any realistic scenario\" is not established. The stress-test note is right about this.\n\nThe n=1 case is a concrete bug: for a single tree, the scale factor is 2^32, so a pure leaf with p=1.0 wraps to 0 in uint32. The paper doesn't exclude n=1. That should be fixed by either using a wider accumulator or clamping, and the paper should state the valid range for n.\n\nPerformance numbers also lack error bars—10,000 replications is good, but variance matters for cache-sensitive if-else trees. And two datasets is thin for a generalization claim.\n\nOverall, this is a solid engineering contribution with a genuine novelty and a load-bearing claim that needs re-scoping. The accuracy paragraph should be rewritten to say \"empirically indistinguishable on tested datasets\" rather than \"no loss.\" The n=1 fix is straightforward. I would send this to review; a good referee can push for a corrected guarantee and a few more datasets, and the paper will be stronger for it.\n\nRecommendation: engage with this paper, but don't let the abstract stand.","headline":"Useful integer-only tree inference framework with a genuinely new leaf-probability conversion, but the 'no accuracy loss' claim overreaches and single-tree models hit an overflow bug.","tokens_in":12949,"tokens_out":3247,"would_cite":true,"duration_ms":27684,"reading_group":"maybe","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":[],"pacs":[],"model":"deepseek-v4-flash","headline":"InTreeger converts random-forest inference to pure integer arithmetic, claiming no accuracy loss and faster execution on ARM, x86, and RISC-V.","keywords":["integer-only inference","decision trees","random forests","fixed-point arithmetic","edge computing","code generation","embedded systems","quantization"],"falsifier":"Run the same comparison on a model with more than 256 trees, where single-precision float is more accurate than the fixed-point encoding, or on a dataset with near-tied class scores; if any sample's predicted class flips between the floating-point and integer-only implementations, the claim fails.","tokens_in":11977,"feed_emoji":"🌳","tokens_out":6742,"duration_ms":55561,"temperature":0.7,"pith_summary":"InTreeger claims that a random-forest model can be converted into a C program that uses only integer arithmetic, with no change to its predictions. The conversion replaces split thresholds with their floating-point bit patterns and scales leaf class probabilities by the ensemble size, turning every operation into integer loads, adds, and comparisons. This matters for embedded and edge hardware, where floating-point units are expensive or absent: the generated code runs on any processor that supports freestanding C. The paper reports speedups of up to 2.1x across ARMv7, RISC-V, and x86, and about 21% energy savings in a real board measurement, while matched predictions on two datasets.","feed_headline":"Integer-only random forests speed up inference by up to 2.1x","feed_subtitle":"Leaf probabilities become integers; predictions stay identical while inference gets faster and uses less energy","key_machinery":"The load-bearing object is a fixed-point encoding of class probabilities with scaling factor $2^{32}$/n, where n is the number of trees. At compile time every leaf probability p becomes floor(p * $2^{32}$ / n), so summing across trees yields the ensemble average scaled by $2^{32}$; no division happens at runtime. Split thresholds are handled by reinterpreting their IEEE-754 bit patterns as integers, so every inference operation is an integer load, add, compare, or store, which is what produces the speed and portability gains.","core_discovery":"The central discovery is that all floating-point arithmetic in decision-tree inference can be removed without sacrificing accuracy. Thresholds are handled by reinterpreting IEEE-754 float bits as integers, and leaf probabilities are multiplied by $2^{32}$/n and truncated to 32-bit unsigned integers during code generation, so the ensemble sum stays within range. The resulting error is at most n/$2^{32}$, below single-precision float resolution for ensembles up to 256 trees, and the paper argues this never changes the predicted class in realistic settings.","pith_inferences":["The n/2^32 bound could be turned into a formal per-model guarantee by checking that the error never exceeds the margin between top-two class scores; the paper validates this empirically only on two datasets up to 100 trees.","The same fixed-point leaf encoding should extend to gradient-boosted trees and scalar-output regression forests, since the framework claims support for all tree-based models but only random forests are evaluated.","On cores with vectorized floating-point units the advantage may narrow; the clearest wins are on FPU-less or scalar pipelines where integer adds avoid separate register files and FPU latency.","The measured 21% energy saving is diluted by a noisy idle baseline; on a dedicated low-power platform the saving should approach the runtime ratio, and removing the FPU entirely could add further gains."],"forward_implications":["Tree-based models can be deployed on microcontrollers without FPUs, since the generated code uses only integer operations and standard C.","The speedup grows with the number of classes, because each leaf adds one probability per class and integer adds are cheaper than float adds.","The end-to-end pipeline lets non-experts generate optimized models from a dataset without library setup or architecture-specific tuning.","On the measured ARMv7 board, completing the same 14.5M-inference workload took 7.79 seconds instead of 19.36 seconds, saving about 21% energy even with a noisy baseline.","The accuracy-preservation argument is bounded: the error is at most n/2^32, so ensemble sizes beyond 256 trees are where floating point becomes more precise."],"supporting_citations":[{"why":"Supplies the method that reinterprets floating-point split thresholds as integer bit patterns for threshold comparisons.","marker":"[26]"},{"why":"Provides the decision-tree code generator this work extends to emit if-else C code.","marker":"[27]"},{"why":"Defines IEEE-754 single-precision float precision, used to argue the fixed-point error stays below float accuracy up to 256 trees.","marker":"[31]"},{"why":"Shows tree accuracy plateaus near 128 trees, keeping typical ensembles below the 256-tree precision threshold.","marker":"[32]"},{"why":"Provides the Python training library used to fit the random forests evaluated for accuracy preservation.","marker":"[15]"}],"fun_headline_variants":["Integer-only trees: same predictions, 2.1x faster inference","Drop floats, keep accuracy: integer-only tree inference 2.1x faster","Floats-free decision trees hit 2.1x speedup with zero precision loss","Integer-only inference: 2.1x faster trees, exact same outputs","No float math needed: integer-only trees speed up 2.1x, no accuracy hit"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The whole accuracy guarantee rests on the assumption that the rounding error accumulated over the ensemble, at most n/$2^{32}$, is always smaller than the difference between the highest and second-highest class probabilities.","fun_headline_variants_meta":{"raw":{"variants":["Integer-only trees: same predictions, 2.1x faster inference","Drop floats, keep accuracy: integer-only tree inference 2.1x faster","Floats-free decision trees hit 2.1x speedup with zero precision loss","Integer-only inference: 2.1x faster trees, exact same outputs","No float math needed: integer-only trees speed up 2.1x, no accuracy hit"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.001237,"raw_usage":{"total_tokens":5025,"prompt_tokens":838,"completion_tokens":4187,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":454,"completion_tokens_details":{"reasoning_tokens":4079}},"tokens_in":454,"tokens_out":4187,"duration_ms":27946,"temperature":1.0,"reasoning_tokens":4079,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-07T15:18:17.871437+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Run the same comparison on a model with more than 256 trees, where single-precision float is more accurate than the fixed-point encoding, or on a dataset with near-tied class scores; if any sample's predicted class flips between the floating-point and integer-only implementations, the claim fails.","supporting_citations":[{"cited_title":"Flint: Exploiting floating point enabled integer arithmetic for efficient random forest inference,","cited_arxiv_id":null,"evidence_quote":"Supplies the method that reinterprets floating-point split thresholds as integer bit patterns for threshold comparisons."},{"cited_title":"Treelite: toolbox for decision tree deployment,","cited_arxiv_id":null,"evidence_quote":"Provides the decision-tree code generator this work extends to emit if-else C code."},{"cited_title":"Ieee standard for floating-point arithmetic,","cited_arxiv_id":null,"evidence_quote":"Defines IEEE-754 single-precision float precision, used to argue the fixed-point error stays below float accuracy up to 256 trees."},{"cited_title":"How many trees in a random forest?","cited_arxiv_id":null,"evidence_quote":"Shows tree accuracy plateaus near 128 trees, keeping typical ensembles below the 256-tree precision threshold."}],"review_version":1}