Suppose you are working on a mobile application. Because the application contains GPL licensed code, the mobile application will be licensed under GPL too. The mobile application also uses a pretrained neural network model. (For simplicity, assume you used MIT licensed code that is not used in the mobile application and a set of copyrighted images to generate and train the neural network model.)
At development time: Neural network training code and training data make a neural network model.
The final product: Mobile application code and the neural network model are in the final release binary. The training code and training data are NOT included.
- Does this neural network model have to be licensed under GPL?
- Does the code used to train the neural network model have to be made available? If so, does it have to be licensed under GPL?
- Does the training data used to train the neural network model have to be made available? If so, does it have to be licensed under GPL?
One could make the argument GPL dictates the distribution of the sources of a system be in the preferred form of the work for making changes in it. Nearly all neural networks are created by the use of training code and a training set of data. Because nobody develops a neural network model by editing its weights one by one, what should be redistributed in this case is the code that allows automatic adjustment of the weights based on training data, not the resulting weights.
However, one could argue since the model itself can be parsed and loaded using only a few lines of code (with the appropriate machine learning library) the model itself is already in the preferred form. The training code is useful for creating a model from scratch but is not necessary for modifying the model.
[Question reposted from https://softwareengineering.stackexchange.com/questions/372548/for-gpl-do-trained-neural-network-models-count-as-source-code?noredirect=1#comment818262_372548 since it was marked off-topic]