How to approach making a GAN where row order does not matter I am working on a project that has the aim of generating "recipes" which are the summation of "ingredients" (1-dimentional length N tensors, where each index is a value that represents how much of a characteristic this ingredient has).
My current plan for each recipe is to have a 2d tensor made from the 1d ingredients:
[[ ingredient 1 ],
[ ingredient 2 ],
   ...

[ ingredient K ]]
An issue is that each recipe has a variable number of ingredients. My planned solution was to add empty ingredients to fill out the length of the recipes so they are all the same, but feedback on this would be appreciated.
The goal is to have the generator learn which combinations of characteristics go together and in what amounts. The thing is that the order of these ingredients does not matter. If I did not need the ingredients themselves I would be training this on the summation of all ingredients per recipe.
What is the best way to approach this? My first instinct is to randomize the order of the ingredients and train with every possible combination, but I do not know enough of how GANs function to tell if this would be a bad approach.
Any feedback/links to related work would be appreciated, thanks

Variable length with permutation invariance for generative networks is very hard and no method that I know of currently tackles both at the same time with good success rate.
If you only need variable length outputs RNNs are used for the time dimension and CNNs are used for the spatial dimension.
However for your case, is there anything preventing you from just outputting a single very large vector, with each index corresponding to one ingredient? That would take care of the permutation problem.
For example, if you have 32 ingredients with 3 attributes each, you could output 3 vectors of size 32. Missing ingredients can be set as 0 in all attributes.
