Are neural nets (the weights file) copyrightable?

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
hgm
Posts: 27895
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Are neural nets (the weights file) copyrightable?

Post by hgm »

I don't think we were discussing the SF/FF2 case anymore...
gonzochess75
Posts: 208
Joined: Mon Dec 10, 2018 3:29 pm
Full name: Adam Treat

Re: Are neural nets (the weights file) copyrightable?

Post by gonzochess75 »

Michel wrote: Thu Feb 25, 2021 4:24 pm I think we should restrict ourselves to quoting the GPL3 (and not the GPL2).

This is I think is the relevant GPL3 clause
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate
So the way I read it is that if you modify SF to load a non-GPLed evaluation .dll which is distributed separately then this paragraph does not exclude that (but as I wrote it is easy to circumvent the separated distribution restriction).
No. See above. The non-GPLed evaluation .dll whether it sits separately on the file system or not is immaterial as it is clearly intended to be combined with SF in your hypothetical into a single program. And the licensing terms allowing someone to put SF on that CDROM says you can't do that. They are not merely aggregated as would be the case if you put Firefox and Google Chrome on the same CDROM. The non-GPL'd eval function in your work is clearly, "by their nature extensions of the covered work"
Michel
Posts: 2273
Joined: Mon Sep 29, 2008 1:50 am

Re: Are neural nets (the weights file) copyrightable?

Post by Michel »

hgm wrote: Thu Feb 25, 2021 4:28 pm I don't think we were discussing the SF/FF2 case anymore...
Well yes. If a NNUE net does not fall under the GPL then I was trying to find out why a classical eval would fall under the GPL.
I still do not see the distinction.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
User avatar
hgm
Posts: 27895
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Are neural nets (the weights file) copyrightable?

Post by hgm »

Classical evaluations in separate DLLs would not fall under the GPL. They perform a task that is not specific to Stockfish, which every other chess engine performs as well. If they use a format for the game-state description as input that is also commonly used (such as FEN, or bitboard), there is absolutely nothing that would associate it with Stockfish as a 'combined work'.

The GPL would not forbid you to modify Stockfish to dynamically link to such an evaluation.
Gian-Carlo Pascutto
Posts: 1243
Joined: Sat Dec 13, 2008 7:00 pm

Re: Are neural nets (the weights file) copyrightable?

Post by Gian-Carlo Pascutto »

hgm wrote: Thu Feb 25, 2021 4:45 pm Classical evaluations in separate DLLs would not fall under the GPL. They perform a task that is not specific to Stockfish, which every other chess engine performs as well. If they use a format for the game-state description as input that is also commonly used (such as FEN, or bitboard), there is absolutely nothing that would associate it with Stockfish as a 'combined work'.

The GPL would not forbid you to modify Stockfish to dynamically link to such an evaluation.
I am not saying you are right or wrong, but the FSF categorically disagrees with what you say: https://www.gnu.org/licenses/gpl-faq.ht ... cVsDynamic

The GPL classifies an "aggregate" as: "A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate”".

Given that your proposal doesn't fall under the aggregate description, I don't see how it can be redistributed with a GPL-ed work?
Michel
Posts: 2273
Joined: Mon Sep 29, 2008 1:50 am

Re: Are neural nets (the weights file) copyrightable?

Post by Michel »

hgm wrote: Thu Feb 25, 2021 4:45 pm Classical evaluations in separate DLLs would not fall under the GPL. They perform a task that is not specific to Stockfish, which every other chess engine performs as well. If they use a format for the game-state description as input that is also commonly used (such as FEN, or bitboard), there is absolutely nothing that would associate it with Stockfish as a 'combined work'.

The GPL would not forbid you to modify Stockfish to dynamically link to such an evaluation.
I now think so too. But some people seem to strongly disagree.

Then there is the issue of distribution. The GPL3 seems to say that you can distribute unrelated things together, without the GPL being viral, but I have yet to find where it says that the GPL is viral for related things, which is the opposite. The GPL2 was quite clear about this. I am hoping that someone points out the relevant part of the GPL3.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
User avatar
hgm
Posts: 27895
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Are neural nets (the weights file) copyrightable?

Post by hgm »

Gian-Carlo Pascutto wrote: Thu Feb 25, 2021 4:57 pmGiven that your proposal doesn't fall under the aggregate description, I don't see how it can be redistributed with a GPL-ed work?
I think the point here is that the GPL can say anything it likes, but that this doesn't necessarily make it legally enforcible. It is easy enough to write a license that specifies that anyone using the software automatically becomes the emperor of Ethiopia.

If I write a DLL for evaluating chess positions handed to me as FEN, I can release it under any license as I see fit. No matter how much the open source community dislikes that, or the GPL explicitly forbids it.
gonzochess75
Posts: 208
Joined: Mon Dec 10, 2018 3:29 pm
Full name: Adam Treat

Re: Are neural nets (the weights file) copyrightable?

Post by gonzochess75 »

hgm wrote: Thu Feb 25, 2021 5:16 pm
Gian-Carlo Pascutto wrote: Thu Feb 25, 2021 4:57 pmGiven that your proposal doesn't fall under the aggregate description, I don't see how it can be redistributed with a GPL-ed work?
I think the point here is that the GPL can say anything it likes, but that this doesn't necessarily make it legally enforcible. It is easy enough to write a license that specifies that anyone using the software automatically becomes the emperor of Ethiopia.

If I write a DLL for evaluating chess positions handed to me as FEN, I can release it under any license as I see fit. No matter how much the open source community dislikes that, or the GPL explicitly forbids it.
If you don't comply with the terms you simply do not have the right to copy it. Absent compliance with the GPL - all rights are reserved for the copyright holder. So go to court and tell the judge that the GPL is nonsense and isn't legally enforceable and they'll then ask you, "Ok, if the copyright holder's license is nonsense, then under what copyright license are you alleging you can copy his/her work?"

If you think the GPL is nonsense and refuse to comply with it, then the solution is clear: stop copying the work. The default case is you have no rights at all to copying SF.
gonzochess75
Posts: 208
Joined: Mon Dec 10, 2018 3:29 pm
Full name: Adam Treat

Re: Are neural nets (the weights file) copyrightable?

Post by gonzochess75 »

hgm wrote: Thu Feb 25, 2021 5:16 pm If I write a DLL for evaluating chess positions handed to me as FEN, I can release it under any license as I see fit. No matter how much the open source community dislikes that, or the GPL explicitly forbids it.
Yes! You can! License it however you see fit by all means. The problem doesn't stem from you copying your own work or distributing it however you see fit. The problem stems from you insisting you get to copy someone elses work - Stockfish - and distributing *it* how you see fit. You don't have that right. That's not your work. Absent complying with the GPL you simply have no rights at all with regards to Stockfish. If you think the terms of the GPL are unreasonable that's entirely fine. The solution is you don't get to copy or distribute Stockfish.
Michel
Posts: 2273
Joined: Mon Sep 29, 2008 1:50 am

Re: Are neural nets (the weights file) copyrightable?

Post by Michel »

So it seems that according to the FAQ a GPLed program cannot use a non GPL compatible library

https://www.gnu.org/licenses/gpl-faq.ht ... atibleLibs

So Stockfish would not be allowed to use the non GPLed evaluation dll (at least under the generally accepted interpretation of the GPL you could not distribute SF with the non GPLed library, privately you can use SF however you want).

Now it would be nice if the FSF explained how their claims in the FAQ are actually derived from the text of the GPL3.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.