{"id":"367ec97c-7cfd-498d-a37a-43dfec2d1eb1","arxiv_id":"2411.11165","paper_version":1,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":4.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":0,"one_line_summary":"A Macaulay2 package that constructs likelihood ideals and ML degrees for toric, hierarchical, and graphical discrete statistical models.","lead":"This paper introduces LikelihoodGeometry, a Macaulay2 package for computing likelihood correspondences and maximum-likelihood degrees of discrete algebraic statistical models. It implements algorithms from the authors' earlier work and from Hosten, Khetan, and Sturmfels, with optimized paths for toric and graphical models.","discovery_kind":"new_method","skeptic_critique":{"model":"deepseek-v4-flash","headline":"The toric saturation shortcut is load-bearing and unverified: Remark 2.1 concedes correctness only when the output is prime, but the package neither proves primality nor falls back to full saturation, so the headline speedup may be computing the wrong ideal.","rationale":"The reader's weakest assumption correctly identifies the saturation step as the main risk, and I agree with that assessment after reading the manuscript. The package is a genuine software contribution: it provides reproducible Macaulay2 code, implements known algorithms from HKS04 and BCF23, and the examples appear runnable. The concern is not about author integrity or about disagreeing with broader consensus in algebraic statistics; it is that the paper's own Remark 2.1 explicitly conditions correctness of the implemented shortcut on primality of the output, while the pseudocode in Algorithm 1 specifies a different, stronger saturation. The package description does not state how non-prime outputs are detected or handled. Since the ML-degree computation is downstream of computeLC, an incorrect likelihood ideal would propagate to the headline quantity. The MLdegree method is also under-specified, but that is secondary; if the saturation issue is resolved by proving primality or by using full saturation, most of the practical correctness concern disappears. I would not change the reader's CONDITIONAL verdict: acceptance should require the authors to either prove the sum-only saturation is harmless for all toric models, demonstrate that the output is always prime, or modify the implementation to saturate by the product as in the pseudocode. A concrete test comparing the shortcut with full saturation across the package's own test models would settle the question quickly.","tokens_in":4732,"tokens_out":6116,"duration_ms":67257,"concrete_test":"Inspect the package source to confirm which saturation is actually used in computeLC. Then, for every toric model in the package test suite, including rationalNormalScroll({2,2,3}) and the binary 4-cycle graphical model, compare the returned ideal L with L_full = saturate(IX + minors(2,A*M), (sum p_i)*(product p_i)) and with HKS04 Algorithm 6. Also run isPrime(L). If any L differs from L_full or is non-prime, the shortcut is not universally correct and the package must either prove primality for the toric branch or fall back to full saturation.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The central claim that computeLC returns the likelihood ideal for toric models, with the advertised speedup, rests on Algorithm 1's final saturation. The pseudocode saturates by (∑ p_i)(∏ p_i), but Remark 2.1 states that the implementation saturates only by ∑ p_i, and that correctness is guaranteed only if the output is prime. The paper does not describe a primality check or a fallback to full saturation. For any toric model where the shortcut output is not prime, computeLC would silently return an ideal with possible extraneous components, and MLdegree computed from it would be unreliable. This is an internal gap, not a disagreement with consensus: the described algorithm and the implemented algorithm may differ, and the stated correctness condition is explicitly conditional. Consequently, the 0.06-second versus 3600-second comparison demonstrates speed of the shortcut branch but not correctness for the general toric case.","agreement_with_reader":"agree"},"referee_report":{"model":"deepseek-v4-flash","summary":"The paper presents LikelihoodGeometry, a Macaulay2 package for constructing the likelihood correspondence and computing the ML-degree of discrete algebraic statistical models. It implements algorithms from the authors' earlier work (BCF23) for toric models, the general Lagrange-multiplier algorithm of Hosten-Khetan-Sturmfels (HKS04), and specialized Gröbner-basis methods for complete and joint independence graphical models. The package is demonstrated on examples including the Hardy-Weinberg curve, rational normal scrolls, hierarchical log-linear models, and undirected graphical models, with a reported dramatic speedup for toric models (0.06 seconds versus over 3600 seconds).","tokens_in":4952,"tokens_out":1990,"duration_ms":19799,"significance":"If correct, the package is a useful and reproducible software contribution to algebraic statistics: it makes the construction of likelihood ideals and ML-degrees accessible for a range of models, implements previously published algorithms, and is the only Macaulay2 package of its kind for discrete models, complementing GraphicalModelsMLE. The reported toric speedup is potentially valuable. However, the correctness guarantee for the headline toric shortcut is explicitly conditional, and the paper does not specify how the implementation handles the non-prime case, so the advertised speedup is not established for the general toric input class.","major_comments":[{"comment":"The central correctness claim for the toric speedup rests on an unverified saturation shortcut. Algorithm 1 as printed saturates by (sum p_i)(prod p_i), but Remark 2.1 states that the implementation saturates only by the single hyperplane sum p_i, and that correctness is guaranteed only if the output is prime. The paper does not describe any primality check, fallback to full saturation, or a proof that the output is prime for the toric models considered. For any toric model where the shortcut output is not prime, computeLC would silently return an ideal possibly containing extraneous components, and the ML-degree computed from it would be unreliable. The 0.06-second versus 3600-second comparison therefore demonstrates only the speed of the shortcut branch, not its correctness for the general toric case. This is a load-bearing gap that must be addressed, either by proving primality of the saturated ideal for all toric inputs, by adding a fallback to full saturation, or by explicitly restricting the claim and documenting the condition under which the shortcut is applied.","section":"Section 2, Remark 2.1 and Algorithm 1"},{"comment":"The description \"MLdegree is then implemented by taking the fiber of a generic map from the likelihood correspondence down to the model\" is not a fully specified algorithm. It does not state what map is taken, how the generic fiber is constructed and solved, or what correctness conditions apply. Because MLdegree is a headline function of the package, this underspecification prevents a reader from reproducing the computation or verifying that the returned degree is indeed the ML-degree of the input model.","section":"Section 2, paragraph on MLdegree"},{"comment":"There is a direct inconsistency between the pseudocode in Algorithm 1, which saturates by (sum p_i)(prod p_i), and the implementation description in Remark 2.1, which saturates only by sum p_i. This makes it unclear which algorithm the package actually runs and which correctness statement the user should rely on. The pseudocode should match the code, or the discrepancy should be explained and reconciled.","section":"Section 2, Algorithm 1 versus Remark 2.1"}],"minor_comments":[{"comment":"The abstract contains a duplicated word: \"a variety that that ties together data\" should read \"a variety that ties together data\". The phrase \"a statistcal model\" is also a typo for \"a statistical model\".","section":"Abstract"},{"comment":"The displayed ideal output for computeLC on the Hardy-Weinberg curve is hard to read because the monomials are broken across lines without clear alignment. Please reformat the Macaulay2 session output for clarity.","section":"Example 1.1"},{"comment":"The graph in Example 1.5 is described as \"a b c\" with an implied edge structure, but the ASCII rendering is ambiguous. A simple figure or explicit edge list would help the reader verify the model.","section":"Section 1.2.3 and Example 1.5"},{"comment":"The reference to the general Lagrange-multiplier algorithm as \"[HKS04, Algorithm 6]\" is appropriate, but the paper should also state explicitly which parts of the implementation follow BCF23 and which follow HKS04, so that users know the provenance of each branch.","section":"Section 2"},{"comment":"The footnote pointing to the GitHub repository is helpful; consider adding a version number or commit hash so that the exact code tested in the paper can be identified in the future.","section":"Data Availability"}],"recommendation":"major_revision","confidential_remarks":"The paper is a software note, and its main contribution is the package itself. The conditional correctness in Remark 2.1 is not merely a presentation issue: it affects the reliability of the advertised toric speedup and of the ML-degree computations. The authors should be asked to either close the gap or explicitly scope the package's guarantees. The self-citation of BCF23 is appropriate and not circular, since the algorithms have independent existence in the literature."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Two things to know: the package actually runs the examples it ships, and the toric speedup is real (0.06s vs >3600s). But the same section that advertises that speedup contains the paper's biggest soft spot. Remark 2.1 says the implementation saturates only by the sum hyperplane, not the product, and that correctness is guaranteed only if the output is prime. The package neither checks primality nor falls back to the full saturation, so the headline benchmark is a speed measurement of a shortcut branch, not evidence that the shortcut always computes the right ideal.\n\nWhat's genuinely new is the Macaulay2 package, not the mathematics. The algorithms come from the authors' earlier paper and from HKS04. The implementation is a legitimate contribution: a new datatype for discrete random variables, model constructors for toric, hierarchical, and graphical models, and a computeLC that dispatches to the fastest known method. The speedup for toric models is the main practical draw, and the code is on GitHub.\n\nThe stress-test note holds up. The gap is internal: the pseudocode and the implemented algorithm differ, and the stated correctness condition is conditional. A user feeding an arbitrary toric model has no way to know whether the output is prime without checking separately, so the reported MLdegree could be unreliable for models where the shortcut output is not prime. This is not fatal to the package, but it needs to be fixed: prove primality for the relevant class, do full saturation when primality is not certified, or at least print a warning.\n\nSecond minor issue: the MLdegree method is described only as \"taking the fiber of a generic map.\" That is not a specification. How is the generic map constructed? Is it deterministic? What happens at singular fibers? For a package whose central output is an MLdegree, this needs detail.\n\nCitation pattern is fine. Self-citation points to prior work with independent theorem statements, and borrowed functions are acknowledged.\n\nMy take: this is a useful software paper with one correctness caveat that should be fixed before the toric shortcut is advertised as a general method. I'd send it to a referee who can run the examples and stress-test the saturation issue. If the authors tighten that and specify MLdegree properly, it's a solid accept. If not, the paper is still usable but the speed claim is only as strong as the primality assumption.","headline":"A working Macaulay2 package for likelihood geometry with real toric speedups, but the saturation shortcut is only conditionally correct and MLdegree is underspecified, so referee time is warranted rather than unconditional acceptance.","tokens_in":5367,"tokens_out":3108,"would_cite":true,"duration_ms":29393,"reading_group":"maybe","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":["62R01","14M25","13P10"],"pacs":[],"model":"deepseek-v4-flash","headline":"This paper presents a Macaulay2 package that constructs the likelihood ideal of a discrete statistical model and computes its ML-degree, with a toric shortcut that cut one example from over an hour to 0.06 seconds.","keywords":["LikelihoodGeometry","likelihood correspondence","ML-degree","toric models","hierarchical log-linear models","undirected graphical models","Macaulay2","algebraic statistics"],"falsifier":"Run computeLC on a toric model for which the single-hyperplane saturation returns a non-prime ideal, then compare that output with the ideal obtained by saturating with the full product $(\\sum p_i)(\\prod p_i)$; a mismatch would show that the implemented shortcut can produce an incorrect likelihood ideal.","tokens_in":4577,"feed_emoji":"🧮","tokens_out":12085,"duration_ms":95575,"temperature":0.7,"pith_summary":"This paper introduces a software package that builds the likelihood correspondence of a discrete algebraic statistical model: the variety whose points pair data vectors with the critical points of the likelihood function, so that every maximum-likelihood problem on the model is captured at once. The package computes the vanishing ideal of this correspondence, the likelihood ideal, and reads off the model's ML-degree. For toric models, it uses a saturation shortcut by the single hyperplane $\\sum p_i$, which the paper reports running a rational-normal-scroll example in 0.06 seconds where the generic Lagrange-multiplier algorithm took more than 3600 seconds. It also supplies constructors for toric, hierarchical log-linear, and undirected graphical models, including explicit Gröbner bases for complete and joint independence models.","feed_headline":"Toric MLE ideals: 0.06 seconds vs. an hour","feed_subtitle":"New Macaulay2 package builds likelihood correspondences and computes ML-degrees for discrete models.","key_machinery":"The central object is the likelihood correspondence $L_M \\subset \\mathbb P^p \\times \\mathbb P^u$, the universal family of critical sets of the log-likelihood; its vanishing ideal, the likelihood ideal, encodes all MLE information. The mechanism that carries the argument is Algorithm 1 for toric models, which saturates the ideal generated by the toric equations and the $2\\times2$ minors of $A\\cdot M$ by the single hyperplane $\\sum p_i$. For non-toric input the package uses the Lagrange-multiplier elimination of Algorithm 6 in [HKS04], and for complete or joint independence graphical models it returns the Gröbner basis from the companion paper [BCF23].","core_discovery":"The central claim is that likelihood ideals of discrete algebraic statistical models can be constructed in one package by combining a general Lagrange-multiplier elimination for arbitrary ideals with a much faster toric algorithm. For a toric model given by a matrix $A$, Algorithm 1 forms the toric ideal $I_X$, appends the $2\\times2$ minors of $A\\cdot M$, and saturates the sum only by the probability-sum hyperplane $V(\\sum p_i)$, rather than by all coordinate hyperplanes. This shortcut is reported to be orders of magnitude faster than the generic route, and for complete and joint independence graphical models the package returns explicit Gröbner bases for the likelihood ideal. The ML-degree is then obtained as the degree of the fiber of a generic map from the likelihood correspondence down to the model.","pith_inferences":["The reported speed gap suggests that toric models with much larger state spaces than the benchmark are now within reach; the paper does not run such a scaling test.","Because correctness of the single-hyperplane saturation is only guaranteed when the saturated ideal is prime, a practical safeguard would be to check primality and, on failure, fall back to saturating by the full product of coordinates.","The ML-degree is described only as the fiber of a generic map; checking it against known ML-degrees for rational normal curves would close that specification gap."],"forward_implications":["Toric models that would previously have been impractical for generic elimination become accessible, since the benchmark example finished in 0.06 seconds instead of over an hour.","A single command, computeLC, chooses the applicable algorithm automatically depending on whether the input is a general ideal, a toric variety, or a complete/joint-independence graphical model.","For complete and joint independence models, the likelihood ideal has explicit Gröbner-basis generators rather than being the output of a lengthy elimination.","The ML-degree computation gives an algebraic route to the number of complex critical points of the likelihood function, complementing numerical approaches."],"supporting_citations":[{"why":"Supplies the toric saturation algorithm and the Gröbner-basis results on complete and joint independence models that Algorithm 1 implements.","marker":"[BCF23]"},{"why":"Provides Algorithm 6, the general Lagrange-multiplier elimination that computeLC uses for non-toric ideals, along with the likelihood-correspondence construction.","marker":"[HKS04]"},{"why":"Introduces the maximum likelihood degree as the degree of the likelihood function's critical locus, the invariant the package computes.","marker":"[CHKS04]"},{"why":"Establishes the toric algebra of graphical models underlying the hierarchical and undirected graphical model constructors.","marker":"[GMS06]"},{"why":"Gives the comparison package for MLE computation in Macaulay2 that this package contrasts with on the Gaussian versus discrete distinction.","marker":"[AGPH+22]"},{"why":"Defines the rational normal scrolls used in the benchmark example that exhibits the speedup.","marker":"[Pet08]"},{"why":"Provides the Macaulay2 system in which the package runs and all examples execute.","marker":"[GS]"}],"fun_headline_variants":["Macaulay2: likelihood geometry in seconds","Fast ML-degree for toric models","New Macaulay2 package toric MLE ideals","From hours to milliseconds: ML-degree","LikelihoodGeometry: build models, get degrees"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The load-bearing assumption is that saturating the toric computation by the single hyperplane $\\sum p_i$, instead of by the full product of coordinates, gives the true likelihood ideal; the paper guarantees this only when the saturated output ideal is prime and does not say what the package does when it is not.","fun_headline_variants_meta":{"raw":{"variants":["Macaulay2: likelihood geometry in seconds","Fast ML-degree for toric models","New Macaulay2 package toric MLE ideals","From hours to milliseconds: ML-degree","LikelihoodGeometry: build models, get degrees"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000487,"raw_usage":{"total_tokens":2301,"prompt_tokens":745,"completion_tokens":1556,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":361,"completion_tokens_details":{"reasoning_tokens":1500}},"tokens_in":361,"tokens_out":1556,"duration_ms":12007,"temperature":1.0,"reasoning_tokens":1500,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-12T18:49:40.451182+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Run computeLC on a toric model for which the single-hyperplane saturation returns a non-prime ideal, then compare that output with the ideal obtained by saturating with the full product $(\\sum p_i)(\\prod p_i)$; a mismatch would show that the implemented shortcut can produce an incorrect likelihood ideal.","supporting_citations":[],"review_version":1}