ASP at Work: An ASP Implementation of PhyloWS

Tiep Le, Hieu Nguyen, Enrico Pontelli, Tran Cao SonICLP (Technical Communications) 2012

TL;DR

This paper presents a novel implementation of the PhyloWS web service API using Answer Set Programming (ASP). By leveraging ASP's declarative nature and expressive power, the authors demonstrate a more comprehensive and modular approach to querying and analyzing large-scale phylogenetic data, addressing limitations of previous implementations.

What Problem Does This Paper Address?

The field of phylogenetics, which aims to reconstruct evolutionary relationships, is experiencing an explosion of data. To make sense of this data and foster interdisciplinary research, a standardized way to access and interoperate phylogenetic information is crucial. The PhyloWS (Phylogenetic Web Service) API was proposed as a community-agreed standard for this purpose. However, existing implementations have been incomplete, particularly in their ability to handle complex queries that require recursive computations or transitive closures, common in phylogenetic analysis (e.g., finding ancestors or lineage relationships). Traditional query languages for semantic web data (like SPARQL) have struggled with this expressive power. This paper tackles the challenge of creating a robust and comprehensive PhyloWS implementation that can effectively query and analyze large phylogenetic datasets.

Methods

The core contribution of this paper is the implementation of PhyloWS using Answer Set Programming (ASP). ASP is a declarative logic programming paradigm that excels at knowledge representation and reasoning, particularly for problems involving complex combinatorial search. The authors developed a system that translates user queries into ASP programs. This involves:

  • Data Representation: Phylogenetic data, originally in formats like NeXML, is converted into a CDAO (Comparative Data Analysis Ontology) RDF representation and stored in a triple store called CDAOStore. This data is then further processed into ASP facts.
  • Query Analysis: A "Query Analyzer" module interprets user queries and determines the specific ASP code and data needed from the CDAOStore.
  • ASP Encoding: The system encodes various PhyloWS query types (node-oriented, clade-oriented, tree-oriented, and data-oriented) into ASP rules. This includes defining fundamental concepts like nodes, leaves, parents, ancestors, and common ancestors, as well as implementing complex queries like finding the most recent common ancestor, calculating distances, and identifying clades.
  • ASP Solver: An ASP solver (specifically, clingo) is used to compute answer sets, which represent the solutions to the queries.
  • Export Module: The results from the ASP solver are then formatted and returned to the user.

The key novelty lies in using ASP's expressive power to handle complex phylogenetic queries that were difficult with previous approaches, and in creating a modular system that can be adapted to different data sources.

Datasets

The primary dataset used in this paper is TreeBASE, a large repository of phylogenetic trees and associated data. The authors extracted data from TreeBASE, converting it into NeXML files and then into CDAO RDF triples. This process resulted in a substantial dataset, with the paper mentioning the extraction of data for 261 studies, comprising approximately 1/10 of the total studies in TreeBASE. The converted CDAO data amounted to about 5GB.

Key Insights and Ideas

  • ASP's Expressive Power for Phylogenetics: The paper strongly advocates for ASP as an ideal technology for implementing complex phylogenetic queries. ASP's ability to handle recursive definitions and transitive closures elegantly addresses the inherent complexity of phylogenetic relationships.
  • Declarative Approach Simplifies Complex Queries: By translating phylogenetic queries into ASP rules, the authors demonstrate how complex operations like finding the most recent common ancestor or calculating distances can be expressed concisely and declaratively, abstracting away from procedural implementation details.
  • Modularity is Key: The proposed PhyloWS implementation is designed to be modular, allowing for easier integration with different data sources and potential future extensions.
  • Scalability is a Major Challenge: While ASP proves powerful, the paper highlights significant scalability limitations of current ASP solvers when dealing with very large datasets (e.g., clingo struggling with files over 70MB). This necessitates pre-processing and efficient data extraction mechanisms.

Key Results

The paper successfully demonstrates the implementation of a comprehensive set of PhyloWS queries using ASP. The evaluation, conducted using data from TreeBASE, shows that the ASP solver can efficiently answer various query types. For instance, the execution times for many queries are reported in milliseconds, with the Triples Extractor module typically taking less than 15 seconds to prepare the data. However, the paper also notes that the conversion of data into CDAO format is time-consuming and space-demanding. The primary limitation identified is the scalability of ASP solvers with large datasets, which currently restricts the amount of data that can be processed directly.

Limitations and Future Work

The authors acknowledge several limitations and propose future directions:

  • Scalability of ASP Solvers: The most significant limitation is the current inability of ASP solvers like clingo to handle very large input files (e.g., >70MB). This necessitates pre-processing and efficient data extraction.
  • Efficiency of Data Conversion: The conversion of data into CDAO RDF triples is noted as being time-consuming and space-demanding.
  • Exploring Other ASP Extensions: The authors plan to investigate other ASP extensions, such as dlvhex and DLVDB, which might offer more scalable implementations.
  • Enhancing Query Capabilities: Future work includes enriching PhyloWS with constraints over answers and preferences between answers, potentially through a web interface.
  • Investigating Reactive Solvers: Experimenting with reactive answer set solvers is also a planned direction.
  • Completing Data Import: The ultimate goal is to complete the import of all available CDAO files into the CDAOStore.

Summary updated

Abstract

This paper continues the exploration started in [Bininda-Emonds,2004], aimed at demonstrating the use of logic programming technology to support a large scale deployment and analysis of phylogenetic data from biological studies. This application paper illustrates the use of ASP technology in implementing the PhyloWS web service API — a recently proposed and community-agreed standard API to enable uniform access and inter-operation among phylogenetic applications and repositories. To date, only very incomplete implementations of PhyloWS have been realized; this paper demonstrates how ASP provides an ideal technology to support a more comprehensive realization of PhyloWS on a repository of semantically-described phylogenetic studies. The paper also presents a challenge for the developers of ASP-solvers.
BibTeX
@inproceedings{le2012asp,
  author = {Tiep Le and Hieu Nguyen and Enrico Pontelli and Tran Cao Son},
  title = {{ASP at Work: An ASP Implementation of PhyloWS}},
  booktitle = {ICLP (Technical Communications)},
  year = {2012},
  url = {https://openreview.net/forum?id=Fonc6UsGa0F},
}
Figure