Cumulative culture depends on the fidelity of learning be-tween successive generations, and the robustness with whichthe lessons of one generation apply to the problems of the next.How do humans accomplish these twin goals? We formalizesocial learning as a kind of program induction, and provide anexperimental test of a key prediction. To do this, we exploit akey fact: When humans learn from others, in addition to ob-serving inputs and outputs we often observe the process thatled to that output. For instance, when preparing a meal, wedon’t just observe a pile of vegetables and then a ratatouille.Instead, we observe a causal process that transforms those in-gredients into a finished food. Here, we use probabilistic pro-grams to represent causal processes and show that the observa-tion of an execution trace speeds up program induction, evenwhen learning from only a single example. This model pre-dicts that the inferences and behavior of people will be struc-tured by these execution traces. In two behavioral experiments,we show that human judgments and behavior are affected bythe execution trace in the systematic ways predicted by our for-mal model. These findings shed light on the mechanisms thatunderlie high fidelity social learning in humans, and unify therole of emulation and imitation in social learning.