Akshay Kulkarni
    • 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
    • Engagement control
    • 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 Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control 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
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Notes on "[Active Mixup for Data-Efficient Knowledge Distillation](https://arxiv.org/abs/2003.13960)" ###### tags: `notes` `knowledge-distillation` `active-learning` `image-mixup` Author: [Akshay Kulkarni](https://akshayk07.weebly.com/) ## Brief Outline They propose to blend active learning ([Gissin and Shalev-Shwartz, 2019](https://arxiv.org/abs/1907.06347)) and image mixup ([Zhang et. al. 2017](https://arxiv.org/abs/1710.09412)) to tackle data-efficient knowledge distillation from a blackbox teacher model. ## Introduction - Synthesize a big pool of images from few training examples by *mixup* and then use *active learning* to select the most helpful subset from the pool to query the teacher model. - Treat the teacher model's outputs as ground truth labels and train the student network using them. - Image mixup ([Zhang et. al. 2017](https://arxiv.org/abs/1710.09412), [Guo et. al. 2019](https://arxiv.org/abs/1809.02499), [Berthelot et. al. 2019](https://arxiv.org/abs/1905.02249)) synthesizes a virtual image by a convex combination of two training images. While the resultant image maybe cluttered or semantically meaningless, it resides near the *manifold* of the natural images. - A large mixup pool will provide a good coverage of the manifold of natural images. Thus, it is expected that a student network imitating the teacher on these mixup images can give similar predictions to test set images as the teacher model does. - Instead of querying the blackbox teacher model by all the mixup images, they use active learning to improve the querying efficiency. Check out [these paper notes](https://hackmd.io/@akshayk07/Sk0KdyMOL) for some information on active learning. ## Methodology Given a blackbox teacher model and a small number of unlabeled images, the approach iterates over the following 3 steps: 1. constructing a big candidate pool of synthesized images from the small number of unlabeled images 2. actively choosing a subset from the pool for which the current student network is the most uncertain 3. querying the blackbox teacher model to acquire labels for this subset and to retrain the student network ### Constructing a candidate pool - Given two natural images $x_i$ and $x_j$, mixup generates multiple synthetic images by a convex combination of the two with different coefficients, $$ \hat{x}_{ij}(\lambda) = \lambda x_i + (1 - \lambda)x_j \tag{1} $$ - Here, the coefficient $\lambda \in [0, 1]$. This technique is handy and effective as it exponentially expands the size of the initial image pool. - The pool of synthetic images can be viewed as a dense sampling of the convex hull of the natural images. The test images likely fall into (or close to) this convex hull assuming the initial images are diverse and representative. ### Actively choosing a subset - Let $\{\hat{x}_{ij}(\lambda), \lambda \in [0, 1], i \neq j\}$ denote the augmented pool of virtual images. It is straightforward to query the teacher to obtain (soft) labels for all these, but this may incur high computational and financial costs. - Instead, use active learning to reduce the cost. Define the student network's confidence over an input $x$ as $C_1(x):=\max_yP_s(y|x)$ where $P_s(y|x)$ is the probability of input $x$ belonging to the class $y$ predicted by the student network. - Less confidence implies that student network can gain more from the teacher's label for the input. Ranking all the sythethic images in the pool and choosing the top ones may lead to near-duplicated images (same image with slightly different $\lambda$ gets selected because of very low confidence). - Thus, they rank image pairs in the candidate pool. They define the confidence of the student network over a pair of images $x_i$ and $x_j$ as $$ C_2(x_i, x_j) := \min_\lambda C_1(\hat{x}_{ij}(\lambda)), \lambda \in [0, 1] \tag{2} $$ - So, synthetic image is selected if the confidence score $C_2$ is among the lowest $k$ ones. Note that size of query set $k$ is a hyperparameter. ### Training the student - Query the blackbox teacher model with the actively selected set of images, and use the soft predictions as labels for the images. - Merge them with the previous dataset (if it's not the first step) to train the student network using a cross entropy loss. ![Overall Algorithm](https://i.imgur.com/KniS8zn.png) ## Ablation Study ### Data Efficiency and Query Efficiency - They investigate how the results change as they vary the total number of unlabeled real images (data efficiency) and the number of synthetic images selected by the active learning scheme (query efficiency). - The more synthetic images selected by their confidence scores (Eq. 2), the higher quality the distilled student network is. Similarly, higher the number of unlabeled real images, higher the distillation success rate. - If number of synthetic images is high, then gain is diminishing as number of real images is increased. - Another trend that can be seen is that if number of real images are halved, it can be complemented by doubling the number of synthetic images to maintain a similar distillation success rate. ### Active Mixup vs Random Search - For a fair comparison, they give the same set of natural images to both random search and active mixup. - Since active mixup avoids redundancy by using the improved confidence score (Eq. 2), they equip random search with similar capability by using a single coefficient $\lambda=0.5$ to construct synthetic images. - Results show that active mixup outperforms random search, which verifies the query efficiency of the proposed method. ### Active Mixup vs Vanilla Active Learning - Active mixup improves on the vanilla scheme by selecting only one synthetic image at most from a pair of real images. To quantize the improvement, they replace the active mixup with vanilla active learning scheme. - The vanilla approach performs worse than both active mixup and random search. This is because it selects nearly duplicated images to query the teacher model. - The prominent improvement suggests that the constraint imposed by $C_2$ in Eq. 2 is crucial to the approach. ## Extra Experiments ### Active Mixup with Out-of-Domain Data for KD - They attempt to use their technique in case actual training data is unavailable but some other data for similar task is available (i.e. there is a domain gap between the actual and available datasets). - They claim similar performance with out-of-domain data as using in-domain data with their approach. - Higher distillation accuracy is obtained for more number of real images (out-of-domain) used. - Without the original training data, mixup augmentation is critical to boost the performance. ## Conclusion - Available examples for KD are not sufficient to represent the variation in the original training data. So, the authors propose a mixup augmentation. - Blackbox teacher models are often expensive to query, so the authors propose to use an active learning scheme. - Thus, they apply a combination of mixup and active learning for data efficient KD.

    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