A non-transitory computer-readable medium storing a program that causes a computer to execute:
- a data acquisition process of acquiring data to be input to a first layer included in a plurality of layers forming a learned model generated by multi-task learning;
- an inference result acquisition process of acquiring an inference result of a subtask, the inference result being output from a second layer, which is a layer subsequent to the first layer, by inputting the data to the first layer;
- a subtask label acquisition process of acquiring a subtask label corresponding to the data;
- a gradient calculation process of calculating a gradient in the data of a function using, as inputs, the inference result of the subtask and the subtask label;
- and
- an inference process of performing task inference using the data, the gradient, and the learned model.