Documentation

Linglib.Comparisons.SDSandRSA

SDS Concepts ≈ LU-RSA Lexica #

In SDS, a concept is a mapping from a word form to its extension in context. This is exactly what a lexicon does in LU-RSA.

SDS Formulation #

For word w, concept c:

LU-RSA Formulation #

For utterance u, lexicon L:

Correspondence #

SDSLU-RSA
Word wUtterance u
Concept cLexicon L
Extension ext(w, c)⟦u⟧_L (meaning of u under L)
P(c)P(L) (lexicon prior)
structure Comparisons.SDSandRSA.Concept (Word Entity : Type) :

A concept in SDS: maps word forms to extensions (Boolean predicates over entities).

This is the discrete counterpart to LU-RSA's Lexicon.

  • extension : WordEntityBool

    The extension function: given a word, which entities satisfy it?

Instances For

    Linear vs Multiplicative Combination #

    SDS uses Product of Experts (multiplicative):

    P(c | selectional, scenario) ∝ P_sel(c) × P_scen(c)
    

    CombinedUtility uses linear interpolation:

    U_combined = (1-λ)·U_A + λ·U_B
    

    Key Difference #

    When to Use Each #

    Use CaseMethodExample
    Multiple evidence sourcesProduct of ExpertsSDS selectional + scenario
    Competing objectivesLinearInformativity vs politeness
    Hard constraintsProduct (with 0s)SDS selectional filtering
    Soft tradeoffsLinearRSA relevance weighting
    def Comparisons.SDSandRSA.productOfExperts {α : Type} (p₁ p₂ : α) (support : List α) :
    α

    Product of Experts: multiplicative combination of distributions.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Linear combination: interpolation of utilities.

      Equations
      Instances For
        theorem Comparisons.SDSandRSA.poe_commutative {α : Type} (p₁ p₂ : α) (support : List α) (a : α) :
        productOfExperts p₁ p₂ support a = productOfExperts p₂ p₁ support a

        Product of experts is commutative: order of experts doesn't matter.

        theorem Comparisons.SDSandRSA.poe_zero_absorbing {α : Type} (p₁ p₂ : α) (support : List α) (a : α) :
        p₁ a = 0productOfExperts p₁ p₂ support a = 0

        Product of experts gives zero when either expert gives zero.

        Selectional Preferences → Structured Lexicon Priors #

        In SDS, selectional preferences constrain concept choice:

        P(c | role) = P(bat=ANIMAL | subject-of-SLEEP)
        

        In LU-RSA, this maps to structured lexicon priors:

        P(L | L encodes bat→ANIMAL) is higher when verb is SLEEP
        

        The Mapping #

        SDS selectional preference: P_sel(concept | semantic-role)

        LU-RSA equivalent: P(L) where L.meaning(word) matches selectional requirement

        Example: "A bat was sleeping" #

        SDS: P(bat=ANIMAL | subject-of(SLEEP)) is high because SLEEP selects animate LU-RSA: P(L_animal) > P(L_equipment) because L_animal satisfies animate constraint

        A semantic role with selectional constraints.

        • name : String
        • selectionalPref : Concept

          Prior probability of each concept filling this role

        Instances For

          SDS selectional preferences can be encoded as LU-RSA lexicon priors.

          Given:

          • A word w with concepts C = {c₁, c₂,...}
          • Selectional preference P_sel(c | role)

          The equivalent LU-RSA setup:

          • Lexica Λ = {L_c | c ∈ C} where L_c assigns w meaning c
          • Lexicon prior P(L_c) = P_sel(c | role)

          Scenario Constraints as World Priors / Background #

          In SDS, scenarios (frames/scripts) provide background knowledge:

          P(concept | scenario) = P(bat=EQUIPMENT | SPORTS-frame)
          

          In RSA, this maps to:

          Example: "A player was holding a bat" #

          SDS:

          LU-RSA equivalent:

          Connection to QUD-RSA #

          @cite{kao-etal-2014-hyperbole} QUD-sensitive RSA:

          L₁(w | u, q) ∝ S₁(u | w, q) × P(w | q)
          

          The QUD q can encode scenario effects by:

          A scenario (frame/script) is a distribution over concepts.

          • name : String
          • conceptDist : Concept

            P(concept | scenario)

          Instances For

            Scenarios can be modeled as QUD-induced priors in RSA.

            Complete Correspondence #

            SDS Inference #

            P(c | context) ∝ P_sel(c | role) × P_scen(c | frame)
            

            LU-RSA Inference #

            L₁(w, L | u) ∝ S₁(u | w, L) × P(L) × P(w)
            

            Mapping #

            SDS ComponentLU-RSA Component
            Concept cLexicon L
            P_sel(c | role)P(L) (lexicon prior, role-dependent)
            P_scen(c | frame)P(w) (world prior, frame-dependent)
            Product combinationMarginalization over L and w

            Insight #

            SDS's Product of Experts over (selectional × scenario) corresponds to LU-RSA's joint inference over (lexicon × world) with structured priors.

            SDS concept disambiguation is a special case of LU-RSA.

            Given:

            • SDS setup with concepts C, selectional P_sel, scenario P_scen
            • For each concept c, create lexicon L_c

            The SDS posterior: P(c | context) ∝ P_sel(c) × P_scen(c)

            Equals the LU-RSA marginal over lexica: P(L_c | u) ∝ Σ_w P(w) × P(L_c) × S₁(u | w, L_c)

            When P_sel encodes in P(L) and P_scen encodes in P(w).

            Worked Example: Conflicting Constraints #

            "The astronomer married the star"

            SDS Analysis #

            Concepts for "star":

            Selectional preference (MARRY):

            Scenario (ASTRONOMER frame):

            Product:

            Result: Tie → pun/zeugma reading emerges

            LU-RSA Analysis #

            Lexica:

            Priors encode selectional + scenario:

            Marginalization yields same tie.

            Instances For
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                Beyond the Correspondence: What's New in SDS? #

                While LU-RSA subsumes SDS's core mechanism, SDS contributes:

                1. DRS Integration #

                SDS explicitly links to Discourse Representation Structures:

                LU-RSA doesn't have explicit discourse structure.

                2. Scenario Induction #

                SDS uses LDA-style topic models for scenario inference:

                LU-RSA doesn't have this hierarchical structure.

                3. Explicit Factorization #

                SDS explicitly factors into selectional × scenario:

                LU-RSA combines everything into P(L), which can be opaque.

                4. Competing Constraints → Puns #

                SDS's factorization explains pun/zeugma emergence:

                What Linglib Should Import #

                From SDS into the LU-RSA framework:

                1. Factored priors: P(L) = P_sel(L) × P_scen(L)
                2. Scenario inference: Add scenario latent variable
                3. Conflict detection: When factors disagree, flag ambiguity
                def Comparisons.SDSandRSA.factoredLexiconPrior (C : Type) (sel scen : C) (support : List C) :
                C

                SDS-style factored lexicon prior: selectional × scenario.

                Equations
                Instances For
                  def Comparisons.SDSandRSA.listArgmax {α : Type} (xs : List α) (f : α) :

                  Find the element with maximum value according to a scoring function.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    def Comparisons.SDSandRSA.hasConflict {C : Type} [BEq C] (sel scen : C) (support : List C) :

                    Detect constraint conflict: when factors disagree on the argmax.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      Summary: SDS ⊆ LU-RSA #

                      Core Result #

                      SDS concept disambiguation is structurally equivalent to LU-RSA lexicon inference:

                      What SDS Adds #

                      1. Explicit factorization of constraints
                      2. DRS integration for discourse
                      3. LDA-style scenario induction
                      4. Conflict detection for puns

                      Linglib Integration #

                      SDS insights can enhance LU-RSA: