Are neural nets (the weights file) copyrightable?

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

Moderators: hgm, Rebel, chrisw

syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

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

Post by syzygy »

Michel wrote: Sat Feb 27, 2021 2:03 pmEDIT2: Note that to define a "modification" the GPL 3 invokes copyright law. But for the definition of a "covered work" it does not.
But a "covered work" is either the unmodified program or a work "based on" the program.
A work "based on" the program is obtained by "modification", which indeed refers to copyright law.
So, arguably, a "covered work" is either the program itself or a derived work.

See also page 46/149 of https://repository.law.uic.edu/cgi/view ... text=jitpl
syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

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

Post by syzygy »

Michel wrote: Sat Feb 27, 2021 2:59 pm
syzygy wrote: Sat Feb 27, 2021 2:52 pm
Michel wrote: Sat Feb 27, 2021 2:03 pm On what grounds do you not consider FF2 (=SF+net) to be a work based on SF?

This has nothing to do with copyright law. It is just common English. In the absence of redefinitions words should be assumed to have their common meaning.
Everything starts with the copyright law question which permissions I need. The permission I need is the permission to distribute FF2 SF. So I invoke the GPLv3 to obtain permission for distributing the entire covered work "FF2 SF" (as part of a zip file), not for distributing the zip file as a whole (of which only FF2 SF is protected by the SF copyright).

The wording of the GPLv3 may allow one to consider the zip file to be a "work based on SF", but I have already covered my copyright needs by invoking the GPLv3 with FF2 SF as the "work based on SF".

And certainly it makes more sense to invoke the GPLv3 on FF2 SF, as this is the derived work that undisputably is protected by the SF copyright. The zip file itself is not a derived work, it merely contains one. (And there are commentators suggesting that "work based on SF" is nothing else than "derived work".)
SF is certainly a work based on SF. But so is FF2. The GPL 3 wants to put restrictions on both of them. With SF there is tautologically no problem but with the work FF2 there may be.
So my argument is that copyright law allows me to distribute a zip file with electronic books A and B IFF I have permission to distribute electronic book A AND I have permission to distribute book B.

This is a copyright question (not a GPL question), so the fact that FF2 SF and FF2 NNUE share some functional relationship does not make this different from two fully independent books.
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

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

Post by Michel »

syzygy wrote: Sat Feb 27, 2021 3:00 pm
Michel wrote: Sat Feb 27, 2021 2:03 pmEDIT2: Note that to define a "modification" the GPL 3 invokes copyright law. But for the definition of a "covered work" it does not.
But a "covered work" is either the unmodified program or a work "based on" the program.
A work "based on" the program is obtained by "modification", which indeed refers to copyright law.
So, arguably, a "covered work" is either the program itself or a derived work.

See also page 46/149 of https://repository.law.uic.edu/cgi/view ... text=jitpl
If that is so why does the GPL 3 define a covered work in this way? If the interpretation is what you say then it should be written that a covered work is either the program itself or a modification as defined by copyright law. That would be completely unambiguous.

EDIT. I looked up the reference. They just claim that the interpretation in the previous paragraph holds, without proper justification IMHO.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

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

Post by syzygy »

Michel wrote: Sat Feb 27, 2021 3:14 pm
syzygy wrote: Sat Feb 27, 2021 3:00 pm
Michel wrote: Sat Feb 27, 2021 2:03 pmEDIT2: Note that to define a "modification" the GPL 3 invokes copyright law. But for the definition of a "covered work" it does not.
But a "covered work" is either the unmodified program or a work "based on" the program.
A work "based on" the program is obtained by "modification", which indeed refers to copyright law.
So, arguably, a "covered work" is either the program itself or a derived work.

See also page 46/149 of https://repository.law.uic.edu/cgi/view ... text=jitpl
If that is so why does the GPL 3 define a covered work in this way? If the interpretation is what you say then it should be written that a covered work is either the program itself or a modification as defined by copyright law. That would be completely unambiguous.
But doesn't it say exactly that?
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.

A “covered work” means either the unmodified Program or a work based on the Program.
EDIT. I looked up the reference. They just claim that the interpretation in the previous paragraph holds, without proper justification IMHO.
The term “a work based on the Program” is not defined directly, but is given meaning in the definition of “modify.” Particularly, that definition specifies that a work resulting from any copying or adaptation of all or part of an earlier work in a fashion requiring copyright permission, other than the making of an exact copy, is a “work based on the earlier work.” This corresponds to the generally understood meaning of a “derivative work” under copyright law.
Perhaps you missed the mention of "a work 'based on'" in the "To 'modify'" paragraph?
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 »

syzygy wrote: Sat Feb 27, 2021 3:42 pm
Michel wrote: Sat Feb 27, 2021 3:14 pm
syzygy wrote: Sat Feb 27, 2021 3:00 pm
Michel wrote: Sat Feb 27, 2021 2:03 pmEDIT2: Note that to define a "modification" the GPL 3 invokes copyright law. But for the definition of a "covered work" it does not.
But a "covered work" is either the unmodified program or a work "based on" the program.
A work "based on" the program is obtained by "modification", which indeed refers to copyright law.
So, arguably, a "covered work" is either the program itself or a derived work.

See also page 46/149 of https://repository.law.uic.edu/cgi/view ... text=jitpl
If that is so why does the GPL 3 define a covered work in this way? If the interpretation is what you say then it should be written that a covered work is either the program itself or a modification as defined by copyright law. That would be completely unambiguous.
But doesn't it say exactly that?
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.

A “covered work” means either the unmodified Program or a work based on the Program.
EDIT. I looked up the reference. They just claim that the interpretation in the previous paragraph holds, without proper justification IMHO.
The term “a work based on the Program” is not defined directly, but is given meaning in the definition of “modify.” Particularly, that definition specifies that a work resulting from any copying or adaptation of all or part of an earlier work in a fashion requiring copyright permission, other than the making of an exact copy, is a “work based on the earlier work.” This corresponds to the generally understood meaning of a “derivative work” under copyright law.
Perhaps you missed the mention of "a work 'based on'" in the "To 'modify'" paragraph?
The author of the neural net himself considered the combination of FatFritz2 to be one combined work and the net to included as part of the larger program. And that continues to this day.

Code: Select all

misc.cpp:     << "Stockfish Devs and Albert Silver (neural network)";
There you have it. FatFritz2 authorship = Stockfish Devs + Albert Silver (neural network) = FF2 SF + FF2 weights file
Alayan
Posts: 550
Joined: Tue Nov 19, 2019 8:48 pm
Full name: Alayan Feh

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

Post by Alayan »

syzygy wrote: Sat Feb 27, 2021 2:52 pm Everything starts with the copyright law question which permissions I need. The permission I need is the permission to distribute FF2 SF. So I invoke the GPLv3 to obtain permission for distributing the entire covered work "FF2 SF" (as part of a zip file), not for distributing the zip file as a whole (of which only FF2 SF is protected by the SF copyright).

The wording of the GPLv3 may allow one to consider the zip file to be a "work based on SF", but I have already covered my copyright needs by invoking the GPLv3 with FF2 SF as the "work based on SF".

And certainly it makes more sense to invoke the GPLv3 on FF2 SF, as this is the derived work that undisputably is protected by the SF copyright. The zip file itself is not a derived work, it merely contains one. (And there are commentators suggesting that "work based on SF" is nothing else than "derived work".)
No. It doesn't work like this.

By default, you have no redistribution rights at all. To have the rights to redistribute the GPL program, you must abide by its licensing conditions. If you can't or don't want to abide by those conditions, then you have no rights to redistribute it. If you think these conditions are unreasonable, you still don't have a right to redistribute it.

When putting the FF2 net and the FF2-SF binary together, the licensing requirements are not met and the rights to distribute the Stockfish part are lost. The FF2 net itself can still be distributed, but not the package that includes the (modified) SF binary.

The licensing requirements can have conditions dealing with thing outside of the licensed product.

The business world is full of exclusivity contracts and agreements. The whole basis of these exclusivity deals is that restricting the way the other party deals with third-parties can lawfully be part of a contract.
I have already covered my copyright needs by invoking the GPLv3 with FF2 SF as the "work based on SF".
The binary is one work based on SF.

You need to respect the licensing conditions for all the works based on SF included in your package for that package's distribution to be lawful.

The package must not include a single "work based on SF" that would include GPL-incompatible components for the package containing a SF-derived work to be lawfully distributed.
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 »

syzygy, I am really trying to understand your position. This hypothetical is not meant as an attack I just want to understand how you'd handle it. Let's forget dynamic linked libraries, whether an NN is data or code, whether an NN weights file is even copyrightable (which we agree on!) etc, etc.

Let's say an enterprising programmer has a brilliant idea for improving Stockfish. The embodiment of the idea would look like this:

1. Stockfish sources verbatim copied with a one line diff that changes the name of one function call from "search" to "mysearch"

2. A new file called mysearch.cpp which is entirely copyrighted by the enterprising programmer. It contains ZERO code from anything else in Stockfish or from any other copyrighted work in existence and is novel, original, brilliant and in all other ways THE AWESOME.

The enterprising programmer asks himself what his licensing obligations are and reads the GPL. He discovers the sections we've been arguing about endlessly. From my understanding of your position the enterprising programmer would say that he could put #1 and #2 on a CDROM and give it to someone else. Because #2 did not contain any SF code and was entirely the original work of the enterprising programmer he could choose not to make it GPL and give it a proprietary license. However, the small change he made to #1 *would* need to be licensed in a GPL compatible way.

Now, I clearly know that you'd disagree with this reading above ^^ but help me understand how your position doesn't lead to ^^. What is the difference? And again let's keep dynamic linked libraries, whether the NN is data or code, whether an NN weights file is even copyrightable out of it. Thanks!
Alayan
Posts: 550
Joined: Tue Nov 19, 2019 8:48 pm
Full name: Alayan Feh

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

Post by Alayan »

An analogy to consider the problem differently:

Imagine there is a law saying "chemical compound X can only be distributed alongside chemical compounds that do not explodes when mixed with X", in order to ensure safety.

Chemical X explodes when mixed with chemical Y. No law restricts the distribution of Y itself.

You can't distribute X and Y together by arguing "if I take X alone, it doesn't explode! So here is my right to distribute X. I also have the right to distribute Y as there is no restriction on it. So I add the two rights, and I have the right to distribute X and Y next to each other!".

FF2 net + SF-binary go boom when you put them together. :mrgreen:
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

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

Post by Michel »

syzygy wrote:To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.

A “covered work” means either the unmodified Program or a work based on the Program.
It is true that I had not seen that "a work based on the Program" is actually defined in the license.

It seems unreasonable to argue that adding a net to SF would require copyright permission.

Still why would this be different from adding an extra file to the Stockfish source with a new evaluation function (perhaps not under the GPL). In what way would this require copyright permission?

EDIT. So ultimately it still comes down to the question if SF + net is a derivative work of SF under copyright law....
Last edited by Michel on Sat Feb 27, 2021 5:43 pm, edited 1 time in total.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
chrisw
Posts: 4319
Joined: Tue Apr 03, 2012 4:28 pm

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

Post by chrisw »

Alayan wrote: Sat Feb 27, 2021 4:14 pm An analogy to consider the problem differently:

Imagine there is a law saying "chemical compound X can only be distributed alongside chemical compounds that do not explodes when mixed with X", in order to ensure safety.

Chemical X explodes when mixed with chemical Y. No law restricts the distribution of Y itself.

You can't distribute X and Y together by arguing "if I take X alone, it doesn't explode! So here is my right to distribute X. I also have the right to distribute Y as there is no restriction on it. So I add the two rights, and I have the right to distribute X and Y next to each other!".

FF2 net + SF-binary go boom when you put them together. :mrgreen:
Yes, but. Terms like “no distribution to brown people” are going to fall on discrimination law and would unenforceable. Terms like “no unsafe distribution” are not really “terms” they’re a way of a) ensuring the licensor is not going to be held accountable by dumb acts of distribution and b) a safety warning.

Terms like “you can’t distribute it with something else XYZ” may well fail on competition and/or trading law.
I got all these CD-ROMs of Xs and all these Ys and I can’t sell them because of lack of demand, so I bundle them together (maybe plus A, B and C) and sell them all off cheap. Is that going to be unlawful because of some GPL license?