Recent work has begun to investigate how structured relations can be learned from non-relational and distributed input representations. A difficult challenge is to capture the human ability to evaluate relations between items drawn from distinct categories (e.g., deciding whether a truck is larger than a horse), given that different features may be relevant to assessing the relation for different categories. We describe an extension of Bayesian Analogy with Relational Transformations (BART; Lu, Chen & Holyoak, 2012) that can learn cross-category comparative relations from autonomously-generated and distributed input representations. BART first learns separate representations of a relation for different categories and creates second-order features based on these category-specific representations. BART then learns weights on these second-order features, resulting in a category-general representation of the relation. This hierarchical learning model successfully generalizes the relation to novel pairs of items (including items from different categories), outperforming a flat version of the learning model.