Documentation

Studies.DaleReiter1995

Dale and Reiter, computational interpretations of the Gricean maxims (1995) #

A referring expression is a distinguishing description: a set of attribute-value pairs that all hold of the intended referent and that together rule out every member of the contrast set, which makes finding one a set-cover problem and finding a shortest one NP-hard. Dale and Reiter compare four computational readings of Grice's brevity submaxim, Full Brevity (a shortest description), Dale's Greedy Heuristic, Reiter's Local Brevity rules and their own Incremental Algorithm, which walks a fixed preference list of attributes and keeps any value that rules out a distractor not yet ruled out. They argue for the last on cost and on two psycholinguistic observations: speakers include unnecessary modifiers, which only the greedy and incremental algorithms produce, and speakers begin an expression before they have finished scanning the distractors, which only the incremental algorithm allows.

We define distinguishing descriptions and the four readings with a finite contrast set, prove that a shortest description satisfies Reiter's two rules while the greedy and incremental algorithms return unnecessary pairs on the paper's own examples, and prove that Fig. 6's output rules out every distractor, never retracts a pair and, under §4.5's accuracy user model, is a distinguishing description.

Implementation notes #

References #

Distinguishing descriptions (§2.2) #

@[reducible, inline]
abbrev DaleReiter1995.KB (E : Type u_4) (A : Type u_5) (V : Type u_6) :
Type (max (max u_4 u_5) u_6)

The value an entity has for an attribute in the host's knowledge base, if it has one (§4.1).

Equations
Instances For
    @[reducible, inline]
    abbrev DaleReiter1995.Description (A : Type u_4) (V : Type u_5) :
    Type (max u_5 u_4)

    The semantic content of a referring expression, a set of attribute-value pairs (§2.2).

    Equations
    Instances For
      def DaleReiter1995.Applies {E : Type u_1} {A : Type u_2} {V : Type u_3} (kb : KB E A V) (x : E) (p : A × V) :

      The pair holds of the entity.

      Equations
      Instances For
        @[instance_reducible]
        instance DaleReiter1995.instDecidableAppliesOfDecidableEq {E : Type u_1} {A : Type u_2} {V : Type u_3} [DecidableEq V] (kb : KB E A V) (x : E) (p : A × V) :
        Decidable (Applies kb x p)
        Equations
        def DaleReiter1995.extension {E : Type u_1} {A : Type u_2} {V : Type u_3} (kb : KB E A V) (L : Description A V) (x : E) :

        Every pair of a description holds of the entity.

        Equations
        Instances For
          @[instance_reducible]
          instance DaleReiter1995.instDecidableExtensionOfDecidableEq {E : Type u_1} {A : Type u_2} {V : Type u_3} [DecidableEq V] (kb : KB E A V) (L : Description A V) (x : E) :
          Decidable (extension kb L x)
          Equations
          def DaleReiter1995.Distinguishing {E : Type u_1} {A : Type u_2} {V : Type u_3} (kb : KB E A V) (r : E) (C : Finset E) (L : Description A V) :

          A distinguishing description of r against the contrast set C holds of r and distinguishes it from C, so that every pair holds of r and every distractor fails some pair.

          Equations
          Instances For
            @[instance_reducible]
            instance DaleReiter1995.instDecidableDistinguishingOfDecidableEq {E : Type u_1} {A : Type u_2} {V : Type u_3} [DecidableEq V] (kb : KB E A V) (r : E) (C : Finset E) (L : Description A V) :
            Decidable (Distinguishing kb r C L)
            Equations
            theorem DaleReiter1995.distinguishing_iff {E : Type u_1} {A : Type u_2} {V : Type u_3} {kb : KB E A V} {r : E} {C : Finset E} {L : Description A V} :
            Distinguishing kb r C L ↔ (∀ p ∈ L, Applies kb r p) ∧ ∀ c ∈ C, ∃ p ∈ L, ¬Applies kb c p
            def DaleReiter1995.rulesOut {E : Type u_1} {A : Type u_2} {V : Type u_3} [DecidableEq V] (kb : KB E A V) (C : Finset E) (p : A × V) :
            Finset E

            The members of the contrast set a pair rules out (§2.2).

            Equations
            Instances For
              theorem DaleReiter1995.distinguishing_iff_biUnion {E : Type u_1} {A : Type u_2} {V : Type u_3} [DecidableEq E] [DecidableEq V] (kb : KB E A V) (r : E) (C : Finset E) (L : Description A V) :
              Distinguishing kb r C L ↔ (∀ p ∈ L, Applies kb r p) ∧ C ⊆ Finset.biUnion L (rulesOut kb C)

              A description distinguishes when its pairs' rulesOut sets cover the contrast set, the set-cover problem of §2.2.

              Four interpretations of brevity (§3.1) #

              @[reducible, inline]
              abbrev DaleReiter1995.IsShortest {E : Type u_1} {A : Type u_2} {V : Type u_3} (kb : KB E A V) (r : E) (C : Finset E) (L : Description A V) :

              A distinguishing description of least cardinality, the Full Brevity reading (§3.1.1).

              Equations
              Instances For
                theorem DaleReiter1995.isShortest_of_card_two {E : Type u_1} {A : Type u_2} {V : Type u_3} {kb : KB E A V} {r : E} {C : Finset E} {L : Description A V} (hL : Distinguishing kb r C L) (h2 : Finset.card L = 2) (h0 : ¬Distinguishing kb r C ∅) (h1 : ∀ (p : A × V), ¬Distinguishing kb r C {p}) :
                IsShortest kb r C L

                A distinguishing description with two pairs is shortest once neither the empty description nor any single pair distinguishes.

                def DaleReiter1995.NoUnnecessary {E : Type u_1} {A : Type u_2} {V : Type u_3} (kb : KB E A V) (r : E) (C : Finset E) (L : Description A V) [DecidableEq A] [DecidableEq V] :

                A distinguishing description none of whose pairs can be dropped, Reiter's No Unnecessary Components rule (§3.1.3).

                Equations
                Instances For
                  def DaleReiter1995.LocallyBrief {E : Type u_1} {A : Type u_2} {V : Type u_3} (kb : KB E A V) (r : E) (C : Finset E) (L : Description A V) [DecidableEq A] [DecidableEq V] :

                  A description with no unnecessary pair in which no set of pairs can be replaced by a single new pair, Reiter's Local Brevity rule (§3.1.3).

                  Equations
                  Instances For
                    @[instance_reducible]
                    instance DaleReiter1995.instDecidableNoUnnecessary {E : Type u_1} {A : Type u_2} {V : Type u_3} (kb : KB E A V) (r : E) (C : Finset E) (L : Description A V) [DecidableEq A] [DecidableEq V] :
                    Decidable (NoUnnecessary kb r C L)
                    Equations
                    theorem DaleReiter1995.noUnnecessary_iff_minimal {E : Type u_1} {A : Type u_2} {V : Type u_3} {kb : KB E A V} {r : E} {C : Finset E} {L : Description A V} [DecidableEq A] [DecidableEq V] :
                    NoUnnecessary kb r C L ↔ Minimal (Distinguishing kb r C) L

                    Reiter's first rule is subset-minimality among distinguishing descriptions.

                    theorem DaleReiter1995.IsShortest.noUnnecessary {E : Type u_1} {A : Type u_2} {V : Type u_3} {kb : KB E A V} {r : E} {C : Finset E} {L : Description A V} [DecidableEq A] [DecidableEq V] (h : IsShortest kb r C L) :
                    NoUnnecessary kb r C L

                    A shortest description has no unnecessary pair, so Full Brevity never includes an unnecessary modifier (§3.2.1).

                    theorem DaleReiter1995.IsShortest.locallyBrief {E : Type u_1} {A : Type u_2} {V : Type u_3} {kb : KB E A V} {r : E} {C : Finset E} {L : Description A V} [DecidableEq A] [DecidableEq V] (h : IsShortest kb r C L) :
                    LocallyBrief kb r C L

                    A shortest description is locally brief.

                    def DaleReiter1995.fullBrevitySteps (na nl : ℕ) :
                    ℕ

                    Descriptions the exhaustive Full Brevity search checks, with na available attributes and a shortest description of nl pairs (§3.1.1).

                    Equations
                    Instances For
                      theorem DaleReiter1995.fullBrevitySteps_values :
                      fullBrevitySteps 3 2 = 6 ∧ fullBrevitySteps 10 3 = 175 ∧ 6000 < fullBrevitySteps 20 4 ∧ 2000000 < fullBrevitySteps 50 5

                      The paper's four counts, six for §2.2's example, 175, over 6,000 and over 2,000,000.

                      def DaleReiter1995.greedyAux {E : Type u_1} {A : Type u_2} {V : Type u_3} (kb : KB E A V) [DecidableEq A] [DecidableEq V] :
                      ℕ → Finset E → List (A × V) → Description A V → Option (Description A V)
                      Equations
                      • One or more equations did not get rendered due to their size.
                      • DaleReiter1995.greedyAux kb 0 x✝² x✝¹ x✝ = if x✝².Nonempty then none else some x✝
                      Instances For
                        def DaleReiter1995.greedy {E : Type u_1} {A : Type u_2} {V : Type u_3} (kb : KB E A V) (C : Finset E) [DecidableEq A] [DecidableEq V] (P : List (A × V)) :
                        Option (Description A V)

                        Fig. 3's Greedy Heuristic, which from the properties P true of the referent adds the one leaving the fewest distractors, the first in P on a tie, until none remain, and fails when P runs out.

                        Equations
                        Instances For

                          The Incremental Algorithm (§4, Fig. 6) #

                          The three values of Fig. 6's UserKnows (§4.1): the user knows the pair holds of the entity, knows it does not, or neither.

                          Instances For
                            @[instance_reducible]
                            Equations
                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              structure DaleReiter1995.Domain (E : Type u_4) (A : Type u_5) (V : Type u_6) :
                              Type (max (max u_4 u_5) u_6)

                              The head-noun attribute, basic-level values, value taxonomies and user model the host system supplies (§4.1).

                              • type : A

                                The attribute realized as the head noun (§2.2).

                              • depth : ℕ

                                The depth of the value taxonomies, bounding findBestValue's descent.

                              • basicLevel : E → A → Option V

                                The basic-level value of an attribute for an entity (BasicLevelValue).

                              • moreSpecific : E → A → V → Option V

                                The child of a value in the attribute's taxonomy that still subsumes the entity's own value (MoreSpecificValue).

                              • userKnows : E → A → V → Knowledge

                                What the user knows of the pair holding of the entity (UserKnows).

                              Instances For
                                def DaleReiter1995.Domain.flat {E : Type u_1} {A : Type u_2} {V : Type u_3} [DecidableEq V] (kb : KB E A V) (type : A) :
                                Domain E A V

                                A domain without value taxonomies whose user knows a pair to hold exactly when it is accurate, the user model of §4.5.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  theorem DaleReiter1995.Domain.flat_userKnows {E : Type u_1} {A : Type u_2} {V : Type u_3} [DecidableEq V] {kb : KB E A V} {t : A} (x : E) (a : A) (v : V) :
                                  ((flat kb t).userKnows x a v = Knowledge.holds ↔ kb x a = some v) ∧ ((flat kb t).userKnows x a v = Knowledge.fails ↔ ∃ (w : V), kb x a = some w ∧ w ≠ v)

                                  Under the accuracy user model, what the user knows is what the knowledge base records.

                                  def DaleReiter1995.Domain.rulesOut {E : Type u_1} {A : Type u_2} {V : Type u_3} (d : Domain E A V) (C : Finset E) (a : A) (v : V) :
                                  Finset E

                                  The remaining distractors the user knows not to bear the pair (Fig. 6, RulesOut).

                                  Equations
                                  Instances For
                                    def DaleReiter1995.Domain.findBestValue {E : Type u_1} {A : Type u_2} {V : Type u_3} (d : Domain E A V) (r : E) (C : Finset E) (a : A) :
                                    ℕ → V → Option V

                                    Fig. 6's FindBestValue, the initial value when the user knows it to hold of r, refined to a more specific value only when that rules out more distractors.

                                    Equations
                                    Instances For
                                      theorem DaleReiter1995.Domain.findBestValue_userKnows {E : Type u_1} {A : Type u_2} {V : Type u_3} (d : Domain E A V) (r : E) (C : Finset E) (a : A) (n : ℕ) (v w : V) :
                                      d.findBestValue r C a n v = some w → d.userKnows r a w = Knowledge.holds

                                      FindBestValue returns only values the user knows to hold of the referent.

                                      def DaleReiter1995.Domain.withType {E : Type u_1} {A : Type u_2} {V : Type u_3} (d : Domain E A V) [DecidableEq A] [DecidableEq V] (r : E) (L : Description A V) :

                                      Fig. 6's return, which always includes a head noun, the basic-level type added without a UserKnows check.

                                      Equations
                                      Instances For
                                        theorem DaleReiter1995.Domain.withType_subset {E : Type u_1} {A : Type u_2} {V : Type u_3} (d : Domain E A V) [DecidableEq A] [DecidableEq V] (r : E) (L : Description A V) :
                                        L ⊆ d.withType r L

                                        The return never retracts a pair.

                                        theorem DaleReiter1995.Domain.withType_mem {E : Type u_1} {A : Type u_2} {V : Type u_3} (d : Domain E A V) [DecidableEq A] [DecidableEq V] (r : E) (L : Description A V) {p : A × V} (hp : p ∈ d.withType r L) :
                                        p ∈ L ∨ d.basicLevel r p.1 = some p.2

                                        The return adds at most the basic-level head noun.

                                        def DaleReiter1995.Domain.step {E : Type u_1} {A : Type u_2} {V : Type u_3} (d : Domain E A V) [DecidableEq A] [DecidableEq V] [DecidableEq E] (r : E) (a : A) (C : Finset E) (L : Description A V) :
                                        Finset E × Description A V

                                        One attribute of Fig. 6's loop, whose best value is kept when it rules out a remaining distractor, those distractors being removed.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          theorem DaleReiter1995.Domain.step_subset {E : Type u_1} {A : Type u_2} {V : Type u_3} (d : Domain E A V) [DecidableEq A] [DecidableEq V] [DecidableEq E] (r : E) (a : A) (C : Finset E) (L : Description A V) :
                                          L ⊆ (d.step r a C L).2

                                          A step never retracts a pair (§4.3).

                                          theorem DaleReiter1995.Domain.step_mem {E : Type u_1} {A : Type u_2} {V : Type u_3} (d : Domain E A V) [DecidableEq A] [DecidableEq V] [DecidableEq E] (r : E) (a : A) (C : Finset E) (L : Description A V) {p : A × V} (hp : p ∈ (d.step r a C L).2) :
                                          p ∈ L ∨ d.userKnows r p.1 p.2 = Knowledge.holds

                                          A step adds only pairs the user knows to hold of the referent.

                                          theorem DaleReiter1995.Domain.step_ruledOut {E : Type u_1} {A : Type u_2} {V : Type u_3} (d : Domain E A V) [DecidableEq A] [DecidableEq V] [DecidableEq E] (r : E) (a : A) (C : Finset E) (L : Description A V) {c : E} (hc : c ∈ C) (hc' : c ∉ (d.step r a C L).1) :
                                          ∃ p ∈ (d.step r a C L).2, d.userKnows c p.1 p.2 = Knowledge.fails

                                          Every distractor a step removes is ruled out by the pair the step adds.

                                          def DaleReiter1995.Domain.loop {E : Type u_1} {A : Type u_2} {V : Type u_3} (d : Domain E A V) [DecidableEq A] [DecidableEq V] [DecidableEq E] (r : E) :
                                          Finset E → List A → Description A V → Option (Description A V)

                                          Fig. 6's loop over the preferred attributes.

                                          Equations
                                          • d.loop r x✝¹ [] x✝ = none
                                          • d.loop r x✝¹ (a :: rest) x✝ = if (d.step r a x✝¹ x✝).1.Nonempty then d.loop r (d.step r a x✝¹ x✝).1 rest (d.step r a x✝¹ x✝).2 else some (d.withType r (d.step r a x✝¹ x✝).2)
                                          Instances For
                                            def DaleReiter1995.Domain.makeReferringExpression {E : Type u_1} {A : Type u_2} {V : Type u_3} (d : Domain E A V) [DecidableEq A] [DecidableEq V] [DecidableEq E] (r : E) (C : Finset E) (P : List A) :
                                            Option (Description A V)

                                            Fig. 6's MakeReferringExpression, the Incremental Algorithm over the preferred attributes P, failing when they run out before the contrast set does.

                                            Equations
                                            Instances For
                                              theorem DaleReiter1995.Domain.loop_spec {E : Type u_1} {A : Type u_2} {V : Type u_3} (d : Domain E A V) [DecidableEq A] [DecidableEq V] [DecidableEq E] (r : E) (P : List A) (C : Finset E) (L L' : Description A V) :
                                              d.loop r C P L = some L' → ∃ (L₀ : Description A V), L' = d.withType r L₀ ∧ L ⊆ L₀ ∧ (∀ c ∈ C, ∃ p ∈ L₀, d.userKnows c p.1 p.2 = Knowledge.fails) ∧ ∀ p ∈ L₀, p ∈ L ∨ d.userKnows r p.1 p.2 = Knowledge.holds

                                              The loop returns through withType a description that never retracts a pair, rules out every remaining distractor and adds only pairs known to hold (§3.2.1's indelible generation, §4.3).

                                              theorem DaleReiter1995.Domain.makeReferringExpression_rulesOut {E : Type u_1} {A : Type u_2} {V : Type u_3} (d : Domain E A V) [DecidableEq A] [DecidableEq V] [DecidableEq E] {r : E} {C : Finset E} {P : List A} {L : Description A V} (h : d.makeReferringExpression r C P = some L) (c : E) :
                                              c ∈ C → ∃ p ∈ L, d.userKnows c p.1 p.2 = Knowledge.fails

                                              Fig. 6's output rules out every member of the contrast set (§4.3).

                                              theorem DaleReiter1995.Domain.makeReferringExpression_mem {E : Type u_1} {A : Type u_2} {V : Type u_3} (d : Domain E A V) [DecidableEq A] [DecidableEq V] [DecidableEq E] {r : E} {C : Finset E} {P : List A} {L : Description A V} (h : d.makeReferringExpression r C P = some L) (p : A × V) :
                                              p ∈ L → d.userKnows r p.1 p.2 = Knowledge.holds ∨ d.basicLevel r p.1 = some p.2

                                              Every pair of Fig. 6's output is known to the user to hold of the referent, except the head noun added at the end, which is the basic-level type (§4.3).

                                              theorem DaleReiter1995.Domain.makeReferringExpression_type {E : Type u_1} {A : Type u_2} {V : Type u_3} (d : Domain E A V) [DecidableEq A] [DecidableEq V] [DecidableEq E] {r : E} {C : Finset E} {P : List A} {L : Description A V} (h : d.makeReferringExpression r C P = some L) (hb : (d.basicLevel r d.type).isSome = true) :
                                              ∃ (v : V), (d.type, v) ∈ L

                                              Fig. 6's output carries a head noun whenever the referent has a basic-level type (§4.3).

                                              theorem DaleReiter1995.Domain.flat_distinguishing {E : Type u_1} {A : Type u_2} {V : Type u_3} [DecidableEq A] [DecidableEq V] [DecidableEq E] {kb : KB E A V} {t : A} {r : E} {C : Finset E} {P : List A} {L : Description A V} (h : (flat kb t).makeReferringExpression r C P = some L) :

                                              Under the accuracy user model the output is a distinguishing description (§2.2).

                                              The paper's examples #

                                              The head noun and the perceptual properties, the attributes of the paper's examples.

                                              Instances For
                                                def DaleReiter1995.instReprAttr.repr :
                                                Attr → ℕ → Std.Format
                                                Equations
                                                Instances For
                                                  @[instance_reducible]
                                                  Equations

                                                  The values of the paper's examples.

                                                  Instances For
                                                    @[instance_reducible]
                                                    Equations
                                                    def DaleReiter1995.instReprValue.repr :
                                                    Value → ℕ → Std.Format
                                                    Equations
                                                    Instances For

                                                      The two dogs and the cat (§2.2, §4.4) #

                                                      The three animals of §2.2 and §4.4.

                                                      Instances For
                                                        @[instance_reducible]
                                                        Equations
                                                        def DaleReiter1995.instReprAnimal.repr :
                                                        Animal → ℕ → Std.Format
                                                        Equations
                                                        • One or more equations did not get rendered due to their size.
                                                        Instances For

                                                          The domain of §4.4, in which the breeds are the only more specific values and the user knows a pair to hold exactly when it is accurate under the taxonomy.

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

                                                            No single pair distinguishes Object1, so the black dog is a shortest description (§3.1.1's six steps).

                                                            The breed rules out no more distractors than the basic-level type, so FindBestValue keeps dog (§4.4).

                                                            The seven cups (§3.1.2) #

                                                            The seven cups of §3.1.2.

                                                            Instances For
                                                              @[instance_reducible]
                                                              Equations
                                                              @[instance_reducible]
                                                              Equations
                                                              def DaleReiter1995.instReprCup.repr :
                                                              Cup → ℕ → Std.Format
                                                              Equations
                                                              Instances For

                                                                Size, colour and material of each cup.

                                                                Equations
                                                                Instances For

                                                                  The contrast set for Object1.

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

                                                                    Object1's properties in the paper's order.

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

                                                                      The greedy heuristic selects plastic first, then large and red, giving the large red plastic cup once the head noun is added (§3.1.2).

                                                                      The white bird (§3.2.1) #

                                                                      A picture of a white bird, a black cup and a white cup.

                                                                      Instances For
                                                                        @[instance_reducible]
                                                                        Equations
                                                                        def DaleReiter1995.instReprPicture.repr :
                                                                        Picture → ℕ → Std.Format
                                                                        Equations
                                                                        • One or more equations did not get rendered due to their size.
                                                                        Instances For

                                                                          The paper's speaker scans the black cup and says white, then scans the white cup and adds bird, which alone would have done (§3.2.1). The algorithm reproduces that output only with colour before type in the preference order; type first yields the bird.

                                                                          The colour-first output contains an unnecessary modifier, the behaviour of Observation 1 that Full Brevity and Local Brevity never produce (§3.2.1).