TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

185 pointsby jalammarover 4 years ago

11 comments

jalammarover 4 years ago
Hi HN,<p>Author here. I had been fascinated with Andrej Karpathy&#x27;s article (<a href="https:&#x2F;&#x2F;karpathy.github.io&#x2F;2015&#x2F;05&#x2F;21&#x2F;rnn-effectiveness&#x2F;" rel="nofollow">https:&#x2F;&#x2F;karpathy.github.io&#x2F;2015&#x2F;05&#x2F;21&#x2F;rnn-effectiveness&#x2F;</a>) -- especially where it shows neurons being activated in response to brackets and indentation.<p>I built Ecco to enable examining neurons inside Transformer-based language models.<p>You can use Ecco to simply interact with a language model and see its output token by token(as it&#x27;s built on the awesome Hugging Face transformers package). But more interestingly you can use it to examine neuron activations. The article explains more: <a href="https:&#x2F;&#x2F;jalammar.github.io&#x2F;explaining-transformers&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jalammar.github.io&#x2F;explaining-transformers&#x2F;</a><p>I have a couple more visualizations I&#x27;d like to add in the future. It&#x27;s open source, so feel free to help me improve it.
评论 #25684476 未加载
评论 #25685311 未加载
评论 #25688876 未加载
GistNoesisover 4 years ago
Interesting. The non-negative matrix factorization on the first level kinda highlight some semantic groupings : paragraph, verbs, auxiliaries, commas, pronouns, nominal propositions.<p>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 example (&quot;would deliberately&quot; whereas at lower level it was just would).<p>But it&#x27;s not as clear as I had hoped it would be. I hoped it would somehow highlight grouping of higher and higher size, that could nicely map to the equivalent of a parse-tree.<p>The problem I have with this kind of visualizations, is that they often require interpretation. Also, they don&#x27;t tell me if the structure was really present by the neural network but was just not apparent because the prism of the Non-negative Matrix Factorization hid it.<p>For my own networks, instead of visualizing, I like to quantify things a little more. I give the neural network some additional layers, and I try to make the neural network produce the visualization directly. I give it some examples of what I&#x27;d like the visualization to look like, and jointly train&#x2F;fine-tune the neural network so that it solve simultaneously his original task, and the production of the visualization which is then easier to inspect.<p>Depending on how many additional layers I had to add, and depending on where they were added, and depending on how accurate (measured by a Loss Function!) the network prediction are, I can better infer how it&#x27;s working internally, and whether or not the network is really doing the work or if it is taking some mental shortcuts.<p>For example in my Colorify [1] browser extension, which aims to reduce the cognitive load of reading, I use neural networks to predict simultaneously visualizations of sentence-grouping, linguistic features, and even the parse-tree.<p>[1] <a href="https:&#x2F;&#x2F;addons.mozilla.org&#x2F;en-US&#x2F;firefox&#x2F;addon&#x2F;colorify&#x2F;" rel="nofollow">https:&#x2F;&#x2F;addons.mozilla.org&#x2F;en-US&#x2F;firefox&#x2F;addon&#x2F;colorify&#x2F;</a>
评论 #25709821 未加载
评论 #25689899 未加载
indymikeover 4 years ago
Helping people understand &quot;what the ai is thinking&quot; is really important when you are trying to get organizations to adopt the technology. Great work.
评论 #25685062 未加载
Der_Einzigeover 4 years ago
This work is awesome!<p>Are there theoretical reason to choose NMF over other dimensionality reduction algorithms, e.g. UMAP?<p>Is it easy to add other DR algorithms? I may submit a PR adding those in if it is...
评论 #25690285 未加载
anfal_alatawiover 4 years ago
Thank you, Jay! I appreciate the addition of the colab notebooks with code examples. I can&#x27;t wait to play around with this and investigate how language models _speak_.
评论 #25684521 未加载
yowlingcatover 4 years ago
Wow, love the NNMF visualization. Like all great visualizations, it does a very good job of showing and not telling me what&#x27;s going on. More of this, please. One question: how does this kind of thing line up with what people describe as &quot;explainable AI?&quot;
评论 #25689441 未加载
评论 #25689450 未加载
blackbear_over 4 years ago
Any examples of novel insights obtained with this method?
评论 #25684501 未加载
评论 #25690629 未加载
ZeroCool2uover 4 years ago
Fantastic work. This is the kind of stuff we need to get these models actually adopted and integrated into non-tech organizations.
shenbergover 4 years ago
NMF for factorizing activations is brilliant!
pizzaover 4 years ago
One small step on the path towards solid-state intelligence
khalidlafiover 4 years ago
looks great!
评论 #25684074 未加载