<?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 Daniël Heres on Medium]]></title>
        <description><![CDATA[Stories by Daniël Heres on Medium]]></description>
        <link>https://medium.com/@danilheres?source=rss-4deb50a43329------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*lXg-X7Ux6Ko6bULPwRkcAA.png</url>
            <title>Stories by Daniël Heres on Medium</title>
            <link>https://medium.com/@danilheres?source=rss-4deb50a43329------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 04:33:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@danilheres/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[Increasing the level of parallelism in DataFusion 4.0]]></title>
            <link>https://medium.com/@danilheres/increasing-the-level-of-parallelism-in-datafusion-4-0-d2a15b5a2093?source=rss-4deb50a43329------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2a15b5a2093</guid>
            <dc:creator><![CDATA[Daniël Heres]]></dc:creator>
            <pubDate>Tue, 11 May 2021 07:22:56 GMT</pubDate>
            <atom:updated>2021-05-11T10:46:34.470Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://github.com/apache/arrow-datafusion"><strong>DataFusion</strong></a> is a next generation data processing engine written in the <a href="https://www.rust-lang.org/">Rust programming language</a>. The design of DataFusion based on the in-memory <a href="https://arrow.apache.org/">Arrow data format</a> makes DataFusion a scalable and flexible engine that excels both at low-latency, in-memory analytics for interactive Data Science &amp; BI workloads and queries / transformations on data lakes.</p><p>With the <a href="https://arrow.apache.org/blog/2021/04/12/ballista-donation/">recently donated Ballista</a>, one of the projects goals is to scale this engine to terabyte and even petabyte workloads.</p><p>In DataFusion 4.0 we are bringing some improvements to the level of parallelism you can expect from your queries, with two main features: <em>automatic repartitioning </em>and a <em>partitioned hash join</em> implementation.</p><p><strong>Automatic Repartitioning</strong></p><p>DataFusion supports parallelism to benefit from the number of cores in a CPU. For achieving parallelism, the engine will split parts of a query that each can run on a different thread to accelerate the query execution.</p><p>In DataFusion, currently the main source of parallelism is on a partition level. DataFusion uses the <a href="https://tokio.rs/">Tokio</a> runtime to schedule the tasks and run them on different threads. DataFusion supports out-of-core processing to minimize the amount of memory needed by streaming and processing the data in small batches (configured by default as 8192 rows).</p><p>To benefit from the parallelism you can split your data into multiple partitions by saving them in multiple Parquet files, or loading your data into memory into multiple partitions using <a href="https://docs.rs/datafusion/4.0.0/datafusion/datasource/memory/struct.MemTable.html#method.load">MemTable::load</a>.</p><p>If you have only a single file or if the number of partitions in a query is reduced by including e.g. a hash aggregate or a ORDER BY, it can also help to repartition intermediate results. This will again split the data into multiple partitions, so it can benefit from running on more cores.<br>As this is very cumbersome to do manually, DataFusion 4.0 automatically repartitions the data based on the level of concurrency available by introducing a <a href="https://github.com/apache/arrow/pull/9865">Repartition</a><strong> </strong>optimization rule. Whenever the plan has a lower amount of concurrency than configured or detected by the number of CPU cores, it will insert a Repartition node. In the benchmarks of TPC-H, we observe speed ups of up to 6x for data that is loaded as a single partition (as measured on a modern 8-core laptop).</p><p>As DataFusion uses micro-batches to stream and group data together (vectorized execution), repartitioning in DataFusion is extremely cheap. On a single node the only thing it will do is to change some references to the batches, but it will not copy the data itself!</p><p><strong>Partitioned Hash Join a.k.a. Grace Join</strong></p><p>DataFusion has a very fast hash join implementation. One of the performance improvements in version 4.0 is the introduction of <a href="https://github.com/apache/arrow/pull/9116">vectorized hashing</a>, speeding up some queries more than 40%.</p><p>Before version 4.0, the default join algorithm was a classic hash join implementation similar to the <em>broadcast join</em> in Spark: it will first collect the entire left side (that means, all files/partitions) of the join into memory, and creates an in-memory index on the columns using a hash table. Finally it processes the right side partitions.</p><p>To scale the implementation, DataFusion 4.0 introduces the use of a <em>partitioned</em> hash join. The algorithm will partition both sides of a join based on the hashed key values, and divides them into <em>n </em>partitions using the modulo function. The number of partitions is equal to the configured concurrency, which defaults to the number of CPU cores.</p><p>This has two important benefits:</p><ul><li>It will enable more concurrency, as we can build the hashmap for the left side in multiple threads for each created partition. This can lead to improvements of more than 40% depending on the query.</li><li>In Ballista, this allows processing bigger data sets, as the data can be split over multiple machines</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/0*MESTQfGZeCSTY5jV" /><figcaption>illustration of GRACE hash join — <a href="http://blog4fun.github.io/blog/2014/01/29/hash-based-join-algorithms-for-rdbms/">source</a></figcaption></figure><p>This algorithm will not <em>always</em> be faster than collecting the left side into one partition, if the left side of the join is very small (and the right side big), it can be faster to <em>not</em> repartition in the left and right side. In DataFusion 4.0, the partitioned hash join will be enabled by default as in many situations it leads to increased performance, but it can be disabled on a global level. In future versions of DataFusion an optimization could be added to choose between the two different options based on statistics.</p><p><strong>Other</strong> <strong>notable DataFusion features in the new release</strong></p><p>There were lot’s of other notable features being contributed, too many to list here.</p><p>Some highlights include:</p><ul><li>Predicate pushdown using Parquet statistics</li><li>Addition of <a href="https://github.com/apache/arrow/pull/9762#issuecomment-803620665">catalog</a> functionality</li><li>UNION ALL and CTE support</li></ul><p>And much more — check out the blog post <a href="https://arrow.apache.org/blog/2021/05/03/4.0.0-release/">here</a></p><p><strong>Conclusion</strong></p><p>With these additional features, DataFusion runs faster and uses more of the available hardware. The features also are preliminary work for Ballista to perform distributed data processing. With features like mentioned in the article, DataFusion is becoming a really powerful engine capable of speeding up many analytical workloads.</p><p>Lot’s of improvements to DataFusion are in the works and on the roadmap, some of which are currently being worked on by the DataFusion community:</p><ul><li>Faster Parquet reader, see for example this experimental parquet 2 repository <a href="https://github.com/jorgecarleitao/parquet2">https://github.com/jorgecarleitao/parquet2</a></li><li>Improvements to hash aggregates, such as using vectorized hashing and using hash partitioning for aggregates with high cardinality</li><li>More optimization rules, such as those that benefit from the knowledge of the partitioning of the data at different stages in a query</li><li>Improvements to core Arrow operations, like using from more <a href="https://github.com/apache/arrow-rs/pull/9">SIMD instructions</a> that the compiler can produce based on <a href="https://en.wikipedia.org/wiki/Automatic_vectorization">auto-vectorization</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2a15b5a2093" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Addressing Pipeline Debt with PowerSQL 0.3]]></title>
            <link>https://medium.com/@danilheres/addressing-pipeline-debt-with-powersql-0-3-bb7fde5844a6?source=rss-4deb50a43329------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb7fde5844a6</guid>
            <category><![CDATA[dbt]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[etl]]></category>
            <dc:creator><![CDATA[Daniël Heres]]></dc:creator>
            <pubDate>Mon, 20 Jul 2020 17:22:01 GMT</pubDate>
            <atom:updated>2020-07-20T18:27:43.883Z</atom:updated>
            <content:encoded><![CDATA[<p>TL;DR <a href="https://github.com/Dandandan/PowerSQL">PowerSQL 0.3</a> adds easy data testing using SQL expressions</p><p>As data analysts, data scientists and data engineers are using more and more data, the quality of the data becomes critical. Your daily forecast will happily output an incorrect forecast given incorrect input data. Product recommendations will be misleading if data about some product categories are unexpectedly removed.</p><p>The more the data is transformed by different teams, systems and ETL / ELT jobs, the more likely it becomes that each step in the pipeline contains errors and leads to incorrect data. The less we test this and verify whether transformations are correct, the more errors we can expect. More Technical Debt will build up over time - and more specifically - Pipeline Debt.</p><p>With <a href="https://github.com/Dandandan/PowerSQL">PowerSQL</a> we are addressing Pipeline Debt. PowerSQL 0.3 introduces ASSERT-based testing which allows you to write a test suite using plain SQL. &quot;Pipeline tests” test data rather than code. An assertion consist of a condition and a message. It can test anything, like a non-NULL assertion to see whether the values are always filled:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*U6UExtvfqhC2Ndtko0j-hg.png" /><figcaption>Non-NULL check</figcaption></figure><p>We would also like to test expectations: statistical properties of our data. Such as: &quot;At least 70% should have a quantity lower than 10&quot;:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ie46fBIdopZJAUeUltk6uw.png" /><figcaption>Statistical test using the expressiveness of SQL</figcaption></figure><p><a href="https://github.com/Dandandan/PowerSQL">PowerSQL</a> gives data teams the power to test their data with the expressiveness of SQL. In addition to syntax and type checking of your code, testing will contribute to robust data transformations and fight Pipeline Debt.</p><p>Please give <a href="https://github.com/Dandandan/PowerSQL">PowerSQL</a> a test drive and let us know what you think!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb7fde5844a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond A/B Testing: How to Optimize Anything]]></title>
            <link>https://medium.com/@danilheres/beyond-a-b-testing-how-to-optimize-anything-1c1ec160381e?source=rss-4deb50a43329------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c1ec160381e</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[hyperparameter-tuning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Daniël Heres]]></dc:creator>
            <pubDate>Wed, 22 May 2019 06:09:14 GMT</pubDate>
            <atom:updated>2019-05-23T18:56:01.076Z</atom:updated>
            <content:encoded><![CDATA[<p>Tech companies exist to improve. Whether they select the best UI design for a high <em>click-through rate</em>, increase the time people spend on a platform by serving better <em>recommendations</em> or improving <em>machine learning models</em> by optimizing the hyper parameters. The product you want to optimize can be everything: a website, a mobile application or even a robot and self-driving cars.</p><p>If you care about improving something, you need to measure the impact of your changes. A classical and pragmatic approach is to use <strong>A/B testing</strong>. You create two different alternatives: one &quot;control&quot; version A<strong>,</strong> which is the same as before, and one version B<strong> </strong>which you hope improves over version A. If you set up your experiment well you can statistically test whether your change is really an improvement. You can also test more alternatives at the same time, as long as you get enough samples.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xg1O6uOYpFamYuOu8O9uig.png" /><figcaption>A/B testing: setting up variations, measuring outcomes by collecting data and selecting the best one.</figcaption></figure><p>While this is a very valuable strategy (and I advise you to start doing it if your organization or team doesn’t already use it), there are a couple of problems with this approach:</p><ul><li>The number of alternatives and configurations that can be tested this way is very limited. Trying a high variety of designs, options, combinations of choices (e.g. multiple A/B tests), sizes and algorithm parameters is not feasible in A/B testing. We will never get close to the most optimal result this way, as we don&#39;t <strong>explore</strong> enough.</li><li>Not choosing an optimal version while testing costs money (not enough <a href="https://medium.com/@dennybritz/exploration-vs-exploitation-f46af4cf62fe">exploitation</a>). If the difference between different versions is big, we could choose to decrease the frequency of the second variation appearing earlier in the process.</li><li>It takes a lot of manual steps to setup, run and evaluate experiments</li><li>It assumes that the best configuration will remain consistent over time: based on the A/B-test result we will choose only one alternative which we keep static. For fast changing environments, running the same A/B Test regularly can be required.</li></ul><h3>Black Box Optimization</h3><p>You can think of your software as a function, if you tune it by changing certain <em>knobs/parameters</em>, you can improve your KPIs/metrics. The better you set those parameters, the better your organization or product is going to perform. However, you don’t know anything about how to change those parameters in order to improve on the metrics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*iHAszM0x_8gw9se5pD8BTw.jpeg" /><figcaption>Tuning your product is like setting the knobs to the optimal values for the best sound</figcaption></figure><p>Enter <em>Black Box Optimization</em>. Black Box Optimization (BBO) stands for optimizing a function of which we don&#39;t know the shape. The only way to get information about how the function looks like is through <em>sampling</em>, iteratively trying out different parameters to get new measurements.</p><p>The great thing about Black Box Optimization is that there is already a large set of algorithms that are known to work well for optimizing alternatives and hyper parameters.</p><p>Evolutionary algorithms are examples of BBO methods. The idea here is that using a measure of <em>fitness</em> (your metric) and making <em>random changes </em>(or &quot;mutations&quot;), we select the best performing individuals out of a simulation and use that for the next step in our optimization process. A more advanced evolutionary search algorithm is for example <strong>CMA-ES</strong>, which smartly changes the distribution of the random mutations, by adapting it based on the best individuals in the previous population(s). You can see it visualized below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*GpHz-gT_KJUoj9wLEgbF_w.gif" /><figcaption>CMA-ES visualization, optimizing to the optimal value (the brightest yellow spot). Source: <a href="http://blog.otoro.net/2017/10/29/visual-evolution-strategies/">http://blog.otoro.net/2017/10/29/visual-evolution-strategies/</a></figcaption></figure><p>Another well known algorithm are those based on <strong>Gaussian Processes</strong>. The idea here is of that of uncertainty: if we didn&#39;t sample points close to existing solutions, we will be less certain about the exact values. We will iteratively pick the most promising and informative points based on this algorithm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cN5FGRftxNqpLT3ZLbpFsw.gif" /><figcaption>Guassian Process driven optimization. Note the decreasing uncertainty after sampling more points. from: <a href="http://efavdb.com/gaussian-processes/">http://efavdb.com/gaussian-processes/</a></figcaption></figure><p>Both of these algorithms can be used to optimize parameters of noisy and complicated functions and they turn out to be very useful for optimizing many parameters. There exist more advanced and even better performing algorithms, for example the <a href="https://arxiv.org/abs/1603.06560">Hyperband</a> method. Also, there are variations of the algorithms that can depend on variables / features (e.g. Contextual Bandits), or can capture state.</p><h3>How to Use It?</h3><p>So you want to use it to tune your own software? One popular example of a black box optimization tool is <a href="https://ai.google/research/pubs/pub46180">Google Vizier</a>. The novel part of that paper is that they showed how to build a service that can be concurrently used by lots of different services at the same time, using a simple to use API. You don’t need to be a Data Scientist to tune your parameters, and get the best selection of optimization algorithms for your problem.</p><p>Interestingly, the team also shows how to use it for a non-software problem: optimizing the ingredients of cookies. The algorithm quickly learns to avoid certain ingredients and converge to a cookie with a nice taste.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*TU_WvB_Pfjr2P3iD8SIzhw.jpeg" /><figcaption>Optimized cookies</figcaption></figure><p>Unfortunately, there doesn&#39;t seem to be a perfect open source alternative currently which covers all use cases and can integrate in all settings and environments. However, there seems to be a large momentum to develop and make those tools available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X_HW_d_AITFMxms5MABu5w.gif" /><figcaption>UI of Katib, showing studies, optimization space and progress</figcaption></figure><p>I collected a list of tools and platforms that are developed in black box optimization world.</p><p><strong>Katib</strong></p><p>Katib seems currently the most promising candidate for an open source implementation for Black Box Optimization. Integrated in Kubeflow, the tool focusses on an easy API and good integration into the rest of the Kubeflow ecosystem (e.g. end-to-end pipelines).</p><p><a href="https://github.com/kubeflow/katib">kubeflow/katib</a></p><p><strong>Sherpa</strong></p><p>Sherpa is a library for black box optimization for Python programs. It has a nice dashboard, support for parallelism, and a good collection of BBO algorithms.</p><p><a href="https://github.com/sherpa-ai/sherpa">sherpa-ai/sherpa</a></p><p><strong>Advisor</strong></p><p>Advisor is a stand alone hyper parameter tuning service with a similar API as Google Vizier. However, development on this tool seems to be stalled.</p><p><a href="https://github.com/tobegit3hub/advisor">tobegit3hub/advisor</a></p><p><strong>AI Platform</strong></p><p>In <a href="https://cloud.google.com/ml-engine/docs/tensorflow/hyperparameter-tuning-overview">AI Platform</a> (old name ML Engine) Google exposes Google Vizier to use for optimization of ML hyper parameters. This way you can optimize certain parts of your ML model, like the number of layers, hidden units, activation functions, learning rate and optimization algorithm, pooling and preprocessing parameters used.</p><p><strong>KerasTuner</strong></p><p><a href="https://elie.net/static/files/cutting-edge-tensorflow-keras-tuner-hypertuning-for-humans/cutting-edge-tensorflow-keras-tuner-hypertuning-for-humans-slides.pdf">KerasTuner</a> will be integrated into the TensorFlow ecosystem to easily optimize Keras models using Bayesian Optimization. While not usable as an API from a service, this shows that tight integration with other (ML) tools is one way how those algorithms will get used.</p><p><strong>SigOpt</strong></p><p>While being far from free, <a href="https://sigopt.com/product/">SigOpt</a> is one of the better known companies in the space. It has nice integrations with lots of tools and languages (R, Python, Java) and the company is building</p><h3>Closing Thoughts</h3><p>While we are clearly not there yet, Black Box Optimization is used more and more. We can expect it to automate model selections and improvements in machine learning architectures and algorithms, better tuning of reinforcement learning algorithms for robotics, selecting better designs for applications and much more.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c1ec160381e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Latest in AI Research — Issue #7]]></title>
            <link>https://medium.com/@danilheres/the-latest-in-ai-research-issue-7-c0f9e0121dce?source=rss-4deb50a43329------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0f9e0121dce</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[research]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Daniël Heres]]></dc:creator>
            <pubDate>Wed, 24 Apr 2019 20:17:14 GMT</pubDate>
            <atom:updated>2019-04-24T20:20:02.688Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Latest in AI Research — Issue #7</h3><p>The <a href="https://www.getrevue.co/profile/tlir/">AI Research newsletter</a> by Daniël Heres</p><p><a href="https://www.getrevue.co/profile/tlir/"><strong>Subscribe here to the newsletter The Latest in AI Research</strong></a></p><h3>Papers of Interest</h3><p><a href="https://d4mucfpksywv.cloudfront.net/better-language-models/language-models.pdf"><strong>Language Models are Unsupervised Multitask Learners</strong></a></p><p>Recently, learning and using contextual representations for Natural Language Processing became popular after techniques like <strong>ELMo</strong>, <strong>ULMFiT</strong> and<em> </em><strong>BERT</strong> were developed. Those techniques tackle the problem of <em>learning to represent</em> a sentence or document. This representation can then be <em>transferred</em> to other tasks, such as text classification or question answering. What the models have in common is that they all are <em>language models</em>: models that predict one or more hidden words or sentences given a previous context sentence. Such models can be used to <em>generate</em> text, by sampling a word from the model step-by-step and in the end generating a full sentence or document.</p><p>In this work, the authors from OpenAI show that scaling up a transformer-based language model, both in model size as measured by the number of parameters (1.5 billion) and the data set size, 40GB of textual data from Reddit links, filtered to have a minimum number of upvotes. They show that increasing the size of the model increases the accuracy of the model considerably.</p><p>Interestingly, the paper shows they don’t even have to fine-tune to achieve good or even state-of-the-art performance on a range of other NLP tasks. For example, simply appending the text “TL;DR:” (which stands for “too long; didn’t read”) after a document and sampling a number of words gets a good result on a summarization task.</p><p>Partly because OpenAI didn’t release the weights of the bigger model (as is normal in this subfield) it got a lot of attention in the media, with titles like <a href="https://www.wired.com/story/ai-text-generator-too-dangerous-to-make-public/">THE AI TEXT GENERATOR THAT’S TOO DANGEROUS TO MAKE PUBLIC</a> (Wired). After a heated online debate a live debate hosted by “This week in Machine Learning &amp; AI” <a href="https://www.youtube.com/watch?v=LWDbAoPyQAk">was streamed</a> live on YouTube.</p><p><a href="https://arxiv.org/abs/1904.08779"><strong>SpecAugment: A Simple Data Augmentation Method for Automatic Speech Recognition</strong></a></p><p><a href="https://ai.googleblog.com/2019/04/specaugment-new-data-augmentation.html"><strong>Blog</strong></a></p><p>Augmentation is used a lot in machine learning to learn more accurate models. For example, in computer vision, images can be rotated, mirrored, the contrast can be changed, etc. These transformations help preventing the model to only fit to the training data (also called <em>overfitting</em>), and allows it to perform better to data points it has never seen.</p><p>In this article the authors show a number of ways to augment data for speech recognition such as warping and masking audio features. When applying the data augmentation in combination with a good performing speech recognition model, the authors improve on existing state of the art results on LibriSpeech and Switchboard datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*3niHx_yFDZfZqimv" /><figcaption>SpecAugment</figcaption></figure><p><a href="https://d4mucfpksywv.cloudfront.net/Sparse_Transformer/sparse_transformers.pdf"><strong>Generating Long Sequences with Sparse Transformers</strong></a></p><p><a href="https://openai.com/blog/sparse-transformer/"><strong>Blog</strong></a></p><p>Transformers, or models with <em>attention</em>, have become popular recently, and are part of many state of the art models, especially in NLP. Attention is an algorithmic concept which allows a machine learning model to learn from sequential data. The attention weights are multiplied with the input data or intermediate representations, allowing it to “focus” on certain time steps more than on others. For the interested reader, see this informative <a href="https://staff.fnwi.uva.nl/s.abnar/?p=108">background article</a> which explains the relation to the idea of <em>routing </em>information and how it relates to the older idea of <em>capsule networks</em>.</p><p>However, as the authors argue, the self attention needs N * N attention matrix, which requires a lot of computation and memory. They therefore propose to use <em>sparse attention</em>: attention that only attends to a smaller (in this case the N * square root of N) subset of the elements in the sequence. The model can now be applied to problems with longer sequences, such as images and audio and learns sparser patterns, which the authors suggest may be beneficial. The model achieves state of the art performance on a couple of datasets, often using a lower number of parameters. The authors share the code for running the sparse attention kernels efficiently on a GPU.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/133/0*dLTEazBSmzMuX6rJ" /><figcaption>Generating images with Sparse Transformers. The white line is “attention” in layer 19</figcaption></figure><p><a href="https://arxiv.org/pdf/1807.06653.pdf"><strong>Invariant Information Clustering for Unsupervised Image Classification and Segmentation</strong></a></p><p>To get models to learn tasks with good accuracy, we often need models with a high number of human annotated labels. <em>Unsupervised learning</em> has the promise to cluster and find similarities in data automatically, but as of today it has relatively little use except in data exploration This is mainly because <em>supervised learning</em> usually leads to models that are much more accurate.</p><p>In this work a new unsupervised method is proposed that is achieving interestingly good performance on classification and segmentation tasks. The basic idea here is to apply a simple transformation, such as mirroring the image, and learn to map two of the same data points to have the same information.</p><p><a href="https://arxiv.org/abs/1903.08254"><strong>Efficient Off-Policy Meta-Reinforcement Learning via Probabilistic Context Variables</strong></a></p><p>Deep Reinforcement Learning is moving more and more from academic research towards practical use cases in robotics, self-driving cars and much more. One big downside however is the often enormous amount of simulation &amp; frames needed to train smart RL agents.</p><p>In this work, the authors propose an algorithm for meta-RL, which allows the algorithm to adapt better to new unknown environments, greatly improving the sample efficiency, the number of data points needed to learn a task. You can find the results on a number of tasks and the link to the code on <a href="https://paperswithcode.com/">Papers With Code</a>.</p><h3>Colorful Code and Delicate Datasets</h3><p><a href="https://medium.com/tensorflow/whats-coming-in-tensorflow-2-0-d3663832e9b8"><strong>TensorFlow 2.0</strong></a></p><p>TensorFlow 2.0 is coming! TensorFlow 2.0 will clean up of the TensorFlow API and remove tf.contrib, but will also focus on bringing foundations for the next wave of ML. TensorFlow 2.0 will focus on building best-practices and of the shelf models to TensorFlow with support for distributed learning and using tf.keras as an important building block.</p><p><a href="https://github.com/HazyResearch/metal"><strong>Snork Metal</strong></a></p><p>Snork Metal is an NLP framework which <a href="https://dawn.cs.stanford.edu/2019/03/22/glue/">achieves high performance</a> on the <a href="https://gluebenchmark.com/">GLUE natural language understanding</a> benchmark. The highest performing submissions use both <em>transfer learning</em> and <em>multi task learning</em> as a learning strategy, suggesting that this will be an important way of achieving highly performing models and predictions in the feature.</p><h3>Wonderful Web</h3><p><a href="http://www.incompleteideas.net/IncIdeas/BitterLesson.html"><strong>The Bitter Lesson</strong></a></p><p>In <em>The Bitter Lesson</em> Richard Sutton shares his view about the “bitter” lessons we can learn from the history of machine learning. He mainly shows that we rely more and more on “brute force” computation rather than rules and human-crafted algorithms. Instead, we use <em>learning </em>and <em>search </em>more to learn from data and simulations. The article received a lot of attention and also a number of responses from e.g. <a href="https://rodneybrooks.com/a-better-lesson/">Rodney Brooks</a> “A Better Lesson” and from <a href="https://staff.fnwi.uva.nl/m.welling/wp-content/uploads/Model-versus-Data-AI-1.pdf">Max Welling</a> “Do we still need models or just more data and compute?”</p><p><a href="https://www.youtube.com/watch?v=Ucp0TTmvqOE"><strong>Tesla Autonomy Day</strong></a></p><p>In a live streamed meeting with investors, Tesla showed their progress and approach on developing self-driving cars. The presentations show a lot of detail about the hardware they use, the models and the way they learn from data from the cars already driving on the roads.</p><p><a href="https://openai.com/blog/dota-2/"><strong>OpenAI vs Dota</strong></a></p><p>OpenAI showed that their reinforcement learning Dota agents can beat professional Dota players. The agents are trained using relatively standard reinforcement learning algorithms, LSTMs and manual reward shaping and many hours of self play (180 years in total). Also in public matches it defeated <a href="https://venturebeat.com/2019/04/22/openais-dota-2-bot-defeated-99-4-of-players-in-public-matches/">99.4% of the players.</a> A number of players found a strategy to beat the AI agents, which it couldn’t handle.</p><p><a href="https://www.getrevue.co/profile/tlir/"><strong>Like this issue? Subscribe here to the newsletter.</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0f9e0121dce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Latest in AI Research — Issue #6]]></title>
            <link>https://medium.com/@danilheres/the-latest-in-ai-research-issue-6-da198dab9343?source=rss-4deb50a43329------2</link>
            <guid isPermaLink="false">https://medium.com/p/da198dab9343</guid>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Daniël Heres]]></dc:creator>
            <pubDate>Tue, 18 Dec 2018 18:36:19 GMT</pubDate>
            <atom:updated>2018-12-18T18:36:19.808Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Latest in AI Research — Issue #6</h3><p><strong>Liked this post and want to get new items in your mailbox automatically? </strong><a href="https://www.getrevue.co/profile/tlir/issues/the-latest-in-ai-research-issue-6-139365"><strong>Sign up here</strong></a></p><h3>Papers of Interest</h3><p><a href="https://arxiv.org/abs/1810.04805"><strong>BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding</strong></a></p><p>In the last years, studies showed that pre-training a language model on a large collection of textual data and fine-tuning on a new set leads to superior results on natural language processing tasks. Pre-training in an unsupervised setting was already popularized by the <a href="https://arxiv.org/abs/1301.3781">word2vec</a> algorithm, but still was limited in settings where the size of the labeled dataset was large, mainly because of the limited way word vectors can provide representations of sentences and documents.</p><p>Recent methods such as <a href="https://arxiv.org/abs/1801.06146">ULMFit </a>and <a href="https://arxiv.org/abs/1802.05365">ELMo</a> already provided a step in this direction, but the authors of BERT take unsupervised pre-training a step further by training a language model that gets SoTA on a lot of tasks, namely Transformers, from the famous paper <a href="https://arxiv.org/abs/1706.03762">Attention Is All You Need</a> . Furthermore they give it a training objective that captures the whole sentence more: masking and predicting words in the text sequence.</p><p>How good BERT really performs can be seen by looking at the results on the leaderboard of the natural language understanding benchmark <a href="https://gluebenchmark.com/leaderboard">GLUE</a>. These results shows that using a language model can increase performance considerably on a wide range of tasks.</p><p><a href="https://arxiv.org/pdf/1806.07366.pdf"><strong>Neural Ordinary Differential Equations</strong></a></p><p>One of the papers winning the NeurIPS 2018 best paper awards introduces a new family of neural networks. Instead of defining a fixed number of hidden layers as in normal neural networks, an ODE network allows to represent continuous transformations. A intuition behind this idea can be found in the use of residual networks, a deep neural network model that incrementally computes transformations on top of previous hidden states. However small the transformations are and deep the model is, these models still define the network using a fixed number of hidden states.</p><p>The authors show how they define a network to be continuous in depth using a parameterization using an ordinary differential equation using a neural network and the use of black-box ODE solvers. They list a number of possible advantages: memory efficiency, adaptive computation (a way of controlling the trade off between accuracy vs computation time), parameter efficiency, and the use of the model for time-series problems with continuous time-intervals.</p><p>They show good results on some tasks like MNIST, time-series, density problems and space interpolations. Also they showed some current limitations of this model. The research provides a promising direction for more efficient and accurate models in the next years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*T1WCLNera6B2gbQ5" /><figcaption>Residual Network vs ODE Network visualization</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*XF5H4-bw3GwzCzvW" /><figcaption>RNN vs ODE network on predicition and interpolation</figcaption></figure><p><a href="https://arxiv.org/pdf/1811.12143.pdf"><strong>Learning to Reason with Third-Order Tensor Products</strong></a></p><p>Reasoning using machine learning is a topic gaining more and more interest. In the research community, a lot of discussions are going on about the current limitations of deep learning models and algorithms and what to do about that. One suggestion is often to include more structure in the way we build models and programs, often called symbols. These symbols refer to a constructs which would allow for better reasoning.</p><p>In the work “Learning to Reason with Third-Order Tensor Products” the authors suggest to use an architecture based on Tensor Product Representation (TPR) a method already proposed in 1990.</p><p>The proposed method provides a way to create embeddings for symbolic structures including relations between symbols, which allows the model to be learned using gradient descent optimization algorithms. They show the proposed model improves generalization and achieves State of the Art results on bAbI tasks, a synthetic data set created for the purpose of testing algorithms how they can perform reasoning using natural language.</p><p>The code for the model and evaluation is available on <a href="https://github.com/ischlag/TPR-RNN">GitHub.</a></p><p><a href="https://openreview.net/forum?id=ByfbnsA9Km"><strong>Cross-Entropy Loss Leads To Poor Margins</strong></a></p><p>Neural networks and other models are trained with cross entropy loss. This leads to good results on a lots of tasks and is efficient to train, as we can use gradient descent with small mini batches, a small number of examples in every training step.</p><p>In this paper, the authors show that the cross-entropy loss function can be one of the reasons neural networks don’t tend to generalize very well: they need quite a bit of data and don’t tend generalize well to examples not found in the training distribution, especially without any regularization.</p><p>The results of a neural network classification problem are compared to a SVM, a model trained by maximizing the margin between the decision boundary and the training points in different classes. SVM is known for learning a general model, as the decision boundary it It is shown that the cross-entropy loss can lead to a very “fragile” classifier where the decision boundary is sharp and has a very small margin.</p><p>After they show why minimizing the cross-entropy loss does not necessarily lead to maximizing the margin, the authors propose what they call “Differential Training”, training a classifier to classify <em>pairs</em> of points. They show that this leads to a classifier maximizing the margin as we can see in the example below. The proposed algorithm however is tested on a very simple dataset, so whether the method can be used to increase generalization on real world machine learning tasks remains future work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*TcGzxvH5ui3JnOlv" /><figcaption>SVM vs cross-entropy (extreme example)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*DtT12IgysjwTzbfH" /><figcaption>Differential Training vs Cross-Entropy Minimization</figcaption></figure><h3>Colorful Code and Delicate Datasets</h3><p><a href="https://code.fb.com/ai-research/xlni/"><strong>XNLI (Cross-lingual Natural Language Inference)</strong></a></p><p>A data set from Facebook for Natural Language Understanding. The goal of the data set is to learn and evaluate representations of natural language that allows knowledge about something in one language to be used in another language.</p><p><a href="http://codh.rois.ac.jp/kmnist/"><strong>Kuzushiji MNIST(KMNIST)</strong></a></p><p>Korean MNIST (also called KMNIST) is a drop-in replacement for MNIST. Read more details about it in the repository on <a href="https://github.com/rois-codh/kmnist">Github</a>.</p><p><a href="https://github.com/facebookresearch/pytext"><strong>Facebook Research releases PyText</strong></a></p><p>PyText is a NLP framework built on PyTorch by Facebook Research which provides functionality for training natural language models. Furthermore it gives some building blocks for building advanced conversational agents based on training data.</p><h3>Liked this post and want to get new items in your mailbox automatically? <a href="https://www.getrevue.co/profile/tlir/issues/the-latest-in-ai-research-issue-6-139365">Sign up here</a></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da198dab9343" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Latest in AI Research — Issue #5]]></title>
            <link>https://medium.com/@danilheres/the-latest-in-ai-research-issue-5-d016da96b899?source=rss-4deb50a43329------2</link>
            <guid isPermaLink="false">https://medium.com/p/d016da96b899</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Daniël Heres]]></dc:creator>
            <pubDate>Sat, 13 Oct 2018 09:02:40 GMT</pubDate>
            <atom:updated>2018-10-13T09:02:40.144Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Latest in AI Research — Issue #5</h3><p>The AI research newsletter by Daniël Heres</p><h3><a href="https://www.getrevue.co/profile/tlir"><strong>Like this issue? Subscribe to the newsletter here</strong></a></h3><h3>Papers of Interest</h3><p><a href="https://arxiv.org/abs/1807.03819"><strong>Universal Transformers</strong></a></p><p>The original <a href="https://arxiv.org/pdf/1706.03762.pdf">Transformer</a> model presented in the Paper “Attention Is All You Need” showed that language tasks like translation don’t need convolutions or recurrent connections for good performance but mainly something called “Attention”. Good models with attention even perform better than RNNs or CNNs while also being faster to train and to sample from.</p><p>In this paper they change the model to recur over the <em>intermediate representations </em>in the model instead over the symbols in a sequence, i.e. depth-wise. This transformation function can be applied any number of times, whereas in most models the number of steps is fixed by the number of layers in the model.</p><p>The model gets state of the art results on a number of challenging tasks: Question Answering, Language Modeling, (most) Algorithmic Tasks and Machine Translation.</p><p><a href="https://arxiv.org/abs/1809.04474"><strong>Preserving Outputs Precisely while Adaptively Rescaling Targets</strong></a></p><p>Learning multiple tasks in a model is something that is very challenging because different tasks have different scale of outcomes. This can be the case in for example games where in one game the scale of the points you get is much higher than in others.</p><p>This is why the authors propose PopArt: an adaptive normalization technique meant for Reinforcement Learning problems.</p><p>The authors show that this technique leads to considerable improvements across games, solving much harder games and a wider set with the same model than before. They also show that it doesn’t need the “clipping” hack anymore to function, in contrast to previous methods.</p><p><a href="https://arxiv.org/abs/1809.11096"><strong>Large Scale GAN Training for High Fidelity Natural Image Synthesis</strong></a></p><p>This works show that Generative Adversarial Network benefit from scaling up: more parameters, larger batch sizes and some architectural changes.</p><p>Increasing the batch size already improves the batch size inception score by 46%, doubling the channels in convolutional layers further increases it by 21%.</p><p>They demonstrate by showing the nearest neighbors the model does not memorize the examples from the training set, but generates novel ones instead.</p><p>The examples and results of this paper are amazing and shows that models can benefit from scaling up, combining techniques from literature and carefully running experiments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*jG8I5BGo9gx1csBa" /><figcaption>Samples from Large Scale GAN Training for High Fidelity Natural Image Synthesis</figcaption></figure><h3>Colorful Code and Delicate Datasets</h3><p><a href="https://groups.google.com/a/tensorflow.org/forum/#!msg/announce/qXfsxr2sF-0/jHQ77dr3DAAJ"><strong>TensorFlow 2.0 is coming</strong></a></p><p>Later this year, TensorFlow 2.0 is planned. Development will focus on ease of use, mainly on the following points: eager execution, platform and language support and deprecate API’s. tf.contrib will be discontinued as part of TensorFlow.</p><p><a href="http://scikit-learn.org/dev/whats_new.html#version-0-20"><strong>Version 0.20 of scikit-learn is out</strong></a></p><p>This release brings a lot of new features and improvements. Support for missing features in preprocessing and model fitting is implemented. OPTICS, a more scalable version of the clustering algorithm DBSCAN is added.</p><p><a href="https://developers.facebook.com/blog/post/2018/05/02/announcing-pytorch-1.0-for-research-production/"><strong>PyTorch 1.0 is almost here</strong></a></p><p>PyTorch, a modern deep learning library and ecosystem is nearly released.</p><p>It brings a number of interesting features:</p><ul><li>JIT, a way of writing code in a subset of Python that still will benefit from (Just In Time) optimizations.</li><li>Support for high performance data parallelism and efficient distributed training.</li><li>A C++ frontend to PyTorch with a similar interface as in Python. This could be used for certain production use cases.</li></ul><p>And much more. It seems when 1.0 released, PyTorch will even get more adoption as the focus will move more towards a stable interface and models for production.</p><h3><a href="https://www.getrevue.co/profile/tlir">Want to have The Latest in AI Research in you mailbox? Subscribe to the newsletter here</a></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d016da96b899" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Latest in AI Research — Issue #4]]></title>
            <link>https://medium.com/@danilheres/the-latest-in-ai-research-issue-4-e7b4f729cde5?source=rss-4deb50a43329------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7b4f729cde5</guid>
            <category><![CDATA[reinforcement-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[tensorflow]]></category>
            <dc:creator><![CDATA[Daniël Heres]]></dc:creator>
            <pubDate>Mon, 16 Jul 2018 17:10:53 GMT</pubDate>
            <atom:updated>2018-07-17T21:03:17.445Z</atom:updated>
            <content:encoded><![CDATA[<p>The AI research newsletter by Daniël Heres</p><h3><a href="https://www.getrevue.co/profile/tlir/issues/the-latest-in-ai-research-issue-4-111789"><strong>Like this post? Subscribe here to the mailing list</strong></a></h3><h3>Papers of Interest</h3><p><a href="https://arxiv.org/abs/1805.11592"><strong>Playing hard exploration games by watching YouTube</strong></a></p><p>As earlier research suggests, playing games from scratch is very hard and only in the most simple games leads to good results. In this paper, the authors find a way to learn vector representations purely from watching game video’s from YouTube. A visual embedding function that returns features based on the input image is learned by predicting the <em>time distance</em> between two image frames. Sounds are used to train the embedding model in the same way, even though the simulator used in the evaluation doesn’t expose the sounds of the game. Because the models learn to predict the time difference, they learn to focus on important things like the players position, the inventory and enemies.</p><p>The agent is also rewarded by imitating human game play. This is achieved by having checkpoints based on the video for every 16 frames for which the agent gets a reward. The embedding of the checkpoint (in the YouTube video) is compared to the one in the game. When the difference between those is small, the agent gets a reward of 0.5.</p><p>The agent achieves very high scores on the games Pitfall!, Montezuma’s Revenge and Private Eye. These games require a lot of navigation and local tactics, so this result is quite remarkable.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FMsy82sIfprI%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DMsy82sIfprI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FMsy82sIfprI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1ff3d9a9a0700b11fa64a9169d3425b7/href">https://medium.com/media/1ff3d9a9a0700b11fa64a9169d3425b7/href</a></iframe><p><a href="https://arxiv.org/abs/1806.00451"><strong>Do CIFAR-10 Classifiers Generalize to CIFAR-10?</strong></a></p><p>Image research benchmarks like CIFAR-10 often contain a training set and a test set (without even including a validation dataset). By experimentally changing algorithms, model architectures and hyperparameters, researchers try to get a higher score on the test sets. However, because lots of different research try lots of experiments, in the end the proposed improvements and hyperparameters end up being very specific to the dataset, they are <em>overfitting </em>to the dataset.</p><p>In this paper, the authors research to what extent models are really generalizable to images of a data-set. They extend the CIFAR-10 dataset with a new test set and measure how the model performs on this new set. All models from literature perform less than on the original dataset, albeit some showing a much larger difference than others.</p><p><a href="http://vladlen.info/publications/learning-see-dark/"><strong>Learning to See in the Dark</strong></a></p><p>Mobile phones often have image sensors that are not big and sensitive to light enough to capture images in low light situations.</p><p>In this paper they show a method to transform low-light, noisy images with lower ISO-values to images with less noise and normal light. The authors created a dataset of image pairs consisting of short-exposure images and long-exposure images. They trained a model using this dataset and report promising results.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FqWKUFK7MWvg%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DqWKUFK7MWvg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FqWKUFK7MWvg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/20cf85aaeef2eee7dbcf0414ef03c276/href">https://medium.com/media/20cf85aaeef2eee7dbcf0414ef03c276/href</a></iframe><p><a href="https://arxiv.org/abs/1805.08318"><strong>Self-Attention Generative Adversarial Networks</strong></a></p><p>In this paper, attention is used to improve Generative Adversarial Networks. Those networks have to parts. A <em>generator</em>, a model that learns to generate images based on a random distribution and a <em>discriminator</em>, to discriminate between real images and generated images. Those networks “compete” in such a way that the generator gradually learns to generate better images while the discriminator finds features in the images which make it clear that a image is not real. The end result is a generative model that can sample realistic looking images, and can interpolate between them.</p><p>Since the creation of this model, lots of improvements have been published and so the images look more and more real over time. In this paper (which includes the original author of GANs) attention is used to improve the quality of images generated by a GAN. They show that attention leads to quantitative and qualitative improvements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*VQZI8-8D1DqDb_aW" /><figcaption>Attention maps in Self-Attention Generative Adversarial Networks</figcaption></figure><h3>Wonderful Web</h3><p><a href="https://blog.openai.com/openai-five/"><strong>OpenAI gets better at Dota 2</strong></a></p><p>OpenAI trains a set of agents on the game Dota 2 using an of the shelf policy optimization algorithm and LSTM networks. They show with some heuristics and computational horsepower and given some restrictions they can learn agents that can beat humans. In the next months they are trying to lift these restrictions and further improving the system to be able to compete with humans on the full game.</p><p><a href="https://deepmind.com/blog/capture-the-flag/"><strong>DeepMind learns to Capture the Flag</strong></a></p><p>Using a pixel level inputs and Recurrent Neural Networks the researchers of DeepMind learn an agent to play Capture the Flag. Instead of training just one agent, they train a population of agents.</p><p><a href="https://github.com/tensorflow/tensorflow/releases/tag/v1.9.0"><strong>TensorFlow 1.9 is out</strong></a></p><p>The latest release brings some notable improvements to tf.keras like new docs and CUDA RNN layers. The gradient boosting model implementation now also supports feature columns and custom losses. Some text preprocessing functions are also added for convenience.</p><h3><a href="https://www.getrevue.co/profile/tlir/issues/the-latest-in-ai-research-issue-4-111789">Like this post? Subscribe here to the mailing list</a></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7b4f729cde5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reinforcement Learning, QA Systems and Taskonomies]]></title>
            <link>https://medium.com/@danilheres/the-latest-in-ai-research-3-a2f79eb272e1?source=rss-4deb50a43329------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2f79eb272e1</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <dc:creator><![CDATA[Daniël Heres]]></dc:creator>
            <pubDate>Wed, 09 May 2018 15:57:49 GMT</pubDate>
            <atom:updated>2018-05-09T17:47:44.074Z</atom:updated>
            <content:encoded><![CDATA[<h3>Reinforcement Learning, QA Systems and Taskonomies: The Latest in AI Research #3</h3><p>The AI newspaper by Daniël Heres</p><p>If you like this post, <a href="https://www.getrevue.co/profile/tlir"><strong>subscribe to the news letter</strong></a>.</p><h3>Papers of Interest</h3><p><a href="https://arxiv.org/abs/1804.06893"><strong>A Study on Overfitting in Deep Reinforcement Learning</strong></a></p><p>Overfitting is a problem in Machine Learning, in which a model relies on patterns from examples in the training set (such as random noise) that are not relevant to thing you want the model to learn. They are just memorizing these patterns, that makes them perform worse on new examples. The phenomenon of how good a model works on new examples is called <em>generalization</em>.</p><p>This is well known in most supervised learning problems, where data is split in different sets: one set to <em>train</em> your model on, one set to <em>validate</em> models and one set to finally <em>test</em> a model. However in Reinforcement Learning, which is often about navigating in games, a lot of benchmarks assume access to all of the levels.</p><p>This paper studies how much this problem occurs in Deep Reinforcement Learning approaches, by testing on a subset of levels and testing them on another subset of levels. When using only a few levels, the reward on the levels seen during training is very good (achieving optimal reward for all sizes), but perform bad when tested on new levels. The difference decreases when using more training levels, a clear sign of overfitting.</p><p><a href="https://arxiv.org/abs/1804.06893">Paper on Arxiv</a></p><p><a href="https://arxiv.org/abs/1804.09541"><strong>QANet: Combining Local Convolution with Global Self-Attention for Reading Comprehension</strong></a></p><p>Question Answering systems are mostly based on Recurrent Neural Networks, powerful architectures that work well on large text datasets. However in other Machine Learning problems involving textual data, RNNs have been largely be replaced by Convolutional Networks or even feedforward neural networks with <em>attention</em>, a way to focus on certain words / features, and <em>positional encodings</em>, a way of representing where a word or character occurred in a text, compared to other items. One of the benefits of CNNs is that they are computationally more efficient.</p><p>In this work they also apply the same with QA-systems. They achieve SoTA results on the SQuAD dataset with separable convolutions, attention and positional encodings.</p><p>They use a data augmentation method for making the dataset artificially bigger using paraphrased sentences which are first translated to another language (French / German) and then translated back to the original (English). This way they achieve higher performance with the same amount of labeled data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*mHS9ac4kKncO5cLT." /><figcaption>QANet Architecture</figcaption></figure><p><a href="https://arxiv.org/abs/1804.08328"><strong>Taskonomy: Disentangling Task Transfer Learning</strong></a></p><p>It is well known that some models and tasks in Machine Learning share some similarity, and therefore it can help to learn a task using techniques like Transfer Learning or Multi Task Learning. Learning one task in one domain helps learning in another domain, achieving higher performance on the new task or achieving the same performance with less data. So, it is not a strange thought that datasets and models are related in some way and have some structure.</p><p>In this paper they explore how much models can be used to transfer knowledge to a new task, showing in some way how related they are. They propose a framework to do this and get as a result a “Taskonomy” of ML tasks.</p><p>On the Taskonomy <a href="https://taskonomy.vision/">website</a> they share a live demo to show their work. They also share a dataset with 3.9 million scenes.</p><p><a href="https://taskonomy.vision/">Web</a></p><p><a href="https://arxiv.org/abs/1804.08328">Arxiv paper</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*5f-iedYeBWtV-tQ8." /><figcaption>Task structure found</figcaption></figure><h3>Colorful Code and Delicate Datasets</h3><p><a href="https://github.com/tensorflow/swift"><strong>Swift for TensorFlow</strong></a></p><p>Python is currently the language of choice of data scientists and machine learning engineers, but it’s likely we move on from there. A group from TensorFlow is investigation whether a more modern language and compiler like Swift can help designing a next version of TensorFlow. This could help adding features like more advanced versions of Auto Differentation, better integration of Eager Execution and better type checking, for errors that in Python only come up when running the code.</p><p><a href="https://github.com/pytorch/pytorch/releases/tag/v0.4.0"><strong>PyTorch 0.4.0</strong></a></p><p>PyTorch 0.4.0, a numerical library for developing ML models, is released. Some notable additions include: support for scalars, trade-off memory for compute, torch.distributions and many more.</p><p><a href="https://github.com/tensorflow/tensorflow/releases/tag/v1.8.0"><strong>TensorFlow 1.8.0</strong></a></p><p>Gradient boosting, TPUv2 performance improvements, are some of the interesting features of this release. Furthermore, there are some smaller ergonomic and performance improvements.</p><p><a href="https://research.googleblog.com/2018/04/announcing-open-images-v4-and-eccv-2018.html"><strong>Open Images v4</strong></a></p><p>Google releases the largest dataset of images annotated with bounding boxes, containing 1.9 million images with 600 categories. Furthermore, it contains 30.1 million human labeled images without bounding boxes.</p><p><a href="https://code.facebook.com/posts/1700437286678763/"><strong>Hash-tag Pretraining</strong></a></p><p>Facebook shows that by pre-training on a large set of images to predict hash-tags, they improve on state of the art image recognition. On the ImageNet benchmark they achieve a top-1 accuracy of 2 percentage point higher than before, a large difference.</p><h3>Wonderful Web</h3><p><a href="https://openaccess.engineering.oregonstate.edu/home"><strong>Statement on Nature Machine Intelligence</strong></a></p><p>AI and ML Researchers signed this letter to protest the creation of a closed journal “Nature Machine Intelligence” by Nature Publishing Group. All the researchers state that they will not submit to, review, or edit for this new journal.</p><p><a href="https://www.getrevue.co/profile/tlir"><strong>Subscribe here to my newsletter if you like this post and would like to receive AI research updates in the future.</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2f79eb272e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Latest in AI Research # 2]]></title>
            <link>https://medium.com/@danilheres/the-latest-in-ai-research-2-6b543c2b7d98?source=rss-4deb50a43329------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b543c2b7d98</guid>
            <category><![CDATA[reinforcement-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[neural-networks]]></category>
            <dc:creator><![CDATA[Daniël Heres]]></dc:creator>
            <pubDate>Mon, 23 Apr 2018 11:17:21 GMT</pubDate>
            <atom:updated>2018-06-02T10:06:28.774Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Latest in AI Research #2</h3><p>The AI newsletter curated by Daniël Heres</p><p><a href="https://www.getrevue.co/profile/tlir/issues/the-latest-in-ai-research-2-104743">Like this post? Subscribe to the newsletter here</a></p><h3>Papers of Interest</h3><p><a href="https://worldmodels.github.io/"><strong>World Models</strong></a></p><p>In a very interactive and visual way, David Ha and Jürgen Schmidhuber show how to create a model that builds up a representation of the “world”, using compression and future prediction. Compression is achieved by first “compressing” the game image into a hidden vector <em>z</em>, using a Variational Auto Encoder (<em>V</em>). This vector captures the essence of an image in a low dimensional vector.</p><p>Next, there is a model (<em>M</em>) that predicts the future of the <em>z </em>vectors given the previous sequence and actions. This makes it possible to sample a sequence using sample techniques, and to generate a possible sequence (“hallucination”) using a first image to seed this process. The auto encoder can be used to recover images from the compressed samples.</p><p>Finally there is a model © that chooses actions based on historical experience, rewards and future predictions contained in models <em>V</em> and <em>M</em>. The <em>C</em> model contains as few parameters (867) as possible, in order to train it using the (gradient-free) black box optimization method CMA-ES using the features from V and M. This model is the only model having access to the reward parameters.</p><p>The method achieves a higher scores on the OpenAI race track task and Doom when comparing against the leaderboard.</p><p><a href="https://arxiv.org/abs/1803.10122">Arxiv link</a></p><p><a href="https://worldmodels.github.io/">Web link</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*VVSrHMi09unn6XLq." /><figcaption>Driving the OpenAI race track task</figcaption></figure><p><a href="https://arxiv.org/abs/1804.02958"><strong>Generative Adversarial Networks for Extreme Learned Image Compression</strong></a></p><p>The authors of this paper propose a way to compress images using a GAN, a Generative Adversarial Network, a network consisting of a <em>generator</em> that generates an image and a <em>discriminator</em> that has to predict whether a image is generated or is sampled from the training set.</p><p>A GAN is used to compress images under 0.1 bits per pixel. (For reference, uncompressed images use 24 (3×8 bits per pixel). They propose two modes of the model, one fully generative and one that selectively generates content based on a compressed code while preserving the rest of the image.</p><p>Compared to BPG, a modern lossy image codec, the work generates images that look much crispier, have more detail and use less bits per pixel. However, the results have more “high level” artifacts, e.g. contain objects or features not in the original image or completely different colors. To mitigate this, the selective network could be used to preserve the most important parts while still compressing the image considerably. The current implementation uses 24GB for a 1024×512px image for training, so more needs to be done for this to make it practical.</p><p><a href="https://arxiv.org/abs/1804.02958">Arxiv link</a></p><p><a href="https://data.vision.ee.ethz.ch/aeirikur/extremecompression/">Web link</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*wua4hO3tY7PKmnyF." /><figcaption>The Selective Compression (SC) network</figcaption></figure><p><a href="https://arxiv.org/abs/1804.03235"><strong>Large scale distributed neural network training through online distillation</strong></a></p><p>Currently, the most successful and popular way to train neural networks with multiple workers is by averaging the gradient updates of all the workers that all train on different mini-batches. This works, but it often needs a big batch size to reduce the overhead of communicating gradient updates.</p><p>The authors propose to use codistillation by copying the weights of the other model(s) every 50, 100, or 200 iterations, which reduces communication considerably compared to synchronous SGD. Each worker learns from an other model to make the predictions more similar to the other model, while still learning from the training examples. This is achieved by introducing a distillation term to the loss function. The local networks both learn from local examples and learn to make the predictions more similar to those of the other network(s).</p><p>They show codistillation works and has a similar effect to model ensembling (averaging multiple trained models), generalizing better than one model, but in this case without more computation as you can use only one model. They also show that retraining a model using codistillation yields models make less different predictions than earlier models than when training an individual model.</p><h3>Colorful Code and Delicate Datasets</h3><p><a href="https://blog.openai.com/retro-contest/"><strong>OpenAI retro contest</strong></a></p><p>The retro contest of OpenAI introduces a number of challenges to test and measure algorithms that can play games like Reinforcement Learning systems. Models can only learn on a subset of the levels and are scored on a set of secret test levels. In most other benchmarks and contests all levels are available, which makes it easier for an algorithm to memorize certain patterns in a game, making the results of this contest much more interesting.</p><p>The contest will run from April 5 to June 5.</p><p><a href="https://storage.googleapis.com/agi-data/blog/gym-retro/contest-tech-report.pdf">Technical report</a></p><p><a href="https://github.com/minimaxir/person-blocker"><strong>Person blocker</strong></a></p><p>This project uses a neural network (Mask R-CNN) to remove people or other from images.</p><p><a href="https://dawn.cs.stanford.edu/benchmark/index.html"><strong>Results of the DAWN Deep Learning Contest</strong></a></p><p>Models are usually evaluated on final performance on a test set. In this contest however, models are evaluated on the time it takes to train them and how much money it costs. fast.ai, Google and Intel seem to have the winning contributions.</p><p>Final results will be available in May.</p><p><a href="https://dawn.cs.stanford.edu/benchmark/papers/nips17-dawnbench.pdf">Paper (pdf)</a></p><h3>Wonderful Web</h3><p><a href="https://www.fastcodesign.com/90167584/this-ai-paints-like-the-old-masters-can-you-tell-the-difference"><strong>Artist uses GAN to generate old masters paintings</strong></a></p><p>Some of the paintings of the computational artist Mario Klingemann come very close to the ones of the old masters. Can you tell the difference?</p><p><a href="http://nautil.us/issue/59/connections/why-is-the-human-brain-so-efficient"><strong>Why Is the Human Brain So Efficient?</strong></a></p><p>This article shows what makes the brain so efficient compared to computers, even when certain computations are much faster on computer chips.</p><h3><a href="https://www.getrevue.co/profile/tlir/issues/the-latest-in-ai-research-2-104743">Like this post? Subscribe to the newsletter here</a></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b543c2b7d98" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Latest In AI Research #1]]></title>
            <link>https://medium.com/@danilheres/the-latest-in-ai-research-1-964550ed8841?source=rss-4deb50a43329------2</link>
            <guid isPermaLink="false">https://medium.com/p/964550ed8841</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Daniël Heres]]></dc:creator>
            <pubDate>Fri, 30 Mar 2018 09:44:02 GMT</pubDate>
            <atom:updated>2018-03-30T09:44:02.615Z</atom:updated>
            <content:encoded><![CDATA[<p>AI research newsletter curated by Daniël Heres</p><p><a href="https://www.getrevue.co/profile/tlir/issues/the-latest-in-ai-research-1-103628">If you like this post, please subscribe to the newsletter here</a></p><h3>Papers of Interest</h3><p><strong>An Analysis of Neural Language Modeling at Multiple Scales</strong></p><p>This paper brings new state of the art results for language modeling, the art of predicting next words or characters on popular language modeling datasets. By carefully evaluating the influence of different parameters of the model and how these interact, they get interesting improvements and show that standard models with careful tuning still is the best way to get high performance.</p><p>This research is important for applications like autocomplete, NLP and other domains involving prediction based on sequences.</p><p><a href="https://arxiv.org/abs/1803.08240">Arxiv link</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*FiOqEL2HBhzoPlG4." /><figcaption>Parameter importance, An Analysis of Neural Language Modeling at Multiple Scales</figcaption></figure><p><strong>Group Normalization</strong></p><p>The authors of Group Normalization propose a new way to normalize neurons of neural networks as an alternative to other Normalization techniques. Normalization techniques help both to reduce training time and converge to lower (test) error.</p><p>Currently, training neural networks with Batch Normalization requires using a larger batch size which is used to estimate mean and variance of individual neurons. This, however, limits the size of the models, as the required memory grows approximately linear with the size of the model.</p><p>Group Normalization allows to train on smaller batch sizes (e.g. a batch size of 2), allowing to train bigger models on devices with less memory.</p><p>They show how Group Normalization relates to other Normalization techniques like Batch Normalization, Layer Normalization, Instance Normalization.</p><p>While not giving as good results as Batch Normalization, it gives another tool to improve training speed</p><p><a href="https://arxiv.org/abs/1803.08494">Arxiv link</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*P37dpNT7Pu4MWR8a." /><figcaption>Visualization of different normalization techniques</figcaption></figure><p><strong>Stochastic Weight Averaging</strong></p><p>It is well known that in almost any model trained using a learning algorithm, training an ensemble of more than 1 model and averaging results almost always improves generalization of a model versus a single model. This however comes at a cost, you need to train <em>n</em> models and need to run them all when you use them for predictions.</p><p>In Averaging Weights Leads to Wider Optima and Better Generalization they show that averaging the weights of the network at points during training leads to better performance on a range of tasks. The nice thing about this, is that it has almost no overhead during training and no overhead during prediction. They also show the method allows for using a fixed learning rate instead of a learning rate schedule which is common in deep learning.</p><p><a href="https://arxiv.org/abs/1803.05407">Arxiv link</a></p><p><strong>Evolution Strategies as a Scalable Alternative to Reinforcement Learning</strong></p><p>The authors from OpenAI compare evolution strategies to other (deep) reinforcement learning algorithms. Evolutionary algorithms have a lot of benefits: they are more efficient and easily parallelizable when compared to gradient-based training and only need a small amount of memory.</p><p>They show that the evolutionary algorithms compare well and achieve great results on a subset of the MuJoCo locomotion tasks.</p><p><a href="https://arxiv.org/abs/1703.03864">Arxiv link</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*ylsj5C_Mn1wcIR9A." /><figcaption>Visualization of scalability using up to 1440 cores and learning curves</figcaption></figure><p><strong>Synthesizing Programs for Images using Reinforced Adversarial Learning</strong></p><p>In this paper, the authors implement a agent that learns to generate programs from examples. A model learned using distributed Reinforcement Learning generates a list of commands to change the width, location and color to form a picture to resemble an image. In contrast to other methods, this method doesn’t need human examples, but is instead trained using the signal of a GAN, a Generative Adversarial Network. This model is used as a discriminator, i.e. it learns to detect whether a picture is an input image or an image generated using the generated painting. By both training the discriminator and the generator at the same time, both the discriminator and the generator become better over time. Also, because the model generates “programs” of paintings, the result is much more interpretable than models directly generating pixels.</p><p>The results are quite impressive: they show that digits, simple drawings and even faces can be generated using this method, although using just 20 brush strokes the faces are quite blurry.</p><p><a href="https://deepmind.com/documents/183/SPIRAL.pdf">Paper link</a></p><p><a href="https://deepmind.com/blog/learning-to-generate-images/">Blog post</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FiSyvwAwa7vk%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DiSyvwAwa7vk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FiSyvwAwa7vk%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/af9dbe31e94aef0c0fde5638138903ba/href">https://medium.com/media/af9dbe31e94aef0c0fde5638138903ba/href</a></iframe><h3>Colorful Code and Delicate Datasets</h3><p><a href="https://pjreddie.com/darknet/yolo/"><strong>YOLO v3</strong></a></p><p>Version 3 of YOLO, a real-time object detection system, is released. It has an ever better balance between precision and computation when compared to other models. In the <a href="https://pjreddie.com/media/files/papers/YOLOv3.pdf">funny tech report</a> they list the methods they tried and did or didn’t work.</p><p><a href="https://github.com/tensorflow/tensorflow/releases/tag/v1.7.0"><strong>TensorFlow 1.7</strong></a></p><p>The version of TensorFlow got some new, interesting features like eager execution out of the contrib namespace, an easier way to define custom gradients, a TensorBoard Debugger Plugin and SQLite integration.</p><p><a href="http://convai.io/"><strong>PersonaChat ConvAI2</strong></a></p><p>ConvAI releases version 2 of the PersonaChat dataset. It contains 10,981 dialogs with each with in total 164,356 sentences. The chats are started with a persona, i.e. a list of interests, family status and more. You can find more details of the dataset in <a href="https://arxiv.org/abs/1801.07243">this paper.</a> You can participate in the competition and win prices.</p><p><a href="https://cloudplatform.googleblog.com/2018/03/introducing-Cloud-Text-to-Speech-powered-by-Deepmind-WaveNet-technology.html"><strong>Google releases improved speech synthesis on Google Cloud</strong></a></p><p>Using the WaveNet model developed by researchers from Google Deepmind, the release brings much improved speech synthesis to users of Google Cloud speech synthesis. Before the release, they moved to generating waveforms of 16 bits instead of 8, and significantly improved the performance and latency of the model.</p><h3>Wonderful Web</h3><p><a href="https://distill.pub/2018/building-blocks/"><strong>The Building Blocks of Interpretability</strong></a></p><p>In this interactive Distill article, lots of different methods are combined to make Neural Networks more interpretable. It shows that Neural Networks, while being a so-called black box model with millions of free parameters, can be inspected using a variety of methods.</p><p><a href="https://www.theguardian.com/technology/2018/mar/19/uber-self-driving-car-kills-woman-arizona-tempe"><strong>Self-driving car from Uber kills pedestrian</strong></a></p><p>The self driving car from Uber killed a pedestrian while test-driving. The car was in autonomous mode during the fatal collision.</p><p><a href="https://deepmind.com/blog/understanding-deep-learning-through-neuron-deletion"><strong>Understanding deep learning through neuron deletion</strong></a></p><p>This blog post from Google Deepmind shows how deep neural networks are affected by deleting individual units. They show how it relates to generalizability and interpretability.</p><h3><a href="https://www.getrevue.co/profile/tlir/issues/the-latest-in-ai-research-1-103628">If you like this post, please subscribe to the newsletter here</a></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=964550ed8841" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>