
Facebook open-sources deep-learning modules - darklrd
https://research.facebook.com/blog/879898285375829/fair-open-sources-deep-l20earning-modules-for-torch/
======
DannyBee
Sadly, this has facebook's new, horrible patent clause.

For those who aren't aware, it says

1\. If facebook sues you, and you counterclaim over patents (whether about
software or not), you will lose rights under all these patent grants.

So essentially you can't defend yourself.

This is different than the typical apache style patent grant, which instead
would say "if you sue me over patents in apache licensed software x, you lose
rights to software x" (IE it's limited to software, and limited to the thing
you sued over)

2\. It terminates if you challenge the validity of any facebook patent in any
way. So no shitty software patent busting!

~~~
jawns
Here's a link to the patent clause:
[https://github.com/facebook/fbcunn/blob/master/PATENTS](https://github.com/facebook/fbcunn/blob/master/PATENTS)

DannyBee, I'm having a hard time envisioning what sort of scenario might
trigger this, and what the repercussions might be. Any chance you could
explain?

~~~
DannyBee
Do you mean the first part, or the validity provision? as a reply points out,
it is incredibly broad.

Assuming you mean the first part (the validity provision seems "obviously bad"
to me), let's lay out some scenarios:

You make your important software dependent on this software. Congrats,
facebook can now sue you with impunity because you can't afford to lose these
patents.

Worse, the fact that they have given you a grant does not prevent them from
suing you, and the second you counterclaim, you lose. Note also that the grant
specifically does not cover "the Software in combination with any software or
other technology provided by you or a third party." So if you take this stuff
and run it in a pipeline, and facebook has a patent on running it in a
pipeline, you don't get that patent and they can still sue you.

(Again, in the apache case, you'd only ever lose the patent grant _if you sued
facebook over the software in question_ ).

Ignoring direct cases, facebook can also use this as leverage during
acquisitions that use their software (Nice software, shame if you were to lose
rights to it), etc.

There are potentially an infinite number of ways to use this kind of stuff.

Also note this kind of thing has been looked at in the past. There is an
entire discussion here: [http://mail-archives.apache.org/mod_mbox/archive-
license/200...](http://mail-archives.apache.org/mod_mbox/archive-
license/200311.mbox/browser)

from when v2 of apache license was being written, etc.

There are reasons the Apache grant has become pretty much the standard - most
people and corporations find it a pretty good balance of various concerns
(being able to defend yourself in patent lawsuits, etc).

What Facebook has done is entirely one-sided. It benefits Facebook only, and
even then, it generally only helps them in situations _where they want to sue
people_. None of this really helps defensively. If they wanted it for defense,
they'd write it differently to cover defensive situations.

~~~
vonmoltke
> You make your important software dependent on this software. Congrats,
> facebook can now sue you with impunity because you can't afford to lose
> these patents.

I have been rattling the clause jawns posted around in my head, and I cannot
see this. I agree that the clause is onerous and I would not incorporate
software that had such a clause into one of my products without a backup plan.
I do not see how this gives Facebook the ability to sue anyone with impunity.
The clause applies to alleging patent infringement BY Facebook or its
subsidiaries (i.e., _you_ are suing _them_ ) or if Facebook is specifically
suing you for patent infringement. Clause section b only applies if your
defense is based on invalidating a Facebook patent; saying, "We don't actually
infringe that" does not trigger this clause.

~~~
DannyBee
First, The only thing most companies have they could use against facebook, if
facebook were to sue them, _are_ patents.

Second, "saying, "We don't actually infringe that" does not trigger this
clause."

This is false. Such a claim is a claim that facebook's patent claim is
unenforceable against you. This falls directly into the "unenforceable"
language.

Also note that you claim it requires lawsuits. Actually, as worded, it does
not.

In fact, it says " The license granted hereunder will terminate, automatically
and without notice, for anyone that makes any claim (including by filing any
lawsuit, assertion or other action) alleging". It specifically says "assertion
or other action". It does not require lawsuits.

So arguably, just by posting a blog post that says facebook's patent is
invalid, you'd lose rights, because that is an assertion that a right in a
patent of facebook's is invalid.

If it's not meant to cover this, it's not at all clear what the difference
between "an assertion" and "a lawsuit" are supposed to be in the examples, or
what "other action" would constitute.

~~~
vonmoltke
> First, The only thing most companies have they could use against facebook,
> if facebook were to sue them, are patents.

Facebook sues me for stealing proprietary information after hiring one of
their engineers. I have no patents. How do patents help me?

> This is false. Such a claim is a claim that facebook's patent claim is
> unenforceable against you. This falls directly into the "unenforceable"
> language.

It is not false. Claiming a patent is unenforceable is not the same as
claiming something you are doing in a specific case is not covered by a
patent. "Unenforceable" has a specific legal definition.[1] The list of common
actions that argue unenforceability: patent is invalid; inequitable conduct by
patentee; delay in braining suit for infringement; patent misuse. Please
explain how "our product doesn't infringe this patent" meets this definition.

> Also note that you claim it requires lawsuits. Actually, as worded, it does
> not.

I did not state that it requires lawsuits. You claimed the clause grants
Facebook the ability to sue with impunity, and I was using the clauses to
refute that statement in that context. I am well aware that the clause, as
written, does not require lawsuits.

[1] [http://www.legalmatch.com/law-library/article/patent-
infring...](http://www.legalmatch.com/law-library/article/patent-infringement-
defenses.html)

------
bpodgursky
I appreciate that Facebook open-sources their libraries, but they have an
awful habit of dumping source code on Github and then continuing to develop it
internally without pushing those changes back out.

For example, Facebook open-sourced Thrift, then proceeded to develop it
internally, and recently released out a fork of thrift, not merging anything
back into the original tree.

Likewise, they open-sourced Corona a few years ago, their Hadoop fork, and I'm
pretty sure that branch has been abandoned too.

So I'm really hesitant to start using any projects out of Facebook unless they
develop some processes to actually maintain these projects.

~~~
amelius
From the article:

> We hope that these high-quality code releases will be a catalyst to the
> research community and we will continue to update them from time to time.

------
nightski
Too bad it is Torch. Working in the lua environment is not enjoyable at all.
Every error becomes a long procedure of looking deep into the source of the
framework since there is no type information or stack traces to go off
whatsoever. You are constantly guessing about the shape of the data or what
parameters are supposed to look like.

~~~
smhx
there's clear and well stack-traces at the lua level. there's great debugger
(in fblualib, called fb.debugger). there's an inbuilt profiler into LuaJIT.
too bad you've had a bad experience.

~~~
nightski
Thanks I am always willing to give it another shot with more tools.

------
vonnik
This is a recruiting move. Facebook is building its DL team, and to do that,
they need to grow the community using their tools.

~~~
publicfig
I see no issue with open sourcing tools to recruit developers. Honestly,
that's one of the best methods I can think of.

~~~
vonnik
I'm not against it. It's a great way to recruit devs. Just wanted to point out
that they would likely be recruiting from the community.

------
contingencies
Paper with proper summary:
[http://arxiv.org/abs/1412.7580](http://arxiv.org/abs/1412.7580)

~~~
ajtulloch
This paper describes one part of the fbcunn release (the fast convolution
layers implemented via FFT, with the source available at
[https://github.com/facebook/fbcunn/tree/master/src/cuda/fft](https://github.com/facebook/fbcunn/tree/master/src/cuda/fft)).
There's a lot more in fbcunn if you want to check it out.

~~~
Hydraulix989
In my experience, the fully connected layers are the bottleneck. The other
issue was the alternating compute-heavy convolution and the IO-heavy pooling.
I'm curious how this FFT implementation stacks up against cuDNN (what's the
speedup like for just the convolutional layers? and then what's the overall
speedup like?).

~~~
ajtulloch
[http://arxiv.org/pdf/1412.7580v2.pdf](http://arxiv.org/pdf/1412.7580v2.pdf)
compares the convolutional implementation with the cuDNN layers. For the FC
layers, it's just CuBLAS `sgemm`.

------
technologia
We've been using Torch for a while at work, really appreciate Facebook doing
this. Some of us had a hard time adjusting to Lua, but it was well worth it.

~~~
chubot
I'm curious what your team experience was with Lua.

IIRC, Lua is even more liberal than Python in that if you mistype a variable
name, it will silently give you 'nil' rather than throwing an exception.

Also, the prototype system is a little wonky. It seems overly flexible and
makes you do too much work yourself, which would make it hard on a large team
all getting started at once.

If Torch gets popular I wonder if something like TypeScript or Facebook's own
Flow would start to make sense.

~~~
psykotic
> IIRC, Lua is even more liberal than Python in that if you mistype a variable
> name, it will silently give you 'nil' rather than throwing an exception.

Like most things in Lua, that is easy to customize. You can just add an
__index metamethod to environment tables. There are various 'strict' modules
which do just that.

~~~
technologia
Thats what we love about Lua, it gives us control of the side effects.

------
UXDork
Does anyone know what Facebook is using the AI for?

~~~
raverbashing
Basically everything in FB has one main goal: Ads

Secondary goals might be: Spam detection and extracting info from the
graph/pictures, etc

FB identify people from your Social Graph in Pictures, for example

~~~
WillNotDownvote
"Basically everything in FB has one main goal: Ads"

Is this actually true, or a glib answer? Ads certainly don't feel like much of
the FB experience, nowhere near the level of Google, or even Twitter. They're
negligible, really.

Whereas shaping the feed and identifying people in pics, etc, is central to
the FB experience.

~~~
dragonwriter
> Ads certainly don't feel like much of the FB experience, nowhere near the
> level of Google, or even Twitter.

Facebook creates an artificial distinction between labeled ads (which are, of
course, obvious ads) and posts with paid reach (which are also ads, but
presented as normal content), exactly for the purpose of maximizing the
quantity of ads while minimizing the _impression_ of content being dominated
by ads.

~~~
WillNotDownvote
Right, so ads don't feel like much of the FB experience.

My point is that FB seems much, much more focused on creating an engaging user
experience than it does on ads, so it seems wrong to say that their deep
learning efforts have ads as their one main goal.

~~~
dragonwriter
> Right, so ads don't feel like much of the FB experience.

Right, but the issue was the claim that with FB everything is about ads, not
the UX _feels_ like it is about ads. Making ads not _feel_ like as much of the
FB experience as they are is, itself, about ads -- and, particularly, is about
maximizing the degree to which the FB experience _is actually_ about ads.

~~~
WillNotDownvote
"Making ads not feel like as much of the FB experience as they are is, itself,
about ads..."

Well, we just disagree here. I see it from exactly the other end. That the
main FB goal is to engage users, and minimizing the (necessary, but grudgingly
so) ads is about that.

------
frik
Wow great. I dreamed of an AI platform based on LuaJIT a few years ago. Torch
and FB's deep-learning module sound amazing!

