  Whenever communication takes place to fulfil a goal, an effective way to
encode the source data to be transmitted is to use an encoding rule that allows
the receiver to meet the requirements of the goal. A formal way to identify the
relevant information with respect to a goal can be obtained exploiting the
information bottleneck (IB) principle. In this paper, we propose a
goal-oriented communication system, based on the combination of IB and
stochastic optimization. The IB principle is used to design the encoder in
order to find an optimal balance between representation complexity and
relevance of the encoded data with respect to the goal. Stochastic optimization
is then used to adapt the parameters of the IB to find an efficient resource
allocation of communication and computation resources. Our goal is to minimize
the average energy consumption under constraints on average service delay and
accuracy of the learning task applied to the received data in a dynamic
scenario. Numerical results assess the performance of the proposed strategy in
two cases: regression from Gaussian random variables, where we can exploit
closed-form solutions, and image classification using deep neural networks,
with adaptive network splitting between transmit and receive sides.
