Boaz Barak
    • 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
      • 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
    • 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
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
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
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
    # Thoughts on "learning systems" Here are some general thoughts on what kind of learning systems we could hope to have, and what will a theory of those look like. Given advances in ML, the guiding principle is that the default baseline is that with enough data and compute we can achieve any goal Suppose that we have some domain $\mathcal{X}$ of natural data - images, texts, etc.. We also have access to some distributions $X$ over $\mathcal{X}$. We could imagine that there is a "baseline distribution" $X_0$ and these distributions are of the form $X = X_0|A$ for some event $A$ (e.g., Images conditioned on being one of 10 classes and sampled from Flickr). We have a set $\mathcal{C}$ of "semantic properties" - let's assume that each such property $c\in \mathcal{C}$ is a function $c:\mathcal{X} \rightarrow \{ \pm 1 \}$. Some tasks we would want to do are the following: 1. __Classification:__ compute $c(x)$ for $c\in \mathcal{C}$ and $x\in\mathcal{X}$. 2. __Likelihood:__ Given samples from $X$ and $x \in \mathcal{X}$, approximate $\log \Pr[ X=x]$. 3. __Generation:__ Given samples from $X$, generate fresh sample $x \sim X'$ from $X'$ that is close to $X$. (we would also want to do tasks 2 and 3 for $X|A$ for some event $A$, as long as $A$ is "semantic" in the sense of being described via functions in $\mathcal{C}$) These tasks are all inter-related: 1. The notion of indistinguishability for $X'$ will be that $\mathbb{E}[c(X)] \approx \mathbb{E}[c(X')]$ for every $c \in \mathcal{C}$. 2. The likelihood and generation should be related to each other where $\log Pr[ X' = x]$ should approximately be equal to the estimate of $\log \Pr[ X =x]$. They can also be used to achieve other tasks. For example, the "philosophically right way" to achieve adversarial robustness with respect to some distance measure $\Delta$ and radius $\delta$ is, given $x$ to "decode it" to $x'$ such that $\Delta(x,x')\leq \delta$ and maximizes $\Pr[ X=x']$. This would correspond to a "consistent system of reasoning". Let's define a _good representation_ of $\mathcal{X}$ to be a function $Enc:\mathcal{X} \rightarrow \mathbb{R}^m$ such that for every $c \in \mathcal{C}$ there is a _linear_ function $\hat{c}:\mathbb{R}^m \rightarrow \mathbb{R}$ such that for every natural distribution $X$ over $\mathcal{X}$, $$\Pr_{x \sim X}[ c(x) \neq \mathrm{sign}(\hat{c}(\hat{x})) ] < \epsilon$$ where $\hat{x} = Enc(x)$. Another way to say this is that the $m$-dimensional random variables $\hat{x}|c(x)=1$ and $\hat{x}|c(x)=-1$ will have different means $\mu_+ , \mu_- \in \mathbb{R}^m$, and whose means will be well separated enough so that if we let $v = \mu_+ - \mu_i$ then the univariate random variables $\langle \hat{x}, v \rangle |c(x)=1$ and $\langle \hat{x}, v \rangle | c(x)=-1$ will be well separated. Advances in machine learning strongly suggest that (1) good representations exist, and (2) with enough data and computational resources we can find them. Such representations directly implies classification (since it reduces tasks to linearly separable data). While usually in theory we aim to explain why we can classify well, let's try to just assume we have a representation $Enc$ as a black box, and moreover that the representation is in the form of a Neural Network, and then try to work from there. Maybe we can even assume that we have $Dec:\mathbb{R}^n \rightarrow \mathcal{X}$ as a black box. That would mean that we can operate in the "good space" $\mathbb{R}^m$, and leave the question of how we get there to practice. Note that we do _not_ assume that such a representation is "succinct". In particular it could well be the case that $\hat{x}$ contains some "spurious information" such as the raw pixels of $x$ in Images etc. We just assume that the representation of $\hat{x}$ is rich enough so that it can translate semantic functions to linear ones. In particular the distribution $\hat{X}$ will certainly have many correlations and so it will _not_ be distributed close to Normal. We still need a notion of what it means to be a "natural distribution" $\hat{X}$ over $\mathbb{R}^m$. One notion could be the following: $\Pr[ \hat{X} = x] \propto \exp(-\parallel f(x) \parallel^2)$ for some "nice" function $f:\mathbb{R}^m \rightarrow \mathbb{R}^d$ and let's say that moreover the distribution $f(\hat{X})$ is indistinguishable from the normal distribution over $\mathbb{R}^d$. This would mean that if we have an "inverter" $g:\mathbb{R}^d \rightarrow \mathbb{R}^m$ such that $g(f(\hat{x})) \approx \hat{x}$ with high probability over $\hat{x} \sim \hat{X}$, then we can sample from $X'$ by choosing $y \sim N(0,I_d)$ and outputting $g(y)$. Indeed, suppose otherwise that there was a distinguisher $\hat{c} \in \hat{\mathcal{C}}$ between $g(N(0,I_d))$ and $\hat{X}$. Then $\hat{c} \circ g$ would distinguish $N(0,I_d)$ and $f(\hat{X})$. We call $f$ the "extractor", denote it by $Ext$ and $g$ the "generator" and denote it by $Gen$. Note that $Dec \circ Gen$ is a GAN. ## How to find such components Suppose we have a pre-trained encoder $Enc$ and access to a natural distribution $X$. We can then try to find the smallest $d$ and NNs $Ext,Gen, Dec$ such that $$Dec(Gen(Ext(Enc(x)))) \approx x$$ for $x\sim X$. The idea is that by finding the smallest $d$ we force $Ext$ to erase any "raw pixel" or other "cheating methods", and this might ensure that $Ext(Enc(x))$ is as "distilled" as possible would would encourage it to be come indistinguishable from $N(0,I_d)$. We can also try to look at variants such as checking that $$Dec(Gen(\eta + Ext(Enc(x)))) \approx x$$ where $\eta \sim N(0,\delta \cdot I_d)$ is some "noise vector". This might help in ensuring we are not cheating by encoding in $d$ dimensions $\gg d$ numbers by abusing the low order digits. ### Completing a "learning system" without access to data Suppose that we already have a "pre-trained" $Enc$ and $Dec$. (This might happen if $Enc$ was obtained by taking a large corpus of data and doing completion tasks, which naturally yield $Dec$ as well.) Then the following is a natural approach to complete the system and get $Ext$ and $Gen$ _without access to data_. This can be useful if $Enc$ and $Dec$ have been trained with lots of data and compute that we don't have access to. If we have both $Enc$ and $Dec$ then we could try to attempt to get $Ext$ and $Gen$ _without any access to data_ by trying to find the __largest__ $d$ and algorithms $Gen,Ext$ such that $$Ext(Enc(Dec(Gen(y)))) \approx y$$ for $y \sim N(0,I_d)$. (Note that the larger $d$ is, since for example if we can solve the task for $d$, we can solve it for $d-1$ by just hardwiring a constant picked as random Gaussian to the last coordinate.) The philosphy here is that if we assume that the set $\{ \hat{x}\in \mathbb{R}^m | Enc \circ Dec(\hat{x}) = \hat{x} \}$ corresonds to the manifold of the support of $\hat{X}$, then by making $d$ large we force $Gen$ to saturate this manifold. Once again, we can also look at the noisy variant, looking for $Gen,Ext$ such that $$Ext(Enc(Dec(Gen(\eta + y)))) \approx y$$ for $y \sim N(0,I_d)$ and $\eta \in N(0,\delta \cdot I_d)$. ### Thoughts on Preetum's comment Preetum makes the very correct observation that the Decoder could be trivial. To make this concrete, suppose that our data is composed of sentences or paragraphs, and we obtain the encoding by trying to impute 10% missing words from the remaining 90%. The encoding of a sentence $x$ can be a concatenation of the values all the neurons of the networks when we do this for several different subsets. The encoding contains inside it all the original words and there is a trivial decoder that will be successful with 100% probabilty, but we the "right" decoder would use the imuputations and so we can assume that the right decoder is not completely trivial. One way to think of this is as follows - let $S \subseteq \mathbb{R}^m$ be the set of actual encodings that can arise from real sentences. For simplicity we can assume that the true distribution on data induces the uniform distribution over $S$. If we are given an encoder and a decoder then we get from them the set $\tilde{S}$ which is the set of all encodin gs $\hat{x}$ such that the encoding of the decoding of $\hat{x}$ is close to $\hat{x}$. If the decoder is trivial then this set could be very large, but if the decoder is not trivial then $\tilde{S}$ could be a good approximation of $S$, and now we can hope to find $Ext,Gen$ that would allow us to give an approximation of the uniform distribution over $\tile{S}$.

    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