since you have kind of a tree structure... can you also generalise this to a graph structure? Graphs with attached data I think have similar problems... and another similarity is with sparse matrices or should you call it sparse data? Just as a random input