Answers.Body: <p>Yes this is entirely possible. As was previously mentioned, complex connectionist systems are often thought of as black boxes(despite us being able to "look in" the box given enough computation and analysis) because of the difficulty in understanding learning and the networks ultimate decision making.</p>
  
  <p>Here, we can model the problem as such: given an input of filter settings(and presumably some information about the audio), predict the target descriptors as an output. All you really need to do is generate a dataset from the program and then train it in a multi-label classification context to predict the output descriptors.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-12T14:35:14.333Z
Answers.Text: I can certainly write some code to gather a dataset. Bsicaly "Brute Force" in a previous comment. In fact, is any AI necessary? I could simply create a lookup table using the first discovered input that results in a given predefined output. In this case my use would be limited to the predefined filters. But can AI somehow do this better?  More efficiently? Predict undefined outcomes? And how do I begin? I assume there is some kind "seed" that is started and then as it "learns" it changes into the machine that I want? I suppose the AI itself becomes the "algorithm" that I'm looking for...
Answers.UserDisplayName: chmedly
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-12T15:03:26.023Z
Answers.Text: @chmedly depending on the number of input/output pairs, it very well could be easier to construct a lookup table. However if the space is not too large this would more than likely be the quickest and most effective. To start create a dataset, if you are able to capture all pairs without too large a memory/computational cost than just create a table. Otherwise construct a set of a large portion of pairs and then convert the categorical data into scalar values an algorithm can use.
Answers.UserDisplayName: hisairnessag3
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-31T17:14:11.330Z
Answers.Text: @chmedly A lookup table is entirely sufficient to deal with small, deterministic input/output spaces where you can enumerate every possible mapping that your system should handle. The problem is, a table cannot generalize at all, so it can't generate useful output for any inputs that aren't in the table. Memorizing input-output pairs is trivial, much of AI is about building systems that generalize well to similar (but not identical) inputs that have never seen before.
Answers.UserDisplayName: Nuclear Hoagie
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-12T11:53:37.070Z
Answers.LastActivityDate: 2019-08-12T11:53:37.070Z
Answers.UserDisplayName: hisairnessag3
Answers.Body: <p>You definitely could -technically- use AI (advanced informatics) techniques like in the <a href="https://binsec.github.io/" rel="nofollow noreferrer">BinSec</a> binary analyzer (static analyzer of binary code).</p>
  <p>You might be forbidden legally to do so. Check with your lawyer.</p>
  <p>Contact me by email for more information (on the technical level).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-29T18:30:37.287Z
Answers.LastActivityDate: 2021-12-30T07:00:24.867Z
Answers.LastEditDate: 2021-12-30T07:00:24.867Z
Answers.UserDisplayName: Basile Starynkevitch
Body: <p>A while back I posted on the Reverse Engineering site about an audio DSP system whose designer had passed away and whose manufacturer no longer had source code (but <a href="https://reverseengineering.stackexchange.com/questions/17238/decode-filter-coefficients-for-audio-dsp">the question was deleted</a>). Basically, the audio filter settings are passed from a Windows program to the DSP device presumably as coefficients and then generic descriptions of those filters (boost/cut, frequency and bandwidth) are passed back from the box to the software - but only if it somehow recognizes the filter setting. </p>
  
  <p>I want to be able to generate the filter settings separately from the manufacturer software, so I need to know how they are calculated. I've not been able to deduce how this is structured from observing the USB communication that I've gathered. So, I wonder if AI could do this.</p>
  
  <p>How would I go about creating an AI to send commands to the box (I know how to communicate with the box and have a framework for how these types of commands are phrased) and then look at the responses to either further decode the system and/or create an algorithm for creating filters?</p>
  
  <p>The communication with the DSP mixer box is basically via "Serial" commands and although it uses a USB port, there is a significant bottleneck inside the command control system in the mixer box. Any attempts to reverse engineer may encounter problems based on the sheer amount of time that it would take to compile enough data. Or not.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-12T10:17:05.730Z
Comments.Text: By "reverse engineer" do you mean you want to know exactly how it works? Or just make another thing which you're still not quite sure what it does but you can get the same output? Most 'AI' is still a black box, even to those who made it.
Comments.UserDisplayName: Lio Elbammalf
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-12T14:09:38.753Z
Comments.Text: @ Lio, I seek 2 potential outcomes - One is that I can decipher the human based design and the 'recipe' will make complete sense. The other is that an algorithm (that I likely don't understand) can be made that will predict the behavior, essentially giving me a recipe that I don't necessarily understand.
Comments.UserDisplayName: chmedly
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-12T14:18:33.483Z
Comments.Text: @ Dutta, I apologize, I have not determined the exact behavior of the device.  But I do know that if it is sent a filter setting from the existing software, it can be queried about the filter and a pre-defined description is returned. But other filter shapes are possible that are not predefined as measured by sending an audio signal through the device.  Brute force: create a large "dictionary" of inputs that result in the pre-defined outputs. Programming would be a lookup.. But I would like to find a mathematical way to "calculate" the result and then arbitrary responses would be possible.
Comments.UserDisplayName: chmedly
Tags: <ai-design><audio-processing><signal-processing>
Title: Can AI be used to reverse engineer a black box?
UserDisplayName: chmedly
ThreadText: # Can AI be used to reverse engineer a black box?
  
  (Asked by: username_0 on 2019-08-12)
  
  A while back I posted on the Reverse Engineering site about an audio DSP system whose designer had passed away and whose manufacturer no longer had source code (but [the question was deleted](https://reverseengineering.stackexchange.com/questions/17238/decode-filter-coefficients-for-audio-dsp)). Basically, the audio filter settings are passed from a Windows program to the DSP device presumably as coefficients and then generic descriptions of those filters (boost/cut, frequency and bandwidth) are passed back from the box to the software - but only if it somehow recognizes the filter setting.
  
  I want to be able to generate the filter settings separately from the manufacturer software, so I need to know how they are calculated. I've not been able to deduce how this is structured from observing the USB communication that I've gathered. So, I wonder if AI could do this.
  
  How would I go about creating an AI to send commands to the box (I know how to communicate with the box and have a framework for how these types of commands are phrased) and then look at the responses to either further decode the system and/or create an algorithm for creating filters?
  
  The communication with the DSP mixer box is basically via "Serial" commands and although it uses a USB port, there is a significant bottleneck inside the command control system in the mixer box. Any attempts to reverse engineer may encounter problems based on the sheer amount of time that it would take to compile enough data. Or not.
  
  **Tags:** ai-design, audio-processing, signal-processing
  > **Comments:**
  > **username_1**: By "reverse engineer" do you mean you want to know exactly how it works? Or just make another thing which you're still not quite sure what it does but you can get the same output? Most 'AI' is still a black box, even to those who made it.  
  > **username_0**: @ Lio, I seek 2 potential outcomes - One is that I can decipher the human based design and the 'recipe' will make complete sense. The other is that an algorithm (that I likely don't understand) can be made that will predict the behavior, essentially giving me a recipe that I don't necessarily understand.  
  > **username_0**: @ Dutta, I apologize, I have not determined the exact behavior of the device.  But I do know that if it is sent a filter setting from the existing software, it can be queried about the filter and a pre-defined description is returned. But other filter shapes are possible that are not predefined as measured by sending an audio signal through the device.  Brute force: create a large "dictionary" of inputs that result in the pre-defined outputs. Programming would be a lookup.. But I would like to find a mathematical way to "calculate" the result and then arbitrary responses would be possible.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2019-08-12. Score: 1
  
  Yes this is entirely possible. As was previously mentioned, complex connectionist systems are often thought of as black boxes(despite us being able to "look in" the box given enough computation and analysis) because of the difficulty in understanding learning and the networks ultimate decision making.
  
  Here, we can model the problem as such: given an input of filter settings(and presumably some information about the audio), predict the target descriptors as an output. All you really need to do is generate a dataset from the program and then train it in a multi-label classification context to predict the output descriptors.
  
  > **Comments:**
  > **username_0**: I can certainly write some code to gather a dataset. Bsicaly "Brute Force" in a previous comment. In fact, is any AI necessary? I could simply create a lookup table using the first discovered input that results in a given predefined output. In this case my use would be limited to the predefined filters. But can AI somehow do this better?  More efficiently? Predict undefined outcomes? And how do I begin? I assume there is some kind "seed" that is started and then as it "learns" it changes into the machine that I want? I suppose the AI itself becomes the "algorithm" that I'm looking for...  
  > **username_2**: @chmedly depending on the number of input/output pairs, it very well could be easier to construct a lookup table. However if the space is not too large this would more than likely be the quickest and most effective. To start create a dataset, if you are able to capture all pairs without too large a memory/computational cost than just create a table. Otherwise construct a set of a large portion of pairs and then convert the categorical data into scalar values an algorithm can use.  
  > **username_3**: @chmedly A lookup table is entirely sufficient to deal with small, deterministic input/output spaces where you can enumerate every possible mapping that your system should handle. The problem is, a table cannot generalize at all, so it can't generate useful output for any inputs that aren't in the table. Memorizing input-output pairs is trivial, much of AI is about building systems that generalize well to similar (but not identical) inputs that have never seen before.  
  
  ---
  
  ### Answer by username_4 on 2021-12-29. Score: 0
  
  You definitely could -technically- use AI (advanced informatics) techniques like in the [BinSec](https://binsec.github.io/) binary analyzer (static analyzer of binary code).
  
  You might be forbidden legally to do so. Check with your lawyer.
  
  Contact me by email for more information (on the technical level).
  
  
  ---
  
  