[Paper Review] A Type System for Interactive JSON Schema Inference (Extended Abstract)
This paper proposes a type system and learning algorithms for inferring unordered XML schemas from positive and negative examples using disjunctive multiplicity schemas (DMS) and disjunction-free multiplicity schemas (MS). It proves that MS are learnable in both positive-only and positive-negative settings, while DMS are only learnable from positive examples due to NP-completeness of consistency checking with negative examples.
In this paper we present the first JSON type system that provides the possibility of inferring a schema by adopting different levels of precision/succinctness for different parts of the dataset, under user control. This feature gives the data analyst the possibility to have detailed schemas for parts of the data of greater interest, while more succinct schema is provided for other parts, and the decision can be changed as many times as needed, in order to explore the schema in a gradual fashion, moving the focus to different parts of the collection, without the need of reprocessing data and by only performing type rewriting operations on the most precise schema.
Motivation & Objective
- To investigate the learnability of unordered XML schema formalisms, specifically DMS and MS, from user-provided examples.
- To extend schema learning beyond positive examples by incorporating negative examples for improved schema maintenance and incremental updates.
- To design efficient, sound, and complete learning algorithms that return minimal schemas consistent with the examples.
- To formally establish the theoretical boundaries of learnability for unordered schemas under different example settings.
Proposed method
- Proposes a learning framework inspired by Gold's identification in the limit, requiring soundness, completeness, and polynomial-time efficiency.
- Introduces disjunctive multiplicity schemas (DMS) and disjunction-free multiplicity schemas (MS) as formalisms for unordered XML content models.
- Develops learning algorithms that return minimal schemas consistent with given positive and/or negative examples.
- Proves NP-completeness of consistency checking for DMS with negative examples via reduction from 3SAT.
- Uses compressed DAG representations of XML documents to support scalable schema inference in future extensions.
- Employs a characteristic sample approach to ensure minimal schema inference under the classical grammatical inference model.
Experimental results
Research questions
- RQ1Can unordered XML schemas be learned efficiently from positive examples only, and are they learnable when negative examples are included?
- RQ2Is the class of disjunctive multiplicity schemas (DMS) learnable in the presence of both positive and negative examples?
- RQ3Are disjunction-free multiplicity schemas (MS) learnable in both positive-only and positive-negative settings?
- RQ4What is the computational complexity of checking consistency between a schema and a set of positive and negative examples?
- RQ5Can minimal schemas be consistently inferred from such examples under the proposed framework?
Key findings
- DMS are learnable from positive examples only, but not when negative examples are included due to NP-completeness of consistency checking.
- MS are learnable in both settings: from positive examples only and from both positive and negative examples.
- The consistency checking problem for DMS with both positive and negative examples is NP-complete, implying that DMS cannot be learned in polynomial time under this setting unless P = NP.
- The proposed learning algorithms for MS return minimal schemas consistent with the input examples in both settings.
- The DMS formalism is not learnable in polynomial time with negative examples, establishing a theoretical limit on its learnability.
- The results provide the first formal characterization of learnability for unordered XML schema formalisms, distinguishing DMS and MS in terms of learnability with negative examples.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.