{"id":"0986c0ac-a0ab-441c-a635-70da6ae2f1c4","arxiv_id":"2412.03676","paper_version":1,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":6.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":4,"one_line_summary":"A JAX library, JPC, trains predictive coding networks with ODE solvers for inference, and the paper reports that a second-order solver (Heun) is faster than Euler integration at comparable accuracy.","lead":"JPC is a new JAX library that trains predictive coding networks by solving their inference dynamics as ordinary differential equations. The authors report that a second-order ODE solver runs faster than standard Euler integration at similar accuracy on several image classification benchmarks.","discovery_kind":"new_application","skeptic_critique":{"model":"deepseek-v4-flash","headline":"Speedup claim conflates solver order with adaptive step-size control; no ablation isolates Heun's second-order advantage.","rationale":"The reader's weakest assumption already noted that the comparison could be dominated by controller or tolerance settings and proposed equal integration error or step count as alternative matching criteria. My concern sharpens this: even within their max-accuracy selection, the comparison is not an apples-to-apples test of solver order, because the adaptive PID controller is a separate component that Euler does not receive. This is a load-bearing issue for the paper's headline empirical claim, but it is addressable with a small ablation study, so it does not warrant rejection. The library contribution and the theoretical tool demo are independent of this confound, and the paper is honest about the caveat. Therefore the reader's CONDITIONAL verdict remains appropriate; the condition should explicitly request the Euler+PID ablation and matched-error comparison.","tokens_in":720,"tokens_out":592,"duration_ms":52199,"concrete_test":"Use Diffrax to run four conditions on the same tasks: Euler with fixed dt, Heun with fixed dt, Euler with PIDController, and Heun with PIDController, using identical tolerances and T grids; select runs by the same max-accuracy criterion and compare wall-clock per training step. If Euler+PID achieves the same speedup over Euler+fixed as Heun+PID does, the headline claim is not established; if Heun+PID remains faster than Euler+PID by the same margin, the second-order advantage is confirmed.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The central claim that a second-order solver (Heun) achieves significantly faster inference runtimes than Euler is not supported by the reported comparison because solver order is confounded with step-size control. Section 3 states: 'Unlike Euler, Heun employed a standard Proportional–Integral–Derivative step size controller.' Thus the experiment compares Euler with fixed step sizes against Heun with an adaptive PID controller. The observed speedup could therefore be an artifact of adaptive step selection rather than Heun's higher order. Additionally, the selection rule (highest mean test accuracy across dt and T grids, Figures 4–6) does not equate inference accuracy: Heun may reach comparable test accuracy with looser integration tolerances, requiring fewer but less accurate steps. The paper reports no ablation of Euler+PID, Heun without controller, or matched integration error; without such controls the speedup cannot be attributed to second-order integration. The caveat in Section 3 about hyperparameters acknowledges variability but does not address this confound.","agreement_with_reader":"partial"},"referee_report":{"model":"deepseek-v4-flash","summary":"The paper introduces JPC, a JAX library for training predictive coding networks (PCNs). JPC provides a simple high-level API and an advanced API built on Equinox, Diffrax, and Optax, and claims to be less than 1000 lines of code. The main empirical claim, developed in Section 3, is that using a second-order ODE solver (Heun) to integrate the PC inference gradient flow yields significantly faster wall-clock runtimes than standard Euler integration, with comparable test accuracy across several datasets and network depths. The paper also presents a theoretical tool from prior work (the closed-form energy of deep linear PCNs, Eq. 4) and a demonstration that the theoretical energy can indicate whether enough inference steps have been performed. The library code is publicly available.","tokens_in":18133,"tokens_out":2900,"duration_ms":29212,"significance":"If the runtime claim is substantiated, the contribution is practically useful: PC training is iterative, and a faster inference integrator could make PC more competitive. The library itself is a valuable community resource, being concise, functional, and built on well-maintained JAX libraries. The explicit use of Diffrax ODE solvers and the inclusion of theoretical diagnostics are also useful. However, the central speedup claim is currently supported by an experimental comparison that confounds solver order with adaptive step-size control and lacks essential statistical and reproducibility details. These issues need to be resolved before the paper's headline result can be accepted.","major_comments":[{"comment":"The comparison between Euler and Heun does not isolate the effect of solver order. The text states 'Unlike Euler, Heun employed a standard Proportional–Integral–Derivative step size controller.' This means the observed speedup could be entirely due to adaptive step-size selection rather than Heun's second-order accuracy. The authors should provide ablations, such as Euler with the same PID controller, Heun without a controller, or a comparison at matched integration error or matched step counts, before claiming that the second-order solver is faster.","section":"Section 3, Figure 1"},{"comment":"The hyperparameter selection rule, retaining the run with the highest mean test accuracy across dt and T grids, does not ensure that the two solvers operate at comparable inference accuracy or integration error. Heun could reach the same test accuracy with looser tolerances and fewer, less-accurate steps. The paper does not report step counts or integration error, and the runs are only one epoch long. The phrase 'not significantly different' is used without any statistical test. Without this information, the wall-clock comparison is difficult to interpret and may be biased.","section":"Section 3, Figures 3–6"},{"comment":"Essential experimental details are missing: the hardware used, the ODE solver tolerance settings (e.g., rtol/atol for Heun's PID controller), the number of training iterations (only 'one epoch' is stated), and how the wall-clock time was measured (e.g., whether jit compilation time was fully excluded per iteration). The shaded regions in Figure 1 show variation across three initializations, but no confidence interval or statistical test is provided for the runtime difference. For a paper whose central claim is about runtime, these details are necessary for reproducibility and for assessing the magnitude of the reported speedup.","section":"Section 3, Figure 1 and experimental setup"}],"minor_comments":[{"comment":"The caption contains a typo: 'MINST' should be 'MNIST'.","section":"Figure 2"},{"comment":"Reference [13] appears to have a typo: 'Tscshantz' should be 'Tschantz'.","section":"References"},{"comment":"The caveat at the end of Section 3 acknowledges that optimiser-specific hyperparameters could change results, which is helpful, but it does not address the confound between solver order and adaptive step-size control that affects the main claim.","section":"Section 3"},{"comment":"The accuracy curves in Figures 3–6 do not include error bars or confidence intervals, making it hard to verify the statement that accuracy differences are 'not significantly different'.","section":"Figures 4–6"},{"comment":"In the code sketch, the variable name 'op t_ st at e' appears to be a typo for 'opt_state'.","section":"Section 4.2"}],"recommendation":"major_revision","confidential_remarks":"The paper fits well as a software/application note and the library is a useful contribution. However, the referee agrees with the reader's assessment that the central speedup claim is confounded. The requested additions (ablations, statistical details, step counts, tolerances, hardware) are within scope and should be feasible; they are necessary before the runtime claim can be considered supported. The theoretical section is a nice addition but is not the main advertised result."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Hi [colleague],\n\nQuick take: JPC is a genuinely useful JAX library for predictive coding networks, and building it on Diffrax ODE solvers is a reasonable engineering choice. The library is small, functional, and well integrated with the JAX ecosystem. But the central runtime claim—that Heun is faster than Euler—is not cleanly supported by the experiment as reported, because the two solvers are compared under different control schemes: Euler with fixed step sizes, Heun with a PID controller. That is a real confound, and the paper even states it in Section 3. You cannot attribute the speedup to second-order accuracy without also testing Euler with the same controller, or Heun without it.\n\nWhat is new: using ODE solvers for PC inference is new among the cited libraries (pypc, Torch2PC, pyhgf, and the benchmark by Pinchetti et al.), and the Euler-versus-Heun runtime comparison is new. The theoretical energy diagnostic in Figure 2 applies the closed-form energy from the authors' prior work [3] to check whether inference has converged; it is a parameter-free expression, so the circularity burden is low. The library itself is a real artifact: under 1000 lines, with both high-level and advanced APIs. That deserves credit.\n\nWhere it is soft: the benchmark protocol. One epoch per run, only three dt values for Euler, the best-accuracy run selected across a grid of dt and T, and no error bars on the accuracy curves. The selection rule means you are comparing the luckiest run of each solver, which is fine for a runtime sanity check but not for a claim of significant speedup in general. The paper's own caveat about hyperparameters is honest but does not address the confound. Also missing: hardware details, Diffrax solver tolerances, and a statistical test on the runtime differences. The theoretical diagnostic is suggestive but not quantitative—it shows correlation, not a threshold.\n\nThe stress-test note says the speedup could be an artifact of adaptive step-size control rather than Heun's order. I checked the text: that is exactly what Section 3 reports. So the concern holds up.\n\nWho is this for? People working on predictive coding implementations, or anyone choosing a library for PC experiments. They will get a clean, well-documented codebase and a plausible but unproven hint that adaptive solvers help. It does not change the theory.\n\nRecommendation: send to a serious referee. The library is a legitimate contribution and the speedup claim is testable; a referee should ask for matched-configuration comparisons (Euler with PID, Heun without), error bars, and a versioned release. This is a conditional accept, not a reject.","headline":"A useful, clean JAX library for predictive coding, but the headline speedup claim conflates solver order with adaptive step-size control and needs an ablation.","tokens_in":18659,"tokens_out":2073,"would_cite":false,"duration_ms":21146,"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":"JPC shows that Heun's method, a second-order Runge-Kutta integrator, runs predictive-coding inference significantly faster than standard Euler integration while maintaining accuracy across datasets and network depths.","keywords":["predictive coding","JAX","ODE solvers","Heun method","Runge-Kutta","inference dynamics","gradient flow","neural network training"],"falsifier":"On the same one-epoch classification benchmark, run Euler with the same PID step-size controller and tolerance used for Heun, and compare wall-clock times at matched final test accuracy; the central runtime claim would collapse if Euler with adaptive step control matches or beats Heun.","tokens_in":17746,"feed_emoji":"⚡","tokens_out":8160,"duration_ms":70457,"temperature":0.7,"pith_summary":"This paper introduces JPC, a JAX library for training predictive coding networks (PCNs), and argues that the standard way of simulating PC inference—Euler integration of the gradient-flow dynamics of neural activities—can be profitably replaced by higher-order ODE solvers. The paper's central empirical claim is that Heun's method, a second-order explicit Runge-Kutta scheme with an adaptive step-size controller, reaches comparable test accuracy significantly faster in wall-clock time than Euler on image classification tasks, with larger gains on deeper networks. The library wraps this in a compact functional API supporting discriminative, generative, and hybrid PC models, and includes a closed-form energy formula for deep linear networks that can signal whether the inference phase has run long enough. If the runtime claim holds, JPC offers a practical speedup for anyone training PCNs and a ready-made baseline for further research on biologically plausible learning.","feed_headline":"Heun beats Euler for predictive coding inference","feed_subtitle":"A JAX library replaces Euler integration with an adaptive Runge-Kutta solver, reaching the same accuracy in less wall-clock time.","key_machinery":"The central object is the gradient-flow inference dynamics of a predictive coding network, $\\dot{z}_\\ell=-\\partial F/\\partial z_\\ell$ for layer activities $z_\\ell$ under the energy $F=\\sum_\\ell\\|z_\\ell-f_\\ell(W_\\ell z_{\\ell-1})\\|^2$. Euler integration is the usual discretisation of this flow; the paper replaces it with Diffrax's ODE solvers, defaulting to Heun's method (a second-order explicit Runge-Kutta scheme) combined with a PID step-size controller, so the solver adaptively chooses how many inference steps to take. This machinery is what produces the runtime comparison that supports the central claim.","core_discovery":"On its own terms, the paper establishes a new default for PC inference: instead of performing gradient descent on the energy $F=\\sum_\\ell\\|z_\\ell-f_\\ell(W_\\ell z_{\\ell-1})\\|^2$ with a fixed Euler step, one can integrate the continuous-time gradient flow $\\dot{z}_\\ell=-\\partial F/\\partial z_\\ell$ with Diffrax's ODE solvers. Benchmarking one-epoch training on image datasets with 3-, 5-, and 10-hidden-layer feedforward networks, the authors find that Heun's method—a second-order explicit Runge-Kutta solver with a proportional-integral-derivative step-size controller—converges to comparable mean test accuracy in substantially less wall-clock time than Euler, with the advantage growing with network depth. The paper presents this as a library contribution rather than a theoretical proof, and notes that other optimiser-specific hyperparameters could lead to different results.","pith_inferences":["The runtime comparison pairs fixed-step Euler with adaptively stepped Heun and selects the highest-accuracy run on each grid; my inference, not the paper's, is that an adaptive Euler baseline or a tolerance-matched comparison could narrow the reported speedup.","If the speedup transfers to generative and hybrid PC models, which the paper does not benchmark for runtime, ODE-solver inference could make predictive coding competitive with backpropagation in wall-clock time on structured tasks.","The correlation between the closed-form energy and test accuracy points toward an automatic early-stopping rule for inference, an extension the paper leaves implicit.","The paper's closing suggestion of stochastic differential solvers raises the prospect of combining the library's wrapper with Langevin-type sampling for better generative performance at lower cost, but this is untested."],"forward_implications":["Any PCN training loop that currently uses fixed-step Euler inference can switch to a second-order solver and expect faster wall-clock training at similar accuracy, with the largest gains appearing in 10-hidden-layer networks.","The same ODE-solver interface works across discriminative, generative, and hybrid PC models, so solver improvements carry over to generative and amortised settings without reimplementation.","The closed-form energy for deep linear PCNs acts as a convergence diagnostic: more inference steps correlate with better test accuracy on MNIST and Fashion-MNIST, offering an empirical stopping criterion.","Because the library is jitted and under 1000 lines of code, the runtime gains come with a reproducible and extensible codebase, not a black-box implementation."],"supporting_citations":[{"why":"Supplies Diffrax, the ODE-solver library whose Heun integrator and PID step-size controller produce the paper's runtime speedup.","marker":"[4]"},{"why":"Provides the prior comprehensive benchmarking of PCN inference optimisers that the paper builds on, focusing on runtime rather than re-benchmarking accuracy.","marker":"[10]"},{"why":"Gives the closed-form equilibrium energy for deep linear PCNs (their Eq. 4) that JPC uses as a diagnostic for whether inference has converged.","marker":"[3]"},{"why":"Supplies Equinox, the JAX library used to define callable network layers compatible with the PC update step.","marker":"[5]"},{"why":"Supplies Optax, the optimiser library used for the parameter-learning phase after inference reaches equilibrium.","marker":"[2]"}],"fun_headline_variants":["Heun beats Euler for predictive coding inference in JAX","JPC library uses ODE solvers to speed up predictive coding","Second-order solver accelerates PC network training in JAX","Predictive coding inference faster with Heun's method","JAX library swaps Euler for Heun in predictive coding"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The load-bearing premise is that the runtime comparison is fair: Euler with a few fixed step sizes and Heun with an adaptive controller are matched by picking the run with the highest mean test accuracy on each hyperparameter grid, so a different matching rule—say equal integration error or equal step count—could change the speedup.","fun_headline_variants_meta":{"raw":{"variants":["Heun beats Euler for predictive coding inference in JAX","JPC library uses ODE solvers to speed up predictive coding","Second-order solver accelerates PC network training in JAX","Predictive coding inference faster with Heun's method","JAX library swaps Euler for Heun in predictive coding"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000201,"raw_usage":{"total_tokens":1330,"prompt_tokens":850,"completion_tokens":480,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":466,"completion_tokens_details":{"reasoning_tokens":399}},"tokens_in":466,"tokens_out":480,"duration_ms":5063,"temperature":1.0,"reasoning_tokens":399,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-11T22:12:53.142456+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"On the same one-epoch classification benchmark, run Euler with the same PID step-size controller and tolerance used for Heun, and compare wall-clock times at matched final test accuracy; the central runtime claim would collapse if Euler with adaptive step control matches or beats Heun.","supporting_citations":[{"cited_title":"Babuschkin, K","cited_arxiv_id":null,"evidence_quote":"Supplies Optax, the optimiser library used for the parameter-learning phase after inference reaches equilibrium."}],"review_version":1}