{'fraction_non_alphanumeric': 0.016939890710382512, 'fraction_numerical': 0.001092896174863388, 'mean_word_length': 5.610108303249097, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Grafting heterogeneous neural networks for a hierarchical object classification

Nowadays, convolutional neural networks (CNNs) are well-known deep learning architectures used for image classification. Improvements have been made in recent years, for example, to increase their accuracies and reduce computation times. Among them, hierarchical approaches based on a step-by-step strategy aim to optimize performance on difficult tasks by solving successive subtasks. The gain in precision provided by existing hierarchical solutions must be relativized with the explosion in the number of parameters they imply, which makes their implementation on embedded systems difficult. The improvement of predictions can also be limited by constraints that appear in the choice of the architectures of the branches when one seeks to have a global network providing predictions at different levels.We propose a strategy that allows the merging of heterogeneous CNNs by following a hierarchical approach in which the information extracted by first-level networks can be fed back at any location into second-level networks. Despite the differences in the number and size of the feature maps, such grafting can be done by using clustering, dimension reduction, and interpolation techniques. This strategy eliminates the computational redundancy induced by the recalculation of low-level features. The proposed grafting approach significantly reduces the inference time of the second network without impacting the accuracy, or may even make it slightly higher. Tests performed on MNIST, CIFAR-10, and PlantVillage datasets with several CNNs illustrate the possibility of implementation in various situations. Our solution allows us to consider in an innovative way the implementation of hierarchical solutions on devices with limited capacities.