A method comprising: obtaining, using one or more computing devices, context data for a current context of a real self-driving vehicle in a real environment; determining, using the one or more computing devices, a contextually-determined action for the self-driving vehicle based on the obtained context data and a reasoning model for controlling the self-driving vehicle, wherein the reasoning model was determined based on multiple sets of training data, wherein the multiple sets of training data include multiple context data and action data pairings, and wherein determining the contextually-determined action for the self-driving vehicle comprises determining, using a premetric, closest context data in the multiple sets of training data that is closest to the current context based on the premetric and determining an action paired with the closest context data as the contextually-determined action for the self-driving vehicle, wherein the premetric is a distance measure; determining, using the one or more computing devices, whether performance of the contextually-determined action results in an indication of an anomaly for the self-driving vehicle; determining, using the one or more computing devices, a portion of the reasoning model that caused the determination of the contextually-determined action that resulted in the indication of the anomaly for the self-driving vehicle based on the obtained context data; updating, using the one or more computing devices, the portion of the reasoning model that caused the determination of the contextually-determined action that resulted in the indication of the anomaly for the self-driving vehicle, in order to produce a corrected reasoning model, wherein the updating comprises removing the closest context data and the action paired with the closest context data, and controlling the self-driving vehicle using the reasoning model; wherein updating the portion of the reasoning model further comprises: selecting, from the multiple sets of training data, one or more additional context-action data pairs similar to the closest context data and the action paired with the closest context data based on a similarity measure, each of the one or more additional context-action data pairs comprising additional context data and action data paired with the respective additional context data; and removing the selected one or more additional context-action data pairs. obtaining, using one or more computing devices, context data for a current context of a real self-driving vehicle in a real environment; determining, using the one or more computing devices, a contextually-determined action for the self-driving vehicle based on the obtained context data and a reasoning model for controlling the self-driving vehicle, wherein the reasoning model was determined based on multiple sets of training data, wherein the multiple sets of training data include multiple context data and action data pairings, and wherein determining the contextually-determined action for the self-driving vehicle comprises determining, using a premetric, closest context data in the multiple sets of training data that is closest to the current context based on the premetric and determining an action paired with the closest context data as the contextually-determined action for the self-driving vehicle, wherein the premetric is a distance measure; determining, using the one or more computing devices, whether performance of the contextually-determined action results in an indication of an anomaly for the self-driving vehicle; determining, using the one or more computing devices, a portion of the reasoning model that caused the determination of the contextually-determined action that resulted in the indication of the anomaly for the self-driving vehicle based on the obtained context data; updating, using the one or more computing devices, the portion of the reasoning model that caused the determination of the contextually-determined action that resulted in the indication of the anomaly for the self-driving vehicle, in order to produce a corrected reasoning model, wherein the updating comprises removing the closest context data and the action paired with the closest context data, and controlling the self-driving vehicle using the reasoning model; wherein updating the portion of the reasoning model further comprises: selecting, from the multiple sets of training data, one or more additional context-action data pairs similar to the closest context data and the action paired with the closest context data based on a similarity measure, each of the one or more additional context-action data pairs comprising additional context data and action data paired with the respective additional context data; and removing the selected one or more additional context-action data pairs. selecting, from the multiple sets of training data, one or more additional context-action data pairs similar to the closest context data and the action paired with the closest context data based on a similarity measure, each of the one or more additional context-action data pairs comprising additional context data and action data paired with the respective additional context data; and removing the selected one or more additional context-action data pairs.