{"id":"1fdb7a5d-d0fe-4e8a-bf78-d32b19466f2e","arxiv_id":"1908.01711","paper_version":1,"verdict":"ACCEPT","confidence":"MODERATE","novelty_score":5.0,"correctness_risk":"low","formal_verification":"none","parameter_count":0,"one_line_summary":"fgivenx is a Python package that plots functional posteriors, including conditional Kullback-Leibler divergence, given MCMC samples of model parameters.","lead":"This paper introduces fgivenx, an open-source Python package for plotting posterior distributions of functions computed from Bayesian samples. It aims to help scientists visualize functional posteriors and conditional divergences in any Bayesian analysis.","discovery_kind":"new_method","skeptic_critique":{"model":"deepseek-v4-flash","headline":"No significant objection identified","rationale":"The reader's ACCEPT verdict with moderate confidence is appropriate. The weakest assumption identified by the reader—that the code correctly computes the functional posterior and KL divergence despite the absence of in-paper validation—is a real omission, but it is not load-bearing for the paper's actual claim. The central assertion is that a functional posterior plotting package exists and is usable; this is supported by the archived source, a worked example, and external usage in peer-reviewed work. The paper does not promise a particular numerical accuracy or a specific algorithm, and the software's correctness can be independently checked by users. No evidence internal to the manuscript suggests a specific bug or inconsistency. Therefore, the concern about missing tests does not move the verdict; it is a reason to keep confidence moderate rather than high. The recommended concrete test would provide an extra safeguard without changing the accept decision.","tokens_in":2518,"tokens_out":4865,"duration_ms":52826,"concrete_test":"Install the archived fgivenx v2.1.17 from Zenodo, run the documented linear-model example, and compare the produced P(y|x) contours and conditional KL divergence against an independent brute-force Monte Carlo estimate computed from the same input samples with a separate KDE implementation. Agreement within the expected sampling noise would confirm that the package performs the advertised computation; a systematic discrepancy would reveal a concrete correctness problem.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The paper's central claim is that fgivenx is a usable Python package for functional posterior plotting. The archived Zenodo release (v2.1.17, DOI 10.5281/zenodo.1404584) is the primary evidence that the software exists and can be run. The paper does not specify the algorithm for computing P(y|x) or the conditional KL divergence, and it includes no numerical validation or tests. This is a genuine weakness: if the archived code contained a serious bug in kernel density estimation or grid handling, the package would not faithfully produce the advertised plots. However, the claim is modest, the package is accompanied by a simple linear-model example, and it has been cited in multiple published applications. Without a concrete indication of a specific flaw, the lack of in-paper tests is a standard software-paper caveat rather than a load-bearing defect.","agreement_with_reader":"partial"},"referee_report":{"model":"deepseek-v4-flash","summary":"The manuscript describes fgivenx, a Python package for plotting functional posterior distributions P(y|x) and conditional Kullback-Leibler divergences from samples of model parameters. It presents a simple linear-model example (Figure 2), a Planck-based demonstration (Figure 1), and a list of published applications in cosmology and Bayesian analysis. The software is archived with a Zenodo DOI and the source is available on GitHub.","tokens_in":2622,"tokens_out":4139,"duration_ms":41289,"significance":"If the package works as claimed, it provides a useful and reusable tool for Bayesian functional posterior visualization, with demonstrated uptake in Planck analyses, dark-energy equation-of-state studies, and nested-sampling diagnostics. The paper's strengths are its modest scope, the archived code (v2.1.17, DOI 10.5281/zenodo.1404584) that can be machine-checked, and a reproducible linear-model example. The lack of in-paper numerical validation is a caveat, but the package's public archive and published usage make this a standard software-paper limitation rather than a defect that undermines the central claim.","major_comments":[],"minor_comments":[{"comment":"The manuscript does not specify the algorithm used to compute P(y|x) and the conditional Kullback-Leibler divergence (e.g., kernel density estimation procedure, bandwidth selection, grid construction); a brief description or a pointer to the relevant module in the archived code would help readers assess the numerical accuracy independently of running the code.","section":"Summary"},{"comment":"In the caption, 'essential a contour version' should be 'essentially a contour version'.","section":"Figure 2"},{"comment":"The GitHub URL appears only in the abstract; include it in the main text so the paper is self-contained and readers do not need to consult the abstract to find the repository.","section":"Abstract / Summary"},{"comment":"The sentence 'currently used in astronomy, but will be of use to scientists performing any Bayesian analysis...' is informal and could be rephrased as 'already used in astronomy, and should be of use to scientists...' for clarity.","section":"Summary"},{"comment":"The paper does not state the software's license; since the software is the main artifact, please state the package's license (e.g., MIT, GPL) alongside the CC-BY license that applies to the paper.","section":"Acknowledgements"},{"comment":"Some references are to arXiv e-prints without a DOI or final publication status (e.g., Higson et al. 2018a, 2018b); consider updating to the published versions or adding DOIs where available.","section":"References"}],"recommendation":"minor_revision","confidential_remarks":"The paper is a straightforward, useful software contribution. The minor issues are mostly editorial, and the absence of in-paper algorithm details is typical for JOSS-style papers. I support publication after minor revisions."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Short version: fgivenx is a legitimate, archived Python package for plotting functional posteriors, and this paper is a fair description of it. I agree with the reader's ACCEPT.\n\nWhat's actually new: the software itself. The underlying techniques—kernel density estimation of conditional posteriors and the conditional KL divergence—have been around for years, and the paper doesn't claim otherwise. The contribution is a clean, reusable implementation with examples and a Zenodo archive. That is real evidence the thing exists and runs. The figure gallery shows exactly what the package produces, and the code is on GitHub.\n\nThe paper does well at situating itself with respect to contour packages (getdist, corner, pygtc) and at documenting actual use in published cosmological analyses (Planck, dark-energy equation of state, nested sampling diagnostics). That external adoption is the best support for the central claim, and it is not circular: those papers use the package; they don't define its validity.\n\nThe soft spots are exactly what the stress-test flags. The paper contains no algorithm specification, no tests, no numerical validation. If the archived code had a bug in the KDE or grid handling, the plots could be wrong without any in-paper way to notice. That is a genuine weakness, but it's a normal condition for a JOSS-style software release. The claim is modest—this is a plotting tool, not a new statistical estimator—and the linear-model example provides a sanity check. I wouldn't call it load-bearing.\n\nCitation pattern: fine. The references are for context (MacKay, scipy) and applications. No self-citation inflation.\n\nBottom line: this paper is for astronomers and other Bayesian practitioners who want to visualize posterior functions. It doesn't break new conceptual ground, but it ships code that works. I'd send it to peer review rather than desk-reject, and I'd accept it with the expectation that the code archive is the real artifact. For my own reading group, I might mention it, but it's not a paper I'd put on the syllabus.","headline":"A solid little software paper: the package is real and usable, the paper is honest about what it does, and the only real weakness is the lack of in-paper validation, which is standard for JOSS.","tokens_in":3113,"tokens_out":2245,"would_cite":false,"duration_ms":22968,"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":"fgivenx is a Python package that turns MCMC parameter samples into contour plots of the predictive probability $P(y|x)$, plus the conditional Kullback-Leibler divergence between prior and posterior predictions.","keywords":["functional posterior","posterior predictive distribution","kernel density estimation","Kullback-Leibler divergence","Bayesian analysis","MCMC samples","Python package","data visualization"],"falsifier":"Run the package's linear-model example with a known Gaussian prior on the slope and intercept, and compare its $P(y|x)$ contours and conditional Kullback-Leibler divergence against the analytically derived posterior predictive distribution; any systematic mismatch in the quantiles or divergence values would show the central claim is wrong.","tokens_in":2314,"feed_emoji":"📊","tokens_out":7109,"duration_ms":64222,"temperature":0.7,"pith_summary":"fgivenx is a Python package that visualizes functional posteriors: given samples from the posterior distribution of a model's parameters, it plots the probability $P(y|x)$ that the model's predicted output $y$ takes a given value at each input $x$. The package also computes the conditional Kullback-Leibler divergence between the prior and posterior predictive distributions, showing where data most change the prediction. The paper's central claim is that this provides a general tool for any Bayesian analysis with functional predictive posteriors, not just the cosmological examples where it has already been used. A sympathetic reader would care because parameter-posterior contour packages answer only 'what do we know about the parameters?' while functional posterior plots answer 'what do we know about the thing the model predicts?'","feed_headline":"New Python package plots the full posterior of predicted functions","feed_subtitle":"From MCMC samples it draws P(y|x) contours and the Kullback-Leibler divergence, no analytic formula needed.","key_machinery":"The load-bearing mechanism is a sequence of one-dimensional kernel density estimates (smooth histograms built by placing a bump on each sampled value) taken across a grid of $x$, rather than a single high-dimensional density estimate. For each value of $x$ on the grid, the package pushes all posterior parameter samples through the function $f(x)$, collects the output values $y$, and estimates the density of those outputs to build $P(y|x)$. This turns functional posterior plotting into repeated one-dimensional density estimation, which is stable and cheap; the conditional Kullback-Leibler divergence is then computed from the estimated prior and posterior densities at each $x$.","core_discovery":"On its own terms, the paper establishes that functional posterior plotting can be packaged as a small, reusable library. The core operation is: take a set of posterior samples of parameters, evaluate the model function $f(x)$ on a grid of $x$ for each sample, and at every grid point perform one-dimensional kernel density estimation over the resulting $y$ values to obtain $P(y|x)$. The package then renders these densities as iso-probability contours (67%, 95%, and 99%) and plots the conditional Kullback-Leibler divergence $\\mathrm{D}_{\\mathrm{KL}}[P(y|x) \\,\\|\\, P_{\\rm prior}(y|x)]$ as a function of $x$. The linear model $y=mx+c$ with prior and posterior samples serves as the demonstration, and the applications listed include cosmological power-spectrum constraints and diagnostics for nested-sampling and compressive-sensing analyses.","pith_inferences":["[Editorial inference] The same machinery could compare two posterior predictive distributions from different datasets or models by replacing the prior with a second posterior ensemble, yielding a data-versus-data divergence plot the paper does not discuss.","[Editorial inference] Because the method reduces to independent one-dimensional kernel density estimates, its practical reliability hinges on the grid resolution in $x$ and the kernel bandwidth in $y$; a natural testable extension is to expose or automate bandwidth selection and to validate contours on analytic posteriors.","[Editorial inference] The package could serve as a standard visual check in Bayesian workflow, complementing trace plots and parameter contours by exposing where the model's predictions are updated; this would matter for any field using black-box likelihoods."],"forward_implications":["Scientists with existing MCMC samples of any model can produce publication-ready functional posterior plots without writing their own density-estimation code.","The conditional Kullback-Leibler divergence plot provides a one-dimensional diagnostic for where the data most strongly update model predictions, useful for model comparison and for spotting regions of $x$ where the prior dominates.","Because the method only assumes predictive outputs that are functions of an input $x$, it transfers to any field doing Bayesian prediction, not just astronomy.","The listed applications in cosmology, dark-energy studies, nested-sampling diagnostics, and compressive sensing indicate that the package already works in several demanding inference settings."],"supporting_citations":[{"why":"Archived release (v2.1.17) of the package whose existence and behavior the paper announces; it is the object of the central claim.","marker":"Handley 2018"},{"why":"Defines the Kullback-Leibler divergence that fgivenx plots as its conditional diagnostic.","marker":"Kullback and Leibler 1951"},{"why":"Provides the SciPy tools whose kernel-density estimation underlies the package's density computation.","marker":"Jones, Oliphant, and Peterson 2001"},{"why":"A standard parameter-posterior plotting package that fgivenx complements; frames the gap in visualizing functional posteriors.","marker":"Foreman-Mackey 2016"},{"why":"One of the cited applications in which fgivenx quantified the primordial power spectrum posterior.","marker":"Planck Collaboration 2018b"},{"why":"Cited use of fgivenx for diagnostic tests of nested-sampling calculations.","marker":"Higson et al. 2018b"}],"fun_headline_variants":["Plot full functional posteriors from MCMC samples","Functional posterior contours from MCMC chains","No analytic formula needed for functional posterior","Draw Bayesian functional posteriors from samples","Plot P(y|x) and KL divergence for any function"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The paper assumes without showing tests or worked validation that the archived code actually computes the posterior density and Kullback-Leibler divergence correctly for arbitrary input samples.","fun_headline_variants_meta":{"raw":{"variants":["Plot full functional posteriors from MCMC samples","Functional posterior contours from MCMC chains","No analytic formula needed for functional posterior","Draw Bayesian functional posteriors from samples","Plot P(y|x) and KL divergence for any function"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000689,"raw_usage":{"total_tokens":3028,"prompt_tokens":761,"completion_tokens":2267,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":377,"completion_tokens_details":{"reasoning_tokens":2200}},"tokens_in":377,"tokens_out":2267,"duration_ms":17496,"temperature":1.0,"reasoning_tokens":2200,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-14T15:27:21.142269+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Run the package's linear-model example with a known Gaussian prior on the slope and intercept, and compare its $P(y|x)$ contours and conditional Kullback-Leibler divergence against the analytically derived posterior predictive distribution; any systematic mismatch in the quantiles or divergence values would show the central claim is wrong.","supporting_citations":[],"review_version":1}