REVIEW 2 major objections 5 minor 11 references
kindling: A Higher-Level torch Interface for Generating, Training, and Tuning Neural Networks in R
T0 review · 2 major / 5 minor · reviewed 2026-07-11 · grok-4.5
Pith's one-line read kindling is an R package that reduces torch boilerplate by generating inspectable neural-network code, training from formulas, and registering models for hyperparameter search inside existing tidymodels workflows.
desk verdict Solid software-announcement paper for a real R package that combines inspectable torch code generation with full tidymodels tuning; modest niche value, ordinary youth caveats, no hidden flaws. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The three-level API built on metaprogramming code generation: functions that emit quoted nn_module expressions; direct formula trainers that reuse hardhat mold/forge for data handling; and dials-registered parameters (hidden widths, depth, activations, output activation, optimizer) that plug into ordinary tune grids.
What would settle it
Take a standard classification data frame and try the documented path: generate an inspectable module expression, fit via the formula interface, register the model as a specification, and run a tune grid over hidden widths and activations; if the generated code is opaque, the model cannot enter the search machinery, or a custom training loop is still required, the central claim fails.
Extended reading notes
Core claim
kindling claims that separating code generation from execution—returning inspectable unevaluated torch module expressions, then wrapping them in formula training and registered model specifications—lets multilayer perceptrons and recurrent architectures (RNN, LSTM, GRU) sit inside standard R modeling and tuning workflows instead of beside them as black boxes.
Load-bearing premise
That this three-level design is complete and stable enough for real modeling workflows even though the package is young and its most general generator and training interface is still experimental.
Editorial extensions
If this is right
- An analyst can point an existing resampling and tune-grid workflow at a neural network by changing only the model specification.
- Generated module code can be inspected, copied, hand-edited, and executed outside the package for teaching or small custom changes.
- Layer widths, network depth, activation choices, and related architectural knobs become searchable dimensions rather than fixed manual settings.
- Recurrent architectures become available through the same formula and tuning path as feedforward networks.
- Fitted models can be scored with standard variable-importance tools without a separate explainability pipeline.
Reading between the lines
- Inspectable generated modules may make deep-learning demos more usable in statistical computing courses that want students to read the network definition, not only call fit.
- If the experimental general generator matures, the same pattern could cover other sequential architectures without a new high-level entry point for each family.
- Long-term usability will depend on whether the tunable parameter objects stay stable as the architecture-specific entry points are consolidated.
- Early download and repository activity show community readiness, but sustained production use will test whether the three levels stay consistent under version change.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The manuscript presents kindling, an R package that supplies a three-level interface to torch for multilayer perceptrons and recurrent networks (RNN, LSTM, GRU). Generator functions return inspectable, unevaluated torch::nn_module() expressions; intermediate helpers (ffnn, rnn) train from a formula and data frame with optional early stopping and validation; and parsnip-registered specifications (mlp_kindling, rnn_kindling) expose the same models to tidymodels workflows, recipes, and dials/tune hyperparameter search. The design goal is to reduce torch boilerplate while keeping generated code auditable and allowing users to move from exploratory fits to systematic tuning without leaving the tidymodels ecosystem. Positioning against brulee, cito, and luz, plus CRAN release history, test coverage, and a concrete iris/garson example, constitute the supporting evidence.
Significance. If the claimed integration holds, kindling fills a practical gap for applied R users who want neural nets inside existing tidymodels pipelines rather than as a separate torch workflow. The inspectable code-generation layer is a genuine differentiator relative to opaque wrappers and is useful for teaching and light customization. Strengths that should be credited include the explicit three-level API, hardhat-based preprocessing, dials-registered parameters, the act_funs eDSL, CRAN availability (0.1.0–0.3.1), 206 testthat blocks under continuous R-CMD-check, and clear positioning against related packages. For a software-announcement paper in stat.CO these are appropriate forms of evidence; the contribution is engineering completeness rather than a new statistical method.
major comments (2)
- Software design section: the authors note that ffnn()/rnn() bypass the experimental S3 train_nn() dispatch and that the generalized nn_module_generator/train_nn interface remains experimental. Because the central claim is that the three-level design is ready for production tidymodels workflows, the manuscript should either (a) document the supported surface as stable and mark the experimental path clearly, or (b) provide a short consolidation roadmap so readers know which entry points are intended for long-term use. This is a load-bearing maturity issue for the production-readiness claim, not a cosmetic one.
- State of the field / Research impact: the comparison with brulee asserts that kindling is 'just as production-ready' while offering broader architecture support and inspectable code. The manuscript supplies design arguments and test counts but no side-by-side workflow example (e.g., identical tune_grid call on the same recipe/workflow for brulee vs. kindling) or minimal performance/robustness check. A single concrete, reproducible comparison would make the production-readiness claim falsifiable rather than rhetorical.
minor comments (5)
- Figure 1 caption and surrounding text: the long one-line call is hard to parse; consider a multi-line code block or a short vignette excerpt so readers can reproduce the garson plot without retyping.
- Summary and Statement of need: a few typographic artifacts remain (e.g., 'HEC Li` ege', 'Universit´ e', 'mlp kindling' vs. mlp_kindling). Normalize package and function names to consistent monospaced or braced form throughout.
- Software design: the act_funs() eDSL is described as 'akin to dplyr::pick()'; a one-line example of a parametric activation (softshrink[lambd=0.5]) already appears in the figure caption—move a minimal self-contained snippet into the main text for readers who skip the figure.
- Research impact statement: download and star counts are useful community-readiness signals but age quickly; state the snapshot date explicitly (already July 2026) and consider adding a short note that they are not performance claims.
- References: ensure package version pins (torch 0.16.3, parsnip 1.6.0, etc.) match the CRAN versions cited and that arXiv preprints (cito) are updated if journal versions exist.
Circularity Check
No circular derivation: software-design announcement with no fitted predictions or self-justifying uniqueness claims.
full rationale
This is a JOSS-style software paper announcing the kindling R package. Its central claim is an engineering one: three levels of abstraction (code-generation of inspectable unevaluated torch::nn_module() expressions, formula-based direct training, and parsnip/tidymodels engines with dials-tunable parameters) reduce torch boilerplate for MLPs and recurrent nets while remaining inspectable and integrable with existing workflows. The manuscript supports that claim with concrete design choices (metaprogramming generators, hardhat mold/forge, act_funs eDSL, dials parameter objects), explicit positioning against brulee/cito/luz, and community-readiness metrics (CRAN releases, download counts, stars, 206 testthat blocks). None of these steps is a scientific prediction derived from fitted constants, a uniqueness theorem imported from the authors, or a renaming of a known empirical pattern. Download/star/test counts are self-reported readiness evidence, not used to prove a result by construction. There is no derivation chain that reduces to its own inputs; residual package youth and experimental status of the generalized generator are maturation notes the authors themselves surface, not circularity. Score 0 is therefore the correct, proportionate finding.
Assumptions & free parameters
assumptions (4)
- domain assumption torch provides correct tensors, autodiff, and nn_module semantics for the generated architectures
- domain assumption tidymodels/parsnip/dials/tune/hardhat conventions remain stable enough for registered engines to stay compatible
- ad hoc to paper Metaprogramming that emits unevaluated nn_module expressions is preferable to opaque wrappers for auditability and teaching
- domain assumption hardhat::mold()/forge() correctly handle predictor roles, factor encoding, and missing data for neural-net inputs
invented entities (3)
-
act_funs() eDSL with bracket syntax for parametric activations
-
mlp_kindling / rnn_kindling parsnip model specifications and associated dials parameters (hidden_neurons, activations, grid_depth, etc.)
-
Experimental generalized nn_module_generator / train_nn S3 interface
Cite this review
Pith. "Pith review of kindling: A Higher-Level torch Interface for Generating, Training, and Tuning Neural Networks in R." pith.science (2026). https://pith.science/paper/GAHMTHNP
@misc{pith2026260703832,
author = {Pith},
title = {Pith review of: kindling: A Higher-Level torch Interface for Generating, Training, and Tuning Neural Networks in R},
year = {2026},
howpublished = {\url{https://pith.science/paper/GAHMTHNP}},
note = {Machine review of arXiv:2607.03832}
}
read the original abstract
{kindling} is an R package that provides a higher-level interface to {torch}, R's native implementation of PyTorch, for defining, training, and tuning neural networks. It supports multilayer perceptrons and recurrent architectures (RNN, LSTM, GRU) while reducing the boilerplate typically required to write {torch} model definitions and training loops by hand. The package is organized around three levels of abstraction: code-generation functions that return inspectable, unevaluated {torch::nn\_module()} expressions; direct-training functions that fit a model from a formula and data frame; and {tidymodels}-registered model specifications that let neural networks be fit, tuned, and evaluated using the {tune}, {dials}, {recipes}, and {workflows} infrastructure that {tidymodels} users already rely on for other model types. This design lets analysts move from exploratory training to systematic hyperparameter search without leaving the {tidymodels} ecosystem, while retaining the ability to inspect or modify the generated model code rather than treating it as a black box.
Figures
Reference graph
Works this paper leans on
-
[1]
2025 , url =
R: A Language and Environment for Statistical Computing , author =. 2025 , url =
2025
-
[2]
2025 , note =
torch: Tensors and Neural Networks with 'GPU' Acceleration , author =. 2025 , note =
2025
-
[3]
, author =
Tidymodels: a collection of packages for modeling and machine learning using tidyverse principles. , author =. 2020 , doi =
2020
-
[4]
2026 , note =
parsnip: A Common API to Modeling and Analysis Functions , author =. 2026 , note =
2026
-
[5]
2026 , note =
brulee: High-Level Modeling Functions with 'torch' , author =. 2026 , note =
2026
-
[6]
arXiv preprint arXiv:2303.09599 , year =
cito: An R package for training neural networks using torch , author =. arXiv preprint arXiv:2303.09599 , year =
-
[7]
2026 , note =
luz: Higher Level 'API' for 'torch' , author =. 2026 , note =
2026
-
[8]
mlr3: A modern object-oriented machine learning framework in R , volume =
Lang, Michel and Binder, Martin and Richter, Jakob and Schratz, Patrick and Pfisterer, Florian and Coors, Stefan and Au, Quay and Casalicchio, Giuseppe and Kotthoff, Lars and Bischl, Bernd , year =. mlr3: A modern object-oriented machine learning framework in R , volume =. Journal of Open Source Software , publisher =. doi:10.21105/joss.01903 , number =
Show all 11 references
-
[9]
, year =
Beck, Marcus W. , year =. <b>NeuralNetTools</b>: Visualization and Analysis Tools for Neural Networks , volume =. Journal of Statistical Software , publisher =. doi:10.18637/jss.v085.i11 , number =
-
[10]
AI expert , volume=
Interpreting neural-network connection weights , author=. AI expert , volume=. 1991 , publisher=
1991
-
[11]
black box
Olden, Julian D and Jackson, Donald A , year =. Illuminating the “black box”: a randomization approach for understanding variable contributions in artificial neural networks , volume =. Ecological Modelling , publisher =. doi:10.1016/s0304-3800(02)00064-9 , number =
Reviewed July 11, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.