Cost-Efficient Hierarchical Knowledge Extraction with Deep Reinforcement Learning

Jaromír Janisch, Tomáš Pevný, Viliam Lisý

Abstract

We extend the framework of Classification with Costly Features to work with structured samples, that can no longer be represented as fixed-length vectors. Instead, the samples can only be represented as trees of features, with a variable and possibly unlimited depth and breadth, similar to a JSON file. We provide a method that, independently for each sample, sequentially selects features from the tree. The newly acquired features can be further expanded, until the algorithm terminates with a classification decision. Each piece of information has a real-valued cost, and the objective is to maximize the classification accuracy while minimizing the total cost of the selected features. The method targets data naturally occurring in many domains, e.g., targeted advertising, medical diagnosis, or malware detection. We demonstrate our deep reinforcement learning based algorithm in seven relational classification datasets.

Introduction

In many real-world machine learning applications, acquiring input features is not free. In medical diagnosis, every test carries a financial cost and potential risk to the patient. In cybersecurity, deep packet inspection or sandbox execution of files consumes significant computational resources. Traditionally, "Classification with Costly Features" (CwCF) assumes data is structured as flat, fixed-length vectors. However, real-world data is often hierarchical and relational—think of a patient's history of visits, a user's collection of posts, or a molecule's graph of atoms.

The Challenge of Hierarchical Data

Representing hierarchical data as flat vectors is often impossible or leads to massive, sparse representations. For instance, a social media user might have hundreds of posts, each with varying numbers of comments and tags. A fixed-length vector cannot naturally capture this variability.

Example of a hierarchical dataset where a user has sets of posts and badges, each with their own properties.

This paper proposes a framework to navigate these "information trees" sequentially. The goal is to build an agent that decides which branch of the tree to explore next, balancing the information gain against the cost of acquisition.

Deep Reinforcement Learning for Knowledge Extraction

The problem is modeled as a Markov Decision Process (MDP). An agent starts with zero knowledge and iteratively selects a feature to "reveal" from the available nodes in the tree. Each action incurs a cost. The process ends when the agent chooses a terminal action, providing a classification based on the gathered evidence.

To solve this, the authors combine two powerful techniques:

  1. Hierarchical Multiple-Instance Learning (HMIL): This architecture processes the partially observed tree into a fixed-size embedding $z$. It recursively aggregates sets of objects (like posts) into a single vector representation.
  2. Advantage Actor-Critic (A2C): The agent uses the embedding $z$ to predict class probabilities $p$, a value function $V$, and the next action $a_t$.
The RL framework: HMIL processes the tree into an embedding $z$, which informs the policy, value function, and feature selection actions.

A key innovation is the use of Hierarchical Softmax for the action space. Instead of choosing from all possible features at once, the agent makes a sequence of decisions down the tree structure, making the action space manageable even for very deep or wide trees.

Experimental Results

The method was tested across seven diverse relational datasets, including medical diagnosis (Hepatitis), molecular toxicity (Carcinogenesis), and social media analysis (Stats).

Key findings include:

  • Efficiency: The RL agent consistently found better accuracy-vs-cost trade-offs than random feature selection.
  • Feature Selection: Even when costs were set to zero, the agent learned to ignore redundant features, effectively performing automated feature selection.
  • Interpretability: The sequential nature of the agent allows researchers to audit the "thought process" of the classifier, seeing exactly which features were deemed most valuable for a specific prediction.

Conclusion

By treating hierarchical knowledge extraction as a reinforcement learning problem, this work provides a scalable and interpretable solution for cost-sensitive classification. Future work may extend this from tree-structured data to more general graph-structured knowledge bases.

Summary updated

BibTeX
@misc{janisch2019cost,
  author = {Jaromír Janisch and Tomáš Pevný and Viliam Lisý},
  title = {{Cost-Efficient Hierarchical Knowledge Extraction with Deep Reinforcement Learning}},
  year = {2019},
  eprint = {1911.08756},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1911.08756},
}
Figure