Process and system for sparse vector and matrix...

Data processing: database and file management or data structures – Database design – Data structure types

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

Reexamination Certificate

active

06751628

ABSTRACT:

FIELD OF THE INVENTION
The invention relates to the field of mathematics, and more particularly the computation of sparse matrixes. In mathematical terms, a vector is a sequence of integral keys and corresponding numeric values. A matrix is a two-dimensional grid of key-pairs with corresponding values, or equivalently a vector of vectors. In common practice, many matrices are “sparse,” meaning that the majority of the numeric values are zero. The building and manipulation of vectors and matrices is a common mathematical task. The amount of memory consumption and processor time is of critical interest in performing these tasks.
The word-indexing of a set of documents, such as those used in document search engines, can be modeled as a sparse matrix. Because it is desired to both build and query such matrices quickly, and because there data is essentially dispersed at random, they are particularly susceptible to any number of speed tradeoffs made in current sparse matrix implementations.
Typically, a large set of documents are indexed by words they contain. The purpose of the index is to speed up the lookup of words. The words and the documents containing them are represented by a unique identifier, generally an integer. Such an index is a matrix wherein the word is the primary key, yielding vectors in which the document is the secondary key, and finally yielding values such as the occurrence frequency of said word. The invention presents a novel data structure representation for vectors and matrices. Further, the invention presents numerous implementations of common methods on such vectors and matrices. Finally, the invention is applied to improving the performance of document index building and querying.
BACKGROUND AND PRIOR ART
Manipulation of large sparse matrices is a common mathematical task. There are many applications that require a space and time efficient data structure and related methods to perform these computations. However, existing implementations suffer from poor performance in particular tasks, or are specific to matrices of a particular pattern.
To analyze the computational time and memory requirements required for processing an algorithm, standard asymptotic notation (0) will be used. “M” and “N” will represent vectors. “m” and “n” will represent the number of elements in the vectors, respectively.
Many data structures and methods have been used for sparse matrix tasks. The classic method is to simply use arrays to implement vectors, and two-dimensional arrays to implement matrices. There are several benefits to this approach. First and foremost, it is conceptually simple. The vector indices map conveniently onto the array indices, and the adjacency of the values stored in memory is pleasingly similar to how a human would represent them visually. Furthermore, it allows quick, i.e., constant, access time to each value. The usual primitive operations on vectors: addition, multiplication, etc., can all be implemented efficiently - in linear time with respect to the number of values.
However, the memory consumption of arrays is proportional to the product of the matrix dimensions. In other words, arrays store zero values and hence do not take advantage of the sparsity of the matrices. A word-document index may contain a large number of documents, as well as a large number of words. However, a majority of words in the language(s) do not occur in any particular document. Hence such an index is generally a large, but sparse, matrix. For this reason, there is considerable interest in other representations that only require memory allocation proportional to the actual number of nonzero values, while still achieving acceptable operation times.
One such representation make use of “compressed vectors”, which are generally stored as parallel arrays of key-value pairs. Pointers are eschewed, as they require additional memory to store the addresses. The key-value pairs can be sorted (by key) or unsorted. The usual tradeoffs apply. Sorted vectors yield a binary search algorithm resulting in O(log(n)) access time. Unsorted vectors requires a linear search algorithm, resulting in O(n) time. But maintaining sorted vectors result in extra overhead for insertion and deletion of entries; the worst-case being O(n) time. A search engineer then needs to process the vector of documents for each word in the query. In order to generate results that are more relevant from a search, it is typically desired that search engines be queried with multiple words, combined with an “AND” or “OR” operation. This in turn results in the merging of multiple word vectors, with a set-like operation of intersection or union. Keeping the vectors sorted thus yield much faster merging for multiple word queries, at the expense of more computation being done during the building of the index.
Compressed matrices consist of an array of compressed vectors keys, with a corresponding full array of compressed vector values. However, unless all the vectors of matrix have similar length, this will still result in a large amount of wasted memory. Such a representation is poor for document indexes because their vectors cannot be expected to be of similar size.
Compressed Sparse Row (or Column) is another common method for sparse matrix representation. The vectors are compressed in the usual manner and concatenated in an order according to their own key. A third array stores the start position of each vector. Access to a given vector is constant, access to a value is O(log(n)), and insertion/deletion is O(n{circumflex over ( )}2). Several variants with the same basic tradeoffs are available.
Storing the matrix relative to a Diagonal (or Skyline) method is also common. Generally these are used if values can be expected to be concentrated along the main diagonal of the matrix. Otherwise, memory reduction is not significant.
All of the above methods offer relatively slow value lookups: O(log(N)) or worse, and extremely poor modification penalties: at least O(n) and generally O(n{circumflex over ( )}2). Furthermore, irrespective of the data structure choice for matrices, unsorted compressed vectors and temporary full-size vectors are generally used in practice.
When a word-document index is queried, generally an entire vector is desired, not just one word-document value. Thus the relatively slow lookup times for individual values is not an issue. However, constructing such an index with O(n) insertion time results in an excruciatingly slow build time. Consequently, it is common to build a forward index first—document by word—and then invert the index—to word by document—for querying. By compiling all the values first, they can be sorted by word, thereby building the inverted index without the O(n) insertion hit.
But this common solution has several drawbacks. It requires a second pass through all the data, thus increasing the time to build the index. It also results in two distinct phases of indexing, a “build” phase and a “query” phase. Hence, the index cannot be effectively used while it is being built, and any updates to the documents cannot be quickly integrated into the index.
In addition to the above shortcomings, querying using compressed vectors can also yield sub-optimal performance times. A query is answered by acquiring the appropriate word vectors, and then merging them together. The merging operation may be as simple as adding the scores for each word-document value. Irrespective of what function is used to merge to values however, there is the overhead of the set operation used to combine the values at issue. Assume there are M query words each of which have any average word vector length of N. If the query is an OR of the words, these vectors must be unioned together. Hence, there are potentially O(M*N) result documents, which is a convenient lower bound for how long such a union operation can take. Unfortunately, if the vectors must be kept in a standard compressed format—even if they are sorted by document—the union operation can be shown to take O((M{circumflex over ( )}2)*N). It is typical to unpack each

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Process and system for sparse vector and matrix... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Process and system for sparse vector and matrix..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Process and system for sparse vector and matrix... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3350690

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.