{"id":"8464c833-7604-4b7c-8a4f-615df8720335","arxiv_id":"1908.03142","paper_version":2,"verdict":"UNVERDICTED","confidence":"HIGH","novelty_score":0.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":1,"one_line_summary":"A Chinese tutorial book re-derives LDA's collapsed Gibbs and variational EM formulas from prior published sources and adds heuristic application recipes, but contributes no new research result.","lead":"This is a Chinese-language tutorial book that walks beginners through the full mathematics of Latent Dirichlet Allocation, from prerequisite distributions to collapsed Gibbs sampling, variational inference, parallel implementations, and example applications. It is a teaching text with no new research result, so a generalist would read it to learn LDA, not to find new science.","discovery_kind":"review","skeptic_critique":{"model":"deepseek-v4-flash","headline":"Section 7.4's claimed 'approximation errors' in the variational derivation are not errors under the book's own mean-field assumption (Eq. 7-23); the correct account would say replacing p by q is approximate, but each E_q expansion is exact.","rationale":"Read in good faith, the book is a pedagogical exposition reproducing standard results; the Gibbs sampling derivation and collapsed Gibbs sampler are standard and mostly clear, and the C code walkthrough adds independent value. The central claim is not a new theorem but a promise that every formula is hand-derived and rigorous. The weakest point is not the mean-field factorization per se, but the book's own Section 7.4 interpretation of it. The text at Eq. (7-23) defines q as factorized; every expectation in the ELBO expansion is with respect to q, so splitting products of z and theta terms is algebraically exact. The book instead labels these splits as approximations and invokes dependence of z and theta in the actual model. That mislabels the source of approximation in variational inference. This is a load-bearing concern because a beginner relying on Section 7.4 would carry away an incorrect picture of why variational inference works, even though the equations match the literature. It does not change the reader's UNVERDICTED verdict: the work is still a non-research book with no new results, and the pedagogical flaw supports the existing medium correctness risk rather than overturning it. The concrete test above would settle the matter by showing the expansion is exact; if the test confirms exactness, Section 7.4 needs correction. OCR corruption prevents checking some minor formula details, but this conceptual issue is readable from the surrounding text and is independent of OCR.","tokens_in":95600,"tokens_out":6503,"duration_ms":71427,"concrete_test":"Symbolically expand the second term of Eq. (7-27) from Eq. (7-23): compute E_q[z_{n,i} log theta_i] = integral sum_z [q(theta | gamma) prod_m q(z_m | phi_m) z_{n,i} log theta_i] dtheta and verify it equals phi_{n,i} (Psi(gamma_i) - Psi(sum_j gamma_j)) with no dropped terms and no appeal to independence beyond the factorization of q. Then re-read Section 7.4: if the passage still claims this expansion 'has error' because z and theta are correlated in the true posterior, the book's explanation of the variational method is incorrect; the only approximation is the mean-field replacement q approximately p. This check can be done by hand or with a computer algebra system in under a page.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The central claim is that a beginner receives a complete, rigorous, hand-derived account of LDA. In the variational half, the derivation of the lower bound (Eq. 7-22) and the subsequent expansion (Eq. 7-27) are correct only if expectations are taken with respect to the factorized variational family q(theta, z | gamma, phi) = q(theta | gamma) prod_n q(z_n | phi_n) introduced at Eq. 7-23. Under that q, the step E_q[z_{n,i} log theta_i] = E_q[z_{n,i}] E_q[log theta_i] is exact, because q factorizes and z_{n,i} depends only on phi_n while log theta_i depends only on gamma. The same is true for E_q[z_{n,i} log beta_{i,w_n}] = phi_{n,i} log beta_{i,w_n} and for E_q[z_{n,i} log phi_{n,i}] = phi_{n,i} log phi_{n,i}. Yet Section 7.4 explicitly tells the reader that these expansions contain approximation errors because 'in reality z and theta are not independent,' citing Eq. 7-39. This is a conceptual error about variational inference: the approximation enters only when the true posterior p(theta, z | w, alpha, beta) is replaced by q; no further approximation occurs in expanding the ELBO under q. A beginner following Section 7.4 will be taught that a mathematically exact step is approximate, which directly undermines the book's promise of rigorous, step-by-step derivation. The final update equations (7-30) and (7-32) match Blei et al., so the formulas survive; but the book's explanation of why they are valid is wrong at a load-bearing point.","agreement_with_reader":"disagree"},"referee_report":{"model":"deepseek-v4-flash","summary":"This is a Chinese-language, book-length tutorial manuscript (eight chapters plus front matter) on Latent Dirichlet Allocation. Its stated purpose is pedagogical: the preface promises that every formula is hand-derived step by step so that a beginner, even one who has forgotten calculus, can follow, and the abstract promises a rigorous mathematical derivation of the two standard inference approaches. Chapter 2 develops prerequisite probability material (gamma, Beta, Dirichlet, conjugacy); Chapter 3 derives collapsed Gibbs sampling and arrives at the standard update (Eq. 3-20) together with the posterior estimates (3-21)-(3-22); Chapter 4 presents six applications, including topic/word ranking and an article-quality scoring method; Chapter 5 explains AD-LDA and a block-structured Spark implementation; Chapters 6-8 give background on variational calculus and a full derivation of variational EM for LDA, ending with the updates (7-30) and (7-32), the M-step estimators (7-36) and (7-38), and a detailed walkthrough of Blei's lda-c code. The book claims no new theorem, estimator, or dataset result; its contribution is expository.","tokens_in":95859,"tokens_out":14704,"duration_ms":148052,"significance":"As an exposition, the book is largely successful where it reproduces standard results: the collapsed Gibbs derivation in Sec. 3.4 is correct in substance, and the explanation of the Gamma-function cancellations and product cancellations is genuinely instructive; the variational derivation reaches the correct ELBO (7-22) and the standard coordinate-ascent and M-step formulas; and Chapter 8's line-by-line reading of lda-c, including the log-sum trick and the incremental gamma update (8-3), is a real strength that will help practitioners map mathematics onto code. The parallelization chapter gives a fair conceptual account of AD-LDA and of the Spark method described in Sec. 5.2. If the exposition were fully corrected, the book would be a useful bridge for Chinese-speaking beginners. It is not a research contribution, however, so its significance must be judged on accuracy and clarity rather than novelty; in that judgment, the conceptual explanation in the variational half and the empirical claims in the application chapters currently fall short of the book's own stated standard.","major_comments":[{"comment":"Section 7.4's 'error discussion' mislocates the approximation in the variational derivation. The three expansions that Section 7.4 labels as approximate - E_q[z_{n,i} log theta_i] = E_q[z_{n,i}] E_q[log theta_i], E_q[z_{n,i} log beta_{i,w_n}] = phi_{n,i} log beta_{i,w_n}, and E_q[z_{n,i} log phi_{n,i}] = phi_{n,i} log phi_{n,i}, used in the five-term expansion (7-27) - are exact under the variational family q(theta,z|gamma,phi) = q(theta|gamma) prod_n q(z_n|phi_n) introduced in Eq. (7-23), because the factorized q makes z_{n,i} depend only on phi_n and log theta_i only on gamma. The approximation in variational inference consists entirely in replacing the true posterior p(theta,z|w,alpha,beta) with q; that is what the KL term in (7-20)-(7-21) measures, and no further approximation is introduced when the ELBO is expanded under q. By telling the reader that the expansions 'contain errors' because 'in reality z and theta are not independent,' Section 7.4 conflates the true posterior with the variational distribution and teaches a beginner that an exact algebraic step is approximate. Because the manuscript's central claim is rigorous step-by-step derivation, this passage should be rewritten so that the mean-field factorization (7-23) is identified as the single approximation and the expansions are presented as exact consequences of it.","section":"Sec. 7.4, Eqs. (7-22)-(7-23), (7-30), (7-32)"},{"comment":"Several quantitative claims in the application and parallelization chapters are unsupported, and one is contradicted by the book's own table. (a) Section 4.2.5 asserts that word rank '平均可以达到80%的准确度' (can reach 80% accuracy on average) with no definition of accuracy, no test corpus, and no evaluation protocol. (b) Section 4.2.6's article-quality algorithm rests on the assumption that distance from the corpus-average 'god vector' (Eqs. 4-4 and 4-5) measures quality; the assumption is never validated against human ratings or any independent quality signal, and the demonstration consists of the author's inspection of twenty blog posts. (c) The text claims, on the basis of Table 4-5 and Fig. 4-14, that higher quality scores are associated with higher average page views, but the table is non-monotonic at the top end: the 0.9-1.0 bin has mean PV 449.8, below the 0.8-0.9 bin's 588.3, and the 0.5-0.6 bin's 167.4 exceeds the 0.4-0.5 bin's 149.3; no confidence intervals or bin-size corrections are given, and the top bin contains only 390 articles versus 2975 in the second bin. (d) Section 5.2.4 asserts that experiments show the distributed method's perplexity matches single-machine Gibbs Sampling, but no experiment is reported in the chapter. These claims should be either properly supported or explicitly presented as anecdotal illustrations from the author's practice.","section":"Secs. 4.2.5-4.2.6, Table 4-5; Sec. 5.2.4"},{"comment":"Section 2.5 leaves the proof of the Dirichlet normalization identity (2-11) 'to the reader' ('这个证明留给读者来完成'), which contradicts the preface's explicit promises that Chapter 2 '力求做到关键证明不遗漏' (strives to omit no key proof) and that every formula is hand-derived ('每一条公式都由作者手把手为您推理'). This is not a cosmetic gap: Eq. (2-11) is invoked at load-bearing steps of the Gibbs derivation, Eqs. (3-16), (3-18), and (3-19), where integrals over phi and theta are collapsed into Delta functions. Since the analogous Beta-function identity (2-6) is proved twice in Section 2.3, supplying the Dirichlet version by the same substitution argument would be straightforward; alternatively, the preface's promise should be reworded.","section":"Sec. 2.5, Eq. (2-11); Preface"}],"minor_comments":[{"comment":"Throughout the manuscript, displayed equations contain stray symbols and interleaved annotations (for example, the in-line commentary inside the derivation of Eq. (3-20) and the corrupted characters in Eqs. (4-5), (7-27), and (7-38)). For the target beginner readership, a clean typeset pass with numbered, self-contained displays is needed.","section":"Eqs. (3-20), (4-5), (7-27), (7-38)"},{"comment":"Figure 4-14 plots bin-averaged PV against score, but the bin sizes differ by an order of magnitude (390 versus 2975 articles in the top two bins); the apparent trend should be shown with bin counts and dispersion, and the axes and units should be labeled.","section":"Sec. 4.2.6, Fig. 4-14"},{"comment":"The preface's claim that the book '首次将 LDA 引入大数据时代' (first brings LDA into the big-data era) is not supported by Chapter 5, which surveys existing methods such as AD-LDA and the Spark method it describes; this claim should be removed or substantially softened.","section":"Preface"},{"comment":"The two halves of the book use different notation for the topic-word distribution (a Dirichlet-sampled phi_k in Chapter 3 versus a fixed matrix beta in Chapter 7). Table 7-1 documents the change, but a forward reference at Section 3.2 would save beginners real confusion.","section":"Sec. 3.2 vs Sec. 7.1, Table 7-1"},{"comment":"The reference list mixes standard sources (Blei et al. 2003; Griffiths and Steyvers; Heinrich) with informal web pages and blog posts, and the 'further reading' list at the end repeats earlier chapter lists; a single consolidated bibliography with formal citations would serve the book's purpose better.","section":"References"}],"recommendation":"major_revision","confidential_remarks":"The manuscript is a book draft rather than a research article: it makes no new technical claim, and as an arXiv cs.IR submission its fit is with the pedagogical/expository category rather than with a research paper's publication criteria; the refereeing should therefore weigh expository correctness heavily. The preface markets 'unique insights' and 'first to bring LDA into the big-data era,' while the content is largely a careful re-exposition of standard sources, which is acceptable for a textbook but should be framed as such. The issues I raise (the Sec. 7.4 mean-field explanation, the unvalidated quality-scoring and perplexity claims, and the omitted Dirichlet proof) are all fixable in revision, so I would not recommend rejection."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Two things to know. First, this is not a research preprint; it is a book-length tutorial on LDA, originally published in Chinese, uploaded to arXiv. Second, the Gibbs-sampling half is mostly solid, but the variational half repeats a standard derivation and then explains the math incorrectly at one load-bearing point.\n\nWhat it does well: the collapsed Gibbs derivation is careful and arrives at the standard update (3-20); the walkthrough of Blei's C code in Chapter 8 is genuinely useful; the book cites Blei et al., Griffiths and Steyvers, Heinrich, Newman et al., and Qiu, and its re-derivations benchmark against those sources rather than against itself. The author is also unusually open about limitations elsewhere, e.g., in the preface saying some proofs should be taken on trust.\n\nWhere it is soft: (1) There is nothing new. Every equation is a standard result. The application chapters (topic rank, word rank, quality score) are heuristics, with no code, data, or controlled evaluation; the informal accuracy and average-PV claims are unsupported. (2) The conceptual error: Section 7.4 tells the reader that the expansion of E_q[z log theta] into E_q[z] E_q[log theta] is approximate, because 'in reality z and theta are not independent.' That is wrong. Once you choose the factorized family q(theta,z)=q(theta)q(z) (Eq. 7-23), those expectations factor exactly. The approximation entering variational inference is the replacement of p by q; the algebra under q is exact. A beginner reading Section 7.4 will be told a mathematically correct step is approximate, undercutting the book's stated promise of rigorous step-by-step derivation. (3) The arXiv PDF has badly OCR-corrupted equations, which made fine-grained checking harder; I would not judge individual formulas from the scan alone.\n\nFor a reader: a motivated Chinese-speaking beginner wanting a hand-held walkthrough of LDA could get value from the Gibbs chapters and the C-code chapter. It is not a research contribution and should not be peer-reviewed as one. If it were to be revised as a book, the Section 7.4 explanation should be corrected.","headline":"A competent Chinese-language re-derivation of standard LDA material; no new results, and the variational chapter contains a real conceptual error about mean-field factorization.","tokens_in":96549,"tokens_out":3263,"would_cite":false,"duration_ms":35358,"reading_group":"no","serious_thinker":"yes","would_accept_peer_review":false},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":["62F15","60J22","68T50"],"pacs":[],"model":"deepseek-v4-flash","headline":"This Chinese book-length guide aims to hand-derive, step by step, every formula behind LDA's two inference methods — collapsed Gibbs sampling and variational EM — so that a beginner who has forgotten calculus can follow the entire…","keywords":["Latent Dirichlet Allocation","topic models","collapsed Gibbs sampling","variational inference","variational EM","Dirichlet-multinomial conjugacy","mean-field approximation","parallel topic models"],"falsifier":"Take two short documents, a vocabulary of a few words, and $K=2$ topics, enumerate the exact posterior $p(\\mathbf{z}, \\theta \\mid \\mathbf{w})$ by brute force over all $2^N$ topic assignments, and compare it with the collapsed-Gibbs sampler run from Eq. (3-20) and with the converged mean-field approximation from Eqs. (7-30) and (7-32); if the sampler's stationary distribution disagrees with the enumerated posterior beyond sampling noise, or if the variational updates oscillate instead of converging to a posterior close to the exact one, the respective derivation chain fails its promise.","tokens_in":95237,"feed_emoji":"📚","tokens_out":13116,"duration_ms":129005,"temperature":0.7,"pith_summary":"This is a teaching book, not a research monograph: it sets out to make the mathematics of Latent Dirichlet Allocation fully accessible, promising in the preface and abstract that every formula is hand-derived step by step and that a reader who has forgotten calculus can still follow the whole chain. Its load-bearing claims are that the collapsed Gibbs sampling update (Eq. 3-20) and the variational EM updates (Eqs. 7-30 and 7-32) are derived completely and correctly from first principles, and that the reader can then implement both methods from the provided pseudocode and a line-by-line analysis of a reference C implementation. The book matters because LDA is one of the most widely used text models in industry and academia, and the gap between the standard research papers and a beginner's background is exactly what it tries to close. The book is written in Chinese and doubles as a practical handbook, with chapters on applications, two parallelization schemes, and a walkthrough of the reference code.","feed_headline":"Every LDA formula, hand-derived step by step","feed_subtitle":"A beginner's road map through collapsed Gibbs sampling and variational EM, LDA's two inference engines.","key_machinery":"For the Gibbs half, the carrying machinery is the Dirichlet–multinomial conjugacy pair: it makes the integrals over $\\theta$ and $\\varphi$ in Eqs. (3-16) and (3-18) collapse into ratios of products of gamma functions, and the factorial identity $\\Gamma(x+1) = x\\Gamma(x)$ then lets nearly every gamma cancel in the full conditional, leaving the two count ratios of Eq. (3-20). The book singles out this gamma cancellation as the central trick of the whole derivation. For the variational half, the carrying object is the mean-field factorization of Eq. (7-23), together with the Dirichlet expectation identity $E_q[\\log \\theta_i] = \\Psi(\\gamma_i) - \\Psi(\\sum_j \\gamma_j)$; these convert the five-term lower-bound expansion of Eq. (7-27) into the two coupled update equations that are iterated in alternation until the bound converges.","core_discovery":"On the book's own terms, the central content is a complete, self-contained derivation chain for LDA's two inference methods. For the sampling route, the chain starts from the joint probability of the observed words and the latent topic assignments, integrates out the Dirichlet parameters $\\varphi$ and $\\theta$ — the move that gives 'collapsed' Gibbs sampling its name — and then uses the full-conditional distribution to arrive at Eq. (3-20), the sampling formula $$p(z_i = k \\mid \\mathbf{z}_{-i}, \\mathbf{w}) \\propto \\frac{n_{k,w_i}^{(-i)} + \\$\\beta$}{$n_k^{{(-i)}}$ + V\\$\\beta$}\\cdot\\frac{n_{m,k}^{(-i)} + \\$\\alpha$}{$n_m^{{(-i)}}$ + K\\$\\alpha$},$$ where the gamma functions introduced in the derivation cancel out. For the optimization route, the chain builds the evidence lower bound, applies the mean-field factorization $q(\\theta, \\mathbf{z} \\mid \\gamma, \\phi) = q(\\theta \\mid \\gamma)q(\\mathbf{z} \\mid \\phi)$ of Eq. (7-23), expands the bound into five terms, and differentiates to obtain the update equations $\\phi_{n,i} \\propto \\beta_{i,w_n}\\exp(\\Psi(\\gamma_i))$ and $\\gamma_i = \\alpha + \\sum_n \\phi_{n,i}$ (Eqs. 7-30, 7-32). The book's stated aim is that a reader who works through these chains ends with the standard published results, the ability to reproduce them unaided, and enough understanding to implement both algorithms.","pith_inferences":["The book flags but never quantifies the mean-field approximation error; a natural extension is a tiny-corpus benchmark that measures the KL divergence between the converged variational posterior and a brute-force exact posterior, turning the caveat of Section 7.4 into a number.","The quality-scoring method of Section 4.2.6 — rating an article by its distance from the corpus-average vector — is illustrated with blog examples but no independent validation; a testable extension is to check it against a labeled spam-versus-curated dataset and to measure its correlation with human quality ratings.","The derivation chain the book lays out — write the joint, integrate out the conjugate priors, cancel gammas in the full conditional — is not specific to LDA, so the same pedagogical route could be reused to introduce other conjugate topic models such as HDP or supervised variants."],"forward_implications":["A reader who follows Chapters 2 and 3 arrives at the collapsed Gibbs sampling formula (3-20) with the two algebraic moves — gamma cancellation and the cancellation of the product over topics and documents — made explicit, which most treatments omit.","The implementation chapter gives a working route from formula to code: the cumulative-method dice roll, the '-1, reassign topic, +1' update loop, and the memory estimate $O(KV)$ for the word-topic count array, so a beginner can implement LDA without assembling scattered sources.","The variational chapters reconstruct the original LDA paper's derivation with the compressed details filled in — the five-term expansion of the lower bound and the constrained optimizations for $\\phi$ and $\\gamma$ — making the classic variational EM method learnable.","The parallelization chapter explains why naive parallel Gibbs breaks the count statistics and where each fix (AD-LDA's global update, spark-LDA's row-and-column blocking) leaves residual error, equipping the reader to choose between the two schemes.","The applications chapter shows that the standard outputs of one LDA run (the $\\theta$ and $\\varphi$ matrices) can be repurposed, without model changes, for document similarity, tagging, recommendation features, topic ranking, and a quality-scoring heuristic."],"supporting_citations":[{"why":"The 'Finding scientific topics' paper that introduced collapsed Gibbs sampling for LDA; the book's Eq. (3-20) is this result re-derived.","marker":"[3] (ch. 3)"},{"why":"The 'Parameter estimation for text analysis' note whose integration steps the book follows to collapse out the Dirichlet parameters $\\theta$ and $\\varphi$.","marker":"[2] (ch. 3)"},{"why":"The 'Gibbs Sampling for the Uninitiated' note that supplies the integrating-out and full-conditional background for the collapsed sampler.","marker":"[1] (ch. 3)"},{"why":"The MCMC survey that provides the full-conditional proof that Gibbs sampling has acceptance probability 1, licensing the sampling formula.","marker":"[15] (ch. 3)"},{"why":"The original LDA paper whose variational-EM derivation (five-term lower bound, update equations) the book reconstructs with added detail.","marker":"[1] (ch. 7)"},{"why":"The distributed-inference paper that proposed AD-LDA; the book explains its global-update merge and its memory limitation.","marker":"[12] (ch. 5)"},{"why":"The large-scale topic-model system whose diagonal block-dividing strategy the spark-LDA section adapts for conflict-free parallel Gibbs sampling.","marker":"[17] (ch. 5)"},{"why":"The machine-learning text that supplies the Dirichlet-distribution and conjugate-prior background on which the whole derivation chain rests.","marker":"[7] (ch. 2)"}],"fun_headline_variants":["Complete LDA derivation: collapsed Gibbs and variational EM","LDA's two inference engines, derived from scratch","Hand-derived LDA formulas for beginners: all steps shown","From gamma integrals to sampling and update equations","LDA math: full derivation chain for beginners"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The variational route assumes that a document's topic assignments and its topic-proportion vector are independent under the approximating distribution; Section 7.4 concedes that they are not, so the expansions of $E[z_{n,i}\\log\\theta_i]$, $E[z_{n,i}\\log\\beta_{i,w_n}]$, and $E[z_{n,i}\\log\\phi_{n,i}]$ that produce updates (7-30) and (7-32) are approximations whose error is never quantified.","fun_headline_variants_meta":{"raw":{"variants":["Complete LDA derivation: collapsed Gibbs and variational EM","LDA's two inference engines, derived from scratch","Hand-derived LDA formulas for beginners: all steps shown","From gamma integrals to sampling and update equations","LDA math: full derivation chain for beginners"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000223,"raw_usage":{"total_tokens":1471,"prompt_tokens":973,"completion_tokens":498,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":589,"completion_tokens_details":{"reasoning_tokens":424}},"tokens_in":589,"tokens_out":498,"duration_ms":5194,"temperature":1.0,"reasoning_tokens":424,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-14T14:44:42.839762+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Take two short documents, a vocabulary of a few words, and $K=2$ topics, enumerate the exact posterior $p(\\mathbf{z}, \\theta \\mid \\mathbf{w})$ by brute force over all $2^N$ topic assignments, and compare it with the collapsed-Gibbs sampler run from Eq. (3-20) and with the converged mean-field approximation from Eqs. (7-30) and (7-32); if the sampler's stationary distribution disagrees with the enumerated posterior beyond sampling noise, or if the variational updates oscillate instead of converging to a posterior close to the exact one, the respective derivation chain fails its promise.","supporting_citations":[],"review_version":1}