Persistent obstruction theory for a model category of measures with applications to data merging
Abstract
Collections of measures on compact metric spaces form a model category (“data complexes”), whose morphisms are marginalization integrals. The fibrant objects in this category represent collections of measures in which there is a measure on a product space that marginalizes to any measures on pairs of its factors. The homotopy and homology for this category allow measurement of obstructions to finding measures on larger and larger product spaces. The obstruction theory is compatible with a fibrant filtration built from the Wasserstein distance on measures.
Despite the abstract tools, this is motivated by a widespread problem in data science. Data complexes provide a mathematical foundation for semi-automated data-alignment tools that are common in commercial database software. Practically speaking, the theory shows that database JOIN operations are subject to genuine topological obstructions. Those obstructions can be detected by an obstruction cocycle and can be resolved by moving through a filtration. Thus, any collection of databases has a persistence level, which measures the difficulty of JOINing those databases. Because of its general formulation, this persistent obstruction theory also encompasses multi-modal data fusion problems, some forms of Bayesian inference, and probability couplings.
1. Introduction
We begin this paper with an abstraction of a problem familiar to any large enterprise. Imagine that the branch offices within the enterprise have access to many data sources. The data sources exposed to each office are related and overlapping but non-identical. Each office attempts to merge its own data sources into a cohesive whole, and reports its findings to the head office. This is done by humans, often aided by ad-hoc data-merging software solutions. Presumably, each office does a good job of merging the data that they see. Now, the head office receives these cohesive reports, and must combine them into an overall understanding.
This paper provides a mathematical foundation combining methods from measure theory, simplicial homotopy, obstruction theory, and persistent cohomology (Section 1(a) gives an overview) for semi-automated data-table-alignment tools (e.g, HumMer Reference 14) that are common in commercial database software. Data tables are abstracted as measures over value spaces. The problem of merging tables, or indeed merging previously-merged tables, is recast as the search for a measure that marginalizes correctly.
For example, one data table might record the ages and heights and weights of patients in a hospital, abstracted as a formal sum of point-mass atoms. Another data table might be an actuarial table giving ages and heights and weights for an entire population, abstracted as a smooth distribution where the heights and weights form 2-dimensional elliptical Gaussian distributions for each age and height, the means and singular values varying with age. Both examples would be data tables on the same age-by-height-by-weight space. A third data table might be a simulated probabilistic model of injury severity during vehicle collisions based on height and weight of the passenger. This data table on height-by-weight-by-severity space may or may not merge with each of the previous examples over height-by-weight, within some error. One can imagine many other data tables collected from myriad sources (motor-vehicle records, longitudinal studies, clinical trials) related to this example that may be of interest.
Our first fundamental result (Theorem 3.11) uses this measure-theoretic lens to draw a surprising correspondence between the process of JOIN in database engineering and the Kan extension property for simplicial sets.
This abstraction, and the model-theoretic tools that come with it, permits several advances over the current state of the art, which are collected in our second fundamental result (Theorem 4.13). First, inconsistencies in table collections are automatically detected as obstructions in the sense of Steenrod (i.e, a certain co-cycle is not zero). Second, when inconsistencies are detected, the obstruction theoretic tools, combined with persistent cohomology, provide two potential remedies: a) if algebraically permitted (i.e, a certain co-class is zero), the user may retreat back one level of merging, repair, and proceed; b) else, the user may settle for a measure that only marginalizes approximately correctly, with the degree of possible correctness computed automatically by persistent obstruction theory.
More broadly, we are interested in the following three meta-problems:
By “sources of partial information” we mean, roughly, collected data (databases, spreadsheets, pictures), statistical models, established theories, simulations, and general population trends. In this article, we define a formal mathematical structure—a Data Complex (Section 2)—that can encapsulate a wide range of problems like 1.1, 1.2, and 1.3. A data complex is meant to encode each source of information as a finite measure on an appropriate value space. Whether these measures arise from collected data as in Problem 1.2 or some model/theory/simulation/trend/merger derived from previous work as in Problem 1.3, we call them data tables. By using measures, we combine Problems 1.2 and 1.3 into a single problem.
1(a). Overview of technical approach
Often, formal mathematics looks very different than its intuitive purpose, so we want to make sure the reader understands our intent, absent its formal notation.
We want a mathematically rigorous way to encode and solve Problems 1.1, ?GPMerge, and 1.3. When translated to the language of data complexes, a physically reasonable process for “merge [data tables] into a cohesive whole” can be expressed in terms of four key mathematical ingredients: homological algebra for simplicial sets, simplicial homotopy Reference 10Reference 18, obstruction theory Reference 23, and persistent (co)homology across a filtration Reference 4.
The first ingredient (homological algebra) is used because data tables may overlap partially, meaning that we need a formal simplicial complex to encode all possible intersections of all possible data tables. Moreover, simplicial sets allow data tables with repeated columns. The marginalization integral provides a face map and a boundary operator, and an analogue of the diagonal measure within a product provides the degeneracy map. The face and boundary operators tell us whether one “narrow” data table reproduces the data of another “wider” data table via marginalization integrals. Thus, the question of whether several “narrow” data tables can be merged into a few “wider” data tables becomes the question of whether a is the boundary of a -chain That is, the ability to merge overlapping partial information sources as in Problem -chain.1.2 is encoded as the homology of a data complex.
The second ingredient (simplicial homotopy) arises because Problems 1.1, 1.2, 1.3 suggest that we want “simple” solutions. Even when partial merging is possible in the sense of homology, it may be that the result is too complicated to be merged further. In the study of geometric bundles, the fundamental group and higher homotopy groups of the fiber play a key role, and we use simplicial homotopy in a similar way here. A simple solution to Problem 1.2/1.3 or a simple hypothesis in Problem 1.1 corresponds to a single data table (as opposed to a complicated chain of many data tables), which is indicated by triviality in the simplicial homotopy group.
An important side effect of introducing simplicial homotopy (via model categories) is that we see that the Kan extension condition means “merging operations are possible.” The process we call merging is similar to JOIN’ing in database software, to fusion in multi-modal data analysis, and to coupling in probability theory. This link reinforces the intuition that data complexes are a good way to encode Problems 1.1/1.2/1.3 for modern data mining when using spreadsheets, DataFrames, and SQL databases. Indeed, our first fundamental result (Theorem 3.11) explicitly formalizes this correspondence.
The reader may be wondering why we introduce something as abstract as simplicial homotopy into something so concrete and common as data merging. Consider the typical database operation
SELECT * FROM table1 INNER JOIN table2 ON table1.column1 = table2.column2 WHERE condition;
When issuing such a command, the administrator must designate two tables to be JOINed and choose specific columns from the two tables to be identified via the ON clause. The SELECT * …; command returns a table, whose columns must appear in some order that is determined by the ordering of attributes in table1 and table2, by their placement in the command, and by the columns in the ON clause. Thus, in the language of Section 2, the database software and the working administrator must agree on a total set of attributes, the attributes in each table, and an ordered attribute inclusion to be used for the ON clause.
This command also indicates why we formalize “data tables” as measures over products of attribute value spaces. Replacing SELECT * with a SELECT columnList corresponds to the ability to re-order the attribute list and to marginalize the output to a sublist of attributes; hence, arbitrary finite products are possible. The optional WHERE condition clause allows one to impose additional restrictions on the values to be considered by imposing logical conditions on the entries, such as WHERE (age > 18 AND height > 200). These conditions allow one to restrict the data table to anyFootnote1 measurable subset of the value space. The entries of a WHERE-restricted data table constitute the mass of this measurable set, with respect to the data table. (Finally, for those fluent in SQL subtleties, note that the ability to perform LEFT, RIGHT, and OUTER JOIN instead of INNER JOIN will be encompassed by approximate join and face operations in Section 4.)
The third ingredient (Steenrod’s obstruction theory as in Reference 22) provides guidance on how to combine homological algebra and homotopy theory to detect and describe any obstructions to an iterative merging process. In its original formulation, obstruction theory asks whether a section of a fiber bundle defined over a topological space can be extended to a section defined over a larger topological space The most famous example is the smooth category, where one computes characteristic cohomology classes to indicate whether sections of a bundle can be extended globally. Steenrod studied this problem in the case of fibrations over general topological spaces. Typically, assuming one has some sort of CW structure on ? one tries to extend , first over the of -skeleton and then the of -skeleton and so forth. Assuming one has already extended , to a section over the of -skeleton Steenrod’s obstruction cocycle is an element , of where , is the homotopy group of the fiber of as twisted by , loosely, the co-chain ; is defined on each -cell of by restricting to the boundary of but there is some nuance coming from the twisting needed to turn this into a homotopy class of the fiber. If this cocyle , is trivial in homotopy, then the section can be extended, and otherwise it cannot. However, if this cocycle is a coboundary, then there is another section , agreeing with , on the of -skeleton with , trivial in homotopy. Hence, obstructions are discovered dimension-by-dimension via homotopy-valued cohomology, and the obstruction computation can often permit the “correction” of initial extensions of the section to avoid higher-dimensional obstructions.
This concept of an obstruction cocycle was introduced by Steenrod in Reference 22 and revisited many times, such as Reference 15 and Reference 11. Its importance motivated early work in category theory. The entire raison d’être of defining fibrant objects and model categories in Reference 10 and Reference 18 was to establish the most general context in which these (co)homology and homotopy calculations remain sensible for more general notions of “weak equivalence.” In particular, one does not require actual topological spaces to perform obstruction theory, merely fibrant objects in a model category.
Here, we establish homology and homotopy theory for data tables by relying on these categorical foundations, giving us an obstruction theory directly analogous to Steenrod’s. When sequential merging is impossible, the obstruction cochain can compute specific data tables that obstruct the process. That is, obstruction theory determines when Problem 1.3 is solvable locally but not globally.
The fourth ingredient, persistent (co)homology, provides a mathematically robust way to measure how much the underlying original data tables would have to be altered, in order to overcome an obstruction. This is a key feature of the theory, because from a practical perspective, multiple information sources are never perfectly consistent. Typos and transpositions and omissions and error bars always exist, and must be accounted for. We use a filtration built from the Wasserstein distance on measures to ensure that the desired simplicial homotopy is possible throughout all levels of the filtration. This allows for a well-defined notion of persistent obstruction theory. Our second fundamental result (Theorem 4.13) formalizes the idea that when inconsistencies are identified, one of two remedies may be availableFootnote2
- •
the head office should retreat back one merging level, repair (with repair suggested by algebra), then again seek consensus
- •
the head office should settle for only approximate consensus, where the desired measure only approximately marginalizes correctly, with the degree of approximation computed via persistence.
The ultimate result of this article is a mathematically robust framework for data merging that is reasonably applicable to real-world data. In this framework, Problems 1.1 and 1.2/1.3 become Problems 2.38 and 2.39, which are answered by Theorem 4.13 and Definition 4.14.
1(b). Related work
To the best of our knowledge, this is the first work to combine all of the tools above to build a robust obstruction theory for databases. Other authors have used different aspects of these tools to address databases. For example, recent work by Fong and Spivak uses database schemas and type/value relationships as a motivational example to introduce functors and (co)limits Reference 6, Chapter 3. Specifically Example 3.99 and the chapter’s final remark are somewhat in the same spirit as the approach taken here. Our category of data complexes in Section 2 is similar to the categorical presentation in Reference 20Reference 21, but our data tables are built from measures (not sets) in order to flexibly address the errors that are inevitable in applications. Finally, other recent work by Abramsky, Morton, and collaborators uses obstruction theory (in the sheaf-theoretic context) to detect non-contextuality in quantum theory, with an application to the non-existence of a universal data table that contains a set of given tables Reference 1Reference 2Reference 13. We expect that further interweaving of these measure-theoretic, sheaf-theoretic, and simplicial/categorical perspectives will be fruitful in the future.
1(c). Outline
The rest of this paper is organized as follows. Section 2 defines the basic object of study, a data complex, and draws a mapping between its simplicial set structure and the choices that must be made by any database administrator. Categorical language is alluded to in this section, but a full categorical treatment of data complexes is confined to the Appendix. Section 3 connects simplicial homotopy to the notion of JOIN, and shows how obstruction theory detects the impossibility of merging. Section 4 describes our notion of persistent obstruction theory and its application to the idea of fuzziness of consensus. The paper concludes with discussion of practical considerations for applications in Section 5.
2. Attributes and data tables
This section provides a practical developmental discussion of a Data Subcomplex that should be accessible to a fairly wide mathematical audience, with full categorical language found in the Appendix. The basic definitions appear in Sections 2(a) and 2(b), culminating in Theorem 2.14 which shows that we have indeed defined a simplicial set. Operations that are specifically useful to standard database operations (inclusion/merge/join) are defined in Section 2(c). Then Section 2(d) makes plain the analogue of “section of a bundle,” which permits the rephrasing of our fundamental problems in mathematical language, and Section 2(e) defines the (co)homology of data complexes needed for obstruction theory.
2(a). Data subcomplex as a simplicial set
Our definitions are aimed at making precise the following real-life scenario in data administration.
- (1)
The administrator chooses a set of all attributes (column names and variable types) of interest.
- (2)
For each attribute in the list the administrator chooses a space of possible values, and a “reasonable” metric , that can provide the distance between any two values in that space. Our notion of “reasonable” includes compactness, which is typically guaranteed by boundedness of realistic integer or vector-valued entries.
- (3)
The administrator acquires “data” for some lists of attributes, and attempts to reconcile these into a joint view across all attributes in The reconciliation process involves “join” operations that could be represented by SQL commands such as .
SELECT * FROM table1 INNER JOIN table2 ON table1.column1 = table2.column2 WHERE condition;
- (4)
When reconciling, the administrator may choose to alter the data, as long as the alterations are “small” with respect to both the individual values via and with respect to the overall information-theoretic content of the data.
The former two items are choices that must be made. The latter two items are a process to be accomplished. The mathematical structure developed here is informed deeply by the example SQL command, as discussed in Section 1(a).
Let us define our objects. It is convenient to use language of category theory; see Appendix A for our conventions.
Consider a finite set The elements are called attributes. For each attribute . there is a compact metric space , called the value space. ,Footnote3 These assumed objects (the finite set of attributes and a compact metric space assigned to each attribute) are user-supplied by a data administrator; after these choices are made, everything else proceeds as defined.
These assumptions imply that is complete, separable and is a Radon space. In many applications, the space is finite or a closed interval in so one needn’t imagine esoteric spaces to grasp the theory. ,
Each is a Radon space (in particular, a measurable space) using the usual Borel algebra from the metric These metrics will be used in Section .4 to quantify levels of acceptable imprecision when marginalizing measures.
An attribute list is a finite sequence of attributes; that is, an attribute list is a function The length of an attribute list is . An attribute list . is called nondegenerate if it contains no repetitions; that is if the function is one-to-one. The longest nondegenerate attribute lists are permutations of .
For any attribute list the product space , is well-defined. The product space admits the metric and is measurable via the corresponding tensor-product algebra.Footnote4 For any list representing a permutation of the set then , is the correspondingly ordered total product of all the measurable spaces of all attributes. At the other extreme, we equip the empty attribute list of length , with the trivial value space as , a singleton set. ,
We use the for ease of proof when studying filtrations. Other -metric or more general product metrics might carry the whole theory, too, but we have not yet verified this. -metrics
In Section 2(b) it is shown that for each , is equipped with face maps (by omission of the element as in Definition th2.7) and degeneracy maps (by repetition of the element as in Definition th2.11). When omitting the trivial -level, is the simplicial set whose elements are generated by the permutations of via the face and degeneracy maps. Including the trivial -level, is the augmented simplicial set generated this way. See Appendix A for a summary of the standard definition of (augmented) simplicial sets.
For any attribute list let , denote the space of finite measures on A data table is a pair . for for any Note that . as a measure on the singleton set , is determined by the mass of A trivial data table is any data table of the form . where and is a measure on the singleton set We sometimes abbreviate our notation for data tables from . to because any , is equipped with a domain (the measurable sets in so ), is understood in context.
In the first example alluded to in the introduction, we could have = [age, height, weight] with in integer years, in centimeters, and in kilograms, each with the standard metric. The space would be the set of measures on the compact set given by the product. An attribute list is also permissible, and might arise for example if heights were compared from two different sources (driver’s license versus medical chart).
For practical purposes, because is a compact metric space, one might use the Radon–Nikodym theorem to write any using a density function with respect to the uniformFootnote5 probability measure on the compact set; however, for simplicity we use the language and notation of measures instead of the language of functions and integrals.
Theorem 2.14 shows that the ambient data complex is a simplicial set (augmented when including with faces given by the marginalization integrals (Definition )2.9) and degeneracies given by Dirac diagonalizations or intersections (Definition 2.13). The ambient data complex is a small category, whose morphisms are generated by faces and degeneracies. The forgetful functor is a simplicial map between the small categories and .
2(b). Morphisms of data tables
This section establishes notation for common operations and proves that and are simplicial sets, establishing that they are small categories with morphisms that are well-understood in language of measures.
In our earlier example with individual patients as atomic point-masses, the face map from age-by-height-by-weight to height-by-weight represents deleting the age column of the spreadsheet, and allowing new duplicate entries to add (that is, integrate) measure.
Face maps can be applied multiple times, and the following lemma provides the desired re-ordered “commutation” property. For attribute lists the proof is immediate; for data tables it is the Fubini–Tonelli Theorem applied to the measures.
If the measure is expressed as a density function via the Radon–Nikodym theorem, then this is the Dirac-delta
2(c). Inclusions, merges, and joins
We now establishFootnote7 additional operations (inclusion, sum, merge, join) that are special to and and do not apply to general simplicial sets.
We are particularly indebted to Tony Falcone for technical discussions that motivated the formalism in this subsection.
The next lemma and corollary make clear that face maps and attribute inclusions are related tightly.
Attribute inclusions provide surjections on value spaces and measures, according to the following “contravariant” definition.
When the attribute inclusion is understood from context, we abuse notation and write instead of Note that . so we use this notation as shorthand for “the total integral of a measure.” ,
Note that and are related by a permutation, which (excepting the identity permutation) does not correspond to a morphism in the categories or The concatenation process provides specific attribute inclusions . and More generally, for attribute inclusion . as in Lemma 2.18, it is true that and are related by a permutation; because, the concatenation provides inclusions and that may not be the original and On the other hand, for any sum . it is true that , is the quotient of by the concatenation-induced inclusion of and vice-versa. ,
Definition 2.24 implies and are well-defined. But, beware of multivariable calculus: as not every measure on a product space is an elementary product of measures! ,
Because Lemma A.2 provides an ordered form of the inclusion–exclusion principle, we can define an indexed form of the inclusion–exclusion principle.
Note that the choice of ordering in Definition 2.27 and Figure 1 is partially arbitrary. In particular, one may draw an equivalent diagram with any choice of interleaving pattern, as long as the entries remain fixed. However, this choice is irrelevant, as the theory developed in Section 3 will encompass all allowable permutations. Regarding the permutation notation introduced earlier, for any Borel sets , and , we write , for the appropriately permuted copy of the set in since the definition and algorithm give a well-defined permutation. This , notation is required in Theorem 3.11 and elsewhere.
Our choice of ordering in provides that the trivial merge
is the sum from Definition 2.24.
As with Definition 2.24, the attribute list is well-defined regardless of the preference of versus and regardless of the indices specified by and This list is identical to the list obtained by constructing the sum . then applying face maps to remove the image of for each indexing But, again beware that the partitioned merge-sort construction equips . with specific attribute inclusions and such that the composed attribute inclusion is well-defined through both compositions. In general, these inclusions are not the same as the inclusions obtained through the “sum and face” construction.
2(d). Data sections
Because the forgetful map acts like a projection, it allows a notion of section.
The following definition captures a condition describing data subcomplexes that are “as compatible as possible.”
The next lemma shows that well-aligned data subcomplexes in this theory play the role of “submanifolds transverse to the fiber” from classical bundle theory and of “holonomic submanifolds” in geometric PDE theory. That is, they represent local sections.
In our definitions above, the set of attributes is finite, and each level of the simplicial set is finite. Therefore, for any simplicial subset we can consider the finite graph whose vertices are the 0-cells of , (singleton attribute lists) and whose edges are the 1-cells (including loops, as degenerate 1-cells like ).
With the language of simplicial sets, we can now re-state our original motivating questions. The remaining sections of this document construct a precise way to answer these questions, and ensure that the notion of “distance” is well-defined. An appropriate notion of distance appears in Definition 4.1. When all the definitions and lemmas are in place, these problems are answered by the Obstruction Cocycle in Definition 4.8.
2(e). Homology
We use the traditional definition of chains, summarized here to fix notation. FixFootnote11 a ring For . a , -chain is a formal linear combination
where negative coefficients indicate formally reversed orientation. We define chains as elements of the 1-dimensional -graded -module, For . define the usual simplicial boundary operator , as ,
It is immediate that satisfies so homology , is well-defined.
For a , -chain is a formal linear combination
where negative coefficients indicate formally reversed orientation. We can also define chains as -graded the , generated by -module Moreover, for any . note that , and are formally distinct unless hence, the graded module ; is very large, especially if is infinite for any For . define the usual simplicial boundary operator , as ,
The next lemma is easy, but important; it means the usual notions of cycle/closed and boundary/exact apply to chains in .
Define the projection by and extending by linearity.
Similarly, the chain modules and homology are well-defined for any data subcomplex of an ambient .
We are particularly interested in the case so that a chain , (respectively is interpreted as a set of attribute lists (respectively, data tables), without any consideration for multiplicity or orientation. It is therefore sensible to apply the condition well-aligned to a chain ) so that a well-aligned chain in , can be interpreted equivalently to a section where , is the data subcomplex generated by the elements of .
3. Homotopy as joins
In the previous section, we established that a data complex is equipped with simplicial homology, and framed data complexes as simplicial sets. This section contains several payoffs for that effort. First, Section 3(a) builds to Theorem 3.11, our first key result, which shows that the simplicial set language enables a connection between our framework and standard database engineering; later results show that the framework enables further insights into data merging problems that transcend standard database engineering. Then, Section 3(b) explores the simplicial homotopy of data complexes and reframes Problems 2.38 and 2.39 in the language of obstruction theory for simplicial sets, as in Reference 7Reference 9Reference 10Reference 12Reference 18.
3(a). Database joins and the kan condition
Recall these three standard definitions from the well-established theory of simplicial sets, as in Appendix A and Reference 7Reference 9Reference 10Reference 12Reference 18.
As is standard in the literature, we abuse notation slightly by referring to both (which is an infinite collection of sets) and (which is the generator of that collection) as “an in -simplex .”
Note! The (categorical) -simplex is not the same as the (topological) -simplex The former is an infinite set of formal objects in the simplex category; it has no notion of “interior” or “continuity.” The latter is a compact topological space obtained defined via convex linear combinations in . There is a relationship between their respective categories called realization, as discussed in .Reference 18, §3 and Reference 9, Chap I.2.
The Kan condition means that the simplicial set is closed under simplicial deformation, so it has a well-defined homotopy group. The Kan condition is not specific to data complexes; it is a definition for general simplicial sets, and gives the appropriate notion of fibrant for many model categories. For our purposes, we require a slight variation on the Kan condition to provide an adequate notion of fibrant data contexts, which we now develop as Definition 3.13.
We define the space of joins for two data tables with designated attribute inclusions.
Similarly to Definition 2.27, we write this set as for notational convenience when the attribute inclusions are understood from context.
Note! This is not the same notion of “join” that one sees in traditional topology, or in categorical references such as Reference 5Reference 19 and https://ncatlab.org/nlab/show/join+of+simplicial+sets. It is not yet clear whether there is a useful relationship to joins in ergodic theory Reference 8. We choose the term “join” to mimic the terminology in database engineering discussed in Section 1. Definition 3.5 reminds one of couplings from statistics, as in Reference 3; however, the generality here allows repetition and distinct measures and overlaps.
The weak join condition means that the simplicial set admits some database JOIN operation between any well-aligned pair of data tables. The strong join condition requires that all possible joins exist in .
The trivial join (when is of particular interest as it provides a generalization of independent products of measures. )
(We would not be surprised if the Kan condition and the strong join condition are equivalent, under some reasonable assumptions, but we have not pursued that claim.)
3(b). Simplicial homotopy of data complexes
See Appendix A for a categorical version of this definition. The entire raison d’être of fibrant objects is that they admit homotopy, as proven by Reference 10 and Reference 18, which allows obstruction theory to be studied in direct analogy to Steenrod. In the category of simplicial sets, the term fibrant refers only to the Kan extension condition. Our practical desire to use joins as a weak-equivalence compels us to require the strong join condition. By Theorem 3.11(1) the traditional definition and all of its consequences are implied.
We now want to explore how a data subcomplex of an ambient interacts with any other attribute list The following sets are of interest. .
A data subcomplex may not be fibrant, so we define a convenient fibrant space that contains it. The notation is meant to be suggestive; in Section 4, a larger filtration of simplicial sets is created (Definition 4.5) by turning the equality in the definition below into an inequality involving Wasserstein distance.
The definition of is a convenient way to say “consider everything that can be generated from using as justified by the following lemma. Similarly, the upcoming Definition ,”4.5 of gives a convenient way of saying “consider everything that can be approximated to an acceptable level of uncertainty from using .”
We conclude this section by tying simplicial homotopy theory to Problem 2.39.
This corollary is revisited as Lemma 4.9. The corollary fails when no such extension can be found. Then, the question remains: how to measure the failure of this corollary? That measurement is the purpose of filtered obstruction theory.
4. Filtrations and obstructions
This section concludes the theoretical framework outlined in Section 1(a). Together, obstructions and filtrations allow us to detect when merging is possible; if merging appears obstructed, we can determine whether merging can be achieved by reverting a previous merge or by altering some of the data tables. Section 4(a) introduces a filtration from a data subcomplex to its ambient using the Wasserstein distance. Each level of the filtration is fibrant, which allows one to define an obstruction cocycle (Section 4(b)) at each level of the filtration. Eventually, for a high enough level in the filtration, the obstruction cocycle becomes trivial, so the importance of the obstruction cocycle can be measured using topological persistence. This statement is formalized in Theorem 4.13, which can be seen as the main payoff of our theoretical development in terms of database engineering. As promised in the introduction, the theory of data complexes does not just mathematize the notion of table merging; rather, it provides further powerful operations when traditional merging is impossible.
4(a). Filtrations from data subcomplexes
A general notion of persistence on simplicial sets appears in Reference 16. In summary, a fibrant filtration of simplicial sets is a bi-graded collection of sets for and equipped with maps and such that
- (1)
is a simplicial set for each ,
- (2)
for all and ,
- (3)
is fibrant for each .
The fibrant condition implies that is well-defined for all and the inclusion maps , induce maps on homotopy, .
We now define a specific filtration for a data subcomplex that is designed to meet our application regarding joining data tables. Recall that is a Radon space for each attribute .
Now we produce a particular fibrant filtration for a data subcomplex.
Note that the case reproduces the complex of perfect joins, Note also that . .
The proof is identical to the proof of Lemma 3.20, replacing the equality with an inequality.
Because is fibrant, all of the usual consequences apply in homotopical algebra, such as
4(b). Persistent obstruction theory for data subcomplexes
Because we have established fibrant objects with resulting homotopy and homology, we are equipped to extend obstruction theory to our application. Although our category is not classical, the next several results are modeled on the classical work summarized in Section 6 of Reference 24, Section 34 of Reference 22, Section 4 of Reference 11, and Reference 15. The discussion culminates in Definition 4.8 and Theorem 4.13.
The next theorem is an adaptation of Theorem 34.6 and Corollary 34.7 in Reference 22, which is summarized in Theorem 4.5 of Reference 11. It relies on defining a difference cochain that compares a homology class of sections.
Theorem 4.13 restates Theorems 4.9 and 4.12 in practical language.
5. Discussion
This paper provides a mathematical foundation for semi-automated data-table-alignment tools that are common in commercial database software. Data tables are abstracted as measures over value spaces, and the problem of merging tables, or indeed merging previously-merged tables, is recast as the search for a measure that marginalizes correctly. This abstraction, and the simplicial set structure built with it, permits several advances over the current state of the art in database engineering. Ongoing and future work will focus on developing clear algorithms for application of persistent obstruction theory to real-world database engineering and related problems in data science.
We conclude this paper with several brief remarks about further work and also some practicalities for future use of this theory:
- •
A data sample in any metric space provides a measure, by counting. The measure is or normalized as for any .
- •
For computational purposes, most infinite metric spaces can be considered as compact or finite spaces, using bounds or bins or kernel methods or distributional coordinates that are appropriate to the problem at hand.
- •
On the compact metric spaces measures of interest can be described as density functions via a Radon–Nikodym comparison to the uniform probability measure , .
- •
One attribute can represent models on other attributes, providing an interpretation of Bayesian inference and an opportunity to apply persistent obstruction theory to compact parameterized model spaces. In machine learning, one could use this framework to describe the compatibility of solutions in ensemble methods.
- •
Any list of attributes can be considered as a single attribute, because it still provides measures over some metric space. There is no requirement that attribute value spaces are “minimal” or “1-dimensional” in any sense.
- •
Filtrations other than might work, too, but someone has to prove that all levels of the filtration are fibrant. -Wasserstein
- •
To study a complex of approximate joins, one must compute Wasserstein distances as in Definition ,4.1. This can be done efficiently using the tools of optimal transport as in Reference 17.
- •
To apply Theorem 4.13, one must compute in the simplicial homotopy group This is definitely the greatest challenge for realizing these mathematical advances as actual software, because homotopy groups are notoriously difficult to compute in general. The task is simplified in our case by several factors. First, we do not necessarily need to know the group structure of . to know whether a particular element is trivial in that group. Second, a data subcomplex is always finitely generated with finite, and that finite number is small (several, not several trillion) in most use-cases. Third, because any list of attributes can be considered as a single attribute, problems that are a priori high-dimensional can be studied with a smaller list of formal attributes. Fourth, we expect the homotopy to simplify as increases, so for practical purposes it may be easy to bound even if each is difficult to compute. We expect (or hope) that and are often sufficient for practical problems.
- •
The most important conclusions of this work are: Any manual or automatic data-merging system must analyze homotopy in order to guarantee success; and Obstructions can only be resolved two ways—backing up one step, or allowing additional leeway in the data comparison.
Appendix A. Categorical definitions
This appendix provides a rapid summary of a categorical interpretation of the development in Section 2. For more on these topics, and for the notion of homotopy for fibrant objects in model categories, see Reference 7Reference 9Reference 10Reference 12Reference 18. The reader is warned that each of these references uses a slightly different convention for ordering, opposite categories, and co-/contra-variant functors.
A(a). Simplex
Let denote the set category, whose objects are sets and whose morphisms are functions.
Let denote the simplex category, whose objects are the nonempty sets of natural numbers with the standard ordering written , and whose morphisms are order-preserving functions. Let , denote the augmented simplex category, whose objects are sets of natural numbers with the standard ordering, and whose morphisms are order-preserving functions. The augmented simplicial category includes the empty set, denoted or which is the initial object in the category. So, , A monomorphism in . is a one-to-one order-preserving function. The only bimorphisms/isomorphisms in are the identity maps. Among the morphisms in and are the co-faces and co-degeneracies defined as follows. ,
These morphisms satisfy the conditions
- (1)
if , ;
- (2)
if , ;
- (3)
;
- (4)
if , and ;
- (5)
if , .
Every non-identity morphism in or can be written as a finite composition of co-face and co-degeneracy morphisms, so these five properties essentially characterize and .
For our applications, the following lemmas about monomorphisms in are very useful. They are elementary, but do not appear in the standard references in this form. Merged indexing is merely an ordered formulation of the inclusion–exclusion principle.
A(b). Simplicial sets
For any category the “simplicial category over , is ” An object in . is a contravariant functor That is, an object in . is an assignment of:
- •
for each object in an object , in ;
- •
for each morphism (order-preserving function) in a morphism , in .
The augmented simplicial category, allows a terminal object in , to correspond to the initial object That is, the trivial map . yields a corresponding map if the category , happens to admit a terminal object.
The morphisms in or are the natural transformations as in Equation A.2.
The most important case is the category of simplicial sets, which is augmented to , The following lemma shows that augmented simplicial sets are given by face and degeneracy maps. .
A particularly important example of a simplicial set is the , (See -simplex.3(a).)
By the Yoneda Lemma, a simplicial set is characterized by the simplicial maps that is, a simplicial set is characterized by its simplices. ;
By Lemma A.4 and the Yoneda Lemma, if is a simplicial set, then a horn in is a collection of -simplices such that for .
A simplicial map is called a cofibration iff it is a monomorphism. A simplicial map is called a fibration iff for any cofibration the commutative diagram ,Equation A.3 can be completed.
Weak-equivalences are defined to be compatible with fibrations and cofibrations according to Reference 18. See also Reference 9. These definitions of cofibration, fibration, and weak equivalence make into a (closed) model category.
A simplicial set is called fibrant or to satisfy the Kan extension condition if is a fibration; that is, a simplicial set satisfies the Kan condition if and only if each horn in can be extended to a simplex in Let . denote the subcategory of fibrant simplicial sets. Then there is a homotopy category and any , admits pointed homotopy groups that characterize the weak equivalence. Moreover, the simplicial homotopy groups of are isomorphic to the continuous homotopy groups of its topological realization, as discussed in ,Reference 18, §3 and Reference 9, Chap I.2. See also Reference 10 and Reference 12 for historical explanations that minimize categorical language.
A(c). Data complexes
Let denote the category of data complexes. An object in is a pair of augmented simplicial sets with simplicial map such that for each the set , is a set of data tables over attribute lists from some attribute set as in Section ,2, with and by marginalization and Dirac-delta intersection, respectively.
A morphism in is a simplicial map as in Equation A.4 with some compatibility conditions.
The vertical maps are tuples satisfying the following compatibility conditions.
- (1)
is a level of a simplicial map on sets of attribute lists.
- (2)
is a level of a simplicial map on sets of measures, with .
- (3)
is a continuous function on metric spaces, where This induces . for all .
- (4)
If with and then , as measures. That is,
These conditions guarantee simply that the attribute lists the value spaces , and the measure spaces , remain compatible. As with in ,Equation A.4, the map can be taken to be or so that the diagram describes naturality with respect to face and degeneracy maps on and These conditions are sensible for . so they apply to the trivial data table , .
For each real number there is a singleton data complex with , , For each . there is a single attribute list , with a singleton value space and one measure, For brevity, we refer to this singleton data complex as . .
Slightly more generally, there is a terminal data complex with , For each . there is a single attribute list , with a singleton value space and measures for each The terminal data complex is the union of all the singleton data complexes. For brevity, we refer to the terminal data complex as . .
Every data complex admits a morphism to the terminal data complex This terminal morphism . maps each data table to the singleton mass If all data tables in . share the same mass (say, then the image of the terminal morphism goes to some ), .
A morphism in is called a cofibration iff it is a monomorphism. A morphism in is called a fibration iff for any cofibration of from a well-aligned pair to a join the commutative diagram ,Equation A.6 can be completed.
A data complex is called fibrant if the terminal morphism is a fibration. By Theorem 3.11, if is a fibrant data complex, then is a fibrant simplicial set. Thus, the category is a (closed) model category, and the fibrant subcategory inherits a well-defined homotopy category from and any , admits pointed homotopy groups that characterize the weak equivalence. Moreover, the homotopy groups are isomorphic to the continuous homotopy groups of the topological realization of the underlying simplicial set.
Acknowledgments
We are very grateful to John Paschewitz and Tony Falcone for project guidance and technical direction, and to Greg Friedman, Justin Curry, Jose Perea, and Jonathan Mattingly for helpful discussions at various stages of the theoretical development.