beaucoker
    • Create new note
    • Create a note from template
      • 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
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
    • 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 No publishing access yet

      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.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      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
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • 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 Create Help
Create Create new note Create a note from template
Menu
Options
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
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
  • 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 No publishing access yet

    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.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    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
    # CATE project update (experiments) The goal of this project update is to see how three factors impact the quality of conditional average treatment effect (CATE) estimation across two groups of inputs (i.e., the groups are defined by a binary variable). The three factors are: 1. Applying group distributionally robust optimization (GDRO), which defines the loss as the worst case over the two groups, when estimating $P(Y|T, X)$. 2. Using separate "heads" in a neural network for each group (i.e., parameter sharing). 3. Cross-fitting. I examine how these factors impact the mean-squared prediction error and CATE error on both train and test data. I use four different "metamodels", which use one or more arbitrary prediction models to estimate the CATE. I use a neural network as the underlying model(s). **Overall, there is some evidence that GDRO is helping, but I'm not sure if its enough, and little or no evidence for the other methods (though see cross-fitting discussion). Overall I'm looking for advice on (a) are these empirical results strong enough to be interesting? and (b) is there any intuition that could help me understand what to do next?** I will use three datasets: 1. *IHDP Group="First"* $(N_{\text{train}}=746, D=25)$: IHDP dataset grouped on binary "First" variable, resulting in a fairly even allocation between the two groups. 2. *IHDP Group="Prenatal"* $(N_{\text{train}}=597, D=25)$: IHDP dataset grouped on binary "Prenatal" variable,, resulting in a more skewed allocation. All observations used for training (so no test). 3. *TOY1* $(N_{\text{train}}=159, D=2)$: This is a toy dataset I invented. The CATE is defined as the difference in two random draws from a GP. All results are averaged over 5 random datasets and 5 random neural network initializations (so 25 total runs). The treatment is binary. *Important note*: the binary group indicator is always used as an input to the model (e.g., of the $D=2$ inputs to TOY1, one is the group indicator). ## Results ### Results summary 1. GDRO generally results in a small improvement in CATE estimation. 2. Separate heads for each group has little impact. 3. Although using more folds improves the CATE estimation error, it improves the CATE estimation error for both groups. So, it seems more folds (which is the recommended practice anyway) helps the model overall but isn't targeted at helping the underrepresented group. Moreover, the cross-fit model was not the best performing model overall. Therefore, based on the evidence here, there is no reason to recommend cross-fitting as a solution to unequal performance across groups. Note: the cross-fit model is called an "R-Learner" or "RNet". It uses a particular estimation technique (basically Double ML for CATE estimation rather than ATE estimation). I did not apply cross-fitting to the other methods; rather, I used a particular method that employs cross-fitting. This method fit very poorly on the TOY1 dataset (I think because the dataset violates the modeling assumptions), so I removed the RNet results on this dataset. To start, here's the prediction error and training error across train/test splits and datasets (recall there is no test data for IHDP Group="Prenatal"). The third column best illustration of the problem: unequal quality of CATE estimation across the two groups. ![](https://i.imgur.com/yNZ9Jyj.png) I will now review how each of the three factors impacts the estimation error for predictions and CATEs. See Appendix below for more details on the experiments. ### 1. Impact of GDRO ![](https://i.imgur.com/w1JW5W3.png) GDRO generally reduces the disparity in estimation equality of predictions and CATEs, although it has less impact on the TOY1 dataset. Is this a significant difference? I'm not sure. ### 2. Impact of separate head for each group ![](https://i.imgur.com/FmBju8L.png) Using a separate head in the neural network for each group does not improve performance (and often makes it worse). ### 3. Impact of cross-fitting To start, here are the results broken down by the four metamodels, with RNet being the only one that uses cross-fitting. Recall I removed RNet results on the TOY1 dataset. RNets tend to outperform only SNets, so using cross-fitting . Recall, however, that this is a particular method that differs from the rest in more than just cross-fitting, so perhaps something else it causing the difference in performance. ![](https://i.imgur.com/BGN7Ilf.png) To investigate the impact of cross-fitting only, here are results for only RNets but with different number of folds (above was 4 folds). As we can see, the performance improves, but it improves across both groups. So the conclusion is that more folds is better (which is expected), but it does not seem to target group disparity in particular. ![](https://i.imgur.com/KSjnrNr.png) ## Appendix ### Metamodels - **SNet**: Uses a "single" model that takes $T$ as input. - **TNet**: Uses "two" models, one for $T=0$ and one for $T=1$. - **RNet**: This is an extension of Double ML for CATE estimation. It uses one model to estimate $E[Y\mid X]$, a second model to estimate $E[T\mid X]$, and third model to regress the residuals on each other to estimate the CATE. I use a neural network for the first model, logistic regression for the second model, and kernel ridge regression for the third model. - **HNet**: This is a compromise between an SNet and a TNet. It uses a single base layer (shared across $T=0$ and $T=1$) but separate "heads" for $T=0$ and $T=1$. I use three HNets in my experiments, including Tarnet and Dragonnet. ### Models These are the inputs to the metamodels (e.g., TNet uses two models). I use fully connected neural networks of 2-4 layers, 100-200 hidden units, and ReLU activation functions. I use the NTK parameterization (i.e., scaling by $1/\sqrt{width}$) and a $N(0,1)$ initalization. Specifically, the multi-headed networks use 2-layers of 200 units for the base and 2-layers of 100 units for each of the heads. The non-multi-headed networks use either 2 or 4 layers with 200 units for the first half of the layers and 100 units for the second half of the layers. Hyperaparameters (learning rate, l2 weight regularization, and any particular parameters of the network (Tarnet and Dragonnet have a few) are manually (and rather unrigorously) tuned by a small gridsearch). I use Adam for optimization. ### Datasets I will use three datasets: 1. *IHDP Group="First"* $(N_{\text{train}}=746, D=25)$: This is a popular infant health dataset. The inputs $X$ and treatment $T$ are real data but the outcomes $Y$ are simulated. For this dataset, I used the binary "First" variable to define the group, resulting in a fairly even allocation between the two groups. 2. *IHDP Group="Prenatal"* $(N_{\text{train}}=597, D=25)$: This is the same dataset as above except grouped on "Prenatal", resulting in a more skewed allocation. Because there are so few observations in Group 0, I use the entire dataset for training (so there are no test results), but note that estimating the CATE on training data is already a difficult task (since the data is only observed for one treatment at a time). 3. *TOY1* $(N_{\text{train}}=159, D=2)$: This is a toy dataset I invented. The CATE is defined as the difference in two random draws from a GP, but for Group 1 I use the difference in RBF GPs while for Group 0 I use a weighted combination between the Group 1 CATE and the difference in Matern 3/2 GPs with a smaller lengthscale. All results are averaged over 5 random datasets and 5 random neural network initializations (so 25 total runs). The treatment is binary. The table below summarizes the datasets ($N$ is the number of training observations, $D$ is the input dimension): | Dataset | $N_{all}$ | $N_{group0}$ | $N_{group1}$ | $D$ | | --------------------- | --------- | ------------ | ------------ | --- | | IHDP Group="Prenatal" | 746 | 27 | 719 | 25 | | IHDP Group="First" | 597 | 316 | 281 | 25 | | TOY1 | 159 | 35 | 124 | 2 | *Important note*: the binary group indicator is always used as an input to the model (e.g., of the $D=2$ inputs to TOY1, one is the group indicator). #### Example of TOY1 *Important note*: the binary group indicator is always used as an input to the model (e.g., of the $D=2$ inputs to TOY1, one is the group indicator). *Note: for TOY1 reversed the Group 0 and Group 1 labels for the above plots, so that Group 0 was always the more difficult group across datasets. In this second, I use the actual group labels (so group 1 is the more difficult group).* THe CATE in TOY1 is the difference between two random draws from a GP. For Group 0 I use the difference in RBF GPs and for Group 1 I use a weighted combination between the Group 0 CATE and the difference in Matern 3/2 GPs with a smaller lengthscale. The number of observations is skewed 75/25 towards Group 0. Here's an example of the two CATEs: ![](https://i.imgur.com/vywRFIF.png) Here's the underlying 4 GPs that went into constructing these CATEs. ![](https://i.imgur.com/WtyvBmm.png)

    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
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    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