76 points · by mshuffett · 4y ago · 61 comments
I was in Mexico typing my 10th reply to a mundane email when it hit me: people shouldn’t be typing every letter of every word — especially not the same things over and over again. That got me thinking about building a tool that helps people type faster anywhere online and ultimately save them time—something that was easier said than done. It was quite challenging to balance the speed needed for real-time predictions with the model complexity needed for high quality predictions. Also, it was surprisingly challenging to integrate with a ton of different websites – I learned that there are many, many different ways to implement a “text box,” and experienced first hand, the joys of integrating with things like shadow dom and iframes.
I have been thinking about how to communicate with computers since I was in maybe 6th grade when I would literally dream about it. I remember I had a notebook in which I tried to analyze the linguistic structure of English to teach my computer English (not a great approach in retrospect). Later on, I worked in ML and AI at IARPA, Amazon, Disney, and BCG before starting an ML consulting firm. The trends in NLP finally caught up to my dream (LLM, distillation, fine-tuning, transformers, GPUs), so working on Compose AI seemed like the next logical step.
We are working to create a more holistic, AI-first writing solution. For now, our chrome extension has autocompletion, rephrasing (shorten, lengthen, change mood), and full email/reply generation functionalities. As you’re typing, the text is streamed to our backend servers, where we have relatively large transformers models that are tuned for specific scenarios.
If you need help with long-form content or the creative process, our web app (https://web.compose.ai) can generate product descriptions, blog outlines, sales pitches and more. Note: our web app asks for credit card on sign-up but includes a free 7-day trial.
For our Chrome Extension, we make money using a freemium subscription model. Your data is end-to-end encrypted and encrypted at rest. We will never sell your data and will only use it to fulfill your completions or improve your results.
Here are a couple demo videos of the extension generating responses to a Hacker News email:
https://www.loom.com/share/c36ec67b0a3a466aaa2ec5ee2399cb15
https://www.loom.com/share/44cf0f5893094d1191143b9f6fe11a5d
Thanks for reading! Would love to have some conversation with folks in the comments section below. Please share any feedback/ideas/experience!
Here are our open jobs: https://at.compose.ai/jointheteam
You can download Compose AI from the Chrome web store: https://at.compose.ai/download
On a more positive note: is there something that detects or warns against hostile tone to help write in a friendly and non-hostile way? :)
Federated machine learning is an area of my research.
I'm wilson@ our website (trying to avoid too much spam from bots).
The first step is to get any functional offline model (1), then prune/project a large language model's representation until you can perform on-device inference (2). You can calculate variance, hit / miss statistics for a body of text and model proposals (3), which you can feed into a ranking model (4) for an extra layer of personalization or use to re-balance the Euclidean projection of your model's layers (4) to optimize for sparseness.
1) Locally store a Trie data structure, where keys are n-grams of user input
Surprisingly effective, considering most business communication uses a limited vocabulary. If your users are submitting less than 10,000 unique English words (skip words removed) per day, try this out.
One thing I really liked about the Trie approach is that corporate jargon appears in real-time, since the "model" is just a data retrieval algorithm. You don't need to modify a vocabulary and re-train/fine-tune a neural network to achieve personalization.
The downside is that you're limited to bi/tri-grams before performance degrades, although YMMV. Auto-completing bi/tri grams does feel tedious after a while.
2) Fine-tune and prune a large language model, then make it sparse
I noticed y'all offer some degree of personalization. Have you tried pruning or compressing your model after fine-tuning? The exact technique will depend on your base model's architecture but in general, try using a sparser representation.
Use accelerators designed to operate on sparse representations, for example TensorFlow XNNPack's sparse operations. XNNPack is a backend engine that opens up native hardware acceleration options in WebAssembly, so you can accelerate inference using the client's GPU (if available).
3) Collect permutation variance and hit/miss statistics
The exact technique/algorithm will depend on your model architecture, but for example matched averaging is a way to express the average number of neighborhood permutations with respect to the input dataset. In other words, the client sends statistics about predictions in Euclidean space, not your literal keystrokes.
4) Use matched averaging to adjust model cardinality or train an additional ranking model
The statistics collected by step 3 can be used to train a personalized ranking model, with the goal of re-ranking the proposals from step 2.
You can also use these statistics to introspect the "embedding space" of a language model, with the goal of identifying compression/pruning opportunities to improve the model's real-time performance. Reducing cardinality in the embedding projection has an outsize impact on inference speed, and you can usually drop most of the language model after observing the range of language used by the client.
You can also used matched averaging to compare hidden <-> hidden weights between many with Euclidean distance measurements (like cosine distance).
This is WAY more than I originally intended to write - but I hope this helps!
Edit: I don’t even use Chrome :) but that’s not the main point, but perhaps shows where I am personally on the privacy scale?
We don’t currently have a way to detect hostile tones, but we do have a way to rephrase sentences to be more friendly — https://www.loom.com/share/703d223a40f34447897d1736c6dc8c91.
Similar idea for public figures: ML that can detect phrases that can be taken out of context easily.
What you're describing is "encrypted in transit" and "encrypted at rest". Encryption in transit is table stakes for any software today, not a differentiator. As for encryption at rest, if I saw that I'd wonder why my email content is ever at rest on your servers.
Again, I don't think you meant to mislead, but it's important to use terms of art accurately, especially when marketing to professionals in the field.
Choosing words to write an email is not difficult, most of the time. It's a bit like AI code helpers. The syntax and the small details are not the challenge. The greater organization, design, and sense of direction are the hard problems.
Google already provides surprisingly accurate 2-3 word suggestions while writing documents and emails.
Wow. I just watched one of the linked videos. I would hate that. Who writes text without even a basic sense of the words they want to say? My limitation is typing speed, not thinking speed. Having to read popups every one or two words and decide if that's what I want to say is not only much slower but also really distracting. Not only does one need to try to keep up with a thought they want to express, but they also have to sift through and avoid bad suggestions. This is a nightmare scenario, like trying to write a paper on a phone with text suggestions.
I absolutely don't understand who those popups are designed for.
I just checked into it. I think the misunderstanding is that force enable only enables autocomplete. Compose Now and Rephrase still misbehave on the majority of websites and make them hard to use, so we didn't include them in the force enable functionality. There's a note about it on the Notion doc Michael linked, but that isn't clear enough in the product. Thanks for letting us know! I'll fix that!
Let me know if you're actually not seeing Github show autocomplete either. I'd love to debug that, but I checked again and it seems to be working for me right now.
I'm curious what you mean by "also tried Compose.AI to compose this message but all suggestions just threw away some of the info"
Just to try and understand the nuance — "your results" is collective you here, right? As in, will things that Alice writes be used to make suggestions to Bob, or will they be ringfenced in an Alice-specific model?
Are inputs being used to iteratively train models & then discarded or are they being held around in a corpus (presume the latter, since you mentioned encryption at rest)?
How do you handle weeding out inadvertently storing/sharing sensitive info when training and suggesting? E.g. passport number, social security numbers, bank details etc.
From watching the video above, it looked like the user spend a fair amount of time selecting autocomplete options, and could have typed the whole thing out in roughly the same amount of time. Are there examples that show more bang-for-buck?
Actually, it doesn't need much AI - just an intelligently written text- filtering and formatting script would do it. I've actually written simple scripts in the past that will take a long email or a bunch of them, and export them as an better formatted HTML-based Word Doc that I can read top-to-bottom and refer back to easily. But it would be awfully nice to have something built in.
I'm honestly amazed at all the email jockeys out there that deal with this daily and have no problem with it. It's been a serious problem for literally decades.
Is there an open source project that is just a library for authenticating and working with all the different email services out there? It would be nice to have a MailKit with some sort of basic SQLite based storage. Then devs could just work on the UI.
But it sounds like you are suggesting something a bit different.
https://i.imgur.com/NAKhwMo.png
Also I think you should really checkout github co-pilot's autocomplete. When writing readme files I see it often completes the whole sentence in gray text which is much faster to expand and easier to complete. Your popup is a bit distracting compared to the inline gray text of copilot/gmail.
I am familiar with co-pilot and I appreciate the suggestion and think it's possible you're right. We actually used to have gray text which you can enabled in certain sites still if you click the extension icon in the top left of your browser: https://imgur.com/a/90wDnvN
We found that it was very difficult to integrate that grey text with many websites in the way you might expect it to work. We are still exploring what a happy medium might look like.
If this is even 50% as effective on my email writing as CoPilot has been on my code writing, then you’ve got a customer for life.
Congrats on the launch!
It seems like 95% of the time the suggestions are irrelevant and actually harm the writing speed by forcing you to read bad suggestions.
I can see some value in the second video with the kind of template system, but for the rest no thank you.
also really really not a fan of requiring a subscription just to look around the web app; Hard to see what it can do.
We do find that we are able to predict significantly more text than Gmail is able to.
I love this. It's so cool! I just wish it worked in my slack app on Linux too. But I know you're working on that. Or at least that's what compose.ai thinks ;)