Are neural nets (the weights file) copyrightable?

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

Moderator: Ras

Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

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

Post by Michel »

hgm wrote: Tue Mar 02, 2021 12:03 pm
Michel wrote: Tue Mar 02, 2021 10:56 amI understand. I originally thought this is what the GPL is doing. But the GPL (even the GPL-3) apparently does something different. It relies on copyright law to define a derived work (or rather something legally equivalent to it but not depending on American copyright law).

After that it puts restrictions on derived works. If you cannot meet these restrictions you lose the right to distribute the GPL'ed program on which the derived work is based, and by extension you cannot distribute the derived work itself.

This depends on the claim of the FSF that a dynamically linked program still constitutes a derived work (otherwise it would be trivial to hijack any GPL'ed program). Apparently many people claim that this interpretation by the FSF is not deducible from copyright law.
They can define 'derived work' in any way they want, as long as they don't claim copyrights on it.
But this is precisely what the GPL does. Under certain conditions a derived work should be GPL licensed. If this is not possible then you lose the right to distribute the original work and hence also the derived work.

Note that a derived work being GPL licensed does not mean that all the parts have to be GPL licensed. The parts should have GPL compatible licenses however. If a NN is not copyrightable then that is fine.

EDIT. Sorry. Of course the fact that the derived worked has to be GPL licensed in itself has nothing to do with copyright. Copyright only comes in to _define_ a derived work.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
syzygy
Posts: 5801
Joined: Tue Feb 28, 2012 11:56 pm

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

Post by syzygy »

Michel wrote: Tue Mar 02, 2021 8:38 am
hgm wrote:I also suspect that (in the context of computer programs) there is something very wrong with the argument that the functionality is not copyrightable, only the 'creative freedom' on top of it.
Yes there seems to be something wrong with ignoring functionality.
  • The fact that a program is statically or dynamically linked makes zero difference for the functionality of the program. It is an implementation detail (and in addition, with the standard concept of linking, the actual memory copy of the program is virtually the same). If copyright law truly makes a difference between these (I am not convinced) then there is something very wrong with copyright law.
  • Likewise, whether a library is interpreted, byte compiled and then interpreted, just in time compiled, pre-compiled, or accessed by whatever scheme that is yet to be invented, is an implementation detail with no effect on functionality. It should make zero difference with respect to the context in which the library can be used.
Indeed functionality plays no role. I'm not sure what is wrong with that, though. Copyright is meant to protect creative expression, not program functionality.

If you distribute a statically linked copy of an executable, you distribute material from the linked library.
If you distribute a dynamically linked copy of an executable, you do not distribute material from the linked library.

Linking is not what is important. Functionality is not what is important. Distributing copyrighted material is what is important. (Or, more generally, copying and conveying to the public.)

As for what happens in the memory of a computer when you run the program, the GPL explicitly does not restrict running the program.

Programmers naturally enter discussions on GPL and copyright licenses with functionality in mind. This is why there are so many misunderstandings.
Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

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

Post by Michel »

syzygy wrote: Tue Mar 02, 2021 12:24 pm
Michel wrote: Tue Mar 02, 2021 8:38 am
hgm wrote:I also suspect that (in the context of computer programs) there is something very wrong with the argument that the functionality is not copyrightable, only the 'creative freedom' on top of it.
Yes there seems to be something wrong with ignoring functionality.
  • The fact that a program is statically or dynamically linked makes zero difference for the functionality of the program. It is an implementation detail (and in addition, with the standard concept of linking, the actual memory copy of the program is virtually the same). If copyright law truly makes a difference between these (I am not convinced) then there is something very wrong with copyright law.
  • Likewise, whether a library is interpreted, byte compiled and then interpreted, just in time compiled, pre-compiled, or accessed by whatever scheme that is yet to be invented, is an implementation detail with no effect on functionality. It should make zero difference with respect to the context in which the library can be used.
Indeed functionality plays no role. I'm not sure what is wrong with that, though. Copyright is meant to protect creative expression, not program functionality.

If you distribute a dynamically linked copy of an executable, you do not distribute material from the linked library.
But you do right if the linked library is in the same .zip file? Whether the library is in the same zip file, or is a section in an ELF executable (also a kind of container format) seems to be exactly the same to me.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
syzygy
Posts: 5801
Joined: Tue Feb 28, 2012 11:56 pm

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

Post by syzygy »

Michel wrote: Tue Mar 02, 2021 9:58 amI sketched situations where there is zero difference with regard to original thought (and with regard to anything that matters actually) and yet it is argued by people here that they would be treated differently under copyright law. If that is so (and I do not know enough about copyright law to truly object) then there is something wrong with copyright law.
The original expression is what creates the copyright.
Copying the original expression is what infringes the copyright.
You are free to refer to my original expression, but you need my permission to copy it.

So the author of a book is free to "link" to another book by including a reference, but she is not free to "link" to another book by using copy and paste. I'm almost certain you have no trouble with that. Why would you have trouble if it is a shared library that is linked to?
Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

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

Post by Michel »

syzygy wrote: Tue Mar 02, 2021 12:32 pm
Michel wrote: Tue Mar 02, 2021 9:58 amI sketched situations where there is zero difference with regard to original thought (and with regard to anything that matters actually) and yet it is argued by people here that they would be treated differently under copyright law. If that is so (and I do not know enough about copyright law to truly object) then there is something wrong with copyright law.
The original expression is what creates the copyright.
Copying the original expression is what infringes the copyright.
You are free to refer to my original expression, but you need my permission to copy it.

So the author of a book is free to "link" to another book by including a reference, but she is not free to "link" to another book by using copy and paste. I'm almost certain you have no trouble with that. Why would you have trouble if it is a shared library that is linked to?
A statically linked library is also just a reference. It is just a section in an ELF executable, which may have many other sections. I do not see the technical difference.

Edit. Hmm it is more complicated than that. I just looked at a static executable with objdump and there is no obvious trace of the statically linked libraries.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
syzygy
Posts: 5801
Joined: Tue Feb 28, 2012 11:56 pm

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

Post by syzygy »

Michel wrote: Tue Mar 02, 2021 12:28 pmBut you do right if the linked library is in the same .zip file? Whether the library is in the same zip file, or is a section in an ELF executable (also a kind of container format) seems to be exactly the same to me.
If you distribute the linked library in any form, then obviously you need permission for that.

The copyright on the linked library cannot prevent you from distributing another program that links to it dynamically (even though the FSF disagrees). It does prevent you from distributing another program that is statically linked to the library.

Perhaps we agree that, at least from the point of view of the copyright on the library, there is a difference between static and dynamic linking.

Now let's consider the copyright on the program that is linking to it.
To distribute such a program, you need permission from the copyright holder.
In principle, the copyright holder can impose whatever condition he likes on distributing the program. Ultimately you have to see what the license allows you to do.

So now you have to consider the GPLv3. What is a "covered work"? (Copyright law is not necessarily of importance now, although it may guide the interpretation of certain terms. As we have seen, the GPLv3 in fact still refers to copyright law where it defines the term "modification" and "a work based on the Program" and therefore also "covered work".)

In my view, the executable itself is a "covered work", as it is a unit of distribution.
I don't see a difference between "entire work" and "covered work". Even if "entire work" was intended to refer to something bigger, the concept just seems too vague to be enforceable.

The GPLv3 requires the "covered work" to be licensed under the GPLv3. So if the executable includes material from a statically linked library, at least that material (and its source) must be licensed under the GPLv3.

The text of the GPLv3 does not seem to actually forbid distributing a covered work in a zip file together with another non-GPL'd file, even if that other file is a shared library. It says something difficult-to-parse about the term "aggregate", but ultimately no legal consequence is specified. If a copyright license allows me to distribute file XYZ, then I have no reason to think that I am not allowed to distribute file XYZ in a zip file together with ABC unless the copyright license specifies that the permission was conditonal on not distributing it in a zip file together with ABC.

Finally, there is the requirement to release the "Corresponding source" as that term is defined in the GPLv3. But this definition does not refer to things that are bundled with the executable (e.g. in a zip file) and is itself problematic. As applied to NNUE nets, I don't accept that the author of an NNUE net would not be allowed to distribute SF unless he also distributes the NNUE net that he happens to have authored under the GPLv3.

Perhaps the "Corresponding source" will in some cases succeed to "infect" in some sense a very specific shared library, but I do not believe it infects NNUE nets. (But there is an argument that could work in court if FF2 SF refers to FF2 NNUE in the default value of the EvalFile UCI option.)

(Of course I am still of the view that NNUE nets are not copyrighted, but that is another discussion.)
User avatar
hgm
Posts: 28418
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 »

Michel wrote: Tue Mar 02, 2021 12:16 pm
hgm wrote: Tue Mar 02, 2021 12:03 pm They can define 'derived work' in any way they want, as long as they don't claim copyrights on it.
But this is precisely what the GPL does. Under certain conditions a derived work should be GPL licensed. If this is not possible then you lose the right to distribute the original work and hence also the derived work.
No, it is what they ask as a counter favor. You can distribute my work, if you also distribute yours. That is not claiming copyrights on your work. They could have asked this for any completely unrelated work. Even if it was not packaged with theirs. "You can distribute our work X, modified in any way, from your website A, as long as your program Y is available for download on your website B". That the GPL only asks such a counter favor for works that are related, linked in someway to their work, and packaged with it.
syzygy
Posts: 5801
Joined: Tue Feb 28, 2012 11:56 pm

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

Post by syzygy »

Michel wrote: Tue Mar 02, 2021 12:34 pm
syzygy wrote: Tue Mar 02, 2021 12:32 pm
Michel wrote: Tue Mar 02, 2021 9:58 amI sketched situations where there is zero difference with regard to original thought (and with regard to anything that matters actually) and yet it is argued by people here that they would be treated differently under copyright law. If that is so (and I do not know enough about copyright law to truly object) then there is something wrong with copyright law.
The original expression is what creates the copyright.
Copying the original expression is what infringes the copyright.
You are free to refer to my original expression, but you need my permission to copy it.

So the author of a book is free to "link" to another book by including a reference, but she is not free to "link" to another book by using copy and paste. I'm almost certain you have no trouble with that. Why would you have trouble if it is a shared library that is linked to?
A statically linked library is also just a reference. It is just a section in an ELF executable, which may have many other sections. I do not see the technical difference.
That's not a reference but a copy. The author of a book is not free to "link" to another book by binding his book together with the another book (and selling copies of it -- he is probably legally allowed to perform the book binding exercise).

I really do not think we need to disagree here. We disagree on the other point of view, starting from the copyright on the book that links, not the book that is linked to.
User avatar
hgm
Posts: 28418
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 »

Michel wrote: Tue Mar 02, 2021 12:34 pmEdit. Hmm it is more complicated than that. I just looked at a static executable with objdump and there is no obvious trace of the statically linked libraries.
It should have the routines of that library that the program called in it. Otherwise it would not qualify as 'statically linked'. It will not have the entire library in it, for obvious efficiency reasons.
User avatar
towforce
Posts: 12659
Joined: Thu Mar 09, 2006 12:57 am
Location: Birmingham UK
Full name: Graham Laight

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

Post by towforce »

syzygy wrote: Tue Mar 02, 2021 1:07 pmSo now you have to consider the GPLv3. What is a "covered work"? (Copyright law is not necessarily of importance now, although it may guide the interpretation of certain terms. As we have seen, the GPLv3 in fact still refers to copyright law where it defines the term "modification" and "a work based on the Program" and therefore also "covered work".)

In my view, the executable itself is a "covered work", as it is a unit of distribution.
I don't see a difference between "entire work" and "covered work". Even if "entire work" was intended to refer to something bigger, the concept just seems too vague to be enforceable.

My opinion about covered work is: I am writing a GPL program that includes a closed source library. My work is covered, the closed source library is not.

To use the excellent book analogy, I am offering a collection of books called, "Books About England", and I am distributing it under a GPL license. The ones I wrote would be "covered", the ones written by other authors would not be: the authors of those books would retain the copyright rights to them.
Human chess is partly about tactics and strategy, but mostly about memory