Causal Cognition: Tutorial 3¶

Learning Causal Relationships¶

Blicket Experiment: Categorize items based on their Blicketness¶

(Sobel et al., 2004; Gopnik et al. 2004)

Blicket Detector: $A \& B$ activate detector

Inference Condition A alone does not actvate detector.

  • Is A a blicket? (6% yes)
  • Is B a blicket? (100% yes)

Blocking Condition A alone does activate detector.

  • Is A a blicket? (99% yes)
  • Is B a blicket? (35% yes)

Purely associative learning could not capture these judgements.

More evidence for the transition from Rescorla-Wagner-> Causal-Power -> causal structure induction.

Generalizing Causal Relationships¶

Lucas et al., (2014)

Three training objects: A, B, C

Three test objects D, E, F

blickets-ood.png

Which objects in the training phase can be inferred as blickets?

How do the training conditions affect inferences in the test phase?

Experiment Results¶

blickets-results.png

What do these results suggest with respect to children and adults' causal learning?

Modeling the task¶

Rescorla-Wagner (Purely associational)¶

$$ V_{X}^{(n+1)} = V_{X}^{(n)} + \alpha_{X} \beta (\lambda - V_{tot}) $$

  • $V_{x}$: strength in predicting outcome from object $X$ (blicket detector in this case)
  • $\lambda$ : outcome reward (0 or 1 in this case for blicket detector)
  • $\alpha_X$ : salience of $X$ (free-parameter)
  • $\beta$: rate parameter (how much we weigh new observations)
  • $V_{tot}$ : total prediction
In [ ]:
import numpy as np
import matplotlib.pyplot as plt
In [ ]:
def update_RW(values,objects, alpha=1, beta=0.5,lambda_blicket = 1):
    
    V_tot = sum([V_x for i,V_x in enumerate(values) if i in objects])
    delta_V = alpha*beta*(lambda_blicket-V_tot)

    return [V_x + (delta_V if i in objects else 0) for i,V_x in enumerate(values) ]
In [ ]:
objects = [0,1,2]
object_names = ['triangle','circle','cube']
train_objects = [
    [0], # triangle
    [1], # circle
    [2], # cube
    [0,1], # triangle & circle
    [0,2], # triangle & cube
    [1,2], # circle & cube
]

train_outcomes_conj = [0,0,0,0,1,0] # conjunctive blicket detector outcomes
train_outcomes_disj = [1,0,1,1,1,1] # disjunctive blicket detector outcomes 


test_names = ['cone','star','sphere']
test_objects = [
    [0], # cone
    [0], # cone
    [0], # cone
    [1], # star
    [0,2], # cone & sphere
    [0,2], # cone & shpere
]
test_outcomes = [0,0,0,0,1,1]
In [ ]:
n_samples = len(train_objects)
n_objects = len(objects)

vs_disj = np.zeros((n_samples+1,n_objects))
vs_conj = np.zeros((n_samples+1,n_objects))
vs_test = np.zeros((n_samples+1,n_objects))

alpha= .3
beta = .3

for i in range(n_samples):
    vs_conj[i+1] = update_RW(vs_conj[i],train_objects[i],alpha=alpha,beta=beta,lambda_blicket=train_outcomes_conj[i])  
    vs_disj[i+1] = update_RW(vs_disj[i],train_objects[i],alpha=alpha,beta=beta,lambda_blicket=train_outcomes_disj[i]) 
    vs_test[i+1] = update_RW(vs_test[i],test_objects[i],alpha=alpha,beta=beta,lambda_blicket=test_outcomes[i]) 
In [ ]:
vs = [vs_conj,vs_disj]
xticks = np.arange(len(train_objects)+1)
fig,axes = plt.subplots(nrows=1,ncols=2,figsize=(12,5))
for ax_i,ax in enumerate(axes):
    for i in range(n_objects):
        ax.plot(xticks,vs[ax_i][:,i],ls='-',alpha=.5,label=object_names[i],lw=3)
        ax.legend()
    ax.set_xticks(xticks)
    ax.set_title('Conjunctive' if ax_i==0 else 'Disjunctive')
    ax.set_xticklabels(['start']+[' '.join([object_names[x] for x in train_object]) for train_object in train_objects],rotation=30)
    
No description has been provided for this image
In [ ]:
fig,ax = plt.subplots()
xticks = np.arange(len(train_objects)+1)
for i in range(n_objects):
    ax.plot(vs_test[:,i],ls='-',alpha=.5,label=test_names[i],lw=3)
ax.legend()
ax.set_xticks(xticks)
ax.set_xticklabels(['start']+[' '.join([test_names[x] for x in test_object]) for test_object in test_objects],rotation=30)
ax.set_title('Test Phase')
plt.show()
No description has been provided for this image

Activity¶

Test your partner's hypothesis generalization of blicketness. In this activity you will pretend to be experimenters and participants, looking to see how well people generalize causal relationships from experiments.

Procedure

Experimenter:

From three objects (A,B,C), select at least one to be a blicket (and keep it a secret).

Then, you must pick a blicket machine:

  • Disjunctive (any blicket will make the machine go off)
  • Conjunctive (requires two blickets for the machine to go off)
  • Anything more complex
    • exactly 1 or 2 blickets
    • Blicket and a non Blicket (mean one)
    • etc.

Keep in mind that if your detecter requires 2 or 3 blickets then you should have at least that many blickets in your three objects (to be nice).

Participant

Your job as is to determine what objects are blickets, and if you can guess what makes the detector go off.

You have 6 experiments you can conduct selecting any set of the objects and place them on the machine. The experimenter will tell you if the detector turns on.

I recommend you write down your experiments.

Then the experimenter will ask 2 questions which the participant must answer:

  1. What objects are blickets?
  2. What makes the blicket detector go off?