Papers
Topics
Authors
Recent
Search
2000 character limit reached

QG-PPR: Personalized PageRank for Logic

Updated 20 January 2026
  • The paper introduces QG-PPR as a scalable framework that leverages personalized PageRank for efficient, query-guided inference in first-order logic.
  • It constructs a localized proof graph using restart edges and probabilistic transitions to bias the search toward short, high-probability proofs.
  • Empirical results show improved mean average precision and AUC over MLNs with significant gains in inference speed and scalability.

Question-Guided Personalized PageRank (QG-PPR) is a framework for efficient probabilistic inference in first-order logic representations, formulated to enable scalable, locally groundable reasoning over large databases. QG-PPR, as implemented in ProPPR, interprets query answering as a personalized PageRank process over a query-induced proof graph, leveraging local search and restart mechanisms to bias inference toward short proofs and high-probability answers. The approach supports efficient, parallelizable inference and learning, with empirical performance advantages over Markov Logic Networks (MLNs) on entity resolution tasks (Wang et al., 2013).

1. Formal Foundations and Semantics

QG-PPR is built atop a definite-clause logic program LP={c1,,cn}LP = \{c_1, \ldots, c_n\} and a database DBDB of unit facts. A query QQ is represented as a conjunction of literals R1RkR_1 \land \ldots \land R_k. The proof state at any step is encoded as u=(Qtransformed,subgoal list)u = (Q_{\text{transformed}}, \text{subgoal list}), where QtransformedQ_{\text{transformed}} is the query with substitutions applied to date, and the subgoal list records the remaining goals to prove.

The initial or start node v0v_0 is (Q,Q)(Q, Q), while a solution node has an empty subgoal list and is denoted by the symbol \Box. The SLD proof graph GG'—potentially infinite in size—captures the space of all proofs of DBDB0 using DBDB1 and DBDB2. QG-PPR extends DBDB3 by adding restart edges to create DBDB4.

Inference is defined as a random walk with restarts, seeded at DBDB5, over DBDB6. Personalized PageRank computes a probability distribution over solution nodes (ground answers DBDB7), structurally favoring nodes closer to DBDB8 through the restart mechanism.

2. Query-Induced Grounding Graph Construction

Each node DBDB9 in QQ0 is a proof state of the form QQ1. For each QQ2 and each clause QQ3 in QQ4, if the leftmost subgoal QQ5 unifies with QQ6 via most general unifier QQ7, a proof edge is created:

  • QQ8, where QQ9,
  • Each edge is annotated by a feature vector R1RkR_1 \land \ldots \land R_k0, reflecting user-defined feature literals instantiated under R1RkR_1 \land \ldots \land R_k1.

Additionally, each node R1RkR_1 \land \ldots \land R_k2 receives a restart edge to R1RkR_1 \land \ldots \land R_k3 with feature annotation R1RkR_1 \land \ldots \land R_k4, biasing the walk toward short proofs. Database facts (unit clauses) act as degenerate clauses with feature R1RkR_1 \land \ldots \land R_k5.

This query-guided construction ensures that only those nodes reachable from R1RkR_1 \land \ldots \land R_k6—i.e., relevant to the query—are included in the grounding, promoting scalability.

3. Personalized PageRank on Proof Graphs

Transitions within R1RkR_1 \land \ldots \land R_k7 are governed by a row-stochastic matrix R1RkR_1 \land \ldots \land R_k8, with transitions parameterized as:

  • R1RkR_1 \land \ldots \land R_k9, typically with u=(Qtransformed,subgoal list)u = (Q_{\text{transformed}}, \text{subgoal list})0,
  • Transition probabilities for each neighbor u=(Qtransformed,subgoal list)u = (Q_{\text{transformed}}, \text{subgoal list})1 are normalized such that u=(Qtransformed,subgoal list)u = (Q_{\text{transformed}}, \text{subgoal list})2,
  • The restart edge from u=(Qtransformed,subgoal list)u = (Q_{\text{transformed}}, \text{subgoal list})3 to u=(Qtransformed,subgoal list)u = (Q_{\text{transformed}}, \text{subgoal list})4 is assigned probability u=(Qtransformed,subgoal list)u = (Q_{\text{transformed}}, \text{subgoal list})5, with the remaining mass u=(Qtransformed,subgoal list)u = (Q_{\text{transformed}}, \text{subgoal list})6 distributed over proof edges.

The personalized PageRank vector u=(Qtransformed,subgoal list)u = (Q_{\text{transformed}}, \text{subgoal list})7 is defined as the stationary distribution:

u=(Qtransformed,subgoal list)u = (Q_{\text{transformed}}, \text{subgoal list})8

where u=(Qtransformed,subgoal list)u = (Q_{\text{transformed}}, \text{subgoal list})9 is a unit vector at the start node. Power iteration is used in practice for convergence:

QtransformedQ_{\text{transformed}}0

4. Local Inference via PageRank-Nibble-Prove

To achieve localized, query-specific inference, ProPPR employs the Andersen–Chung–Lang “PageRank-Nibble” method. This procedure simultaneously approximates QtransformedQ_{\text{transformed}}1 for the seed QtransformedQ_{\text{transformed}}2 and enumerates a compact subgraph QtransformedQ_{\text{transformed}}3 sufficient for inference within controlled error.

A high-level pseudocode for PageRank-Nibble-Prove is as follows:

GG'4

Here, QtransformedQ_{\text{transformed}}4 is a lower bound on the restart probability (typically set to QtransformedQ_{\text{transformed}}5), and QtransformedQ_{\text{transformed}}6 specifies the error tolerance. The algorithm ensures that after each push, QtransformedQ_{\text{transformed}}7 remains an exact PPR vector for QtransformedQ_{\text{transformed}}8, and when the loop terminates, QtransformedQ_{\text{transformed}}9 approximates v0v_00 with error v0v_01 per node. The constructed subgraph v0v_02 contains only visited edges—providing a “local grounding” for v0v_03.

5. Theoretical Properties

The Andersen–Chung–Lang theorem asserts that if v0v_04 are the nodes successively pushed in PageRank-Nibble-Prove, then:

v0v_05

Hence, the number of edges in v0v_06 is at most v0v_07. Both inference time and grounding size are thus v0v_08, independent of the database size v0v_09 or the full proof graph's size. This establishes rigorous scalability guarantees.

6. Weight Learning and Parallelization

Supervised learning is supported using triples (Q,Q)(Q, Q)0, where (Q,Q)(Q, Q)1 and (Q,Q)(Q, Q)2 are the sets of correct and incorrect answers for (Q,Q)(Q, Q)3. After running PageRank-Nibble-Prove to obtain (Q,Q)(Q, Q)4, pairwise learning examples are collected to impose (Q,Q)(Q, Q)5 for all (Q,Q)(Q, Q)6 pairs.

The pairwise squared-hinge loss is:

(Q,Q)(Q, Q)7

with total objective

(Q,Q)(Q, Q)8

using (Q,Q)(Q, Q)9 regularization with parameter \Box0. Gradients w.r.t. \Box1 are computed by backpropagating through power-iteration, in the style of Backstrom & Leskovec. Stochastic gradient descent is applied, with learning rate \Box2.

Parallelization is realized by running independent threads over separate queries \Box3, grounding and updating asynchronously ("Hogwild!" style). Since each local grounding is small, the per-thread computational cost is low, and wall-clock speedup is nearly linear in thread count.

7. Empirical Results and Comparison

On the CORA citation entity resolution task (1,295 citations, 132 ground-truth papers), queries assess the predicate \Box4. The applied ProPPR program employs approximately 14 clauses over four predicates (author, title, venue, transitive closures) with feature annotations.

Performance metrics include:

  • Mean average precision (MAP): Untrained ProPPR achieves \Box5 compared to MLN's \Box6, with ProPPR demonstrating roughly 8× faster inference.
  • After learning, AUCs for matching cite/author/venue/title attributes improve from \Box7 (untrained) to \Box8, outperforming MLN’s range of \Box9.
  • Inference time for ProPPR remains essentially constant as GG'0 increases, while MLN inference time increases substantially.
  • Learning scales nearly linearly with the number of threads; up to GG'1–GG'2 speedups are observed with 16 cores.

All aspects of QG-PPR—graph construction, inference, and learning—are query-guided, ensuring the computation remains focused on those portions of the logic program and database relevant to GG'3, with a strong theoretical guarantee that the resulting computational cost is independent of database size (Wang et al., 2013).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

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 Question-Guided Personalized PageRank (QG-PPR).