Biological systems have to build models from their sensory input data that allow them to efficiently process previously unseen inputs. Here, we study a neural network learning a binary classification rule for these inputs from examples provided by a teacher. We analyse the ability of the network to apply the rule to new inputs, that is to generalise from past experience. Using stochastic thermodynamics, we show that the thermodynamic costs of the learning process provide an upper bound on the amount of information that the network is able to learn from its teacher for both batch and online learning. This allows us to introduce a thermodynamic efficiency of learning. We analytically compute the dynamics and the efficiency of a noisy neural network performing online learning in the thermodynamic limit. In particular, we analyse three popular learning algorithms, namely Hebbian, Perceptron and AdaTron learning. Our work extends the methods of stochastic thermodynamics to a new type of learning problem and might form a suitable basis for investigating the thermodynamics of decision-making. T s = . This rule or function is implemented by a neural network, called the teacher. Another network, called the student, has to infer this rule from a number of examples , T x s ( ) supplied by the teacher. Our focus is on the final step of information processing: how well can the network emulate the function after a training period, i.e. how well do the outputs of the student, s, match the correct output of the teacher T s for the same input? We will show that the ability of the network to generalise such a rule from the examples it has seen to previously unseen inputs is OPEN ACCESS RECEIVED