Live data from Hacker News

Show HN: Ecco – See what your NLP language model is “thinking”

eccox.io

21–30 of 35 posts

Re: Show HN: Ecco – See what your NLP language model is “thinking”

#21
post #20
post #2

Hi HN, Author here. I had been fascinated with Andrej Karpathy's article ( https://karpathy.github.io/2015/05/21/rnn-effectiveness/ ) -- especially where it shows neurons being activated in response to brackets and indentation. I built Ecco to enable examining neurons inside Transformer-based language models. You can use Ecco to simply interact with a language model and see its output token by token(as it's built on…

This is fantastic, I used your earlier transformers article to first get a real grasp on the architecture. I hope you expand this to accommodate other modes of attention outside of transformers paradigm as well!

Wonderful! Thanks!

I am curious about those recent O(L) attention transformers (see slide 106 of http://gabrielilharco.com/publications/EMNLP_2020_Tutorial__...). If these methods are converging towards a new self-attention mechanism, I'd love to try illustrating that.

What other attention modes are you referring to? Did something in particular catch your attention?

Re: Show HN: Ecco – See what your NLP language model is “thinking”

#22

Wow, love the NNMF visualization. Like all great visualizations, it does a very good job of showing and not telling me what's going on. More of this, please. One question: how does this kind of thing line up with what people describe as "explainable AI?"

It's not explainable until all these weights are between unambiguous concepts in a knowledge base rather than plain text tokens that must be interpreted. For some reason we gave up on symbolic AI in the 70's and decided making machines write poetry is where the money's at.

Re: Show HN: Ecco – See what your NLP language model is “thinking”

#23

Wow, love the NNMF visualization. Like all great visualizations, it does a very good job of showing and not telling me what's going on. More of this, please. One question: how does this kind of thing line up with what people describe as "explainable AI?"

These are AI explanation methods. They belong to the toolbox which would include LIME, Shapley values...etc. Input saliency is a gradient-based explanation method.

Re: Show HN: Ecco – See what your NLP language model is “thinking”

#24

Interesting. The non-negative matrix factorization on the first level kinda highlight some semantic groupings : paragraph, verbs, auxiliaries, commas, pronouns, nominal propositions. I tried to look at higher level layers, and the grouping were indeed of higher level : for example at level 4 there was a grouping which highlighted for any punctuation (and not just comma). The grouping were also qualifying more : for e…

Interesting. Thanks for sharing your notes on the higher layers. Allow me to repost that to the discussion board on github.

I do get your point on interpretation. This work is just a starting point. I'm curious to arrive at ways to automatically select the appropriate number of factors for a specific sequence. Kind of like the elbow method for K-means clustering.

Re: Show HN: Ecco – See what your NLP language model is “thinking”

#26
post #20

Earlier quoted context omitted.

This is fantastic, I used your earlier transformers article to first get a real grasp on the architecture. I hope you expand this to accommodate other modes of attention outside of transformers paradigm as well!

Wonderful! Thanks! I am curious about those recent O(L) attention transformers (see slide 106 of http://gabrielilharco.com/publications/EMNLP_2020_Tutorial__... ). If these methods are converging towards a new self-attention mechanism, I'd love to try illustrating that. What other attention modes are you referring to? Did something in particular catch your attention?

Personally, I implemented this just yesterday.

https://arxiv.org/pdf/1703.03130.pdf

It's a bit older now but I was looking for a self attention method without resorting to a transformer model and this proposed an interesting implementation that wound up being very successful for my problem case.

Re: Show HN: Ecco – See what your NLP language model is “thinking”

#27
post #14

Earlier quoted context omitted.

I'd love to look at your group's visualizations! Is it a private repo? because the link doesn't open up. It never stops to blow my mind that we can represent words and concepts in vectors of numbers. Thanks for your kind words! It's a labor of passion, honestly. And while in previous years it was a nights-and-weekends project, I have recently been giving it my entire time and focus -- which is why I'm able to dip my…

Yikes, you are right… I just linked a private repo. '^^ I have poked the rest of the group and it seems that at least a tweet was made [1] – but not much else remains. Describing it from memory, we ran ELMo and BERT on Wikipedia and then allowed similarity search between a query and showed heat maps to a matched context. Nothing particularly deep compared to yours that go into the transformer “machinery”, but I think…

You are not rambling. Thanks for sharing.

Re: Show HN: Ecco – See what your NLP language model is “thinking”

#28

This work is awesome! Are there theoretical reason to choose NMF over other dimensionality reduction algorithms, e.g. UMAP? Is it easy to add other DR algorithms? I may submit a PR adding those in if it is...

I actually started with PCA. But NMF proved more understandable since negative dimensions in PCA are hard to interpret. I didn't consider UMAP, but would be interested to see how it performs here.

It should be easy, yeah. for NMF, the activations vector is reshaped from (layers, neurons, token position) down into (layers/neurons, token position). And we present that to sklearn's NMF model. I would assume UMAP would operate on that same matrix. That matrix is called 'merged_act' and is located here: https://github.com/jalammar/ecco/blob/1e957a4c1c9bd49c203993...

Re: Show HN: Ecco – See what your NLP language model is “thinking”

#30
post #14

Earlier quoted context omitted.

I'd love to look at your group's visualizations! Is it a private repo? because the link doesn't open up. It never stops to blow my mind that we can represent words and concepts in vectors of numbers. Thanks for your kind words! It's a labor of passion, honestly. And while in previous years it was a nights-and-weekends project, I have recently been giving it my entire time and focus -- which is why I'm able to dip my…

Yikes, you are right… I just linked a private repo. '^^ I have poked the rest of the group and it seems that at least a tweet was made [1] – but not much else remains. Describing it from memory, we ran ELMo and BERT on Wikipedia and then allowed similarity search between a query and showed heat maps to a matched context. Nothing particularly deep compared to yours that go into the transformer “machinery”, but I think…

Hey, I feel you! I'm an intuitive learner as well. I wouldn't have been able to learn much in ML if it weren't for people who write and visualize and make the methods accessible to non-experts. In my case, as with many others, it was the writing and videos of Andrew Ng, Karpathy, Chris Olah, Nando de Freitas, Sebastian Ruder, Andrew Trask, and Denny Britz amongst others. Accessible content like this goes a long way in building the confidence to further pursue the topic and not be intimidated by the steep learning curve. It fill me with joy that you've found some of my work helpful.

Thanks for digging up the screenshot. Exploring contextualize word embeddings is truly fascinating. And thanks for sharing your experience!

Post reply on HN