Live data from Hacker News

fMRI-to-image with contrastive learning and diffusion priors

stability.ai

61–69 of 69 posts

Re: fMRI-to-image with contrastive learning and diffusion priors

#61
post #57

Earlier quoted context omitted.

Why are you building this, and what kind of ethical considerations have you taken, if any?

I'm curious what answers you would find acceptable? I'm not being snarky - I genuinely struggle with this line of thinking. People seem to find "if I don't then someone else will" to be an unacceptable answer but it seems to me to be fairly central. There's a inevitability about most scientific discoveries (there are notable exceptions but they are few) and unless we're talking about something with capital outlay in…

I'm not suggesting I have some ability to judge whatever the answer is, I'm just curious because TFA didn't include a lot of detail on this point except some vague bullet points at the end.

Re: fMRI-to-image with contrastive learning and diffusion priors

#62

Some important points from the article under the limitations section - Each participant in the dataset spent up to 40 hours in the MRI machine to gather sufficient training data. - Models were trained separately for every participant and are not generalizable across people. Image limitations: MindEye is limited to the kinds of natural scenes used for training the model. For other image distributions, additional data…

For anyone who hasn’t been in an MRI: 40 hours is a lot.

Those things are tight; not “look where you are going” tight, but you absolutely need to tell people beforehand that they will feel very uncomfortable inside, remind them that they can get out at any time, and show them how because they will not like being in there.

I wouldn’t spend 20 minutes in one if it were not important. I’d seriously push back on an hour. 40 hours is something I’d only do if that is absolutely necessary.

Re: fMRI-to-image with contrastive learning and diffusion priors

#63
post #29

Earlier quoted context omitted.

> To achieve the goals of retrieval and reconstruction with a single model trained end-to-end, we adopt a novel approach of using two parallel submodules that are specialized for retrieval (using contrastive learning) and reconstruction (using a diffusion prior). What you can think of contrastive learning as is: two separate models that take different inputs and make vectors of the same length as outputs. This is ach…

This is mostly correct, except that there is only one model. This model takes an fMRI and predicts 2 outputs. The first is specialized for retrieval and the second can be fed into a diffusion model to reconstruct images. You can see the comparison in performance between LAION-5B retrieval and actual reconstructions in the paper. When retrieving from a large enough database like LAION-5B, we can get images that are qu…

How is contrastive learning done with one model, exactly?

I agree only one is used in inference, but two are needed for training (otherwise how do you calculate a meaningful loss function?). Notice in the original CLIP paper, there's an image encoder and a text encoder, even though only the text encoder is used during inference. [0]

[0] https://arxiv.org/pdf/2103.00020.pdf

Re: fMRI-to-image with contrastive learning and diffusion priors

#64
post #63

Earlier quoted context omitted.

This is mostly correct, except that there is only one model. This model takes an fMRI and predicts 2 outputs. The first is specialized for retrieval and the second can be fed into a diffusion model to reconstruct images. You can see the comparison in performance between LAION-5B retrieval and actual reconstructions in the paper. When retrieving from a large enough database like LAION-5B, we can get images that are qu…

How is contrastive learning done with one model, exactly? I agree only one is used in inference, but two are needed for training (otherwise how do you calculate a meaningful loss function?). Notice in the original CLIP paper, there's an image encoder and a text encoder, even though only the text encoder is used during inference. [0] [0] https://arxiv.org/pdf/2103.00020.pdf

There are 2 submodules in our model — a contrastive submodule and a diffusion prior submodule, but they still form 1 model because they are trained end-to-end. In the final architecture that we picked there is a common backbone that maps from fMRIs to an intermediate space. Then there is an MLP projector that produces the retrieval embeddings and a diffusion prior that produces the stable diffusion embeddings.

Both the prior and MLP projector makes use of the same intermediate space, and the backbone + projector + prior are all trained end-to-end (the contrastive loss on the projector output and mse loss on prior outputs are simply added together).

We found that this works better than first training a contrastive model then freezing it and training a diffusion prior on its outputs (similar to CLIP + DALLE-2). That is, the retrieval objective improves reconstruction and the reconstruction objective slightly improves retrieval.

Re: fMRI-to-image with contrastive learning and diffusion priors

#65
post #60

Earlier quoted context omitted.

>People seem to find "if I don't then someone else will" to be an unacceptable answer but it seems to me to be fairly central. Because you can use this as a cop out for truly heinous work. I.e. gain of function research, autonomous weapons, chemical weapons, etc. It's not a coherent world view for someone that actually cares about doing good.

I think you've hit upon some interesting examples. Maybe the way to look at this is cost vs "benefit" (in the broadest sense of the word). When research has an obvious and immediate negative outcome that's a cost. The difficulty/expense of the research is also a cost. The "benefit" would be the incentive to know the outcome. This may be profit, military advantage, academic kudos etc. Maybe the problem with the type o…

> I think you've hit upon some interesting examples. Maybe the way to look at this is cost vs "benefit" (in the broadest sense of the word).

This is obviously a better framework to be in.

"If I don't do it someone else will" is really fraught and that's why people reject it.

So one would really need to ask is there a net benefit to having a "mind reading" system out in the world. In fact I find it hard to think of positive use cases that aren't just dwarfed by the possibility of Orwellian/panopticon type hellscapes.

Re: fMRI-to-image with contrastive learning and diffusion priors

#66
post #60

Earlier quoted context omitted.

I think you've hit upon some interesting examples. Maybe the way to look at this is cost vs "benefit" (in the broadest sense of the word). When research has an obvious and immediate negative outcome that's a cost. The difficulty/expense of the research is also a cost. The "benefit" would be the incentive to know the outcome. This may be profit, military advantage, academic kudos etc. Maybe the problem with the type o…

> I think you've hit upon some interesting examples. Maybe the way to look at this is cost vs "benefit" (in the broadest sense of the word). This is obviously a better framework to be in. "If I don't do it someone else will" is really fraught and that's why people reject it. So one would really need to ask is there a net benefit to having a "mind reading" system out in the world. In fact I find it hard to think of po…

> In fact I find it hard to think of positive use cases

Firstly - forcing people to think of positive use-cases up front is a terrible way to think about science. Most discoveries would have failed this test.

Secondly - can you really not? Off the top-of my head:

a) Research tools for psychology and other disciplines

b) Assistive devices for the severely disabled

c) An entirely new form of human-computer interface with many possible areas of application

Re: fMRI-to-image with contrastive learning and diffusion priors

#67
post #66

Earlier quoted context omitted.

> I think you've hit upon some interesting examples. Maybe the way to look at this is cost vs "benefit" (in the broadest sense of the word). This is obviously a better framework to be in. "If I don't do it someone else will" is really fraught and that's why people reject it. So one would really need to ask is there a net benefit to having a "mind reading" system out in the world. In fact I find it hard to think of po…

> In fact I find it hard to think of positive use cases Firstly - forcing people to think of positive use-cases up front is a terrible way to think about science. Most discoveries would have failed this test. Secondly - can you really not? Off the top-of my head: a) Research tools for psychology and other disciplines b) Assistive devices for the severely disabled c) An entirely new form of human-computer interface wi…

As I mentioned do any of those outweigh the possibility that some 3 letter agency might start mass scanning US Citizens for what amounts to thought crime? The very fundamental idea of privacy would cease to exist.

Re: fMRI-to-image with contrastive learning and diffusion priors

#68
post #66

Earlier quoted context omitted.

> In fact I find it hard to think of positive use cases Firstly - forcing people to think of positive use-cases up front is a terrible way to think about science. Most discoveries would have failed this test. Secondly - can you really not? Off the top-of my head: a) Research tools for psychology and other disciplines b) Assistive devices for the severely disabled c) An entirely new form of human-computer interface wi…

As I mentioned do any of those outweigh the possibility that some 3 letter agency might start mass scanning US Citizens for what amounts to thought crime? The very fundamental idea of privacy would cease to exist.

That's a very big leap. If we're at the stage where a three letter agency can put you in an fMRI machine, then we're probably also at the stage where they can beat you with a rubber hose until you confess.

My point is that there's already a wide variety of things a future draconian state can do. This doesn't seem to move the dial very much.

Post reply on HN