Piotr Migdał
p.migdal.pl · Personal blog · on HN since 2015
Piotr Migdał, a physicist turned data scientist, writes about deep learning, word embeddings, data science careers, and interactive explanations.
What HN saysHN links it for machine learning explainers and his gender-differences dating analysis, which a commenter describes as even-handed.
17HN people shared it
7linked it in comments
62stories submitted
1.5Kstory points
3 months agolast shared
2015people per year2026
Most-shared posts
- 1Learning Deep Learning with Keras – An Overview for Beginners3 people · 97 points · first shared 2017 · 3 comments on HN
- 2What I do or: science to data science3 people · 10 points · first shared 2015 · discussion on HN
- 3Don't use cosine similarity carelessly2 people · 439 points · first shared 2025 · 96 comments on HN
- 4King – man + woman is queen; but why?2 people · 263 points · first shared 2017 · 101 comments on HN
- 5Dating for nerds (part 2): gender differences2 people · 45 points · first shared 2017 · 30 comments on HN
- 6Data science intro for math/phys background2 people · 31 points · first shared 2016 · discussion on HN
- 7I Learned to Stop Worrying and Love the Types and Tests2 people · 18 points · first shared 2020 · discussion on HN
- 8Show HN: Interactive Machine Learning, Deep Learning and Statistics Websites2 people · 14 points · first shared 2018 · discussion on HN
- 9Quantum mechanics for high-school students2 people · 4 points · first shared 2016 · discussion on HN
- 10Bangbangcon or doing inclusivity well2 people · 2 points · first shared 2017 · discussion on HN
- 11King – man and woman is queen; but why?2 people · 1 points · first shared 2025 · discussion on HN
- 12If it is worth keeping, save it in Markdown1 people · 343 points · first shared 2025 · 273 comments on HN
- 13Show HN: Weltschmerz by age1 people · 72 points · first shared 2018 · 33 comments on HN
- 14Science-based games and explorable explanations1 people · 68 points · first shared 2024 · 13 comments on HN
- 15Dating for nerds (part 1): problem diagnosis1 people · 31 points · first shared 2017 · 8 comments on HN
What HN people wrote when they linked it
stared · 2026-08-01
"A Visualization Language for the AI Era", as a tagline, sounds weird.
I had the best success with popular and versatile packages like matplotlib and ggplot2 - even 1.5 ago (vide https://quesma.com/blog/which-chart-would-you-swipe-right/).
Now, frankly, my go-to visualization package is React, sometimes with a pinch of D3.js (e.g. https://p.migdal.pl/tree-of-tree/).
ivan_ah · 2016-02-04
I recommend you go for data science rather than finance.
For one you'll have less to learn to catch up (ML = prob theory + modelling skills). Also "data science" is a much broader skill that is in demand in many industries, while to apply your modelling skills to finance requires that you join one of the dirty banks, dirty hedge funds, or other dirty system construct.
This is a good book to have on the shelf: https://www.cs.ubc.ca/~murphyk/MLbook/
also on topic http://p.migdal.pl/2015/12/14/sci-to-data-sci.html
berkeleymalagon · 2019-04-04
Hey all,
Excited to share this demo with the HN.
All of the portraits in this demo are computer-generated by a machine learning model called “StyleGAN”. While most of the recent excitement around StyleGAN centers around its amazing ability to generate infinite variation (e.g. thispersondoesnotexist.com <3), the emergent semantics encoded in the latent space are impressive as well.
For instance, faces in this space allow for some semantic vector math, reminiscent of word2vec’s “king - man + woman = queen” (https://p.migdal.pl/2017/01/06/king-man-woman-queen-why.html).
We can find the latent representations of, say, smiling people. We can then average them and create a new semantic vector that, when added to pictures of non-smiling faces, makes them all smile.
Play with the sliders to see what I mean.
Some possible applications: Generation of assets for games, Customizing ad photography by region/demographics, Lifelike, custom avatars, Compression, Modeling longitudinal medical imagery, Zero-shot inpainting, super-resolution, etc.
Happy to answer any questions!
Lockal · 2025-02-27
I don't understand what is so spectacular in this experiment and why AI was needed to conduct it. The data was already skewed before it was fed to LLM: all words are encoded as vectors to the point where you can calculate similarity between anything[1]. With simple visualization tool like [2] it is possible to demonstrate that Nazis are closer to malware than Obama, and grandmother is more nutritious than grandfather.
[1] https://p.migdal.pl/blog/2017/01/king-man-woman-queen-why
[2] https://lamyiowce.github.io/word2viz/
nhaehnle · 2017-12-17
> I wrote Dating for Nerds: Gender differences (http://p.migdal.pl/2017/09/30/dating-for-nerds-gender-differ...) and got no backlash (much to my surprise, though).
Skimming through it, it does seem pretty even-handed. Although I'd like to point out that you're writing a "guide for nerds" and consistently addressing the reader as if they were a man. Women can be nerds, too. It's fair to have a guide for male nerds, since the experience is bound to be quite different for men vs. women, but it'd make sense to actually point that out.
kaycebasques · 2025-05-29
The post title reminds me of something that I researched a little a couple months back. Practically all embeddings are implemented as vectors, right? Definitionally, an embedding doesn't have to be a vector. But in practice there's not really any such thing as a non-vector embedding, is there?
One thing I learned recently is that, if your embedding model supports task types (clustering, STS, retrieval, etc.), then that can have a non-trivial impact on the generated embedding for a given text: https://technicalwriting.dev/ml/embeddings/tasks/index.html
Parquet and Polars sound very promising for reducing embeddings storage requirements. Still haven't tinkered with them: https://minimaxir.com/2025/02/embeddings-parquet/
And this post gave me a lot more awareness to be more careful about how exactly I'm comparing embeddings. OP's post seems to do a good job explaining common techniques, too. https://p.migdal.pl/blog/2025/01/dont-use-cosine-similarity/
T-A · 2017-10-04
For some reason, your question immediately reminded me of this: http://p.migdal.pl/2015/12/14/sci-to-data-sci.html
My guess is that a postdoc would be seen by prospective employers as a clear declaration of intent to stay in academia. But if that is what you want, you should use those few (hopefully!) years to build up a research portfolio which will get you a permanent position. Starting from scratch on something which you have no previous experience with is not the way to do that. I doubt anybody sensible would be willing to let you try on their dime.
If you do not intend to stay in academia, it is time to start revising down the value you assign to certificates of whatever. You are more likely to be asked for an interesting GitHub repo. But if you insist, there is a plethora of things like
https://www.microsoft.com/en-us/learning/certification-overview.aspx
http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page…
https://training.linuxfoundation.org/certification