Papers
Topics
Authors
Recent
Search
2000 character limit reached

PERG: Graph Grammars, Review Generation & Robustness

Updated 4 July 2026
  • PERG is an overloaded acronym representing three research programs: a probabilistic graph grammar for graph generation, a review synthesis pipeline, and a framework for evaluating robustness in personalized LLM outputs.
  • It leverages structured conditioning through formal grammars, graph-based retrieval, and piecewise evaluation metrics to balance correctness with personalization in generation.
  • Empirical results show that Restricted PERG accurately captures network properties, personalized review systems improve text quality and rating accuracy, and robustness frameworks reduce factual errors effectively.

to=arxiv_search 彩神争霸官方نېjson_string code variant? {"query":"(Reddy et al., 2019) Edge Replacement Grammars: A Formal Language Approach for Generating Graphs"} to=arxiv_search 天天爱彩票app.json {"query":"(Reddy et al., 2019) Edge Replacement Grammars: A Formal Language Approach for Generating Graphs","max_results":5} PERG is an overloaded acronym in recent arXiv literature. In the cited work, it denotes three distinct constructs: Probabilistic Edge Replacement Grammars, a formal graph generation model; Personalized Review Generation, a retrieval-conditioned setup for synthesizing reviews from user–item graph context; and Personalized Evaluation of Robustness in Generation, a framework for measuring whether LLMs remain factually correct while following user preferences (Reddy et al., 2019, Au et al., 9 Apr 2026, Okite et al., 18 Sep 2025). The shared acronym obscures substantial differences in object of study, formalism, and evaluation: one PERG is a probabilistic grammar over graphs, one is a benchmarked generation pipeline over bipartite review graphs, and one is an evaluation framework for personalized LLM behavior.

1. Acronym usage and referential scope

In the cited literature, “PERG” is not a single established term but a label attached to three separate research programs.

Usage Expansion Primary object
PERG Probabilistic Edge Replacement Grammars Generative model for graphs
PERG Personalized Review Generation Review synthesis from user–item graph evidence
PERG Personalized Evaluation of Robustness in Generation Robustness evaluation for personalized LLM outputs

The first usage originates in graph grammar literature and is formalized as a probabilistic extension of Edge Replacement Grammars. The second appears as task nomenclature inside the PeReGrINE benchmark, where reviews are modeled as edges in a temporally filtered bipartite graph. The third names a robustness framework and dataset, PERGData, for testing whether personalization degrades factuality or preference adherence in LLMs (Reddy et al., 2019, Au et al., 9 Apr 2026, Okite et al., 18 Sep 2025).

A useful distinction is methodological rather than terminological. The graph-grammar PERG is a generative model with an explicit probability distribution over derivations; the PeReGrINE PERG is a task setup for retrieval-conditioned generation; the robustness PERG is an evaluation framework defined by accuracy and preference-following criteria. This suggests that acronym-level similarity should not be taken as conceptual continuity.

2. PERG as Probabilistic Edge Replacement Grammars

An Edge Replacement Grammar (ERG) is defined as a tuple

G=(V,  Σ,  R,  S)G = (V,\;\Sigma,\;R,\;S)

where VV is a finite set of nonterminal edge–labels, Σ\Sigma is a finite set of terminal edge–labels with VΣ=V\cap\Sigma=\emptyset, SVS\in V is the start nonterminal, and RR is a finite set of productions of the form

A    RAA \;\longrightarrow\; R_A

where AVA\in V and RAR_A is a finite undirected graph whose edges are labeled by elements of VΣV\cup\Sigma. A single-step derivation replaces a nonterminal-labeled edge VV0 in a graph VV1 by deleting VV2 and gluing in the graph VV3 by identifying its external attachment points with VV4. A full derivation VV5 yields a terminal graph VV6 all of whose edges lie in VV7 (Reddy et al., 2019).

A Probabilistic ERG, or PERG, is a tuple

VV8

where VV9 is an ERG and

Σ\Sigma0

assigns to each production Σ\Sigma1 a probability Σ\Sigma2 such that

Σ\Sigma3

If a terminal graph Σ\Sigma4 is derived by a leftmost derivation using rules Σ\Sigma5, then its probability is

Σ\Sigma6

The paper states that one checks that Σ\Sigma7, so the construction defines a normalized distribution over the language generated by the grammar (Reddy et al., 2019).

The motivation for this formulation is explicitly contrasted with much existing graph generation work: much of the existing work require that a large number of parameters, in fact exponential in size of the graphs, be estimated from the data. The PERG approach instead leverages the extensive prior work in the formal graph grammar literature. In the paper’s framing, this is a formal-language approach to graph generation rather than a direct parametric fit to network statistics (Reddy et al., 2019).

3. Restricted PERG, non-squeezability, and parameter estimation

The paper proposes a variant of PERG called Restricted PERG (RPERG), which is analogous to PCFGs in string grammar literature. In an RPERG, every production Σ\Sigma8 is restricted so that the graph Σ\Sigma9 is non-squeezable (Reddy et al., 2019).

For a connected undirected graph VΣ=V\cap\Sigma=\emptyset0 and two distinct vertices VΣ=V\cap\Sigma=\emptyset1, removing VΣ=V\cap\Sigma=\emptyset2 may leave VΣ=V\cap\Sigma=\emptyset3 connected components VΣ=V\cap\Sigma=\emptyset4. A nontrivial squeeze at VΣ=V\cap\Sigma=\emptyset5 replaces one component VΣ=V\cap\Sigma=\emptyset6 by a single edge VΣ=V\cap\Sigma=\emptyset7. A squeeze is trivial if VΣ=V\cap\Sigma=\emptyset8. A graph is called non-squeezable if no nontrivial squeeze is possible. The exposition further states that a non-squeezable graph is exactly a graph whose only separating pairs VΣ=V\cap\Sigma=\emptyset9 separate no proper subgraph; in particular, all 3-vertex-connected graphs, together with the degenerate non-squeezable cases of triangles and star-graphs, form the atomic right-hand sides in an RPERG (Reddy et al., 2019).

This restriction yields a tractable learning procedure. Given a dataset SVS\in V0 of observed terminal graphs, each assumed i.i.d. from some unknown PERG, and assuming that each SVS\in V1 admits a unique decomposition into non-squeezable atoms, the count of a rule SVS\in V2 in canonical parses is

SVS\in V3

The complete-data log-likelihood is

SVS\in V4

subject to SVS\in V5 for each SVS\in V6. Solving the constrained problem yields the closed form

SVS\in V7

The paper emphasizes that no EM is needed because the unique non-squeezable-decomposition ensures a one-to-one parse for each SVS\in V8 (Reddy et al., 2019).

Generation is top-down. Starting from a single edge labeled SVS\in V9, the sampler repeatedly selects a nonterminal edge RR0 labeled RR1, samples a rule RR2 with probability RR3, removes RR4, glues in RR5 by identifying its external ports with RR6, and continues until no nonterminal edges remain or a target-size condition is enforced. The exposition states that if one does not enforce a hard size-constraint, the procedure terminates almost surely because each replacement increases the total number of terminal edges in expectation; one may append a special rule RR7 of small probability to allow eventual halting (Reddy et al., 2019).

Theoretical properties are stated explicitly. Every connected graph has a unique multiset of non-squeezable minors obtained by repeated squeezing, hence RPERG parses are unambiguous. Any connected unlabeled graph may be generated by a suitable PERG; RPERGs generate the class of all graphs by decomposing them into 3-connected, triangle, and star-atoms. For grammar induction, if RR8 is the number of nodes and RR9 the number of edges of the largest training graph, each step of finding a split-pair or biconnected components takes A    RAA \;\longrightarrow\; R_A0, the worst case is A    RAA \;\longrightarrow\; R_A1, and in practice with balanced splits one gets A    RAA \;\longrightarrow\; R_A2. Sampling a graph of size A    RAA \;\longrightarrow\; R_A3 edges takes A    RAA \;\longrightarrow\; R_A4 replacements and hence A    RAA \;\longrightarrow\; R_A5 time (Reddy et al., 2019).

4. Empirical behavior of RPERGs as graph generators

Reddy et al. compare RPERG, denoted ERGM-2 in the paper, against HRG—Hyperedge Replacement Grammars, Chung–Lu random graphs, and Kronecker graph models. The paper reports that RPERGs empirically outperform existing methods for graph generation and improve on the performance of the state-of-the-art Hyperedge Replacement Grammar based graph generative model (Reddy et al., 2019).

The reported empirical picture is organized around structural signatures of real networks. For degree distribution, all models capture the overall heavy-tail, but RPERG traces the empirical curve most closely. For spectral properties, eigenvalue scree plots follow a power-law and RPERG matches the original best; in Table 2, RPERG has the smallest cosine-distance of leading eigenvector centralities across four data-sets: ArXiv, Routers, Enron, and DBLP. For the hop-plot, RPERG’s hop-plot virtually coincides with the true graph’s. For clustering coefficient vs. degree, RPERG reproduces the degree-dependent clustering far better than Chung–Lu and Kronecker. For triangle-participation and Graphlet Correlation Distance (GCD), Table 3 shows that RPERG yields the lowest GCD on all four real-world networks (Reddy et al., 2019).

The paper’s summary claim is that, despite being a context free grammar, the proposed model is able to capture many of the structural properties of real networks, such as degree distributions, power law and spectral characteristics. A plausible implication is that the restriction to non-squeezable atoms does not preclude faithful reproduction of higher-order graph signatures when the decomposition aligns with graph connectivity structure.

5. PERG as Personalized Review Generation in PeReGrINE

In PeReGrINE, PERG denotes a Personalized Review Generation setup grounded in graph-structured user–item evidence. Reviews are modeled as edges in a bipartite graph A    RAA \;\longrightarrow\; R_A6, where A    RAA \;\longrightarrow\; R_A7, A    RAA \;\longrightarrow\; R_A8, and each edge A    RAA \;\longrightarrow\; R_A9 is a review

AVA\in V0

with rating AVA\in V1, title AVA\in V2, body AVA\in V3, optional images AVA\in V4, and timestamp AVA\in V5. Given a target pair AVA\in V6 and its gold review at time AVA\in V7, the task is to generate AVA\in V8 using only evidence with AVA\in V9. The ideal objective is

RAR_A0

where RAR_A1 and RAR_A2 collect item metadata and user/item histories prior to RAR_A3 (Au et al., 9 Apr 2026).

The benchmark restructures Amazon Reviews 2023 into a temporally consistent bipartite graph. For a target review at RAR_A4,

RAR_A5

Every retrieved review must satisfy RAR_A6. The setup enforces minimum degrees RAR_A7 and RAR_A8, and partitions by user-most-recent-review into train/dev/test to preserve temporal integrity (Au et al., 9 Apr 2026).

A central component is the User Style Parameter

RAR_A9

where VΣV\cup\Sigma0 is an 11-dim stylometric vector comprising length features, sentiment features from VADER, and writing-style features. Concretely, the 11 dimensions are: character count, token count, sentence count, avg. sentence length, pos, neg, neu, compound, punct. density, capitalization ratio, and first-person pronoun density. The paper states that VΣV\cup\Sigma1 encodes each user’s persistent linguistic/affective tendencies in a compact form, stabilizing retrieval when user histories are sparse (Au et al., 9 Apr 2026).

The framework defines two retrieval functions, VΣV\cup\Sigma2 and VΣV\cup\Sigma3, and studies four evidence configurations: product-only, user-only, neighbor-only, and combined. If VΣV\cup\Sigma4, item retrieval scoring is

VΣV\cup\Sigma5

where VΣV\cup\Sigma6 is the cosine similarity between review text embedding and product-metadata embedding, and VΣV\cup\Sigma7 is VΣV\cup\Sigma8. User retrieval ranks prior user reviews by VΣV\cup\Sigma9 and takes the top-VV00 (Au et al., 9 Apr 2026).

Conditioning is prompt-based. The prompt concatenates a “PRODUCT INFORMATION” block, a “USER HISTORY” block, and an “ITEM NEIGHBOR REVIEWS” block as appropriate to the retrieval setting. The paper states that VV01 is used only in retrieval, not directly in the prompt. For models, it uses Qwen2.5-3B-Instruct for text-only ablations and Qwen3-VL-8B-Instruct for multimodal experiments, with images captioned separately and appended to the prompt (Au et al., 9 Apr 2026).

Evaluation combines micro-level generation metrics with macro-level Dissonance Analysis. The standard metrics are ROUGE-L, BLEU, METEOR, BERTScore-F1 for text and title generation; accuracy, MAE, RMSE for rating prediction; and title–text consistency defined as the fraction of examples whose generated title sentiment matches body sentiment. Dissonance Analysis introduces three heuristic measures, lower being better: User Dissonance, Product Dissonance, and Sentiment Dissonance, with formulas given in Appendix D (Au et al., 9 Apr 2026).

The key findings are reported with explicit metric values. In the text-only ablation on All Beauty with Qwen2.5-3B, product-only yields best Product Dissonance VV02 and best title-text consistency VV03, but high User Dissonance VV04. User-only gives lowest User Dissonance VV05 and best rating acc VV06, but poor product grounding with Product Dissonance VV07. Combined achieves the best text-overlap metrics with ROUGE-L VV08, BLEU VV09, and BERT-F1 VV10, while maintaining balanced Dissonance with User D VV11 and Prod D VV12. In the multimodal ablation with Qwen3-VL-8B, adding captioned images increases all text metrics by approximately 1–2 points and slightly decreases Product Dissonance, but the evidence-setting ranking remains unchanged: combined > product > neighbor > user for overall quality. Category-level results over 500 instances × 7 domains indicate that “All Beauty” is easiest, while “Sports” and “Toys” have better rating acc but weaker text overlap (Au et al., 9 Apr 2026).

The best-practice recommendations stated in the paper are operational. Item retrieval should be anchored on pre-existing metadata, not fragments of the gold text, to avoid leakage. Both user and item histories should satisfy the explicit temporal cutoff VV13. The evidence sources should be combined to balance personalization and grounding. The stated limitations are equally specific: the current retrieval ranker is text-only, sparse/cold-start is left for future study, and both the dissonance metrics and the User Style Parameter still require component-wise ablation (Au et al., 9 Apr 2026).

6. PERG as Personalized Evaluation of Robustness in Generation

In “Benchmarking and Improving LLM Robustness for Personalized Generation,” PERG denotes Personalized Evaluation of Robustness in Generation, a framework for assessing whether personalization preserves both correctness and preference adherence. Let VV14 be a user query, VV15 a set of user preferences, VV16 the model output, VV17 indicate factual correctness, VV18 indicate whether at least one preference is relevant to VV19, and VV20 indicate whether VV21 appropriately incorporates a relevant preference. Robustness is then defined piecewise:

VV22

In practice, the framework reports four summary metrics on the subset VV23 of queries answered correctly with no preferences: Breakage Rate, Alignment Failure, Robustness Error Rate, and Performance Variation. Robustness Error Rate is given as

VV24

Performance Variation is

VV25

These definitions separate two failure modes that are often conflated in personalized generation: introducing factual errors and failing to use relevant preferences (Okite et al., 18 Sep 2025).

The accompanying dataset, PERGData, contains 7,208 examples sourced from TruthfulQA (817), MMLU (5,170 sampled from 14,042 questions), and CommonsenseQA (1,221). For each question, the dataset includes a ground-truth multiple-choice question, one relevant preference with textual justification, and five irrelevant preferences drawn from PrefEval. The design is explicitly between-subjects: each question is paired with exactly one relevant preference to control annotation cost, and a small within-subjects check showed identical accuracy distributions (Okite et al., 18 Sep 2025).

The evaluation protocol combines prompting variants and automatic judgments. The prompting methods are zero-shot, Chain-of-Thought, in-context learning with three demonstration triples, and Self-Critic. Factuality is measured by extracting the chosen letter option from the model’s free-form answer using a fine-tuned Mistral-7B multiple-choice selector with 99.5% F1, with fallback mapping via GPT-4o-mini if extraction fails. Preference alignment is judged by GPT-4o-mini on a 1–5 Likert scale, where 1–2 maps to not aligned and 3–5 maps to aligned; human validation on 200 examples yielded Cohen’s VV26 versus the LLM judge (Okite et al., 18 Sep 2025).

The empirical findings are framed around 14 LLMs across 5 families, from 7B to 70B parameters, including both open-source and closed models. Under zero-shot prompting with relevant preferences, Breakage Rate ranges from 3% to 26%, Alignment Failure ranges from 1% to 16%, and Robustness Error ranges from 5% to 34%. In the sample table, GPT-4.1 has Breakage Rate 5.0%, Align Fail 0.7%, and RobustErr 5.4%; Llama-3 70B has 6.0%, 5.3%, and 9.0% respectively; Mistral-7B has 27.3%, 13.2%, and 34.4%; and Janus-7B has 24.7%, 18.3%, and 34.7%. The paper states that scaling generally improves robustness, that naïve fine-tuning on preference data actually increased alignment failures by approximately 8% in the Janus-7B versus Mistral-7B comparison, and that no single prompting method consistently lowers Robustness Error across models. In the Mixed setting with one relevant and five irrelevant preferences, alignment failures rise substantially for all models, though breakage rates remain largely unchanged (Okite et al., 18 Sep 2025).

Error analysis is preference-sensitive. The paper reports that thinking/context preferences often trigger chain-of-thought behaviors that lead to breakage, whereas clarity/conciseness preferences tend to produce fewer factual failures on short, direct questions, for example in TruthfulQA. To mitigate failures, it introduces Pref-Aligner, a two-stage framework: Stage 1 produces a purely factual response VV27 ignoring preferences, and Stage 2 takes VV28 and performs a lightweight edit VV29 only if a preference is relevant; otherwise it returns VV30 unchanged. The reported improvements are explicit. In the relevant-only setting, Llama-3 8B improves from 20.9% to 18.1% Robustness Error, Llama-3 70B from 9.0% to 6.5%, Mixtral 8×7B from 26.1% to 18.9%, and Gemma-2 9B from 12.6% to 6.8%. For Llama-3 70B, Breakage Rate drops from 5.6% to 1.1% in the relevant setting, from 6.9% to 1.2% in the mixed setting, and from 5.5% to 1.2% in the irrelevant setting. The paper summarizes this as reducing breakage by approximately 75–80% and reducing overall robustness errors by approximately 25% on average (Okite et al., 18 Sep 2025).

The conceptual contribution of this PERG is terminological precision. It defines robustness in personalization as the conjunction of factuality and appropriate preference incorporation, rather than treating preference alignment alone as sufficient. This suggests that some apparent personalization gains may mask accuracy regressions unless evaluated on the subset of queries already solved correctly without personalization.

7. Conceptual distinctions and points of contact

The three PERG usages differ at the level of formal object, supervision signal, and output space. Probabilistic Edge Replacement Grammars define a distribution over terminal graphs via rule applications. Personalized Review Generation conditions text generation on retrieved graph context under strict temporal cutoffs. Personalized Evaluation of Robustness in Generation defines metrics over model behavior under preference conditioning (Reddy et al., 2019, Au et al., 9 Apr 2026, Okite et al., 18 Sep 2025).

Their commonality lies mostly in structured conditioning. In the graph-grammar setting, structure appears in the decomposition of graphs into non-squeezable atoms. In PeReGrINE, structure appears in the bipartite graph VV31, the retrieval functions VV32 and VV33, and the separation between product consensus and user style. In the robustness framework, structure appears in the partition between relevant and irrelevant preferences and in the decomposition of failure into breakage and alignment failure. A plausible implication is that the repeated reuse of “PERG” reflects a broader interest in explicit structure—graphical, temporal, or preference-theoretic—as a control mechanism for generation.

Because these are distinct constructs, citations should be disambiguated at first mention in technical writing. In one context, PERG means a probabilistic grammar for graphs; in another, it means a benchmarked setup for personalized review synthesis; in another, it means an evaluation framework and dataset for robustness under personalization. Without such disambiguation, statements about “learning,” “generation,” “retrieval,” or “robustness” can easily be misattributed across unrelated literatures.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to PERG.