Neural Code Search: ML-based code search using natural language queries

#artificialintelligence

Engineers work best when they can easily find code examples to guide them on particular coding tasks. For some questions -- for example, "How to programmatically close or hide the Android soft keyboard?" But questions specific to proprietary code or APIs (or code written in less common programming languages) need a different solution, since they are not typically discussed in those forums. To address this need, we've developed a code search tool that applies natural language processing (NLP) and information retrieval (IR) techniques directly to source code text. This tool, called Neural Code Search (NCS), accepts natural language queries and returns relevant code fragments retrieved directly from the code corpus.


Adaptive Regularization for Weight Matrices

arXiv.org Artificial Intelligence

Algorithms for learning distributions over weight-vectors, such as AROW were recently shown empirically to achieve state-of-the-art performance at various problems, with strong theoretical guaranties. Extending these algorithms to matrix models pose challenges since the number of free parameters in the covariance of the distribution scales as $n^4$ with the dimension $n$ of the matrix, and $n$ tends to be large in real applications. We describe, analyze and experiment with two new algorithms for learning distribution of matrix models. Our first algorithm maintains a diagonal covariance over the parameters and can handle large covariance matrices. The second algorithm factors the covariance to capture inter-features correlation while keeping the number of parameters linear in the size of the original matrix. We analyze both algorithms in the mistake bound model and show a superior precision performance of our approach over other algorithms in two tasks: retrieving similar images, and ranking similar documents. The factored algorithm is shown to attain faster convergence rate.


What made you do this? Understanding black-box decisions with sufficient input subsets

arXiv.org Machine Learning

Local explanation frameworks aim to rationalize particular decisions made by a black-box prediction model. Existing techniques are often restricted to a specific type of predictor or based on input saliency, which may be undesirably sensitive to factors unrelated to the model's decision making process. We instead propose sufficient input subsets that identify minimal subsets of features whose observed values alone suffice for the same decision to be reached, even if all other input feature values are missing. General principles that globally govern a model's decision-making can also be revealed by searching for clusters of such input patterns across many data points. Our approach is conceptually straightforward, entirely model-agnostic, simply implemented using instance-wise backward selection, and able to produce more concise rationales than existing techniques. We demonstrate the utility of our interpretation method on various neural network models trained on text, image, and genomic data.


Deep code search

#artificialintelligence

The problem with searching for code is that the query, e.g. "read an object from xml," doesn't look very much like the source code snippets that are the intended results, e.g.: That's why we have Stack Overflow! Stack Overflow can help with'how to' style queries, but it can't help with searches inside codebases you care about. For example, "where in this codebase are events queued on a thread?" DeepCS is just such a search engine for code, based on the CODEnn (Code-Description Embedding Neural Network) network model.


How a fungal infection can make wine smell BETTER

Daily Mail - Science & tech

A fungal infection common on grapes can actually enhance the pleasant notes in a wine's aroma, according to a new study. As scientists suspect the changing climate is driving increased fungal growth, researchers investigated how these infections affect different varieties of grapes. Surprisingly, 'bunch rot' led to more positive ratings in wines made from White Riesling, Red Riesling and Gewürztraminer grapes, as the fungus enhanced fruity, floral, and'toasty' aroma notes – but, they found powdery mildew causes some wines to smell'flat.' A fungal infection common on grapes can actually enhance the pleasant notes in a wine's aroma. As scientists suspect the changing climate is driving increased fungal growth, researchers investigated how these infections affect different varieties of grapes.