News for hackers. Stuff that matters.
Re:State-of-the-art text classification with universal langu... by jph00 on Tuesday May 15, 2018 @02:26PM (#17076351)
Jeremy here (co-author of this paper). Let me know if you have any questions!
Re:State-of-the-art text classification with universal langu... by Eridrus on Tuesday May 15, 2018 @08:25PM (#17079037)
When I think of state of the art in this area, I think of the Deep Contextualized Word Vectors/ELMo paper from Peters et al, which you cite, but you don't have any comparisons to.

The only point of reference between the two papers I see is the CoVe models, which you guys beat pretty handily, but the ELMo model also beats the CoVe model handily, just on different datasets, so not clear how they stack up.

Any chance you could do some more direct comparisons? You do say that it's a more complex architecture, and the tokenized char convolution stuff is a bit of a pain to do, but if that actually helps, it's not that bad to do once.

From an engineering perspective, not changing the LM weights is kind of nice because then you can train multiple separate models on top of the embeddings without needing to retrain everything (and deal with the associated "noise" when retraining models) and it gives some nice modularity. It would be nice to know how much of the performance is lost from having embeddings that can be shared across a lot of tasks.

Random note: it seems like in Table 7, you have bolded "Freez + discr + stlr" in the IMDb column which has a value of 5.00, whereas "Full + discr" has a value of 4.57, and so should probably be the bolded number.

Re:State-of-the-art text classification with universal langu... by jph00 on Tuesday May 15, 2018 @09:13PM (#17079249)
Very interesting comments. Yes absolutely want to do comparisons to ELMo. It's a little tricky to do so on our datasets, since ELMo isn't really a complete method on its own, but more an addendum to existing methods. In the future we hope to do seq2seq and sequence labeling studies, and we can then ensure we pick datasets that the ELMo paper covered.

Using char tokens can definitely be helpful, as can sub-words. It's something we've been working on too, and hope to show results of this in the future.

I mainly disagree with your view of end-to-end training. In computer vision we pretty much gave up on trying to re-use hyper-columns without fine-tuning, because the fine-tuning just helps so much. It's really no trouble doing the fine-tuning - in fact the consistency of using a single model form across so many different datasets is really convenient and helpful for doing additional levels of transfer learning.

Thanks for the note about table 7 - it's actually an error (it should be 5.57, not 4.57; Sebastian is in the process of uploading a corrected version).

Re:State-of-the-art text classification with universal langu... by madisonmay on Wednesday May 16, 2018 @01:32AM (#17080213)
Yes absolutely want to do comparisons to ELMo.

Perhaps even more interesting than comparison would be modifications to ULMFit to incorporate good ideas from the AllenNLP ELMo paper.

The learned weighting of representation layers seems like a decent candidate, as does giving the model flexibility to use something other than a concatenated [mean / max / last state] representation of final LSTM output layer (as is the case in some of ELMo's task models). I'm personally curious about using an attention mechanism in conjunction with something like ELMo's gamma task parameter (regularizer) for learning a weighted combination of outputs but haven't been able to get things to function well in practice.

The dataset the ELMo model is trained might also be preferable to WIKI 103 for practical English tasks, although you lose the nice multilingual benefits you get from working with WIKI 103.

In general it seems like the format described in the ELMo paper is simply not designed to work at very low N because the weights of the (often complex) task models used in ELMo's benchmarks are learned entirely for scratch. That's not possible without a decent amount of labeled training data.

Anyhow, thought the paper was very well put together, definitely an enjoyable read. Hope yourself and Sebastian collaborate on future papers, as good things certainly came of this one!

Re:State-of-the-art text classification with universal langu... by Eridrus on Wednesday May 16, 2018 @08:22AM (#17081784)
I just wanted to clear up my comments on fine tuning. These LMs are huge. The ELMo paper has 300 dimensional embeddings, yours has 400 (which, btw, should probably be controlled in a comparison). As an engineer, I don't really want to deploy a fine tuned LM for every task I have. Especially on smartphones, I can barely deploy one of these.

The obvious answer is that I should just train a single joint model.

That's great, but when you retrain a model, even if you get similar accuracy, your actual predictions change. It's basically why same model ensembles help.

So if I am trying to improve predictions for a single task, but I have a joint model, then I have to deal with a whole pile of churn that I wouldn't if I had separate models.

This doesn't show up in academic metrics, but people care when things that used to work stop working for no real reason, even if an equal amount of new things started working.

So, I'm not saying we shouldn't fine tune things, it's that I have a set of engineering challenges that make fine tuning less ideal, and I am curious how much we can get away with sharing. There are plenty of CV papers which indicate that the very first layers basically don't benefit from fine tuning because they are so general. Is that true for NLP as well, or are words embeddings already quite domain specific?

Re:State-of-the-art text classification with universal langu... by Abundnce10 on Tuesday May 15, 2018 @07:50PM (#17078871)
This method dramatically improves over previous approaches to text classification, and the code and pre-trained models allow anyone to leverage this new approach to better solve problems such as: Finding documents relevant to a legal case; Identifying spam, bots, and offensive comments; Classifying positive and negative reviews of a product; Grouping articles by political orientation;

I'm starting a new project where I'm given many recipes and I need to take in a free form text of recipe ingredients (e.g. "1/2 cup diced onions", "two potatoes, cut into 1-inch cubes", etc.) and build a program that identifies the ingredient (e.g. onion, potato), as well as the quantity (e.g. 0.5 cup, 2.0 units). Could I use something like Fast.ai to tackle this problem?

Re:State-of-the-art text classification with universal langu... by timClicks on Wednesday May 16, 2018 @12:19AM (#17079986)
If you have sufficient labelled data, conditional random fields works well for this kind of problem. A technical team from NY Times have a great piece on it https://open.blogs.nytimes.com/2015/04/09/extracting-structu...
Re:State-of-the-art text classification with universal langu... by ioot17 on Wednesday May 16, 2018 @02:57PM (#17085361)
CRF works quite well, it's actually what I utilize right now to approach recipe parsing on https://cookalo.com/. It's based on CRFsuite with Python bindings for data training on already labeled recipes. If you build your own app and want to do some comparison, feel free to run some benchmarks against it.
Re:State-of-the-art text classification with universal langu... by Abundnce10 on Wednesday May 16, 2018 @07:35PM (#17087322)
Very cool! It sounds like you followed a similar approach that the NY Times used in their recipe parsing approach, correct?

How does your API handle ingredients with multiple options (e.g. "1 1/2 cups seedless red or green grapes")?

Re:State-of-the-art text classification with universal langu... by ioot17 on Thursday May 17, 2018 @04:59PM (#17095709)
Yes, that's correct, it's similar to the mechanisms NY Times guys were using and I've been focusing on the datasets to feed the CRF with as it's what drives the whole thing. This is the output I've got based on your example: [ { "unit": "cup", "input": "1$1/2 cups seedless red or green grapes", "name": "red grapes", "qty": "1$1/2", "comment": "seedless or green" } ]

Don't hesitate to try the API out by pasting some examples to the white box on the site and pressing the "Try it out!" button, it's interactive :)

Re:State-of-the-art text classification with universal langu... by Abundnce10 on Friday May 18, 2018 @01:08PM (#17103077)
Don't hesitate to try the API out by pasting some examples to the white box on the site and pressing the "Try it out!" button, it's interactive

Sweet, I didn't realize it was interactive. I'll give it a try!

Re:State-of-the-art text classification with universal langu... by jph00 on Tuesday May 15, 2018 @09:14PM (#17079254)
I'm not sure - what you're describing is information extraction. I haven't tried that yet, but I'm certainly interested in doing so (especially for medical data).
Re:State-of-the-art text classification with universal langu... by state_less on Tuesday May 15, 2018 @09:34PM (#17079324)
Similarly, could something like this be useful to extract out a command that a user wants to run from a transcription? For example, "Add a user named Jenny to our client list.", which results in the command, 'create user Jenny'. Or, "Could you add Jenny to our client list?", which results in the same command, 'create user Jenny'. Perhaps instead of outputting the next word, output the expected command from a set of commands?
Re:State-of-the-art text classification with universal langu... by woliveirajr on Tuesday May 15, 2018 @03:15PM (#17076857)
Portuguese (specifically, Brazilian Portuguese) isn't being studied yet ?
Re:State-of-the-art text classification with universal langu... by jph00 on Tuesday May 15, 2018 @03:44PM (#17077167)
Doesn't look like it. Hope to see someone take it up!
Re:State-of-the-art text classification with universal langu... by juliango on Tuesday May 15, 2018 @05:22PM (#17077978)
Does the (future) sequence labeling project refers to Part Of Speech tagging?
Re:State-of-the-art text classification with universal langu... by jph00 on Tuesday May 15, 2018 @09:14PM (#17079252)
That would certainly be one of them.
Re:State-of-the-art text classification with universal langu... by timClicks on Wednesday May 16, 2018 @12:17AM (#17079978)
Hi Jeremy (& Sebastian of course), this is an amazing contribution to the state of the art!

I haven't read things in depth, but am curious - how do these models cope with out of vocabulary terms?

Re:State-of-the-art text classification with universal langu... by madisonmay on Wednesday May 16, 2018 @11:27AM (#17083156)
Initially embeddings of OOV terms are initialized to mean embeddings, and then the language model fine-tuning step allows the model to adjust these values.

See [18] here: https://github.com/fastai/fastai/blob/master/courses/dl2/imd....

Re:State-of-the-art text classification with universal langu... by derdude on Tuesday May 15, 2018 @04:44PM (#17077714)
Hey Jeremy, thanks for sharing this awesome article! Do you think this is also applicable to classify 1. readability and 2. entertainment/fun of a text? Thanks!
Re:State-of-the-art text classification with universal langu... by jph00 on Tuesday May 15, 2018 @05:19PM (#17077967)
Yes I think it would work great for both of those applications. For readability, you'd ideally want a dataset showing how long someone took to read each document. For entertainment, some kind of review dataset would be fine (it's basically a type of sentiment analysis, which we've already tested on 3 datasets.)
Re:State-of-the-art text classification with universal langu... by groovybits on Tuesday May 15, 2018 @03:45PM (#17077176)
Is this the same classification project that was presented at this past Bsides NoVA?
Re:State-of-the-art text classification with universal langu... by jph00 on Tuesday May 15, 2018 @04:02PM (#17077352)
No I don't know what that is