<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jeffrey Hetherly on Medium]]></title>
        <description><![CDATA[Stories by Jeffrey Hetherly on Medium]]></description>
        <link>https://medium.com/@jeffrey.hetherly?source=rss-fb5f4b66eadb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*gCIGpHCmMDqJRZY8.</url>
            <title>Stories by Jeffrey Hetherly on Medium</title>
            <link>https://medium.com/@jeffrey.hetherly?source=rss-fb5f4b66eadb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 17:41:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jeffrey.hetherly/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Source Contrastive Estimation: It Removes Noise, Too!]]></title>
            <link>https://medium.com/@jeffrey.hetherly/source-contrastive-estimation-it-removes-noise-too-dc8626835e8e?source=rss-fb5f4b66eadb------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc8626835e8e</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[audio]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Jeffrey Hetherly]]></dc:creator>
            <pubDate>Mon, 23 Apr 2018 22:41:10 GMT</pubDate>
            <atom:updated>2018-04-23T22:41:10.354Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HUURwzfv-i4AtmSaq6j4Fg.jpeg" /></figure><h3>Using source embeddings to remove dynamic noise from monaural audio</h3><p>Imagine you’re recording a weekly company meeting, which you plan to transcribe later. You place your smartphone at the center of your meeting table, hit <em>record</em>, and start deliberating your team’s weekly goals. While transcribing the audio the following day, you’re shocked at how difficult it is to understand at times. What was a lively debate during the meeting turns into a garbled mess because cars are honking in the background. Fluorescent light fixtures and HVAC in the meeting room also contribute to an irritating hum throughout the recording. Halfway through the meeting your colleague let some fresh air in by opening a window. This had the unintended consequence of also letting in loud, distracting barking-dog noise from the kennel across the street.</p><p>The issues touched on in the above scenario are among the central concerns of monaural (single-track) audio processing. The human auditory system is capable of localizing and isolating different audio sources and focusing only on those it determines to be most interesting. We do this subconsciously using our complex array of auditory senses coupled with sophisticated cognitive processing which includes understanding the context in which the sounds occur. A single microphone on a smartphone (in reality, phones typically use <a href="https://www.quora.com/How-many-mic-does-the-iPhone-have">arrays</a>, though their offsets are small) lacks this sophisticated machinery humans have of filtering out distractions. Our <a href="https://gab41.lab41.org/introducing-source-contrastive-estimation-d63ab9844e3">previous blog post</a> on source contrastive estimation (SCE) for blind source separation shows how deep neural networks can be leveraged to isolate different speakers in monaural audio recordings. This post outlines Lab41’s work on adapting this technique to remove noise sources from monaural recordings as well.</p><p>Going back to the weekly meeting scenario, there are two types of noise present: <a href="https://en.wikipedia.org/wiki/Stationary_process">stationary</a> and non-stationary (or, dynamic). The stationary noise comes from the constant hum originating from the light fixtures. This type of noise is easily detected and removed with traditional signal processing techniques such as Wiener or Kalman filters. These techniques rely on the noise having some statistical regularity and are a standard part of many commercial audio pipelines. Dynamic noises are much more difficult to remove. The noises from the barking dogs are a good example of non-stationary noise. The following figure illustrates the lack of statistical regularity in both the audio waveform and spectrogram of a barking dog versus noise from an HVAC system (white noise).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*dRHfpZzLlZaH7wo3N2R6dw.png" /></figure><p>While, dynamic noise reduction is popular in consumer devices (noise cancelling headphones, etc.), they all rely on having a fixed microphone array specially calibrated for certain tasks (e.g., smartphones listen for human voice commands, etc.). This is not the case in many scenarios, including those with distant speakers (recording devices are poorly calibrated for this), an unknown number of distracting noises, rooms having an unknown impulse response, and so on. Removing the stationary noise is a relatively straightforward task. Identifying and extracting the dynamic noise is more difficult and requires modeling and automatically isolating the specific sources of each noise type.</p><p>Over the last decade, machine-learning approaches have started to see success in removing dynamic noise. In particular, adaptation of <a href="http://ieeexplore.ieee.org/document/6544586/">matrix factorization techniques</a> to the processing of spectral representations of audio signals has proven useful. These methods can be difficult to make <a href="https://www.merl.com/publications/docs/TR2015-023.pdf">performant</a>, and in many cases additional complexity is required to model source characteristics accurately. While we explored one such method (sparse non-negative matrix factorization (SNMF)), this algorithm shows suboptimal performance when compared to nonlinear approaches (i.e. neural networks).</p><p>Removing dynamic noise requires a significant amount of modeling to disambiguate both signals (human speakers) and noises (i.e. barking dogs), each of which has very complex temporal patterns. Wouldn’t it be nice if the temporal patterns for each source could be learned rather than resorting to linear approximations or coming up with ad-hoc, handcrafted models? Indeed, deep neural networks are well suited for such tasks as demonstrated in our work using SCE to separate multiple speakers in monaural audio. We leveraged this work to model a set of noise sources along with human voices in order to separate them. However, we made a few improvements that further optimize the source-separating power in the context of denoising.</p><p>Recall that SCE learns a dense “embedding vector” representation for each of the time-frequency (<em>t-f</em>) values in an FFT spectrogram. Each <em>t-f</em> value is assigned to a known set of sources through an all-or-nothing masking procedure (every <em>t-f</em> value is assigned to one, and only one, source). During training, vectors that belong to different sources are pulled apart while vectors from the same source are pushed together. To then isolate sources, a vector is computed for every <em>t-f</em> value and clustering is performed using <em>K</em>-means to group <em>t-f</em> values. Each group of <em>t-f</em> values is then back-transformed through an inverse FFT (iFFT) operation into a resulting waveform. This is an optimal procedure when the following criteria are met:</p><p>1. An arbitrary number of sources are to be separated</p><p>2. The number of sources is constant and known</p><p>3. The clusters for all sources in the embedding space are isotropic and well-separated (i.e. conducive to <em>K</em>-means clustering)</p><p>Our solution to denoising draws inspiration from recent work on <a href="https://arxiv.org/abs/1611.06265">music-singer separation</a>. Here, too, there exist just two broad categories of sources to separate. Instead of clustering the embedding vectors, a nonlinear transformation is learned that takes each vector and learns so-called “ratio masks” that proportionally split each <em>t-f</em> value between both “singer” and “music” categories. The process of estimating these masks is called mask inference (MI). The spectral magnitude is then multiplied by each ratio mask and run through an iFFT operation to yield the waveforms for each source. During training, a loss term that corresponds to the reconstruction error of the ratio-masked spectrogram is added to a deep clustering (DC) loss. In our implementation we used the SCE loss rather than the DC loss. This two-source architecture is diagramed below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*PSVJXbC4JOtgnGWvjLJfLw.png" /></figure><p>Here we see that after the spectral magnitude is fed through four bi-directional LSTM (BLSTM) layers and a final linear reshaping layer (Z), the output is funneled to both a clustering objective and ratio mask objective specifically designed to separate only signal (human speech) and noise (e.g.,barking dogs).</p><p>We trained ours and several other network architectures and compared denoising performance using a combination of the <a href="http://www.openslr.org/12/">LibriSpeech</a> spoken word and the <a href="https://serv.cusp.nyu.edu/projects/urbansounddataset/">UrbanSound8K</a> noise datasets. The noises involved ranged from periodic (HVAC, jackhammer) to highly non-stationary (dogs barking, street music). As a deep learning baseline, we tested against a denoising autoencoder (DAE) whose objective was to reconstruct a clean spectrogram given a noised version. We also tested mask inference coupled with deep clustering (MI+DC) and mask inference coupled with SCE (MI+SCE). These two networks can perform both clustering © and mask inference (MI). Thus, we tested both methods of separating signal from noise.</p><p>The following is the performance of these algorithms in terms of source-distortion ratio (SDR) improvement versus input SNR.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*04CS8BO2vywuPQdoiPemNQ.png" /></figure><p>The performance of the mask inference head of SCE+MI is on par with the DC+MI (+13 dB at an input SNR of [-5,-4] dB) while the clustering performance of SCE (+11.5 dB) is slightly better than the clustering of the SCE+MI and DC+MI algorithms. Therefore, SCE may be more desirable when the number of sources to be separated is arbitrary. The performance of the deep learning-based methods is relatively consistent across input SNRs while SNMF sees more dramatic differences. Also, the improvements in SDR are greatest for inputs with lower in SNR. This can be explained by the fact that at higher input SNRs the signal is already quite prominent, so there is less room for improvement. And now, the performance versus noise type:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*WSWVT2WudIWfRiEuTA7dFw.png" /></figure><p>In general, the improvements in SDR are greatest for more statistically stationary noise sources and the deep learning methods perform quite well for both stationary and non-stationary noise sources.</p><p>With such promising results, there are several avenues to explore and improvements to be made. One such exploration is to better align the objectives of the <em>K</em>-means clustering and vector space learning (i.e. criterion 3 in the above discussion). Another method for potential improvement is to use waveforms as both input and output to a network that learns a sparse representation and is able to separate arbitrary numbers of sources.</p><h4>Lab41 is a Silicon Valley challenge lab where experts from the U.S. Intelligence Community (IC), academia, industry, and In-Q-Tel come together to gain a better understanding of how to work with — and ultimately use — big data.</h4><h4>Learn more at <a href="http://www.lab41.org/">lab41.org</a> and follow us on Twitter: <a href="https://twitter.com/_lab41">@_lab41</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc8626835e8e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Deep Learning to Reconstruct High-Resolution Audio]]></title>
            <link>https://medium.com/insight-data/using-deep-learning-to-reconstruct-high-resolution-audio-29deee8b7ccd?source=rss-fb5f4b66eadb------2</link>
            <guid isPermaLink="false">https://medium.com/p/29deee8b7ccd</guid>
            <category><![CDATA[insight-ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Jeffrey Hetherly]]></dc:creator>
            <pubDate>Fri, 23 Jun 2017 18:12:13 GMT</pubDate>
            <atom:updated>2017-09-18T18:43:50.989Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*MwXU-lEJQT7WCB-Mb4wZBQ.png" /></figure><p><em>Jeffrey Hetherly, Physics PhD and Insight AI Fellow, implemented cutting-edge research that was scheduled to be presented at ICLR 2017. He is now a Data Scientist at Lab41, an In-Q-Tel Lab, working on advances in machine learning for open source products. This project, made possible by Paperspace GPUs, also resulted in an active open source contribution to TensorFlow.</em></p><p><strong><em>Want to learn applied Artificial Intelligence from top professionals in Silicon Valley or New York?</em></strong><em> </em>Learn more about the <a href="http://insightdata.ai/?utm_source=dlaudio&amp;utm_medium=blog&amp;utm_content=top">Artificial Intelligence</a> program.</p><p>Audio super-resolution aims to reconstruct a high-resolution audio waveform given a lower-resolution waveform as input. There are several potential applications for this type of upsampling in such areas as streaming audio and audio restoration. One traditional solution is to use a database of audio clips to fill in the missing frequencies in the downsampled waveform using a similarity metric (see <a href="http://ieeexplore.ieee.org/abstract/document/7251945">this</a> and <a href="http://ieeexplore.ieee.org/document/7336890">this</a> paper). Inspired by the successful applications of deep learning to <a href="http://ieeexplore.ieee.org/document/7115171/">image super-resolution</a>, there is recent interest in using deep neural networks to accomplish this upsampling on raw audio waveforms. After prototyping several methods, I focused on implementing and customizing recently <a href="https://openreview.net/pdf?id=S1gNakBFx">published research</a> from the 2017 International Conference on Learning Representations (ICLR).</p><p>While there are a variety of domains where audio upsampling could be useful, I focused on a potential voice-over-IP application. The dataset I chose for this project is a collection of TED talks about 35 GB in size found <a href="http://www-lium.univ-lemans.fr/en/content/ted-lium-corpus">here</a>. Each talk is located in separate files with bit rates of 16 kilobits per second (kbps) which is considered high quality for speech audio. This dataset contains primarily well-articulated English speech in front an audience from a variety of speakers. These qualities regarding the TED talks are an approximation to what one may expect during a voice-over-IP conversation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*QhohESqkqN_J675RIWw7pA.png" /></figure><p>The preprocessing steps are outlined in the above figure. The first and last 30 seconds from each file are trimmed to remove the TED intro and closing. The files are then split into 2 second clips and a separate, 4x downsampled set of clips at 4 kbps are created along with a set at the original 16 kbps. 60% of the dataset are used during training while 20% are reserved for validation and 20% for testing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*mMu4bAZjHjxvyLKBzgKWIA.png" /></figure><p>The training workflow outlined in the above figure uses the downsampled clips of the data preprocessing steps and batch-feeds them into the model (a deep neural network) to update its weights. The model with the lowest validation score (denoted “Best Model”) is saved for later use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*TOWWDLnNNHV-3VjGzuxhwg.png" /></figure><p>The process of using the “Best Model” to upsample an audio file is given in the above figure. This workflow takes whole audio files, splices them into clips similarly to the preprocessing steps, sequentially feeds them to trained model, stitches the high-resolution clips back together, and saves the high-resolution file to disk.</p><h4>Model Architecture</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*92eC0ceeZju_898TSPyJwQ.png" /></figure><p>The model architecture I implemented was a <a href="https://arxiv.org/abs/1505.04597">U-Net</a> that uses a one-dimensional analogue of <a href="https://arxiv.org/abs/1609.05158">subpixel convolutions</a> instead of deconvolution layers. I used Tensorflow’s Python API to build and train the model while the <a href="https://github.com/jhetherly/EnglishSpeechUpsampler/tree/master/src">subpixel convolutional layers</a> are implemented using Tensorflow’s C++ API. The model works as follows:</p><ul><li>The downsampled waveform was sent through eight downsampling blocks that are each made of convolutional layers with a stride of two. At each layer the number of filter banks was doubled so that while the dimension along the waveform was reduced by half, the filter bank dimension was increased by two.</li><li>The bottleneck layer was constructed identically to a downsampling block which connects to eight upsampling blocks which have residual connections to the downsampling blocks. These residual connections allowed for the sharing of features learned from the low-resolution waveform.</li><li>The upsampling blocks used a subpixel convolution that reorders information along one dimension to expand the other dimensions.</li><li>A final convolutional layer with restacking and reordering operations was residually added to the original input to yield the upsampled waveform.</li><li>The loss function used was the mean-squared error between the output waveform and the original, high-resolution waveform.</li></ul><h4>Performance</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w8wU5sG8YP6QMOMDI_FlBw.png" /></figure><p>The above figure shows two quantitative measures of performance on a test sample after 10 epochs of training. On the left column are spectrograms of frequency versus time, and on the right are plots of the waveform amplitude versus time.</p><ul><li>The first row contains the spectrogram and waveform plots for the original, high-resolution audio sample.</li><li>The middle row contains similar plots for the 4x downsampled version of the original audio sample. Notice that 3/4 of the highest frequencies are missing in the downsampled frequency plot.</li><li>The last row contains the spectrograms and waveform plots for the output of the trained model.</li></ul><p>Inset are two quantitative measures of performance: the signal-to-noise ratio (SNR) and the log-spectral distance (LSD). Higher SNR values represent clearer-sounding audio while lower LSD values indicate matching frequency content. The LSD value shows the neural network is attempting to restore the higher frequencies wherever appropriate. However, the slightly lower SNR value implies that the audio may not be as clear-sounding.</p><p>The paper that inspired this architecture claimed to train on 400 epochs of data whereas I could train on only 10 epochs due to time constraints. A longer training period would likely result in increased clarity in the reconstructed waveform. Below you can listen to sample audio clips from the test set. The first 5 sec clip is the original audio at 16 kbps, the second is the downsampled audio at 4kbps, and the last is the reconstructed audio at 16kbps.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fw.soundcloud.com%2Fplayer%2F%3Furl%3Dhttp%253A%252F%252Fapi.soundcloud.com%252Ftracks%252F327936709%26show_artwork%3Dtrue&amp;url=https%3A%2F%2Fsoundcloud.com%2Fjeffrey-hetherly%2Ftrue-test&amp;image=http%3A%2F%2Fi1.sndcdn.com%2Fartworks-000228240513-6g4367-t500x500.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=soundcloud" width="800" height="166" frameborder="0" scrolling="no"><a href="https://medium.com/media/1cfc3e788925079cbbdf011cdd105afa/href">https://medium.com/media/1cfc3e788925079cbbdf011cdd105afa/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fw.soundcloud.com%2Fplayer%2F%3Furl%3Dhttp%253A%252F%252Fapi.soundcloud.com%252Ftracks%252F327936711%26show_artwork%3Dtrue&amp;url=https%3A%2F%2Fsoundcloud.com%2Fjeffrey-hetherly%2Fds-test&amp;image=http%3A%2F%2Fi1.sndcdn.com%2Fartworks-000228239674-qa4mml-t500x500.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=soundcloud" width="800" height="166" frameborder="0" scrolling="no"><a href="https://medium.com/media/ca0251ef89bdfe0ef32702e218d5fa86/href">https://medium.com/media/ca0251ef89bdfe0ef32702e218d5fa86/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fw.soundcloud.com%2Fplayer%2F%3Furl%3Dhttp%253A%252F%252Fapi.soundcloud.com%252Ftracks%252F327936710%26show_artwork%3Dtrue&amp;url=https%3A%2F%2Fsoundcloud.com%2Fjeffrey-hetherly%2Freco-test&amp;image=http%3A%2F%2Fi1.sndcdn.com%2Fartworks-000228240426-12gtic-t500x500.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=soundcloud" width="800" height="166" frameborder="0" scrolling="no"><a href="https://medium.com/media/ec203731ed35d1953e2e82c72975a0ac/href">https://medium.com/media/ec203731ed35d1953e2e82c72975a0ac/href</a></iframe><h4>Open-source contributions</h4><p>The reconstruction of downsampled audio can have a variety of applications, and what is even more exciting is the possibilities of applying these techniques to other non-audio signals. I encourage you to adapt and modify the code available in my <a href="https://github.com/jhetherly/EnglishSpeechUpsampler">github repo</a> to experiment along these lines.</p><p>In addition to making available the code for these experiments, I had a desire to contribute additional open source materials for the growing applied AI community. Since the subpixel convolution layer is a general operation that might be useful to deep learning researchers and engineers alike, I’ve been <a href="https://github.com/tensorflow/tensorflow/pull/9376">contributing back to TensorFlow</a> and working closely with their team to integrate into their codebase.</p><p><strong><em>Want to learn applied Artificial Intelligence from top professionals in Silicon Valley or New York?</em></strong><em> </em>Learn more about the <a href="http://insightdata.ai/?utm_source=dlaudio&amp;utm_medium=blog&amp;utm_content=bottom">Artificial Intelligence</a> program.</p><p><strong>Are you a company working in AI and would like to get involved in the Insight AI Fellows Program?</strong> Feel free to <a href="/service/mailto:info@insightdata.ai">email us</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29deee8b7ccd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/insight-data/using-deep-learning-to-reconstruct-high-resolution-audio-29deee8b7ccd">Using Deep Learning to Reconstruct High-Resolution Audio</a> was originally published in <a href="https://medium.com/insight-data">Insight</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>