News for hackers. Stuff that matters.
Re:Why do we use word embeddings in NLP? by pluma on Tuesday September 10, 2019 @09:06AM (#20927678)
Except this doesn't work consistently because words in real language are ambiguous and not every combination results in something that can meaningfully map to real-world language.

You need to start from a word list with 100% unambiguous and clearly defined words and even then you're no step closer to working with real language because while superficially similar your word list is actually a highly specialised DSL.

Of course in many cases this DSL approximation of the target language is good enough for certain tasks but the entire process is inherently flawed.

Re:Why do we use word embeddings in NLP? by tonyarkles on Tuesday September 10, 2019 @09:51AM (#20928151)
> approximation of the target language is good enough for certain tasks but the entire process is inherently flawed

That is pretty much the definition of a "model" :)

I recently went through the "Tensorflow in Practice" specialization on Coursera and it was illuminating. The thing about ML models, whether CNNs for images, or word2vec+RNN, or whatever else, is that they really don't have any rigid scientific basis for why they work. You're doing, say, Stochastic Gradient Descent to optimize the neuron weights across your dataset. Out the other side of the training, you have a mostly meaningless set of coefficients that work well to classify other unseen data.

I dual-majored in CS and EE, and I leaned towards the "science" side of things, where things get modelled mathematically and analyzed, accepting that the model is likely incomplete but still useful. The thing that drives me nuts with ML is that there's no explanation of what the terms in the ML model actually mean (because the process that produced them doesn't actually investigate meaning, it just optimizes the terms). But... I've accepted that even though the models are pretty much semantically meaningless, they work.

Re:Why do we use word embeddings in NLP? by amelius on Tuesday September 10, 2019 @10:07AM (#20928317)
> I've accepted that even though the models are pretty much semantically meaningless, they work.

Until they don't. Which may happen easily if you deploy a model for the first time.

My personal view is that (at this moment) ML is mostly correlation detection and pattern recognition, but has little to do with intelligence.

Re:Why do we use word embeddings in NLP? by bitL on Tuesday September 10, 2019 @11:26AM (#20929243)
The point is that we don't have mental capacity to understand this stuff. Nobody has any clue how to interpret millions of dimensions, some non-linear manifold there and how to translate it to something humans are capable of understanding. These things might be done automatically by our brains on subconscious level in a similar fashion (or not), but on conscious level we are completely clueless and basically shoot darts to see which ones become somewhat useful.

I think you object to the lack of "mathematical beauty", but my point is "who cares?". Not sure why should reality conform to some mental model we find "appealing" for whatever reason. Deep Learning is similar to experimental physics.

Re:Why do we use word embeddings in NLP? by woliveirajr on Tuesday September 10, 2019 @12:03PM (#20929705)
This.

Explainable AI is a emerging field, I hear about this necessity specially in NLP and Law. We expect to understand how some decision was reached, and we'll never accept some computer-generated decision if it wasn't explained how each logical step was done. And just giving millions of weights of each neuron won't give us that, because we won't be able to reach the same decision with just those parameters.

We know that IA is a bunch of probabilities, weights and relations in n-dimensions. Our rational brain can know that too, but can't feel it.

Re:Why do we use word embeddings in NLP? by Der_Einzige on Tuesday September 10, 2019 @12:23PM (#20929910)
That's why you use interpretability tools like LIME

Example of this would be here: https://github.com/Hellisotherpeople/Active-Explainable-Clas...

Re:Why do we use word embeddings in NLP? by Der_Einzige on Tuesday September 10, 2019 @12:22PM (#20929895)
Wait... That's what dimensionality reduction is for. I can interpret 3 PCA dimensions pretty damn well since I can figure out the covariance explained by each dimension of my original dimensions
Re:Why do we use word embeddings in NLP? by bitL on Tuesday September 10, 2019 @02:58PM (#20931976)
Yeah, but your accuracy also drops. You might end up with interpretable underwhelming solution instead of non-interpretable SOTA.
Re:Why do we use word embeddings in NLP? by pluma on Tuesday September 10, 2019 @10:15AM (#20928408)
As you hint at, the (more common) alternative to defining the world in advance is to rely on machine learning to figure things out (and possibly generate separate clusters for meanings that don't even map well to specific words but resolve the ambiguity). But even then you can run into problems. Even if your model can parse "cloud" correctly based on the context, good luck trying to parse a text about online storage of meteorological data.

The ontological approach described in the article doesn't really work all that well with real world data.

The raw ML approach works well enough but has a multitude of problems (e.g. learning biases, like "black" being a negative sentiment classifier when talking about people because of the texts the model was initially fed).

But given how hard it is to "solve" these problems, I'm not convinced ML alone will ever progress beyond the 80% "good enough" solution it is now, without being replaced with something completely different.

This is what makes me skeptical of all the tall tales about strong AI and "the singularity". While the specialised applications (e.g. deepfakes) are certainly impressive and a lot of the more generalised applications can go a long enough way to get a decent amount of funding despite unfixable flaws (e.g. sentiment analysis), getting from "here" to "there" seems to require more than just more incremental refinement.

Computer Linguistics courses have been teaching ontological "scientifically sound" approaches that yielded no real-world applications while Google had been eating their lunch with dumb statistical models. The dumb models have since become infinitely more intricate and improved from "barely usable" to "good enough" but seem to be inching ever closer to an insurmountable wall, whereas the "scientific" models still seem to be chasing their own tail describing spherical cows in a vacuum.

Re:Why do we use word embeddings in NLP? by superpermutat0r on Tuesday September 10, 2019 @10:12AM (#20928385)
Well, science includes scientific method. Trial and error that is abundant in deep NN ML research is at the core of science. The theories and math have almost always arrived after stuff worked heuristically.

That's also one of the reasons why deep NN returned the spark to ML. ML was so deep into the proven models and math that the lack of trial and error part slowed down progress.

Re:Why do we use word embeddings in NLP? by brudgers on Tuesday September 10, 2019 @09:28AM (#20927887)
I agree:

  king - manliness
is nonsensical in the context of chess.
Re:Why do we use word embeddings in NLP? by tonyarkles on Tuesday September 10, 2019 @09:56AM (#20928218)
That's a really good point, and related to my sibling comment, one of the other things that makes me uncomfortable about ML models is the mysterious generalizability. Some generalize well, some start spewing nonsense when you move slightly outside of their training zone. Special-purpose models, I think, do quite a bit better than attempted larger generalized models.

For your chess example, if you trained a word2vec model using only a large corpus of text about chess, you very likely wouldn't get the "king - manliness" vector being anything meaningful at all, but you would likely see word associations that are meaningful and also potentially unexpected.

Re:Why do we use word embeddings in NLP? by fromthestart on Tuesday September 10, 2019 @10:13AM (#20928389)
I'm afraid you misunderstand the way embeddings work - at least for BERT based models, which are currently state of the art.

BERT embeddings, after training change with context. In other words if you feed a paragraph about bank robbers and look at the encoding for bank, it will be meaningfully different from the encoding for the same word produced from a paragraph (or sentence) about river banks.

We use BERT at the startup I work at, and one of our tests was the sentence "the bank robbers robbed the bank and then rested by the river bank". BERT was able to generate three different semantically meaningful encodings for the word bank in this sentence. The first two instances were much closer to each other in vector space (euclidean distance) than the last.

This is huge, because it is arguably the first step in building an AI which can perform basic reasoning about information encoded in text. For example, if you average up the encodings of a paragraph of words, you can create an "encoding" which assigns a summary meaning or topic. Simple vector math becomes a powerful reasoning tool.

The future is here.

Re:Why do we use word embeddings in NLP? by thelazydogsback on Tuesday September 10, 2019 @12:18PM (#20929853)
> This is huge, because it is arguably the first step in building an AI which can perform basic reasoning about information encoded in text.

Well, except for the many many decades of previous work on NLP using symbolic methods that are quite capable. Although DNNs are en vogue and have some amazing properties, we shouldn't forget that symbolic AI/NLP using explicitly semantic representations is powerful and has a rich history, and complements DNNs quite well -- such as being easily explainable, for one.

Re:Why do we use word embeddings in NLP? by yorwba on Tuesday September 10, 2019 @11:18AM (#20929163)
The contextualized word embeddings you get out of BERT are still generated from fixed per-word vectors. And while you get one output vector for each input vector, that doesn't mean they correspond to each other. The model could arbitrarily reshuffle information between outputs, so long as the output as a whole reflects the input sufficiently well. So BERT embeddings are not "word embeddings" in the usual sense.