Prediction error determines how new experiences are encoded in memory, impacting fear extinction outcomes.