  Federated learning is typically considered a beneficial technology which
allows multiple agents to collaborate with each other, improve the accuracy of
their models, and solve problems which are otherwise too data-intensive /
expensive to be solved individually. However, under the expectation that other
agents will share their data, rational agents may be tempted to engage in
detrimental behavior such as free-riding where they contribute no data but
still enjoy an improved model. In this work, we propose a framework to analyze
the behavior of such rational data generators. We first show how a naive scheme
leads to catastrophic levels of free-riding where the benefits of data sharing
are completely eroded. Then, using ideas from contract theory, we introduce
accuracy shaping based mechanisms to maximize the amount of data generated by
each agent. These provably prevent free-riding without needing any payment
mechanism.
