---
title: 'Dynamic Query Expansion: Boosting Search Performance'
url: https://www.emergentmind.com/topics/dynamic-query-expansion-dqe
type: topic
---

# Dynamic Query Expansion: Boosting Search Performance

Probabilistic Soft Logic (PSL) is a statistical relational learning and probabilistic programming framework that models relational domains by relaxing logical atoms from Boolean values into the continuous interval $[0,1]$. This real-valued semantics supports the efficient representation of uncertainty and relational structure using weighted logical rules. The resulting inference tasks can be formulated as convex optimization problems, enabling scalability orders of magnitude beyond discrete alternatives such as Markov Logic Networks (MLNs). PSL has found application in domains that require integrating noisy and structured information, such as natural language understanding, social network analysis, drug-target prediction, and neural-symbolic reasoning.

## 1. Syntax, Semantics, and Basic Inference

PSL expresses models as sets of weighted first-order logic rules or clauses. Each atom is assigned a soft truth value $p(a) \in [0, 1]$ rather than being strictly true or false. A PSL program defines a set of weighted, ground rules of the general form
$$
\lambda : (a_1 \land \dots \land a_n) \to b
$$
where $\lambda \ge 0$ is a rule weight. Each rule is grounded over all possible instantiations, yielding a large set of ground rules.

Rule bodies and heads are mapped to real values using fuzzy logic operators, most commonly the Łukasiewicz t-norm:
$$
\text{Conjunction:} \quad \bigwedge_{i=1}^n p(a_i) = \max\left\{0, \sum_{i=1}^n p(a_i) - (n-1)\right\}
$$
$$
\text{Implication:} \quad a \to b := \min\{1, 1 - p(a) + p(b)\}
$$

The degree to which a ground rule is violated is measured by its "distance to satisfaction":
$$
d = \max\{\text{truth of antecedent} - \text{truth of consequent}, 0\}
$$
The total energy function is a nonnegative, weighted sum of (possibly squared) hinge-loss terms over all ground rules.

The central inference task is Maximum A Posteriori (MAP) estimation:
$$
\min_{p(a) \in [0,1]} \sum_{\text{rules}} \lambda_{\text{rule}}\cdot d_{\text{rule}}^{p}
$$
for $p=1$ (linear) or $p=2$ (quadratic). The convexity of the objective, ensured by the properties of the t-norm, enables efficient optimization via methods such as ADMM (Alternating Direction Method of Multipliers), even for models with millions of ground rules [1505.04406].

## 2. Selection and Theory of t-Norms in PSL

A critical design decision in PSL is the choice of conjunction (t-norm) operator. The original PSL formulation selects the Łukasiewicz t-norm due to its convexity and its consistency with the Fréchet bounds:
$$
\max\left\{\sum_{i=1}^n p_i - (n-1), 0\right\} \leq \Sigma(p_1, \ldots, p_n) \leq \min_i p_i
$$
Convexity is required for tractable inference; under these conditions, Baral & Kreinovich establish that the Łukasiewicz t-norm is the unique convex t-norm consistent with the Fréchet constraints [1611.06631].

Generalizing, a one-parameter family of convex, permutation-invariant, piecewise-linear t-norms is also supported in PSL:
$$
\Sigma_c(p_1,\ldots,p_n) = \max\left\{c\cdot\sum_{i=1}^n p_i - (nc-1), 0\right\}, \quad 1/n \leq c \leq 1
$$
Here, $c=1$ recovers Łukasiewicz (hard conjunction), and $c=1/n$ recovers the arithmetic mean (soft averaging). For $c\in(1/n,1)$, the conjunction interpolates between hard and soft semantics, sacrificing associativity but retaining convexity and commutativity. This flexibility supports adaptation to a variety of domains, such as semantic similarity, where soft averaging better reflects graded relationships [1611.06631].

## 3. Probabilistic Semantics and Relationship to Markov Logic

PSL can be viewed as a many-valued fuzzy logic generalization of the Markov Logic Network paradigm. In PSL, the model's unnormalized probability density on a (ground) interpretation $I: \{a\} \to [0,1]$ is
$$
\hat{f}_\Pi(I) = \exp\left(-\sum_{(w:R^{\hat{k}})\in\Pi} w \cdot d_R(I)^k\right)
$$
where $d_R(I)$ is the rule violation (as above). The density is normalized over all $[0,1]^{|\sigma|}$ assignments.

On Boolean truth assignments, PSL density collapses (up to a constant) to the MLN weight of satisfied formulas. To recover classical, Boolean semantics, "crispifying" rules of infinite weight ($p \otimes_l \neg p \to_l p$) can be added, forcing variables to take values in $\{0,1\}$ and yielding exact equivalence in MAP states with MLN [1606.08896].

The key distinction is that while MLN allows arbitrary first-order formulas but at the cost of intractable MAP inference (NP-hard), PSL restricts rule syntax (Lukasiewicz connectives, clause form) to guarantee convexity and efficiently solves the MAP problem [1505.04406, 1606.08896].

## 4. Structure Learning and Model Induction

Learning PSL model structure (i.e., discovering the set of weighted logical rules) from data is nontrivial due to the combinatorial space of possible clauses. Two primary approaches are prominent [1807.00973]:

- **Greedy Local Search (GLS):** Iteratively adds clauses from a candidate pool using improvement in pseudolikelihood as the objective. While conceptually straightforward, each iteration requires weight re-learning, and scalability is limited.

- **Piecewise Pseudolikelihood (PPLL):** Fully factorizes the objective across clauses and variables. One global, parallelizable convex optimization is performed over all candidate clauses, dropping those with zero weight. This yields an order-of-magnitude speedup and often superior predictive performance, as shown by up to 15% AUC gain on real-world SRL tasks.

Path-constrained clause generation, such as via the Path Ranking Algorithm (PRA), efficiently creates high-quality candidate clauses. Complexity analyses confirm PPLL's scalability to hundreds or thousands of rules [1807.00973].

## 5. Extensions: Integration with Deep Learning and Neuro-Symbolic Inference

Several recent developments extend PSL to hybrid neuro-symbolic systems by parameterizing predicates using neural networks, enabling the integration of perception and symbolic reasoning:

- **NeuPSL**: Embeds neural predicate outputs into the PSL energy function, allowing joint, end-to-end learning and inference over both neural parameters and symbolic rule weights. Convex inference over continuous variables is coupled with backpropagation through neural leaf nodes, supporting tasks such as MNIST-addition and citation classification [2205.14268].

- **DeepPSL**: Enables gradient-based training through the HL-MRF inference problem via approximate surrogate gradients, supporting multimodal tasks directly from raw inputs (images, text, etc.). Scalability to models with millions of ground rules is demonstrated [2109.13662].

- **Neural PSL for DSI (NEUPSL DSI):** Imparts domain knowledge into latent-variable neural models for dialog structure induction through PSL-style hinge-loss constraints. The resulting system displays substantially improved performance and few-shot generalization in dialog parsing [2403.17853].

- **PSL as Regularizer:** PSL hinge-loss terms can regularize deep models, enforcing logical consistency during training. For example, in clinical temporal relation extraction, PSL-inspired penalties on transitivity and symmetry improve model F$_1$ without the overhead of MAP inference at test time [2012.08790].

These neuro-symbolic architectures leverage the tractability and expressivity of convex PSL inference to enforce or inject domain knowledge and structure into otherwise unconstrained neural learning.

## 6. Applications and Empirical Results

PSL has been successfully applied to domains requiring both rich relational modeling and scalable inference. Selected examples include:

- **Drug-Target Interaction (DTI):** Meta-path-based PSL models aggregate multiple similarity types and relations using meta-path counts as observed atoms, yielding significant AUC/AUPR gains and massive reductions (orders of magnitude) in inference time over baselines in DTI prediction [2306.13770].

- **Natural Language Processing:** PSL has integrated multi-layered linguistic analyses (tokenization, POS tags, dependency parsing, AMR) using cross-domain predicates and co-constraints, achieving coherent normalization and sense disambiguation of learner language [2004.07000].

- **Document Classification and Entity Resolution:** Relational inference in semi-supervised classification and collective entity disambiguation tasks, outperforming both non-relational neural methods and symbolic-only systems, especially when logic and deep learning are jointly optimized [2205.14268, 2109.13662].

- **Dialog Structure Induction:** Enforcement of few, interpretable PSL constraints greatly improves maximally informative latent state discovery and downstream performance in dialog parsing, especially when little supervision is present [2403.17853].

- **Clinical Temporal Relation Extraction:** PSL-style transitivity and symmetry constraints, applied as regularizers during deep language model training, yield 1–2% absolute F$_1$ improvements over standard BERT or ILP-based approaches [2012.08790].

Empirical evaluations consistently confirm PSL's tractability (linear scaling in number of ground rules, billions-level feasibility), flexibility (adjustable logical semantics via t-norm parameterization), and its practical advantage as a unifying backbone for neuro-symbolic models [1505.04406, 1611.06631, 2109.13662].

## 7. Assumptions, Limitations, and Computational Properties

PSL operates under several syntactic and semantic constraints:
- Rules must be built from Lukasiewicz t-norms/conorms and standard negation; arbitrary logical connectives are not permitted.
- All variables are grounded to finite domains before inference.
- Weights are non-negative, and exponents $k \in \{1,2\}$.

These restrictions guarantee MAP inference is a convex optimization problem (linear or quadratic program), enabling polynomial-time solution (up to numerical tolerances). Marginal inference remains #P-hard over $[0,1]^n$ and is generally approximated via variational or sampling methods. While PSL sacrifices maximal generality compared to MLNs (which can encode arbitrary logics), it achieves scalability and is well-suited to large-scale, noisy, or partially reliable structured domains [1606.08896, 1505.04406].

PSL’s probabilistic semantics and convex weighting generalize the log-linear model of MLN from Boolean to many-valued logics, situating PSL as the convex, many-valued analogue to Boolean, combinatorial SRL frameworks.

---

**References:**  
[1505.04406] Hinge-Loss Markov Random Fields and Probabilistic Soft Logic  
[1611.06631] On Selecting a Conjunction Operation in Probabilistic Soft Logic  
[1807.00973] Scalable Structure Learning for Probabilistic Soft Logic  
[1606.08896] On the Semantic Relationship between Probabilistic Soft Logic and Markov Logic  
[2205.14268] NeuPSL: Neural Probabilistic Soft Logic  
[2109.13662] DeepPSL: End-to-end perception and reasoning  
[2306.13770] Meta-Path-based Probabilistic Soft Logic for Drug-Target Interaction Prediction  
[2403.17853] Using Domain Knowledge to Guide Dialog Structure Induction via Neural Probabilistic Soft Logic  
[2012.08790] Clinical Temporal Relation Extraction with Probabilistic Soft Logic Regularization and Global Inference  
[2004.07000] Exploring Probabilistic Soft Logic as a framework for integrating top-down and bottom-up processing of language in a task context

Source: https://www.emergentmind.com/topics/dynamic-query-expansion-dqe