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
towforce
Posts: 11564
Joined: Thu Mar 09, 2006 12:57 am
Location: Birmingham UK

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

Post by towforce »

We might be in the final decade in which copyright laws are still important: the laws of supply and demand indicate that once computer software that can generate high quality art on demand becomes freely available, the value of a copyright will fall relentlessly until it reaches a level at which it's not worth anyone's while to pursue a case.
Writing is the antidote to confusion.
It's not "how smart you are", it's "how are you smart".
Your brain doesn't work the way you want, so train it!
User avatar
hgm
Posts: 27790
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 »

syzygy wrote: Wed Feb 24, 2021 2:24 amIt does have to be relevant creativity, i.e. creativity that is still perceptible in the final result, at least in general.
This is what I would have thought to, but it was mentioned in one of these recent discussions that the choice of variable naming was an expression of the necessary creativity (cannot find where, now), and it was not withspoken. But we can consider that debunked, then.
If you use a program to generate an image, you will have copyright on the image only to the extent that the image has traits that express your free creativity. If the program is a fractal generator and you have used a lot of creative effort to invent a funny way of coming up with some parameter values, you will not have copyright on the generated image.
We have to be careful here, as 'funny way' is ill defined. But if there is a somewhat continuous and therefre predictable relation between some of the parameters and for the fractal looks, so that I could tweek the parameters to converge onto something that I considered desireable... Then that isn't really different from using MS Paint and changing the pixel colors one by one until I created an image I liked.

The crux is whether the machine-assisted creation process can be steered purposefully towards a desired result, and whether the operator has been using that possibility.
Still, the weights of a neural net are just numbers somehow representing non-copyrightable functionality. There is no free creativity expressed by a human and therefore no copyright.
This gets dangerously close to a claim that highly optimized binaries would not be subject to copyright. Because the task of an optimizer is to recognize the functionality of the program described in the source code, and create the most efficient machine code that performs that function.
noobpwnftw
Posts: 560
Joined: Sun Nov 08, 2015 11:10 pm

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

Post by noobpwnftw »

Some very interesting points raised. Wouldn't it be nice if we have someone pursuit such a case(or have this included) and a court ruled on it? :D
daniel71
Posts: 146
Joined: Wed Aug 27, 2008 3:48 am

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

Post by daniel71 »

I found this under Chess Programming Wiki:
Fat Fritz 2, released on February 09, 2021, is based on NNUE technology and Stockfish 12 with a double sized network, and thus, running on a CPU, not requiring expensive GPU graphic cards for game playing like its predecessor. The network was trained by Albert Silver with the help of Daniel Uranga and Dietrich Kappe, who provided scripts and ideas. Further credits were given to the Stockfish contributors, and in particular Yu Nasu for his groundbreaking work on NNUE, and Hisayori Noda for the initial Stockfish NNUE implementation [7]. Using the original Fat Fritz as initial supervisor to evaluate chess positions, the learning of Fat Fritz 2 was reinforced by Stockfish's alpha-beta search [8]. The initial release had the 40 MiB NNUE file embedded inside the Fat Fritz 2 executable, and was soon separated after the intervention of the Stockfish community due to a possible GPL license violation [9]. While the separated none GPL licensed NNUE file had a replacement on GitHub [10], it was not identical with the commercial purchased network, yielding in weaker play [11]. The Stockfish community, denying Fat Fritz 2's originality as claimed by ChessBase, reacted with the release of Stockfish 13 on February 19, 2021 [12].

Looks like the net did fall under GPL License when it was embedded with the Stockfish chess engine and had to be separated... This is really not resolved completely but Chessbase did try to fix everything after they got caught.
noobpwnftw
Posts: 560
Joined: Sun Nov 08, 2015 11:10 pm

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

Post by noobpwnftw »

The GPL issue with FF2 is not resolved.

Despite all this, is there even a license term on the FF2 net at all? If there is no license term that one can find which excludes the right to redistribute, I think anyone can!
Ckappe
Posts: 81
Joined: Sun Feb 14, 2021 11:50 am
Full name: Rütger Andersen

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

Post by Ckappe »

dkappe wrote: Wed Feb 24, 2021 1:34 am Programmers and the law. :lol: That’s why they have the FAQ. You should read them and not wave your hands and claim that anything has been amply demonstrated.
And you, yourself, as a programmer foremost and not a lawyer by profession, claims that you know the legal implications of this by interpreting an faq.. :P

Is it not the pot calling the kettle black?

I am pretty sure we can find lawyers arguing both that the NN falls under the same license, that copyright does not apply to NNs at all, and also some can even argue that NN-weight files in themselves are creative work that can be copyrighted :)

But the argument that an NN-weight file (or any huge parm-file binary ) can be copyrighted similar to an art-image, song, or design is most likely shot down pretty hard by any skilled IP-lawyer, regardless of your "interpretation" of the GPL FAQ.
User avatar
jshriver
Posts: 1342
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

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

Post by jshriver »

gonzochess75 wrote: Sun Feb 21, 2021 5:38 pm The following thought occurred to me... if Chessbase is claiming that the FF2 weights file is not subject to the GPLv3 that is tantamount to saying that the weights file is not subject to copyright.

If that is the case, then what is stopping anyone from buying FF2 and distributing the net/weights file around or putting it up on an FTP to download for free? If the nets/weights file is not copyrightable, then FF2/AS does not have copyright to it.

It is a double edged sword saying that the net is not subject to GPLv3!
I would imagine a weights file/NN is copyrightable. For example, a single pgn may not be, but a collection is. Why you can't just buy Chessbase megapack export to pgn and redistribute. It as a collected works, is copyrightable.

There is also the open database license to address issues like this where GPL might not seem to apply.
syzygy
Posts: 5562
Joined: Tue Feb 28, 2012 11:56 pm

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

Post by syzygy »

hgm wrote: Wed Feb 24, 2021 11:10 am
syzygy wrote: Wed Feb 24, 2021 2:24 amIt does have to be relevant creativity, i.e. creativity that is still perceptible in the final result, at least in general.
This is what I would have thought to, but it was mentioned in one of these recent discussions that the choice of variable naming was an expression of the necessary creativity (cannot find where, now), and it was not withspoken. But we can consider that debunked, then.
Choice of variable names is an aspect that is lost in a stripped executable, so creativity in that choice cannot confer any creativity on the stripped executable. But there may well be other choices made when writing source code that do survive in a stripped executable.

In general, it is necessary that an object, to be protected by copyright, still contains traits that express the creativity that was used in its creation.

Specifically for object code, the law might make an exception to this rule. One could argue that, since the legislator wanted object code to be protected, a piece of object code A that was obtained by translating source code B is protected by the copyright on B.

Note that this is not how copyright normally works. If you take a book and extract some random words, the collection of those random words is not protected by the copyright on the book, even though the process of creating that collection involved the creativity needed to write the book.

Both EU and US copyright law were at some point amended to make computer programs copyrightable, so computer programs are indeed somewhat special in terms of copyright.
If you use a program to generate an image, you will have copyright on the image only to the extent that the image has traits that express your free creativity. If the program is a fractal generator and you have used a lot of creative effort to invent a funny way of coming up with some parameter values, you will not have copyright on the generated image.
We have to be careful here, as 'funny way' is ill defined. But if there is a somewhat continuous and therefre predictable relation between some of the parameters and for the fractal looks, so that I could tweek the parameters to converge onto something that I considered desireable... Then that isn't really different from using MS Paint and changing the pixel colors one by one until I created an image I liked.

The crux is whether the machine-assisted creation process can be steered purposefully towards a desired result, and whether the operator has been using that possibility.
Yes, if it's like tweaking the settings of your photo camera to obtain an image that pleases you, then there is probably a copyright created. The created image itself expresses some of your creativity (which requires more than that creativity was used in its creation).
Still, the weights of a neural net are just numbers somehow representing non-copyrightable functionality. There is no free creativity expressed by a human and therefore no copyright.
This gets dangerously close to a claim that highly optimized binaries would not be subject to copyright. Because the task of an optimizer is to recognize the functionality of the program described in the source code, and create the most efficient machine code that performs that function.
Exactly, if object code does not simply inherit the copyright on the source code from which it was compiled (i.e. if normal concepts of copyright law apply also to object code), then any "perfectly optimized" executable almost by definition will lack copyright protection. This is because such an executable will be the almost unique optimal implementation of the functionality implemented by the source code from which it was compiled. (Of course there could still be copyright on what the program displays on your screen, etc.)

With object code there is the argument that it inherits the copyright on the source code from which it was created.
I see no such thing in the case of NN weights, unless one would consider the collection of training material used to create the NN to be the NN's source code. I think that goes too far. (But even if one takes this view, it isn't automatic that the collection of training material is copyrighted. What free creativity went into creating it?)
syzygy
Posts: 5562
Joined: Tue Feb 28, 2012 11:56 pm

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

Post by syzygy »

Michel wrote: Wed Feb 24, 2021 7:43 am
  • A is net is code which is linked to the other code in SF so the GPL extends to it
At least this position won't fly in court if the net is distributed separately.
There is no SF code in the net, so there can be no SF copyright on the net.

The GPL and its FAQ may or may not suggest that code A that links to/is designed to work with GPL'd code B inherits the copyright on B, but that is nonsense.

An interesting question arises when the two are distributed somewhat but not entirely separately, e.g. two files zipped together. Do they then form one derived work that is necessarily protected by the copyright on B, or do they still form two separate works, one protected by the copyright on B and the other not? I think this question has to be answered in the same way as how one judges the result of binding two books together into one book. If the two works are simply juxtaposed they remain two works. Here I still see no reason to take into account that one piece of code was designed to work together with the other piece of code, because the copyright on code is about the expression in source code, not about functionality, and designed to work together is about functionality.

So zipping A and B together still does not create one work protected by the copyright on B (and the copyright on A if any). There may be one work once they are run inside a computer, but the GPL does not forbid that.
noobpwnftw
Posts: 560
Joined: Sun Nov 08, 2015 11:10 pm

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

Post by noobpwnftw »

I think one can argue that the net is more of a linked program in object code form which runs under the interpreter(engine). There is no distinction between object code that is in COFF/ELF format or in neural network weights format, in this case, it is copyright-able, but then you'll have to deal with the problem in regard to linkage.