Answers.Body: <p>Combining two different fully trained neural networks is not only feasible, it is commonly done. Let's look at the example given as two concepts involving integers, <span class="math-container">$C_a$</span> and <span class="math-container">$C_m$</span>.</p>
  <p><span class="math-container">$$ C_a: \mathcal{Y} = f_a (\mathcal{X}) = x_0 + x_1 $$</span></p>
  <p><span class="math-container">$$ C_m: \mathcal{Y} = f_m (\mathcal{X}) = x_0 \, x_1 $$</span></p>
  <p>Now let's define a palette of operations, including these two binary operations, that can be used to construct, a concept <span class="math-container">$C_e$</span>, an expression comprised of an arbitrary hierarchy of addition, multiplication, constants, and substitution.</p>
  <p><span class="math-container">$$ C_e: \mathcal{Y} = f_e (\mathcal{X}) \; \text{, where} $$</span></p>
  <p><span class="math-container">$$ f_e \in \{f_a, f_b\} \; \land \; i \in \{0, 1\} \; \land \; ( \, x_i \in \mathbb{I} \; \lor \; x_i \in \mathcal{Y} \, ) \; \text{.} $$</span></p>
  <p>Now, one artificial network can be trained to approximate <span class="math-container">$f_a$</span> within a concept class <span class="math-container">$\mathbb{C}$</span> of which <span class="math-container">$C_a$</span> and <span class="math-container">$C_m$</span> are members, using labeled examples of correct integer additions and another artificial network can be trained to approximate <span class="math-container">$f_b$</span> within that same concept class, using labeled examples of correct integer multiplications.</p>
  <p>An expression involving both can be trained to approximate arbitrary product of sums or sum of products under specific conditions. It's unclear though if this is what you are looking for.</p>
  <p>Normally, one wouldn't train a network to perform operations that are already known. Training is normally used to model operations that are not known.</p>
  <p>(Bilinear Convolutional Neural Networks (B-CNNs), introduced in <a href="https://arxiv.org/pdf/1504.07889.pdf" rel="nofollow noreferrer"><em>Bilinear CNNs for Fine-grained Visual Recognition</em></a>, 2017, Tsung-Yu Lin, Aruni RoyChowdhury, Subhransu Maji, is an approach to using two CNNs in conjunction to provide two fine and course visual recognition in the same way the human visual system can have a dual awareness of detail and panorama. B-CNNs probably don't apply to the scenario given in the question.)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-28T10:50:01.920Z
Answers.LastActivityDate: 2020-06-21T13:27:54.943Z
Answers.LastEditDate: 2020-06-21T13:27:54.943Z
Answers.UserDisplayName: Douglas Daseeco
Body: <p>I'm relatively new to artificial intelligence and neural networks.</p>
  <p>Let's say I have two different fully trained neural networks. The first one is trained for mathematical addition and the second one on mathematical multiplication. Now, I want to combine these two neural networks into one that knows about both operations.</p>
  <p>Is this possible? Is there a representative name for this kind of technique?</p>
  <p>I had read something about bilinear CNN models that sounds similar to what I'm looking for, right?</p>
  
Tags: <neural-networks><machine-learning><deep-learning>
Title: Is it possible to combine two neural networks trained on different tasks into one that knows both tasks?
UserDisplayName: vP3nguin
ThreadText: # Is it possible to combine two neural networks trained on different tasks into one that knows both tasks?
  
  (Asked by: username_0 on 2018-12-27)
  
  I'm relatively new to artificial intelligence and neural networks.
  
  Let's say I have two different fully trained neural networks. The first one is trained for mathematical addition and the second one on mathematical multiplication. Now, I want to combine these two neural networks into one that knows about both operations.
  
  Is this possible? Is there a representative name for this kind of technique?
  
  I had read something about bilinear CNN models that sounds similar to what I'm looking for, right?
  
  **Tags:** neural-networks, machine-learning, deep-learning
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-12-28. Score: 4 | Accepted answer
  
  Combining two different fully trained neural networks is not only feasible, it is commonly done. Let's look at the example given as two concepts involving integers, $C\_a$ and $C\_m$.
  
  $$ C\_a: \mathcal{Y} = f\_a (\mathcal{X}) = x\_0 + x\_1 $$
  
  $$ C\_m: \mathcal{Y} = f\_m (\mathcal{X}) = x\_0 \, x\_1 $$
  
  Now let's define a palette of operations, including these two binary operations, that can be used to construct, a concept $C\_e$, an expression comprised of an arbitrary hierarchy of addition, multiplication, constants, and substitution.
  
  $$ C\_e: \mathcal{Y} = f\_e (\mathcal{X}) \; \text{, where} $$
  
  $$ f\_e \in \{f\_a, f\_b\} \; \land \; i \in \{0, 1\} \; \land \; ( \, x\_i \in \mathbb{I} \; \lor \; x\_i \in \mathcal{Y} \, ) \; \text{.} $$
  
  Now, one artificial network can be trained to approximate $f\_a$ within a concept class $\mathbb{C}$ of which $C\_a$ and $C\_m$ are members, using labeled examples of correct integer additions and another artificial network can be trained to approximate $f\_b$ within that same concept class, using labeled examples of correct integer multiplications.
  
  An expression involving both can be trained to approximate arbitrary product of sums or sum of products under specific conditions. It's unclear though if this is what you are looking for.
  
  Normally, one wouldn't train a network to perform operations that are already known. Training is normally used to model operations that are not known.
  
  (Bilinear Convolutional Neural Networks (B-CNNs), introduced in [*Bilinear CNNs for Fine-grained Visual Recognition*](https://arxiv.org/pdf/1504.07889.pdf), 2017, Tsung-Yu Lin, Aruni RoyChowdhury, Subhransu Maji, is an approach to using two CNNs in conjunction to provide two fine and course visual recognition in the same way the human visual system can have a dual awareness of detail and panorama. B-CNNs probably don't apply to the scenario given in the question.)
  
  
  ---
  
  