Galacticus
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Subhalo Population Emulator ###### tags: `dark matter` `merger trees` `subhalos` ## Extension to WDM (Or, really to any models with some "hidden" parameter.) For our current, CDM emulator we describe subhalos by six parameters, $x_{1\ldots6}$. Galacticus predicts some joint distribution function over this 6D parameter space, $p(x_{1\ldots6})$. We train a normalizing flow to map that distribution function into a 6D standard multivariate normal distribution, $\mathcal{N}(x^\prime_{1\ldots6})$, from which we can sample rapidly (and then reverse the mapping to recover a sample from the distribution on the orignial parameter space). Suppose that we now want to emulate WDM, where we have some parameter $m_\mathrm{WDM}$ that describes the particle properties of dark matter (and the limit $m_\mathrm{WDM}\rightarrow \infty$ corresponds to the CDM case). We can run Galacticus for a bunch of different values of $m_\mathrm{WDM}$ (either some uniform distribution, or randomly sampled values). Then, let's treat $m_\mathrm{WDM}$ as a $7^\mathrm{th}$ variable in our model parameter space. Galacticus can now be thought of as predicting the distribution function, $p(x_{1\ldots6},m_\mathrm{WDM})$. Note that the distribution along the $m_\mathrm{WDM}$ direction is going to depend on how we chose which values of $m_\mathrm{WDM}$ to evaluate at. But, it will turn out that doesn't matter - since we're going to construct a way to choose whatever specific value of $m_\mathrm{WDM}$ that we want. Now we train a new normalizing flow on this 7D distribution function. But, for this normalizing flow, we make the distribution function in the latent space a combination of the original 6D standard multivariate normal, and a uniform distribution in the new dimension, $\mathcal{N}(x^\prime_{1\ldots6}) U(x^\prime_7)$. Then, define the loss function as a combination of the usual log-likelihood, plus a constraint that will force $x^\prime_7 = m_\mathrm{WDM}$. (Or, any bijective mapping from $m_\mathrm{WDM}$ to $x^\prime_7$ - all we care about here is that we can choose some value of m_\mathrm{WDM}$ and know what the corresponding value of $x^\prime_7$ will be. So, we could, for example, use $x^\prime_7 = m_\mathrm{WDM}/m_\mathrm{max}$ where $m_\mathrm{max}$ is the largest WDM particle mass we consider, or $x^\prime_7 = \log(m_\mathrm{WDM}/m_\mathrm{max})$, etc.). So, something like: $$ \sum_{i=1}^N \log \mathcal{L}_i + \sum_{i=1}^N (m_{\mathrm{WDM},i - x^\prime_{7,i}})^2/\sigma^2 $$ where here $\sigma$ is some parameter that controls how strong the constraint to make $x^\prime_7 = m_\mathrm{WDM}$ is - the smaller we make $\sigma$ the more the loss function should push the emulator toward this condition. But, we don't want to make $\sigma$ too small such that the original likelihood condition becomes overwhelmed. So, some testing will be required here. Once we have a trained emulator that behaves in this way we can generate a population of subhalos for any given $m_\mathrm{WDM}$. We simply first find the corresponding $x^\prime_7$ - this is now fixed for all subhalos in the population that we want to create. We then sample $x^\prime_{1\ldots6}$ as usual from the multivariate normal. We now have $x^\prime_{1\ldots7}$ so we just feed these in to the emulator inverse to get the corresponding sampled point from the original parameter space. Because we enforced the emulator to have $x^\prime_7 = m_\mathrm{WDM}$ that means the inverse must have $m_\mathrm{WDM} = x^\prime_7$. So, we should get, for every emulated point, our targetted value of $m_\mathrm{WDM}$, and a set of parameters $x_{1\ldots6}$ for the subhalo consistent with being drawn from the original distribution function, conditioned on $m_\mathrm{WDM$}$, i.e. $p(x_{1\ldots6},m_\mathrm{WDM}|m_\mathrm{WDM})$, which is what we wanted. (Technically there will be some small variation around the target $m_\mathrm{WDM}$ which should scale with the value of $\sigma$ in our loss function - so we can tune how close we want the match to be.) Qualitatively, we want to be able to take a slice through the 7D distribution function predicted by Galacticus at some fixed $m_\mathrm{WDM}$ and sampled from the conditioned 6D distribution function. The problem with a standard normalizing flow is that we sample in the latent space, and in that space the simple slice along the $m_\mathrm{WDM}$ dimension corresponds to some complicated, distorted 6D volume which would be impossible to sample from. In what's described above we're essentially putting another constraint on the normalizing flow, forcing it to make the slices in $m_\mathrm{WDM}$ also correspond to simple slices along one dimension in the latent space also - and then we can trivially sample from those.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully