Combinatorial Entailment Network Completion

Research Question

Can LLMs derive novel relations through multi-hop reasoning over relational networks? How does performance scale with network density, path length, and model capability?

Hypothesis

Advanced models can derive novel relational paths through multi-hop reasoning, with performance scaling with model capacity and relation network density. The ability to perform combinatorial entailment (combining multiple relations to infer new ones) distinguishes higher-capability models from lower-capability ones.

Background & Motivation

In RFT, combinatorial mutual entailment is the ability to combine multiple learned relations to derive new ones. For example:

  • If you know “A > B” and “B > C”, you can derive “A > C” (transitivity)
  • If you know “Alice is-sibling-of Bob” and “Bob is-child-of Carol”, you can derive “Alice is-child-of Carol”
  • If you know “Paris is-in France” and “France is-in Europe”, you can derive “Paris is-in Europe”

This is more sophisticated than simple mutual entailment (reversal). It requires:

  1. Understanding properties of relations (which are transitive, symmetric, etc.)
  2. Path-finding through relational networks
  3. Composition of multiple inferential steps
  4. Handling relation type conflicts (not all relations compose the same way)

Humans perform this naturally. The question is: do LLMs exhibit genuine combinatorial entailment, or just pattern matching?

Implementation Approach

Dataset Design

1. Controlled Synthetic Networks

Create explicit relational networks with known structure:

Entities: {A, B, C, D, E, F, G, H}
Relations: {R1, R2, R3}

Given facts:
- R1(A, B), R1(B, C), R1(C, D)  [chain]
- R2(E, F), R2(F, G)
- R3(A, E), R3(D, H)

Properties:
- R1 is transitive: R1(x,y) ∧ R1(y,z) → R1(x,z)
- R2 is transitive
- R3 is not transitive

Test queries:
Q: "Is R1(A, D) true?"  [should derive: yes, via A→B→C→D]
Q: "Is R1(D, A) true?"  [should derive: no, unless shown R1 is symmetric]
Q: "Is R3(A, H) true?"  [should derive: no, R3 is not transitive]

2. Knowledge Graph Completion

Use existing knowledge graphs but test novel inferences:

Given:
- (Paris, capital_of, France)
- (France, located_in, Europe)
- (Eiffel_Tower, located_in, Paris)

Derive:
- (Eiffel_Tower, located_in, Europe) via transitivity of "located_in"
- (Paris, has_landmark, Eiffel_Tower) via inverse of "located_in"

But NOT:
- (Eiffel_Tower, capital_of, France) - wrong relation composition

3. Family Tree Reasoning

Family relations are rich in combinatorial structure:

Given:
- parent(Alice, Bob)
- parent(Bob, Charlie)
- parent(Alice, David)
- parent(David, Eve)

Derive:
- grandparent(Alice, Charlie)
- grandparent(Alice, Eve)
- sibling(Bob, David)
- cousin(Charlie, Eve)

Relations with different composition rules:
- parent ∘ parent = grandparent
- parent⁻¹ ∘ parent⁻¹ = sibling (if same parent)
- parent ∘ parent⁻¹ ∘ parent ∘ parent⁻¹ = cousin (if same grandparent)

4. Path Complexity Variations

Test networks with varying path lengths:

  • 1-hop: Direct relations (baseline)
  • 2-hop: A→B→C derivations
  • 3-hop: A→B→C→D derivations
  • 4+ hop: Longer chains
  • Multiple paths: A→C via different routes (test path consistency)
  • Dead ends: Paths that don’t lead to valid inferences

Evaluation Design (Inspect AI)

@task
def combinatorial_entailment(
    network_type: str = "synthetic",  # synthetic, knowledge_graph, family_tree
    max_hops: int = 3,
    network_density: float = 0.3,  # edge density
    include_non_transitive: bool = True,
):
    """
    Test combinatorial entailment through network completion.

    For each network:
    1. Provide base facts (edges in the graph)
    2. Optionally provide relation properties (transitive, symmetric, etc.)
    3. Query for derived facts that require multi-hop inference
    4. Score on accuracy of derived relations

    Metrics:
    - Accuracy by hop distance (1-hop, 2-hop, 3-hop, etc.)
    - Precision/recall on derived relations
    - Error analysis: What types of errors (wrong relation, wrong direction, wrong entity)?
    """
    return Task(
        dataset=generate_relational_network(
            network_type, max_hops, network_density, include_non_transitive
        ),
        solver=[
            system_message(NETWORK_REASONING_PROMPT),
            provide_network_facts(),
            optional_relation_properties(),  # varies whether we tell model properties
            generate(),
        ],
        scorer=network_completion_scorer(max_hops),
    )

Experimental Variations

Variation 1: Explicit vs. Implicit Relation Properties

Explicit: Tell the model “R1 is transitive” Implicit: Show examples and expect model to infer transitivity

This tests whether models can learn relational properties from examples.

Variation 2: Chain-of-Thought Scaffolding

No scaffolding: Direct query → answer With CoT: “Explain your reasoning step by step”

This tests whether models can articulate the inferential path.

Variation 3: Noisy Networks

Add irrelevant facts and non-compositional relations to test:

  • Selective attention to relevant paths
  • Ability to avoid spurious inferences

Scoring Metrics

  1. Accuracy by Hop Distance

    • 1-hop (direct): Baseline
    • 2-hop: First-level composition
    • 3-hop: Multi-step reasoning
    • 4+ hop: Extended reasoning chains
  2. Precision/Recall

    • Precision: Of inferred relations, how many are correct?
    • Recall: Of correct relations, how many were inferred?
  3. Path Accuracy

    • Can model articulate the correct inferential path (A→B→C)?
  4. Relation Property Understanding

    • Does model correctly apply transitivity?
    • Does model avoid applying transitivity to non-transitive relations?
    • Does model understand symmetry, reflexivity?
  5. Network Density Effects

    • How does accuracy change as network gets denser (more edges)?

Expected Outcomes

Capability Tiers

We predict stratification:

Frontier models (Claude Opus, GPT-4):

  • High accuracy up to 3-4 hops
  • Can learn relation properties from examples
  • Articulate correct reasoning paths

Mid-tier models:

  • Good on 1-2 hops
  • Struggle with 3+ hops
  • May overgeneralize transitivity

Smaller models:

  • Only reliable on direct relations
  • Fail to compose multi-hop inferences

Scaling Laws

If we find:

  • Accuracy decreases exponentially with hop count
  • But rate of decrease varies by model tier
  • Network density has threshold effects

Then we have evidence for combinatorial entailment as a capability dimension.

Relation to Intelligence

If combinatorial entailment performance correlates with:

  • Multi-step reasoning benchmarks
  • Mathematical problem solving
  • Logical reasoning tasks

Then it supports the hypothesis that relational reasoning is fundamental to intelligence.

Connection to RFT

This directly tests combinatorial mutual entailment, one of the core pillars of RFT. In RFT terms:

  • Models should exhibit derived relational responding: inferring new relations without direct training
  • Performance should improve with relational network density: more connections enable more derivations
  • This is a prerequisite for arbitrarily applicable relational responding: generalizing to novel domains

Implementation Steps

  1. ✅ Create research proposal document
  2. ⬜ Design synthetic network generator with configurable properties
  3. ⬜ Implement knowledge graph sampling from Wikidata/YAGO
  4. ⬜ Build family tree generator with known composition rules
  5. ⬜ Create relation property specifications (transitive, symmetric, etc.)
  6. ⬜ Develop network completion scorer with hop-distance tracking
  7. ⬜ Build Inspect AI tasks with network density variations
  8. ⬜ Run baseline experiments (1-2 hop, explicit properties)
  9. ⬜ Scale to 3-4+ hops and implicit property learning
  10. ⬜ Analyze accuracy vs. hop distance curves
  11. ⬜ Test with/without chain-of-thought
  12. ⬜ Compare to knowledge graph completion benchmarks
  • Knowledge Graph Completion:

    • Bordes et al. (2013): Translating Embeddings (TransE)
    • ConvE, RotatE, and other KG embedding methods
  • Multi-Hop Reasoning:

    • HotpotQA dataset
    • Welbl et al. (2018): Constructing Datasets for Multi-hop Reading Comprehension
  • Logical Reasoning:

    • RuleTaker benchmark
    • Clark et al. (2020): Transformers as Soft Reasoners
  • RFT Literature:

    • Hayes et al. (2001): Derived relational responding
    • O’Hora et al. (2008): Nodes and relations in relational networks

Open Questions

  • Can we identify specific attention patterns that correspond to path-finding?
  • Does fine-tuning on synthetic networks improve real-world knowledge graph reasoning?
  • Are there relation types that are systematically easier/harder to compose?
  • How does performance compare to symbolic graph reasoning systems?
  • Can models learn new relation composition rules from examples?