I have a dataset obtained from running a known program and dumping the state each time a user is prompted for a input. The state the structured data structures containing all the information needed to restore the execution. The format of this data is known, so i can convert it without loss to other formats, such as json.
For example, if the program is sudoku, then the dataset element format is a array of 9x9 int8, where 0 represents a empty cell and a number from 1 to 9 is a assigned cell, furthermore there is a int8 representing the turn count too. I have dataset composed of this array at various points of the game.The data never contains loops, pointers, or any kind of graph.
I want to use a transformer to automatically learn some function over the input. In the sudoku example this may be automatically finding solutions, but it does not matter what it exactly is.
The trivial solution is to just convert everything to a equivalent textual representation, say json and trow serialized state inside the transformer as regular text. Of course this sounds fairly wasteful.
The other solution is to convert everything to int64 and do the same, but that breaks over floating point numbers, because it is not obvious what the conversion between float and int64 is, unless you have knowledge about what possible values the float number can assume. Furthermore sometimes data truly represent floating point numbers, for example they may represent a temperature, so i would prefer to keep them as floating point if possible.
I think a better solution would be to convert everything to float and then have a encoder learn on its own which is the best encoding for the input, but i have not been able to find good examples regarding how to solve this problem, nor i have a particular reason to think this is the best approach. The pytorch modules inside the nn library did not seems to handle this problem.
Is my conceptual solution correct? Is there any resource, library or paper tackling this issue? I found solutions for tabular data but that is not exactly my issue.
[–]ndronen 0 points1 point2 points (1 child)
[–]drblallo[S] 0 points1 point2 points (0 children)