CoSky: Cosine Skyline Ranking
- CoSky is a skyline ranking method that identifies Pareto-optimal tuples and scores them via sum normalization, automatic Gini-index weighting, and cosine similarity.
- It constructs an ideal point in a TOPSIS-inspired manner and offers direct SQL integration, ensuring both fast computation and discriminative ranking.
- The method is designed for top-k exploration and multilevel skyline processing, providing an efficient alternative to dominance-based approaches like dp-idp and RankSky.
Searching arXiv for the cited CoSky paper and related record. CoSky, for “Cosine Skyline,” is a skyline-ranking method in multi-criteria decision analysis for databases. It is defined on the set of skyline, or Pareto-optimal, tuples and ranks them by combining sum normalization, automatic attribute weighting via the Gini index, construction of an ideal point in the style of TOPSIS, and scoring by Salton’s cosine similarity. In the formulation presented in “Ranking Methods for Skyline Queries,” CoSky is positioned as a fast, discriminative, and directly SQL-expressible alternative to dominance-based ranking methods such as dp-idp and to the PageRank-derived RankSky, while also serving as a ranking component inside the multilevel framework DeepSky (Martin-Nevot et al., 29 Jul 2025).
1. Problem setting and rationale
The method is defined in the standard skyline-query setting. For a relation with a preference on each attribute, a tuple dominates , written , when is at least as good as in all attributes and strictly better in at least one. Formally, the comparison relation is
and the skyline is the set of tuples not dominated by any other tuple.
The need for ranking arises because skyline cardinality can become large on many realistic datasets, particularly with independent attributes and moderate dimensionality. In such cases, the statement that all skyline points are equally good is operationally unhelpful: users may face hundreds or thousands of skyline tuples differing only slightly. The paper therefore treats ranking as necessary for top- exploration and for multilevel skyline processing in DeepSky (Martin-Nevot et al., 29 Jul 2025).
This motivation is sharpened by the limitations of prior ranking schemes. The dominance-based dp-idp method uses dominance power and inverse dominance power in a tf-idf-like scoring formula, but computing its minima layers is expensive, its scores may coincide for different skyline points, and it is not progressive. RankSky adapts PageRank by building a similarity matrix and computing a dominant eigenvector through a Google matrix and the IPL method, but it depends on matrix operations and iterative eigenvector computation and is not easily embeddable in a relational DBMS. CoSky is introduced specifically to address those constraints.
2. Core design and ranking semantics
CoSky ranks only skyline points. Its pipeline has four components: attribute normalization, automatic weighting, ideal-point construction, and cosine scoring. The output is a real score 0 for each skyline point 1, followed by a descending ordering 2 (Martin-Nevot et al., 29 Jul 2025).
The method is explicitly TOPSIS-inspired but simplified. Classical TOPSIS typically combines distance to an ideal point and distance from an anti-ideal point. CoSky adopts the ideal-solution perspective but uses only similarity to the ideal point in its main score. The paper notes that an anti-ideal point can also be defined, but the core method uses 3 alone.
Its weighting mechanism is data-driven. Instead of requiring externally supplied attribute weights, CoSky estimates attribute importance from skyline dispersion by means of a Gini-index-based measure. Attributes with higher dispersion over the skyline are treated as more discriminative and therefore receive greater weight.
Its score is geometric rather than dominance-based. Each weighted skyline tuple is interpreted as a vector in 4, and ranking depends on its angular similarity to the ideal point. Because Salton’s cosine is scale-invariant, the method privileges proximity in direction to the ideal profile. The paper identifies this as both a strength and a limitation: it supports efficient, simple computation, but it also means that dominance structure and transitive dominance layers are not used in the score.
A distinct practical feature is DBMS compatibility. Every step of CoSky uses only aggregation, basic arithmetic, 5, 6, and 7; it requires no logarithms, recursion, matrix operations, or iterative eigen computations. This is the basis for the claim that CoSky is “directly embeddable in DBMS.”
3. Mathematical formulation
Let the skyline be 8, with preferences unified to a single direction. The paper denotes the normalized skyline by 9 and the normalized-and-weighted skyline by 0 (Martin-Nevot et al., 29 Jul 2025).
CoSky begins with sum normalization. For each attribute 1,
2
which yields 3 and 4 for each attribute, provided 5.
Attribute weights are then derived from the Gini index computed on the normalized skyline:
6
and normalized across dimensions as
7
Weighted normalized values are
8
The ideal point 9 is defined attribute-wise on the weighted skyline:
0
and, for completeness, the anti-ideal point is
1
The CoSky score is Salton’s cosine similarity between 2 and 3:
4
or, component-wise,
5
For non-negative vectors, 6. Larger values indicate smaller angle to the ideal point. The paper further states that 7 if and only if 8 is colinear with 9 and in the same direction.
4. Preference unification, algorithmics, and SQL realization
Because cosine similarity assumes a consistent sense of attribute direction, CoSky begins by unifying preferences. If some attributes are 0 and others 1, the paper recommends converting them all to one direction, for example all 2, either by complement using supremum or infimum or by inversion. Inversion is recommended when feasible because it preserves relative ratios better. In the Pokémon example, a 3 attribute 4 is transformed into 5, after which the preferences become 6 for all three attributes (Martin-Nevot et al., 29 Jul 2025).
Algorithmically, CoSky is a post-processing stage applied after skyline extraction. The workflow is: compute skyline 7; accumulate per-attribute sums over 8; normalize skyline tuples by those sums; compute per-attribute Gini indices and their global sum; build the weighted skyline 9; compute the ideal point; precompute the ideal norm; compute each tuple’s cosine score; and sort by decreasing score. The paper presents this as Algorithm 8 and assumes skyline computation by BBS or another skyline algorithm external to CoSky.
The complexity given in the paper is
0
Here the skyline phase, exemplified with BBS, contributes 1, while CoSky proper is linear in skyline size and dimensionality because it iterates over skyline tuples and attributes a constant number of times. Space usage is proportional to 2 for the normalized and weighted skylines and to 3 for the Gini and ideal arrays.
The SQL implementation mirrors the mathematical pipeline through a sequence of CTEs: S computes the skyline; SN applies sum normalization; SGini computes Gini values; SW computes weights from Gini values; SP forms the weighted skyline; Ideal computes the ideal-point coordinates; and SScore computes cosine scores, after which the final query orders by Score DESC. The paper emphasizes that this implementation uses only sums, products, divisions, 4, 5, and 6, which is the substantive basis of its DBMS embeddability.
5. Comparative position: dp-idp, RankSky, and DeepSky
CoSky is framed against two alternative skyline-ranking families. The first is dp-idp, where each skyline point is scored through the set of dominated tuples it covers, using the local term 7 and the global term
8
Its score is the sum of 9 over dominated tuples. The 2025 paper improves dp-idp with a dominance hierarchy, but still identifies heavy computation, weak discrimination, and lack of progressiveness as major drawbacks (Martin-Nevot et al., 29 Jul 2025).
The second is RankSky, which adapts PageRank to skyline ranking. Preferences are unified to 0, a skyline matrix 1 is formed, a square similarity matrix 2 is built, then normalized to a stochastic matrix 3, and transformed into a Google matrix
4
The dominant eigenvector is then computed by the IPL method and used as the score vector. Compared with dp-idp, RankSky avoids dominance layers; compared with CoSky, it remains substantially heavier because of matrix multiplication and iterative eigenvector computation.
CoSky differs from both. Relative to dp-idp, it dispenses entirely with dominance counts and minima layers. Relative to RankSky, it retains a vector-space view of skyline points but uses a direct ideal-point similarity instead of graph-based score propagation. The resulting semantics are purely geometric.
The method is also integrated into DeepSky, a multilevel skyline top-5 framework. DeepSky computes level-0 skyline 6, then level-1 skyline on 7, then additional levels as needed. At each level, a ranking algorithm—dp-idp, RankSky, or CoSky—orders that level, and the algorithm takes as many top points as needed to reach 8. The 2024 preprint “Classement d'objets Skylines dans les bases de données” introduced CoSky and DeepSky without RankSky; the later 2025 paper extends the comparative landscape by adding RankSky while preserving CoSky’s role as the SQL-friendly ranking component (Martin-Nevot et al., 2024).
6. Experimental behavior, worked example, and limitations
The experimental study in the 2025 paper evaluates implementations of dp-idp, RankSky, and CoSky on an AMD Ryzen 5 5600X machine with 32GB RAM under Linux, using Python 3.8 executed with PyPy 3.10, synthetic datasets with independent dimensions, and cardinalities ranging from 10 to 1 billion tuples, with 3, 6, and 9 dimensions. On a 50,000-tuple, 3-dimensional dataset, SkyIR-UBS is reported at more than six hours, the authors’ dp-idp improvement at roughly half that but still hours, RankSky at about 1 minute 46 seconds, CoSky’s algorithmic implementation at about 2 minutes 16 seconds, and CoSky’s SQL implementation at 0.172 seconds. On 200,000 tuples, CoSky SQL is about 1 second in 3 dimensions, about 58 seconds in 6 dimensions, and about 7 minutes 56 seconds in 9 dimensions; for 3 attributes and up to 1 billion tuples, the worst case is reported as a bit more than 3 hours (Martin-Nevot et al., 29 Jul 2025).
A small worked example on a Pokémon relation illustrates the ranking behavior. The skyline consists of three tuples, with preferences unified to 9 by replacing 0 with 1. After normalization, Gini weighting, ideal-point construction, and cosine scoring, the final CoSky order is Row 2 2 Row 4 3 Row 1.
| RowId | Original skyline tuple | CoSky score |
|---|---|---|
| 2 | 4 | 0.909 |
| 4 | 5 | 0.847 |
| 1 | 6 | 0.774 |
This example is used to show discrimination. The improved dp-idp method assigns score 7 to Rows 2 and 4, leaving them indistinguishable, whereas CoSky assigns distinct non-zero scores. RankSky yields a different order again, namely Row 1 8 Row 4 9 Row 2.
The paper also states several limitations. CoSky depends on a linear vector model and does not capture semantic similarity beyond numeric proximity. It ignores dominance structure entirely, unlike dp-idp. Because cosine uses direction rather than magnitude, a skyline point proportional to the ideal vector can receive score 0 even when absolute scale differs. The method may also be uninformative or unstable when the skyline contains very few points. Suggested extensions include refining the model of the ideal point, combining CoSky with regret minimization or other skyline ranking approaches, improving scalability in high dimension through indexing, statistics, or parallelization, and integrating CoSky into an open-source skyline ranking platform.