1,012 research outputs found
Repairing Type Errors in Functional Programs
Type systems for programming languages can be used by compilers to reject programs which are found to be unsound and which may, therefore, fail to execute successfully. When a program is rejected the programmer must repair it so that it can be type-checked correctly and then executed safely. Diagnostic error messages are essential to help the programmer repair the program.
Hindley-Milner type systems give the programmer a great deal of flexibility (polymorphism and implicit typing) while ensuring type safety. As a consequence of this flexibility repairing mistakes can be difficult and programmers have previously observed that type error messages produced by compilers are not helpful enough.
This thesis examines the problem of producing more helpful error messages for ill-typed programs written in programming languages with a Hindley-Milner typing discipline. Three main results are described. Firstly, type inference algorithms which infer types in different orders are described, and the ability of these to produce more meaningful error messages is investigated. Secondly, the results of several other authors on helping to explain type inference are condensed into a single generalisation. Thirdly, error messages which suggest concrete changes to the program to remove type errors are produced using the theory of linear type isomorphisms. This theory is implemented as an extension to the MLj compiler. Finally, extensions to Hindley-Milner are explored, taking the type system of MLj as an example
Conditional Sum-Product Networks: Imposing Structure on Deep Probabilistic Architectures
Probabilistic graphical models are a central tool in AI; however, they are
generally not as expressive as deep neural models, and inference is notoriously
hard and slow. In contrast, deep probabilistic models such as sum-product
networks (SPNs) capture joint distributions in a tractable fashion, but still
lack the expressive power of intractable models based on deep neural networks.
Therefore, we introduce conditional SPNs (CSPNs), conditional density
estimators for multivariate and potentially hybrid domains which allow
harnessing the expressive power of neural networks while still maintaining
tractability guarantees. One way to implement CSPNs is to use an existing SPN
structure and condition its parameters on the input, e.g., via a deep neural
network. This approach, however, might misrepresent the conditional
independence structure present in data. Consequently, we also develop a
structure-learning approach that derives both the structure and parameters of
CSPNs from data. Our experimental evidence demonstrates that CSPNs are
competitive with other probabilistic models and yield superior performance on
multilabel image classification compared to mean field and mixture density
networks. Furthermore, they can successfully be employed as building blocks for
structured probabilistic models, such as autoregressive image models.Comment: 13 pages, 6 figure
Bayesian co-estimation of selfing rate and locus-specific mutation rates for a partially selfing population
We present a Bayesian method for characterizing the mating system of
populations reproducing through a mixture of self-fertilization and random
outcrossing. Our method uses patterns of genetic variation across the genome as
a basis for inference about pure hermaphroditism, androdioecy, and gynodioecy.
We extend the standard coalescence model to accommodate these mating systems,
accounting explicitly for multilocus identity disequilibrium, inbreeding
depression, and variation in fertility among mating types. We incorporate the
Ewens Sampling Formula (ESF) under the infinite-alleles model of mutation to
obtain a novel expression for the likelihood of mating system parameters. Our
Markov chain Monte Carlo (MCMC) algorithm assigns locus-specific mutation
rates, drawn from a common mutation rate distribution that is itself estimated
from the data using a Dirichlet Process Prior (DPP) model. Among the parameters
jointly inferred are the population-wide rate of self-fertilization,
locus-specific mutation rates, and the number of generations since the most
recent outcrossing event for each sampled individual
- …