text:
How can I solve the linkage problem in genetic algorithms?
In a genetic algorithm, the order of the genes on a chromosome can have a significant effect on the performance (capacity to generate adaptation) of the genetic algorithm, where two or more genes interact to produce highly fit individuals. If we have a chromosome length of $100$ and genes $A$ and $B$ interact, then having them next to each other is strongly preferable than having them at opposing ends of the chromosome. In the former case, the probability of crossover breaking the genes apart is $1$ in $100$, and in the latter it is one.
What mechanisms have been tried to optimise the order of genes on a chromosome, so that interacting genes are best protected from crossover? Is it even possible?
I've asked at Biology SE if there exists any known biological mechanism which is responsible for such a possible order of the genes on a chromosome.

What do you mean by "interact"? Can you be more specific in your usage of the GA terminology? Are talking about the crossover between two chromosomes? Or which GA operator are you referring to when you say "interact"?

Two genes interact when their effect on individual fitness is non linear or epistatic. As for crossover by definition it is between two chromosomes.

Can you give an example of such cases, where the vicinity of the genes in the chromosome determines the fitness of the individuals? Furthermore, note that the fitness of the individuals depends on the definition of the fitness function anyway.

I don't know who changed the question but the change is inaccurate. Genes are not similar they interact epistatically or in simple words they act in combination and not singly. The linkage problem which was in the initial question is a known problem. An efficient GA solution needs an efficient chromosome ordering, but this is often not known at design time. If we could evolve the ordering  while evolving a solution the performance as measured by the number of generations to reach an optima can be much reduced, but only if linkage evolution is significantly faster than solution evolution.

I changed the title. The title was "linkage problem in GA". This is not a question. Edit your post and ask a question in the title like "How do I solve the linkage problem in GAs?" (if this is your question). I am sorry I changed the meaning of your post: I just tried to improve it, but this can happen.

Can you please link us to a paper or book that discusses the "linkage problem" you're referring to?

I didn't say the fitness is affected by the linkage. I just said that the fitness of an individual depends on the definition of the fitness function.

@nbro the fitness of any individual is unaffected by the ordering, but the likelihood that useful sequences or building blocks using John Hollands terms are disrupted by crossover is severely affected. See the very simple 100 gene chromosome example, or if the genes A B and C occur in the optima in that order the more efficient order places them together in a uninterrupted single sequence which is the least likely form to be broken by crossover

So, your problem is related to the crossover operator. This is what I had initially asked about.

@nbro https://www.springer.com/gp/book/9783642128332 and others just search for linkage problem

@nbro here's a more technical paper https://www.ncbi.nlm.nih.gov/pubmed/12689725

@nbro no crossover is unchanged, think of the linkage map as a reordering of the chromosome before the fitness function is applied; crossover and mutation operate on the form before reordering.


text:
How can I perform multivariable regression with neural networks?
I want to use a neural network to perform a multivariable regression, where my dataset contains multiple features, but I can't for the life of me figure it out. Every kind of tutorial on the internet seems to be either for a single feature without information on how to upgrade it to multiple, or results in a yes or a no when I need numeric predictions (that is, it uses neural networks for classification).
Can someone please recommend some kind of resource I can use to learn this?

Have a look at sklearn's sklearn.neural_network.MLPRegressor class, which uses a multi-layer neural network to do regression. You first need to define the object MLPRegressor, for example, by specifying the value of the parameter hidden_layer_sizes, which determines the number of layers and the number of neurons per layer, then you should call the method fit on this created object and pass to it your data matrix $X \in \mathbb{R}^{n \times m}$, where $n$ is the number of samples and $m$ is the number of features.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
How can I learn tensors for deep learning?
I've seen in most deep learning papers use tensors. I understood what tensors are, but I want to dive into them, because I think that might be beneficial for further studies in Artificial Intelligence. Do you have any suggestion (e.g. books or papers) about that?

I'd suggest you to look at the Linear Algebra section of Deep Learning by Goodfellow et. al.

In deep learning (and, in general, machine learning), tensors are multi-dimensional arrays. You can perform some operations on these multi-dimensional arrays (depending also on the specific implementations and libraries). These operations are similar to the operations you can apply to vectors or matrices, which are just specific examples of multi-dimensional arrays. Examples of these operations are

indexing and slicing (if you are familiar with Python, these terms should not scare you)
algebraic operations (such as multiplication of a tensor with another tensor, which includes numbers, vectors or matrices), which typically support broadcasting
reshaping (i.e. change the shape of the tensor)
conversion to or from another format (e.g. a string)

TensorFlow provides an article that discusses these tensors, so I suggest that you read it.
In mathematics, tensors are not just multi-dimensional arrays. They are multi-dimensional arrays that need to satisfy certain properties (in the same way that matrices need to satisfy certain properties to be called matrices) and are equipped with certain operations.
The paper A Survey on Tensor Techniques and Applications in Machine Learning (2019) Yuwang Ji et al., published by IEEE, provides a comprehensive overview of tensors in mathematics. It is full of diagrams that illustrate the concepts and the explanations are concise. Some of the explanations in this paper may not be very useful to develop deep learning applications, but some of the illustrations and explanations (especially, in the first pages, which are the only ones that I read) will give you some intuition behind the tensors or multi-dimensional arrays used in deep learning).
So, tensors in deep learning (DL) may not be exactly equivalent to the tensor objects in mathematics, because they may not satisfy all the required properties or some of the operations in the specific libraries may not be implemented, but it is fine to call them tensors because a tensor in mathematics is also a multi-dimensional array, to which you can apply operations (some of them are implemented in the DL libraries).

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
What is ratio of the objective function in the case of continuous action spaces?
I'm trying to implement the proximal policy optimization (PPO) algorithm. I'm confused on how to make it work with continuous action space.
For discrete action space, the output of the network is the probability for every available action, then I choose the next action based on this probability. The ratio, in the objective function, is the ratio between the action probability of the new policy and the action probability between the old policy.
For continuous action space, from what I understand, the output of the network should be the action itself. How should this ratio (or the objective function itself) look like in that case?


text:
Is there a rule-of-thumb to determine which behaviours must be learned in a lifetime and which innate?
I was training an AI to learn things during its lifetime such as find food and navigate a maze. Behaviors that might change during its lifetime.
But I hit upon a snag. Some behaviors, like avoiding poisonous snakes, cannot be learned in a lifetime since once bitten by a snake the being is dead.
That got me thinking about how to separate out behaviors that must be given to the AI at birth (either by programming or using some evolutionary algorithm) and which behaviors to let the AI learn in its lifetime.
Also, there is the matter of when a learned behavior should be able to overrule an innate behavior (if at all).
Is there much research into this? I'm looking for some method to determine a set of innate behaviors which can't be learned.

You think that certain behaviors, like avoiding poisonous snakes, are innate, but they are not. Humans (and other animals) usually learn to avoid poisonous snakes in a supervised fashion, rather than trial-and-error: in other words, someone tells you that certain things should not be done. So, my suggestion would be to try to implement a multi-agent system, where an agent also learns from other agents: for example, if an agent sees that after another agent ate some poisoning food it died, then it should try to avoid it too, given that it doesn't want to die.

However, even though I think your question arises because you thought that, if a behavior cannot be learned by trial and error, then it must be innate, my previous comment does not answer your question. So, please, maybe update your question. Do you still want to know about "innate behaviors"?


text:
Does GraphSage use hard attention?
I was reading the recent paper Graph Representation Learning via Hard and Channel-Wise Attention Networks, where the authors claim that there is no hard attention operator for graph data.
From my understanding, the difference between hard and soft attention is that for soft attention you're computing the attention scores between the nodes and all their neighbors while for hard attention you have a sampling function that selects only the most important neighbors. If that is the case, then GraphSage is an example of hard attention, because they apply the attention only on a subset of each node's neighbors.
Is my understanding of hard and soft attention wrong, or the claim that the authors made does not hold?

If you now know the answer to this question, I suggest that you review the answer below and accept it if it answers the question. If not, feel free to leave an answer to your own question and accept it. Then please flag this comment as "no longer needed".

GraphSage does not have attention at all. Yes, it randomly samples (not  most important as you claim) a subset of neighbors, but it does not compute attention score for each neighbor.


text:
Can a data compression function be used to make predictions?
I've heard that prediction is equivalent to data compression.
Is there a way to take a compression function and use it to create an AI that predicts?

The way some (not all) compression algorithms work is that they encode frequent events in a short code, and rarer events with a longer code. Overall you save more space by encoding the common elements than you need to expend coding the rare ones. One example of this is a Huffman code, which uses a variable length encoding based on the frequency of the items.
You can use a compression algorithm for prediction if if encodes more than one event at a time. For example, word pairs rather than individual words. Each word pair will have a code, and the common word pairs (eg of the) will have shorter codes that the ones which are less common (eg of three). For prediction, select all the word pairs that start with your known sequence (eg of). Now select from that list the pair with the shortest code (which is more common), so in this example of would more likely be followed by the rather than three. After than, repeat the process with the next word, so look for pairs that begin with the.
All you need is the compression 'code book' which is produced during the compression process -- it's essentially a model of the data you compressed. This also works for longer sequences than pairs, of course.
If you want to know more about the topic, I can recommend Managing Gigabytes by Witten, Moffat, and Bell. Great book on compression techniques.

Although this does not strictly answer your question (but it is at least very related), Jürgen Schmidhuber has some interesting ideas about compression and how it relates to artificial intelligence, prediction, curiosity, etc. For example, have a look at this paper Simple Algorithmic Theory of Subjective Beauty, Novelty, Surprise, Interestingness, Attention, Curiosity, Creativity, Art, Science, Music, Jokes, whose abstract states

In this summary of previous work, I argue that data becomes temporarily interesting by itself to some self-improving, but computationally limited, subjective observer once he learns to predict or compress the data in a better way, thus making it subjectively more "beautiful". Curiosity is the desire to create or discover more non-random, non-arbitrary, "truly novel", regular data that allows for compression progress because its regularity was not yet known. This drive maximizes "interestingness", the first derivative of subjective beauty
  or compressibility, that is, the steepness of the learning curve. It motivates exploring infants, pure mathematicians, composers, artists, dancers, comedians, yourself, and recent artificial systems.

See also his interesting talk Juergen Schmidhuber: The Algorithmic Principle Beyond Curiosity and Creativity on YouTube.


text:
Will the RL agent implemented as a neural network fine-tune itself?
Normally, when you develop a neural network, train it for object recognition (on normal objects like bike, car, plane, dog, cloud, etc.), and it turns out to perform very well, you would like to fine-tune it for e.g. recognizing dog breeds, and this is called fine-tuning.
On the other hand, in reinforcement learning, let's consider a game with rewards on checkpoints $1, 2, 3, \dots n$. When you have a bot that plays and learns using some (e.g. value) neural net, it develops some style of solving the problem to reach some checkpoint $k$, and, after that, when it will reach the $k+1$ checkpoint, it probably will have to revalue the whole strategy.
In this situation, will the bot fine-tune itself? Does it makes sense to keep a replay buffer as is and to "reset" the neural net to train it from scratch, or it's better to stay with fine-tune approach?
If possible, topic-related papers would be very welcome!


text:
Is a multi-layer Kohonen network possible?
The Kohonen network is one fully connected layer, which clusters the input into classes by a given metric. However, the one layer does not allow to operate with complex relations, that's why deep learning is usually used.
Is it possible then to make multi-layered Kohonen network?
AFAIK, the output of the first layer is already cluster flags, so the activation function on the non-last layers must be different from the original Kohonnen definition?

Kohonen networks by definition are single layer FCNN's, but what differentiates them from others is their unsupervised training procedure.
This procedure is a function of the input, the weights and some hyperparameters. This means if you have a multilayer network you could train only the final layers weights using this procedure. Think of it this way, let $f$ be the final layer, and $g$ be the composition of all other layers, such that the whole network $N(x) = f \circ g(x)$. Using kohonens training procedure, you could learn $f$'s weights where the input is $g(x)$ rather than x. But then how would you learn $g$'s weights?
So you could do this by iterative learning. let $N$ be a 2 layer network: $N = f_2 \circ f_1$. first learn $f_1$ using the single layer procedure, and now you could learn $f_2$ in the same manner, except the input features its trying to cluster would be $f_1(x)$ rather than $x$.
There does exist cons to this procedure though: Using a kohonen network at each layer will try to cluster it to the best of its abilities, not so that its final composition will be best (a common problem in many optimization procedures that arent end-to-end), but that its current representation is. This may lead to non-optimal results, not achieving that deep representation that you're looking for that you could achieve in autoencoders or other deeper unsupervised models.

I also guessed you can not use kohonnen with the normal layers, because the mertic of those output is not like the from original data, means it is not differomorf.  I v made small test and watched that for example in autoencoders middle layer.  I v asked, is it generally known multiple knns -> means not.

@DuttaA thats kinda my point: since you can learn f1 then f2, f2 will add almost no benefit because its optimized for the singular goal at each layer rather than for a deeper end-to-end representation you get in autoencoder type models


text:
Why do we normalize data in a deep neural network?
I have asked this question a number of times, but I always get confusing answers to this, like "normalized data works better", "data lives in the same scale"
How can x-m/s make the scale of images the same? Please explain to me the maths. Also, take MNIST dataset for example & illustration.

I answered a similar question earlier and here is a piece of my answer that i think covers your question:
Batch normalization's assistance to neural networks wasn't really understood for the longest time, initially it was thought to assist with internal covariate shift (hypothesized by the initial paper: Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift) but lately has been tied to the optimization process (How Does Batch Normalization Help Optimization?).
This means, from an architectural perspective, it is difficult to correctly assume how it should be utilized or how it will effect your network, unless you really understand its impact on the loss landscape and how your optimization process will traverse it given your initialization (Note, by the way, a recent paper by Google showed that you can alleviate a lot of the benefits of batch normalization sheerly by understanding what issues it's resolving and attempting to mitigate them in the initialization process: Fixup Initialization).


text:
How can I incrementally train a Yolo model without catastrophic forgetting?
I have successfully trained a Yolo model to recognize k classes. Now I want to train by adding k+1 class to the pre-trained weights (k classes) without forgetting previous k classes. Ideally, I want to keep adding classes and train over the previous weights, i.e., train only the new classes. If I have to train all classes (k+1) every time a new class is added, it would be too time-consuming, as training k classes would take $k*20000$ iterations, versus the $20000$ iterations per new class if I can add the classes incrementally.
The dataset is balanced (5000 images per classes for training).
I appreciated if you can throw some methods or techniques to do this continual training for Yolo.

A general rule of thumb to avoid forgetting is to use a low learning rate

@PradipPramanick , but lower learning rate can affect the future new class prediction accuracy right.

There's something called Elastic Weight Consolidation to prevent neural networks from forgetting previous tasks as they train on new tasks. It might be helpful for your case too.
The main idea is to quantify the importance of parameters for task $t$ and penalize the model in proportion when it changes its parameters as it trains to learn task $t+1$. As you can see, this incentivizes model to change parameters that are less important for task $t$ which prevents the model from forgetting it.


text:
Why is the $\epsilon$ hyper-parameter (in the $\epsilon$-greedy policy) annealed smoothly?
As far as I understand, RL is a process that can be divided into 2 stages:

Exploring a wide range of paths (acting randomly)

Refining the current optimal paths (revolving around actions with a so-far most promising score estimate)

Completing 1. too quickly results in a network that just doesn't spot the best combination of actions, especially if rewards are sparse. "Refining" then has little benefit, since the network will tend to choose between unlucky estimates it observed so far, and will specialise in those.
On the other hand, finishing 2. too quickly results in a network that might have encountered the best combination, but never got time to refine these "good trajectories". Thus its estimates of scores along these "good trajectories" are rather poor and inaccurate, so again the network will fear to select and specialize those, because they might have a low (inaccurate) estimate.
Why not to give both 1. and 2. the maximum time possible?
In other words, instead of gradually annealing the $\epsilon$ coefficient (in the $\epsilon$-greedy) down to a low value, why not to always have it as a step function?
For example, train 50% of iterations with a value of 1 (acting completely randomly), and for the second half of training with the value of 0.05, etc (very greedy).  Well, 50% is a random guess, could be adjusted manually, as needed. The most important part is this "step function".
To me, always using such a "step" function would instantly reveal if the initial random search was not long enough.  Perhaps there is a disadvantage of such a step curve?
So far, I got the impression that annealing is a gradual process.
To me, it seems that when using gradual annealing it might not be evident if the neural network (e.q. in DQN or DQRNN) learns poorly because of the mentioned issue or something else.
Is there some literature exploring this?
There is a paper Noisy Networks for Exploration, but it proposes another approach that removes the $\epsilon$ hyperparameter. My question is different, specifically, about this $\epsilon$.

This seems like something that would be easy to explore in an experiment. Pick a few simple environments, and compare a step function change to $\epsilon$ with gradual change. You will need to tune both approaches (each has a few hyper-parameters) to compare best with best, but experiment on something simple might only take a few days


text:
Is this a classification problem?
I’m not really sure which machine learning approach is best for my problem at hand. I work in an engineering company that designs and builds different kinds of ships. In my particular job, I collect the individual weight of items on these vessels. The weight and there location is important because it is used to ensure the vessel in question can float in a balanced manner.
I have a large corpus of historical data on hand that lists the items on the vessel, there attributes, the weight for these items and where the weight came from (documentation), or the source.
So, for example, let’s say I have the following information:
 ITEM  |         ATTRIBUTES            | WEIGHT  |WEIGHT SOURCE
Valve  |Size: 1 inch |Type: Ball Valve |2 lbs.   |Database 1
Elbow  |Size: 2 inch |Type: Reducing   |1 lb.    |Database 2

I have to comb through many systems on these vessels and find the proper documentation or engineering drawings that lists the weight for the item in question. It usually starts by investigating the item and its attributes and then looking in a number of databases for the weight documentation. This takes a long time, as there is no organization or criteria as to what database has what. You just have to start randomly searching them and hope you find what you need.
Well I now have a large corpus of real world data that lists thousands of items, there attributes, there weight and most importantly the source of the documentation (Database 1, 2, 3 etc.). I’m wondering if there is any correlation between an item, its attributes and its weight location (database). This is where machine learning comes in. What I’d like to do is use machine learning to help find the weight location more quickly. Ideally it would be nice if it could analyze a batch of information and then provide recommendations on which databases to search.
My first thoughts are that this is a classification problem, and maybe a CNN would be helpful here. If that is the case, I have over 100 categories in my dataset.
I actually went ahead and programmed a simple feed forward neural network using the following resources: https://www.analyticsvidhya.com/blog/2017/05/neural-network-from-scratch-in-python-and-r/ I attempted to use this network to solve the above problem, but so far I have had no success. I’m in over my head here.
I don’t expect it to be correct 100% of the time. Even if it had an 80% success rate that would be awesome. So my question is this;
What kind of neural network do I need to accomplish this?

Hi and welcome to this community! To clarify, you say you want to predict the "the weight location more quickly". What do you mean by "weight location"? Do you mean the database where you can find information about the item?

In this case the "Weight Location" refers to a database. Which I have records of in a large corpus of data. Hoping to use historical data to help predict "Weight Location" or which database to look in for a particular item.

Why do you need machine learning for this? Write a program that searches through databases and parses the entries.

There is in-fact a lot of reasons I can’t do that. Many of which are beyond the scope of this conversation. The long and short of it is, I work for the government and they don’t like proficiency. This ML project would be a side project of mine, not one bestowed upon my by higher ups. Yes, I am being a code ninja. The end goal is to increase my own proficiency. It seems others are not interested in the idea.


text:
Can non-Markov environments also be deterministic?
The definition of deterministic environment I am familiar with goes as follows:

The next state of the agent depends only on the current state and the action chosen by the agent.

By exclusion, everything else would be a stochastic environment.
However, what about environments where the next state depends deterministically on the history of previous states and actions chosen? Are such environments also considered deterministic? Are they very uncommon, and hence just ignored, or should I include them into my working definition of deterministic environment?

Markov Environment is not about deterministic or stochastic. "Depends only on the current state and your action" does not mean you know what will happen(deterministic).
We can have Markov + deterministic, Markov + Stochastic, Non-Markov + deterministic, and Non-Markov + stochastic.
The definition you have is not a definition of deterministic. It is a definition of Markov property.
Refer to Wikipedia.

A stochastic process has the Markov property if the conditional
  probability distribution of future states of the process (conditional
  on both past and present values) depends only upon the present state;
  that is, given the present, the future does not depend on the past. A
  process with this property is said to be Markovian or a Markov
  process. The most famous Markov process is a Markov chain. Brownian
  motion is another well-known Markov process.

Markov property is assumed mostly in stochastic problems.
Brownian motion is the motion of molecules of ink in the water and used to model the movement of a stock price, which is stochastic.
Deterministic means when you are in the same state and choose the same action your next state will be always the same.
Stochastic means even you are in the same state and choose the same action, you next state can be different than the previous time.
Example) You toss a coin and roll a die. Every time you roll a die you get pennies as many. If the coin gets head, you get a chance to roll a die twice next time.
Your state can be (money you collect so far, coin head/tail in the previous time).
In this problem, your next state will not be affected by the past. the only thing you need to know is the current state, the money you got and head or tail. It has a Markov process/environment. However, still, it is stochastic because you don't know what will be the next state.

Depends on the information provided in the state of the system. In theory, the history can be an element of the state, in which case, by the definition you provided:

The next state of the agent depends only on the current state and the action chosen by the agent.

It is a deterministic agent.
On the otherhand assume the state has no information about the history, in which case at every point you only know its current status and nothing about where it was previously. In this case, it is a stochastic environment because you can define a distribution with greater than 0 entropy/uncertainty over possible next states.

Technically in the last paragraph, what you have constructed may still be deterministic (or not), but the state description will definitely be non-Markov.

Also, critically this answer misses on the interpretation of "depends on". Often that allows for stochastic dependencies, and that is usually intended in descriptions of MDPs, and "depends on" can also be "correlates with". However, a strict reading in normal English might interpret it as meaning deterministic as you have put. I often add "and a random factor" to the list of things the next state and reward can depend on, as clarification when describing Markov property


text:
What is the best loss function for convolution neural network and autoencoder?
What is the best choice for loss function in Convolution Neural Network and in Autoencoder in particular - and why?
I understand that the MSE is probably not the best choice, because little difference in lighting can cause a big difference in end loss.
What about Binary cross-entropy? As I understand, this should be used when target vector is composed as 1 at one place and 0 at all others, so you compare only class that should be correct (and ignore others),... But this is an image (although the values are converted in 0-1 values,...)

Hi. Can you just focus on one model? Please, edit your question and ask just about one model, otherwise, this question might become too broad.

There is no right answer to this. Finding the right loss function is a tough and difficult problem. So your goal as the architect is to try to find one that best suits your needs. So lets think about your needs.
You mention that you dont want lighting shifts to cause large error, so ill take a leap and assume you care more about the shapes and style of the image more than the coloring. To deal with this, maybe consider using difference of the gram matrices (this is considered common place in style transfer literature: A Neural Algorithm of Artistic Style) Note that you could use the encoder to get the representation of the output as well for the loss, $L(x) = D(Gram(Enc(x)), Gram(Enc(\hat x))$ where $D$ would be some distance metric like euclidian distance.
Maybe the outline is all you care about. You could use some known edge detector filter and compare those, ex: $D(Edge(x), Edge(\hat x))$
Maybe you just dont care about color shifts, you could do $D(x - \mu_x, \hat x - \mu_{\hat x}$).
Note that you can play around with whatever distance metric you use, whether it be with MSE, RMSE, MAE, etc... Each has their own small pros/cons based on the loss manifolds they create. In your case i dont think the difference there will be night and day though, but you never know.
Also mixing and matching is always nice: ex: $L(x) = \lambda_1 D(x, \hat x) + \lambda_2D(Gram(Enc(x)), Gram(Enc(\hat x)) + ...$
Takeaway: MSE might actually be fine, but it really depends on what you prioritize, and once you figure that out you can start getting clever and design the loss that fits your needs and problem


text:
What is the most common practice to apply batch normalization?
For a deep NN, should I generally apply batch normalization after each convolution layer? Or only after some of them?  Which? Every 2nd, every 3rd, lowest, highest, etc.?

In the literature, it differs. You will see models do it after or before pooling only, and sometimes you see it after every single convolution.
Batch normalization's assistance to neural networks wasn't really understood for the longest time, initially it was thought to assist with internal covariate shift (hypothesized by the initial paper: Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift) but lately has been tied to the optimization process (How Does Batch Normalization Help Optimization?).
This means, from an architectural perspective, it is difficult to correctly assume how it should be utilized, unless you really understand its impact on the loss landscape and how your optimization process will traverse it given some initialization (Note, by the way, a recent paper by Google showed that you can alleviate a lot of the benefits of batch normalization sheerly by understanding what issues it's resolving and attempting to mitigate them in the initialization process: Fixup Initialization).
So I would recommend 3 things until it is more understood how to utilize it generally:

Play around, get frisky and experiment. Use what works best.
Use block featurizers that are known to work well like residual blocks. Proven in practice and will probably work for you too.
Do the research and investigate it more, if you find the answer, you'll be helping a lot of people :)


text:
How do I determine the generalisation ability of a neural network?
I am trying to ascertain if my neural network is able to generalize or if it’s simply using memory/overfitting to solve a task. I would like my model to generalise.
Currently, I train the neural network on a randomly generated 3x3 frozen lake environment - with no holes. (The network simply chooses an action for each state it is presented.)
Then, I test the model on a much larger frozen lake environment. Still no holes. Still randomly generated. The test environment size is assigned by a random value of 5-15 for each axis (height/width), randomly generated.
Then I determine the "degree of generalization" by how many large environments the network is able to solve. At present, it solves 100/100 on the 3x3, and about 83/100 on the larger test environments.
When I track the solutions it generates, I can see that the network always takes the shortest route available, which is great.
Do you guys have any ideas, inputs or criticism on the method I use to determine the degree of generalization?

Do you have any working definition of "abstract thinking" that you want answers to apply? It is a hard concept to define at the level of maths and statistics where you are measuring it. Wiithout a working definition from you, answers will tend to be more philosophical than practical

Hi Neil! No i don’t. I just want to avoid overfitting/memorisation, and want the network to be able to generalise and apply to similar environments as described. Does this make sense?

Yes. I was thinking that really you are asking about generalisation and not about "abstract thought" at all. Measuring generalisation is a very practical thing that you can do, and some discussion can be had about limits of this. "Abstract thought" - in the sense that it is used in natural English - is arguably not happening at all here, your agent has learned a kind of reflex behaviour a bit like riding a bicycle or running away from danger.

Thanks for your input Neil. English is not my native language, so i will edit the post to reflect the correct meaning. - Do you happen to have any input on the issue at hand?

Yes, I do have some thoughts. I may get time to post an answer later today


text:
Suicide Predictor and Locator
Suicide is on the increase in my country and most victims tend to leave early traces from text messages, social media accounts, search engine queries. So I came up with the idea to develop an AI system with the following features:

Ability to read text messages searching for suicide trigger words
Read chats also for the same trigger words
Incorporate synchronization of words from software/browsers on recent words typed
Learning algorithm to predict the next action after taking notes of the use of these suicide trigger words
Ability to access any cellphone, Android, computer, websites

Is this feasible or not feasible?

By feasibility do you mean whether you can accurately predict suicide attempts with the assumption you get all this data or is it feasible anyone would let you record all this information (it all sounds very 'big brother')? To train a model you would need records of these where you knew customers went on to attempt suicide and records where people didn't.

That's right bro. If I can't develop a model can it be simulated and what software can I use to simulate

This question seems to be specifically about your idea so I'll answer as such - any general 'can digital activity be used to predict suicide attempts' is probably too broad for this site.
As I see it you want to use what a person types, across all types of digital media, to get some measure of their risk of suicide attempt.
Two key questions in any machine learning problem

Can we create variables as predictors?
Is the data there? i.e. do we have labelled data already

As far as creating variables goes a lot of people don't realise that machine learning (or 'AI') isn't about dumping a load of unedited data into an algorithm and letting it figure it out - 90% of the work is in making those variables into something sensible. In this case it may involve a fair bit of psychology. Perhaps you look at changes in message length - has someone gone from writing essays to short answers? (I'm not a psychologist, that may well be way off the mark). The use of particular words or phrases may come into it - you would need to do a fair bit of research into the differences between those who attempted suicide and those who didn't (perhaps ranking words by frequency and see if there are distinct differences).
This brings us to our second question (or perhaps it should be the first) 'is the data there'? You want to predict suicide risk from digital activity so you'll need the digital activity of all different types of people with a label of whether or not they attempted suicide (and when - no point collecting the data two years after their attempt). Do you think this dataset exists? I'm sceptical - the level of detail you would need (both into someone's digital activity and their personal mental state) is unlikely to be recorded.
It isn't to say I think its an idea to be thrown out, only that you need to be realistic about the amount of effort required to do something like this. You would need to carry out research to collect this data, need to plan out your ideas before hand to know what you would like to collect (the worst thing is to find, after a year of data collection, that you didn't monitor a variable you would have now found vital).


text:
How does Friend-or-Foe Q-learning intuitively work?
I read about Q-Learning and was reading about multi-agent environments. I tried to read the paper Friend-or-Foe Q-learning, but could not understand anything, except for a very vague idea.
What does Friend-or-Foe Q-learning mean? How does it work? Could someone please explain this expression or concept in a simple yet descriptive way that is easier to understand and that helps to get the correct intuition?

Hi Harris Pat and welcome to this community! We're glad to help if we can, but, please, ask one question per post. I've edited your post to leave only the first question. Please, ask the other 3 questions in their separate post.


text:
What models and algorithms are used in commercial vehicle re-identification tasks?
Due to the fast-growing applications of AI technologies applied to vehicle re-identification tasks, there have already been hot contests, such as the Nvidia AI challenge.
What algorithms or models are really adopted in commercial vehicle re-identification tasks, effective and reliable, nowadays?


text:
Is it possible to use adversarial training to learn invariant features?
Given a set of time series data that are generated from different sites where all sites are investigating the same objective but with slightly different protocols.
Is it possible to use adversarial learning to learn site invariant features for a classification problem, that is, how can adversarial learning be used to minimize experimental differences (e.g. different measurement equipment) so that the learned feature representations from the time series are homogenous for a classification problem?
I have come across multi-domain adversarial learning, but I'm not sure if this is the best formulation for my problem.

Hi and welcome to this community! What do you mean by "sites" in this context?

HI, thank you. Sites in this case means different locations around the world. In a given location L_i for example, there are N_i subjects (i=1,..) and each subject has numeric information measured. The numeric information is the same but the way the numeric information is measured is slightly different. In one location, the data for a given subject may be measured for say 2 minutes, and in another it is 1 minute.


text:
How should I build an AI that quickly detects falling game assets on screen?
I want to build an AI that plays a simple android game.
The game is just a one at a time object falling, some times at an angle. The AI needs to recognize the object and to decide whether to swipe left, swipe down, or click on it. The background is changing some times, but the object falling is always on top.
There are 44 different assets and I have the original full resolution PNG of the objects.
How should I approach this?


text:
When doing binary classification with neural networks, how can I order the importance of the features for a class?
I have a simple neural network for binary classification.
The input features include age, sex, economic situation, illness, disability, etc. The output is simply 1 and 0.
I would like to order the features from the greatest to least impact it had on the classification.
An example answer could look like this:
Classification: 1

illness
economic situation
disability
sex
age

Another example:
Classification: 0

economic situation
age
disability
sex
illness

Two popular methods I’ve seen done:
1) For each feature, remove it and run the model and see the impact it has on the result. The idea is that the larger the impact, the more pertinent it was to the result.
2) Look at the gradients magnitude $|\nabla_f {y} |$. You can either look at the raw gradient or look at the guided back-propagation which is just the back props  product rule, but you only look at when the nodes positively help trigger a neuron by taking only the positive gradients at each step.
There’s probably also more methods. Hope this helped.

We don't get all of the (nonlinear) interactions in vanilla linear regression, but #1 is how we do parameter inference in statistics! (At least it's a way.)


text:
Can an AI simulate someone that is diagnosed as "Special Needs"?
Do you think it would be possible to train an AI in such a way as to mimic/simulate someone that is diagnosed as "Special Needs"?
Why? Most diagnosis and treatments for people today are subjective, sure it's what a group of like-minded professionals has agreed upon as a valid hypothesis, but, at the same time, there is an absence of the absolute. Could we train an AI to become a "special needs" be a starting point in helping find better ways to unlock the potential and understanding of these differences?

Creating an AI to accurately simulate any human behaviour to the level at which we could learn from the AI would, currently, be a huge leap beyond our current capabilities.

To back up Lio's point, training an AI to behave like any kind of life form in order to simulate even a subset of interactions with it, is currently a tall order. You can forget any mammals for a few years yet, let alone humans.

This leads to another question: Why train an AI to be "special needs"? Now you have a "special needs" robot, and you're back where you started: How do you decipher what differentiates them?

I don't think this is a good question for this site. It could be a good starter question for a PhD, but I wouldn't expect the question itself to be answered in the eventual thesis.


text:
Models to extract Causal Relationship between entities in a document using Natural Language Processing techniques
I am looking to extract causal relations between entities like Drug and Adverse Effect in a document. Are there any proven NLP or AI techniques to handle the same.  Also are there ways to handle cases where the 2 entities may not necessarily co-occur in the same sentence.

Hi. Please, ask the question "Also are there ways to handle cases where the 2 entities may not necessarily co-occur in the same sentence." in another post. Ideally, one question per post.


text:
Is there a theory behind which model is good for a classification task for the convolutional neural network?
Let say I'm trying to apply CNN for image classification. There are lots of different models to choose and we can try an ensemble, but given a limit amount of resources, it does not allow to try everything.
Is there a theory behind which model is good for a classification task for the convolutional neural network?
Right now, I'm just taking an average of three predictions.
predictions_model = [y_pred_xceptionAug,y_pred_Dense121_Aug,y_pred_resnet50Aug]
predictions = np.mean(predictions_model,axis=0)

But each model's performance is different. Is there better way for ensemble methods?

i cant tell if youre interestted in best way to get bang for buck using an ensemble or the theory of what CNN's would work best for you

Ensembles aren't very popular in the field of computer vision. The main reason why this is, is that models are already so large parameter-wise that it is hard to fit multiple models in-memory for classification. Since there are effective ways of training very large models, people would rather create a larger networks if they had the capacity than averaging the results from multiple ones.
That being said, there is no reason why ensembling wouldn't have beneficial results for your task.
One way would be, as you do, to average the results of the models. This is usually used to reduce the bias of weaker models. Another way would be to use meta-modelling, i.e. create a fourth model (even as simple as a linear classifier) that will be trained with the outputs of the three CNNs as its input features. The idea is that the meta-model will learn the best way to weight the outputs of the CNNs so that, instead of them all having an equal vote (as is the case when you average them), the meta-model will learn the best way to weigh them.

authors: Сергей Лобов


text:
Which approach can I use to generate text based on multiple inputs?
I have a little experience in building various models, but I've never created anything like this, so just wondering if I can be pointed in the right direction.
I want to create (in python) a model which will generate text based on multiple inputs, varying from text input (vectorized) to timestamp and integer inputs.
For example, in the training data, the input might include:
eventType = ShotMade
shotType = 2
homeTeamScore = 2
awayTeamScore = 8
player = JR Smith
assist = George Hill
period = 1
and the output might be (possibly minus the hashtags):
JR Smith under the basket for 2! 8-4 CLE. #NBAonBTV #ThisIsWhyWePlay #PlayByPlayEveryDay #NBAFinals
or
JR Smith out here doing #WhateverItTakes to make Cavs fans forgive him. #NBAFinals
Where is the best place to look to get a good knowledge of how to do this?

Generally, text generators work by modeling the joint distribution of the text by its Bayesian forward decomposition
$
\begin{align*}
p(w_1, w_2, ..., w_n) &= p(w_1) * p(w_2|w_1) * p(w_3|w_2, w_1) *\ ...\ * p(w_n|\{w_i\}_{i<n})\\
&= \prod_{i=1}^n p(w_i|\{w_k\}_{k<i})\\
\end{align*}
$
From a modeling perspective, this looks right up RNN's ally, where you can have a state holding information from $\{w_k\}_{k<i}$ to learn a representation of $w_i$
Now, in your specific case, you're interested in a conditional text-generator, so you are trying to model $p(w_1, w_2, ..., w_n | \{v_j\}_j)$, but this same tactic works.
$
\begin{align*}
p(w_1, w_2, ..., w_n| \{v_j\}_j) &= p(w_1|\{v_j\}_j) * p(w_2|w_1, \{v_j\}_j) * p(w_3|w_2, w_1, \{v_j\}_j) *\ ...\ * p(w_n|\{w_i\}_{i<n}, \{v_j\}_j)\\
&= \prod_{i=1}^n p(w_i|\{w_k\}_{k<i}, \{v_j\}_j)\\
\end{align*}
$
So, in your RNN or forward-based model, you can use the exact same approach just additionally embed the conditional inputs you have and somehow infuse it into the model (in practice, I have seen this through attention, concatenation, or some other common approach).
My recommendation (depending on the computational power you have) is to take advantage of the recent fad of pre-trained language models. Specifically, ones trained on next word prediction will probably do the job best. A good example is gpt-2, and, if you check out their GitHub, their code is very readable and easy to adjust for adding conditional input in the ways I have described.


text:
What is the difference between learning without forgetting and transfer learning?
I would like to incrementally train my model with my current dataset and I asked this question on Github, which is what I'm using SSD MobileNet v1.
Someone there told me about learning without forgetting. I'm now confused between learning without forgetting and transfer learning. How they differ from each other?
My initial problem, what I'm trying to achieve (mentioned in Github issue) is the following.
I have trained my dataset on ssd_mobilenet_v1_coco model. I'm getting continuous incremental data. Right now, my dataset is very limited.
What I want to achieve is incremental training, i.e. as soon as I get new data, I can further train my already trained model and I don't have to retrain everything:

Save trained model $M_t$
Get new data $D_{t+1}$
Train $M_t$ on $D_{t+1}$ to produce $M_{t+1}$
Let $t = t+1$, then go back to $1$

How do I perform this incremental training/learning? Should I use LwF or transfer learning?

Hi could you take a look here? https://ai.stackexchange.com/questions/27687/visualisation-for-mobilenet-feature-extraction

Learning without Forgetting (LwF) is an incremental learning (sometimes also called continual or lifelong learning) technique for neural networks, which is a machine learning technique that attempts to avoid catastrophic forgetting. There are several incremental learning approaches. LwF is an incremental learning approach based on the concept of regularization. In section 3.2 of the paper Continual lifelong learning with neural networks: A review (2019), by Parisi et al., other regularisation-based continual learning techniques are described.
LwF could be seen as a combination of distillation networks and fine-tuning, which refers to the re-training with a low learning rate (which is a very rudimentary technique to avoid catastrophically forgetting the previously learned knowledge) an already trained model $\mathcal{M}$ with new and (usually) more specific dataset, $\mathcal{D}_{\text{new}}$, with respect to the dataset, $\mathcal{D}_{\text{old}}$, with which you originally trained the given model $\mathcal{M}$.
LwF, as opposed to other continual learning techniques, only uses the new data, so it assumes that past data (used to pre-train the network) is unavailable. The paper Learning without Forgetting goes into the details of the technique and it also describes the concepts of feature extraction, fine tuning and multitask learning, which are related to incremental learning techniques.
What is the difference between LwF and transfer learning? LwF is a combination of distillation networks and fine-tuning, which is a transfer learning technique, which is a special case of incremental learning, where the old and new tasks are different, while, in general, in incremental learning, the old and new tasks can also be the same (which is called domain adaptation).

TODO: This answer needs to be improved because the concept of "task" is not well defined here. Saying that the old and new tasks are the same in domain adaptation can be confusing, without a definition of "task".

What I want to achieve is incremental training. So, as soon as I get new data, I can further train my already trained model and I don't have to retrain everything.

Learning without forgetting is one of the methods to solve multitask learning. If your model trained to solve problem A and then after sometimes you need your model to solve new problem B without forgetting the problem A (the model still good to solve the problem A), then you need this.
Transfer learning is a method to use a trained model to solve another task (and may forget the original task). For example, you use a model that originally trained to classify cat or dog to a new task that trying to classify goat or cow. You use this in hopes of speeding up your training process.
If your new data has the same task with the old data, you don't need to use multitask learning method. For example:

if your model trained with 50 images to detect an apple in the image, and then you get new 100 images to detect an apple then you just need to continue your train (incremental learning). In this case, you need (to save) the latest parameter of your model after trained (latest learning rate value, epoch, etc.), if you have it then you just need to run your training again (continue the epoch).
if your model trained with 100 images to detect an apple in the image, and then you get new 100 images to train your model to detect an orange and you don't care if your model will give a bad result to detect an apple, then you can use transfer learning. You may freeze a few first layers as "extractor" and initialize a new layer at the end.
if your model trained with 100 images to detect an apple in the image, and then you get new 100 images to detect an orange and your model must good to detect both apple and orange in an image, then you use multitask learning. The easiest method is to train your model with the apple+orange image, but you can also use another approach like proposed in Learning without Forgetting paper.

Hi could you take a look here? https://ai.stackexchange.com/questions/27687/visualisation-for-mobilenet-feature-extraction


text:
What are the main technologies needed to build an AI for Warcraft 3's mod DotA?
What are the main technologies needed to build an AI for Warcraft 3's mod Defense of the Ancients (DotA)? Maybe I can take inspiration from OpenAI's work.


text:
What is the exact output of the Inception ResNet V2's feature extraction layer?
I am working with the Inception ResNet V2 model, pre-trained with ImageNet, for face recognition.
However, I'm so confused about what the exact output of the feature extraction layer (i.e. the layer just before the fully connected layer) of Inception ResNet V2 is. Can someone clarify exactly this?
(By the way, if you know some resource that explains Inception ResNet V2 clearly, let me know).

Due to this article: https://arxiv.org/pdf/1512.00567v3.pdf?source=post_page--------------------------- ,
I try to flatten the 3-d tensor in to 1d vector: 8*8*2048, because in the article, the pool layer of inception resnet v2 at page 6 is Pool: 8 * 8 * 2048.
But at the end, my code showed the error:
 ValueError: cannot reshape array of size 33423360 into shape (340,131072)
This is all my code:
from keras.applications.inception_resnet_v2 import InceptionResNetV2
from keras.applications.inception_resnet_v2 import preprocess_input
from keras.models import Model
from keras.preprocessing.image import load_img
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import classification_report
from imutils import paths
from keras.applications import imagenet_utils
from keras.preprocessing.image import img_to_array
from sklearn.preprocessing import LabelEncoder
from sklearn.model_selection import train_test_split
from keras.preprocessing import image
import random
import os
import numpy as np
import cv2

# Path to image
image_path = list(paths.list_images('/content/drive/My Drive/casia-299-small'))
# Random image path
random.shuffle(image_path)
# Get image name
labels = [p.split(os.path.sep)[-2] for p in image_path]

# Encode face name in to number
le = LabelEncoder()
labels = le.fit_transform(labels)

# Load model inception v2, include_top = Fale to ignore Fully Connected layer
model = InceptionResNetV2(include_top = False, weights = 'imagenet')

# Load images and resize into required input size of Inception Resnet v2 299x299
list_image = []
for (j, imagePath) in enumerate(image_path):
    image = load_img(imagePath, target_size = (299, 299, 3))
    image = img_to_array(image)

    image = np.expand_dims(image, 0)
    image = imagenet_utils.preprocess_input(image)

    list_image.append(image)

# Use pre-trained model to extract feature
list_image = np.vstack(list_image)
print("LIst image: ", list_image)
features = model.predict(list_image)
print("feature: ", features)
print("feature shape[0]: ", features.shape[0])
print("feature shape: ", features.shape)
features = features.reshape((features.shape[0], 8*8*2048))

# Split training set and test set n ratio of 80-20
x_train, x_test, y_train, y_test = train_test_split(features, labels, test_size = 0.2, random_state =42)

params = {'C': [0.1, 1.0, 10.0, 100.0]}
model = GridSearchCV(LogisticRegression(), params)
model.fit(x_train,y_train)
model.save('/content/drive/My Drive/casia-299-small/myweight1.h5')
print('Best parameter for the model {}'.format(model.best_params_))

preds = model.predict(x_test)
print(classification_report(y_test, preds))
```

You can use this to view the Keras Resnet Inception V2 network.
from keras.applications.inception_resnet_v2 import InceptionResNetV2, preprocess_input
from keras.layers import Input
model = InceptionResNetV2(weights='imagenet', include_top=True)
print(model.summary())

This will Output (im showing only the last few layers):
__________________________________________________________________________________________________
conv_7b_ac (Activation)         (None, 8, 8, 1536)   0           conv_7b_bn[0][0]
__________________________________________________________________________________________________
avg_pool (GlobalAveragePooling2 (None, 1536)         0           conv_7b_ac[0][0]
__________________________________________________________________________________________________
predictions (Dense)             (None, 1000)         1537000     avg_pool[0][0]
==================================================================================================
Total params: 55,873,736
Trainable params: 55,813,192
Non-trainable params: 60,544
__________________________________________________________________________________________________
None

If we look at the output of the 'avg_pool' layer from 'Top'. There will be 1536 features at the output.
You can make a model in this way:
from keras.applications.inception_resnet_v2 import InceptionResNetV2, preprocess_input
from keras.layers import Input
import numpy as np
def extract(image_path):
    base_model = InceptionResNetV2(weights='imagenet', include_top=True)
    model = Model(inputs=base_model.input,outputs=base_model.get_layer('avg_pool').output)

    img = image.load_img(image_path, target_size=(299, 299))
    x = image.img_to_array(img)
    x = np.expand_dims(x, axis=0)
    x = preprocess_input(x)

    # Get the prediction.
    features = model.predict(x)
    features = features[0]
    return features

features=[]
features = extract(image)

I couldn't try the code as, right now, I don't have an environment to test this code.


text:
What are the differences between CRF and HMM?
What I know about CRF is that they are discriminative models, while HMM are generative models, but, in the inference method, both use the same algorithm, that is, the Viterbi algorithm, and forward and backward algorithms.
Does CRF use the same features as HMM, namely features transition and state features?
But in here https://homepages.inf.ed.ac.uk/csutton/publications/crftut-fnt.pdf, CRF has these features Edge-Observation and Node-Observation Features.
What is the difference features transition and state features vs features Edge-Observation and Node-Observation features?

crf is undirected model and hmm is a type of bayesian net which is directed (+ has additional constraints making computation over it easier)


text:
What kind of output should be used for predicting angles in DNNs?
I am building a model which predicts angles as output. What are the different kinds of outputs that can be used to predict angles?
For example,

output the angle in radians

cyclic nature of the angles is not captured
output might be outside $\left[-\pi, \pi \right)$

output the sine and the cosine of the angle

outputs might not satisfy $\sin^2 \theta + \cos^2 \theta = 1$

What are the pros and cons of different methods?

Approaches I have seen/used:
Scenario 1: The angle is in between 2 vectors of some form, in which case, $[-\pi, 0)$ and $[0, \pi)$ are equivalent. (In vector space there always exists two angles between vectors: $\theta$ and $1-\theta$ )

Use the sigmoid $\sigma$ function to put it between 0 and 1, and then scale to $[0, \pi)$. Since you arent modeling the whole rotation in this case, this works decently because the 2 ends dont have to be modeled as equivalent
Use cosine similarity, learn 2 vector representations and use $cos\ \theta = \frac{v_1^T v_2}{||v_1||*||v_2||}$ and then you could use the arccos.

Scenario 2: Wanting to learn an angle on the unit circle, meaning $\theta$ vs $1-\theta$ is very important and so your bound is $[-\pi, \pi)$

Use a sinusoidal activation and multiply by $\pi$ (ex: $z=\pi*sin(x)$) This way you model the periodic nature of circling the unit circle (the activation eventually roates backs to itself continuously)

As you said, the first option is not very suitable due to the cyclic nature of the angles. However, if you don't mind discretizing the values, you could represent the output as a binary vector.
A variant of the second option seems perfect to me. You may output a 2D vector and use that vector's angle as output. You'll probably need a regularizer for the vector's norm, but that's it.


text:
Is there a continuous conditional variational auto-encoder?
The Conditional Variational Autoencoder (CVAE), introduced in the paper Learning Structured Output Representation using Deep Conditional Generative Models (2015), is an extension of Variational Autoencoder (VAE) (2013). In VAEs, we have no control over the data generation process, something problematic if we want to generate some specific data. Say, in MNIST, generate instances of 6.
So far, I have only been able to find CVAEs that can condition to discrete features (classes). Is there a CVAE that allows us to condition to continuous variables, kind of a stochastic predictive model?

Whether a discrete or continuous class, you can model it the same.
Denote the encoder $q$ and the decoder $p$. Recall the variational autoencoder's goal is to minimize the $KL$ divergence between $q$ and $p$'s posterior. i.e. $\min_{\theta, \phi} \ KL(q(z|x;\theta) || p(z|x; \phi))$ where $\theta$ and $\phi$ parameterize the encoder and decoder respectively. To make this tractable this is generally done by using the Evidence Lower Bound (because it has the same minimum) and parametrizing $q$ with some form of reparametrization trick to make sampling differentiable.
Now your goal is to condition the sampling. In other words you are looking for modeling $p(x|z, c;\phi)$ and in turn will once again require $q(z|x, c; \theta)$. Your goal will now intuitively become once again $\min_{\theta, \phi} \ KL(q(z|x, c;\theta) || p(z|x, c; \phi))$. This is still simply transformed into the ELBO for tractability purposes. In other words your loss becomes $E_q[log \ p(x|z,c)] - KL(q(z|x,c)||p(z|c)$.
Takeaway: Conditioning doesn't change much, just embed your context and inject it both into the encoder and decoder, the fact that its continuous doesn't change anything. For implementation details, normally people just project/normalize and concatenate it somehow to some representation of $x$ in both the decoder/encoder.


text:
What do the words "coarse" and "fine" mean in the context of computer vision?
I was reading the well know paper Fully Convolutional Networks for Semantic Segmentation, and, throughout the whole paper, they talk use the term fine and coarse. I was wondering what they mean. The first time they say it in the intro is:

Convolutional networks are driving advances in recognition. Convnets are not only improving for whole-image classification, but also making progress on local tasks with structured output. These include advances in
  bounding box object detection, part and keypoint prediction, and local correspondence.
The natural next step in the progression from coarse to fine inference is to make a prediction at every pixel.

It's also used in other parts of the paper

We next explain how to convert classification nets into fully convolutional nets that produce coarse output maps.

What do "coarse" and "fine" mean in the context of this paper? And in the general context of computer vision?
In English, "coarse" means "rough or loose in texture or grain" , while "fine" means "involving great attention to detail" or "(chiefly of wood) having a fine or delicate arrangement of fibers", but these definitions do not elucidate the meaning of these words in the context of computer vision.
This question was also asked here.

tl;dr

What does that mean in the context of this paper?

With "coarse segmentation" the author means a segmentation that doesn't have much detail. "Fine segmentation", on the other hand, refers to a segmentation with a high level of detail.

But also more importantly [what does that mean in the context of] general computer vision?

The most common use in CV is to describe how general or specific a class in is classification. A "coarse class" is a very broad one, while a "fine class" is a very specific one.
Intended use
What the author refers to is the level of detail of the resulting segmentation.
A coarse segmentation would mean that we have large blobs covering each class without much detail. On the other hand, a fine segmentation would have a much higher level of detail which can even go down to pixel level (i.e. pixel-by-pixel correct segmentation).
To make this clear look at the following two examples. As we go from the left to right, the segmentation maps go from coarse to fine:

Note that in the rightmost images the result an almost pixel-perfect (i.e. fine details) segmentation map, while the ones on the left don't have much detail and can be considered coarse.
Alternative use
Because this isn't an established terminology, some of the times coarse and fine can refer to the nature of the classes in a classification task. Take the top image for example; the label for a coarse classification task could be a tree. For a fine classification task we would have labels like oak tree, pine tree, etc.
The most prominent example of this is the cifar dataset which has two versions: a coarse one that has 10 classes and a fine one that has 100 classes, which are all subclasses of the coarse classes. For example a coarse class is fish, while the fine ones are aquarium fish, flatfish, ray, shark, trout, etc.
For semantic segmentation an example could be the following: you want to make a street segmentation model. This a coarse segmentation would mean that it just splits the image into road, vehicle, etc. A fine segmentation, on the other hand, could also detect the type of vehicle, e.g. truck, car, etc.


text:
Coloring graphs with reinforcement learning
I am trying to build an RL agent to solve the NP-hard problem graph coloring. The problem is quite challenging.
This how I addressed it.
The environment
To preserve the scalability of the algorithm, providing the agent with the whole graph wouldn't be a good idea. Therefore, the input for the agent would be a window of embeddings.
More precisely, first, I would apply an embedding to the graph to generate fixed-size vectors to every vertex in the graph (thus, every vertex in the graph is represented as a vector that contains some information about its neighborhood and position in the graph).
Second, the agent will get a window of the embedding. For example, when coloring vertex number $17$, the input would be the $2n$ vectors from vertex $17-n$ to $17+n$, to give the agent more local information.
Third, I think the agent would require more information about the number of colors already used and the number of the already colores vertices.
The agent
My biggest problem is how the agent should be. Technically, the problem is the action space dimension. For a given graph, the maximal number of colors is the number of vertices which varies from graph to graph (losing the scalability). Plus, the possible actions at each state varies with the history of the coloring. The possible colors for a given state (or node) are all the used colors eliminating the connected colors and adding the possibility of a new color, that is, for vertex $56$, the agent has already used the first $40$ colors $\{0, 1, 2, 3, \dots,40 \}$, and node $56$ is connected to some neighbors already colored with $\{14, 22, 40 \}$, the possible colors are $\{0,1, \dots, 40 \}- \{14, 22, 40 \} + \{41\}$.
How do I overcome the high dimensional inconsistent action space?

I'm fairly sure most problems with a large option for inputs simply inputs it as an image through a convnet, so I think that would certainly be step in the right direction. That being said, no one has ever actually "solved" any NP hard problem, so i wouldn't expect much no matter what network you use. You might be able to achieve something that gives some solution, just perhaps not the optimum.

Sure. I'm trying to find an approximation for the solution. Plus, the possible set of actions depend on the whole history of coloring not only the state. So, there are actually two big problems: the high dimensional action space comparing to the low dimension of possible actions, and the set of possible action depends an all previous state not only the current.

I would think a recursive net, probably an LSTM, with modified hidden states that are computed through a convnet. This architecture should be capable of remembering previous states and analysing the high dimensional nature of the input (each dimension can be used as a channel into the convnet) while also providing a low dimensional output.


text:
Can I use self-driving car's data set for left-hand drive cars which drive on the right lane for right-hand cars which drive on the left lane?
Can I use self-driving car's data set for left-hand drive cars which drive on the right lane for right-hand self-driving cars which drive on the left lane?

Hi and welcome to this community! I suppose that you're going to test your self-driving car in simulation. Is that right? Anyway, I think that it will depend on the self-driving AI that you will use. A sufficiently sophisticated model might be able to use data recorded in one situation to drive in another situation, but I bet you will encounter several issues, due to the stupidity of models and the training procedures.

Okay thanks I want to start a self driving car startup in SA we drive on left lane with right hand driving cars most of the open source self driving car data is opposite

No
Various reasons:

From Wikipedia: "Left- and right-hand traffic":

"In most countries, rail traffic follows the handedness of the roads, although many of the countries that switched road traffic from LHT to RHT did not switch their trains. Boat traffic on rivers is effectively RHT. Boats are traditionally piloted from the starboard side to facilitate priority to the right.".

Sometimes cars and trains interact, especially at rail crossings, a frequent source of accidents.

From Wikipedia: "Priority to the right":

"Some countries use the priority-to-the-right rule, despite driving on the left. Australia uses the priority-to-the-right rule at four-way intersections where the roads all have equal priority, but specific rules apply for T-intersections. Singapore also uses priority-to-the-right, as well as priority to vehicles going straight and turning vehicles to give way to vehicles going straight.".

Wikipedia: (local legal exceptions) "Boulevard rule":

"Maryland is among the U.S. states which follow this rule, but not all states have similar provisions in statutes or case law. New York applies the rule to traffic entering public roads from private driveways or alleys, but not where public roads intersect.".

Wikipedia: Changing sides at borders":

"Traffic Switchover sign at the Thai–Lao Friendship Bridge. Although many LHT jurisdictions are on islands, there are cases where vehicles may be driven from LHT across a border into a RHT area.". See the Lotus Bridge in Google Maps.

Vehicle regulations: DriveSmartBC Article: "Right Hand Drive Vehicles in a Left Hand Drive World":
Some areas allow RHD vehicles, despite a majority of the vehicles being LHD and the roads being designed for same.

That is an incomplete list of exceptions.
See also: "Advantages and disadvantages between left hand and right hand units" for a brief list of pros and cons, which points out some additional exceptions.

I would suggest to look into dataset like nuscenes, which have both left and right driving data. So if you want to test, then you can use left driving dataset for train and later right driving for testing or vice versa. I believe that will be a better option.


text:
Understanding log probabilities of actions in the PPO objective
I'm trying to implement the Proximal Policy Optimization (PPO) algorithm (code here), but I am confused about certain concepts.

What is the correct way to implement log probability of a policy (denoted by $\pi_\theta$ below)?
$$
L^{C P I}(\theta)=\hat{\mathbb{E}}_{t}\left[\frac{\pi_{\theta}\left(a_{t} | s_{t}\right)}{\pi_{\theta_{\text {old }}}\left(a_{t} | s_{t}\right)} \hat{A}_{t}\right]=\hat{\mathbb{E}}_{t}\left[r_{t}(\theta) \hat{A}_{t}\right]
$$
Let's say my old network policy output is oldpolicy_probs=[0.1,0.2,0.6,0.1] and new network policy output is newpolicy_probs=[0.2,0.2,0.4,0.2].
Do I take the log of this directly, or should I first multiply these with the true label y_true = [0,0,1,0] as implemented here?
ratio = np.mean(np.exp(np.log(newpolicy_probs + 1e-10) - K.log(oldpolicy_probs + 1e-10))*advantage)
Once I have the ratio and I multiply it with an advantage, why do we take the mean over all actions? I suspect it might be because we are taking estimate $\hat{\mathbb{E}_t}$ but conceptually I don't understand what this gives us. Is my implementation above correct?

I have the same question. In this scenario, you have discrete actions right? How were you able to handle this?

@AhmedAlagha Please see the implementation of ppo loss here on github.


text:
What are the benefits of using max-pooling in convolutional neural networks?
I am reading Francois Chollet's Deep learning with Python, and I came across a section about max-pooling that's really giving me trouble.
I am unable to copy-paste the content, so I've included screenshots of the paragraph that's troubling me.

I simply don't understand what he means when he talks about "What's wrong with this setup?" (towards the end).
How does removing the max-pooling layers "reduce" the amount of the initial image that we're looking at? What are the benefits of using max-pooling in convolutional neural networks, as opposed to just using convolution layers?

I think the "What's wrong with this setup" paragraph is trying to convey this: Lets say you have an extreme scenario of a 10^5 x 10^5 sized input image of a car, the conv net sees this image as slices of size 7x7 using this example, and in such a massive image, a slice like that hardly show anything. By maxpooling, you essentially "collect" a group of these slices, so the next time the conv net sees the image, it sees a larger window and can therefor identify over-arching features

@Recessive thank you for your comment. Where do you think the 7 x 7 came from though? Like why did he mention 7 x 7 specifically? (how did he get that number?)

Essentially no proven benefits. Max pooling is not used in latest models any more.

@user10796158 He's referring to the size of the filter for that particular conv layer, which is 7x7. You could increase the size of the filter to observe more of the image (say, 20x20 slices) and I don't believe there's actually anything wrong with that (aside from a large amount of computations). However, in spite of this, deepmind has found (https://arxiv.org/pdf/1804.04438.pdf) that the "what's wrong with this" is only true at initialisation, so it seems that regardless of maxpooling layers, the network will learn stability.

MaxPooling pools together information. Imagine you have 2 convolutional layers $(F_1, F_2)$ respectively, each with a 3x3 kernel and a stride of $1$. Also, imagine your input is $I$ is of shape $(w,h)$. Let's call a max-pooling layer $M$ is of size $(2,2)$.
Note: I'm ignoring channels because, for these purposes, it's not necessary and can be extended to any amount of them.
Now you have two cases:

$O_1 = F_2 \circ F_1 \circ I$
$O_2 = F_2 \circ M \circ F_1 \circ I$

In these cases, $shape(O_1)=(w-4, h-4)$ and $shape(O_2)=\left(\frac{w-2}{2}-2, \frac{h-2}{2}-2 \right)$. If we plug in dummy values, like $w,h = 64,64$, we get the shapes become $(60,60)$ and $(29,29)$ respectively. As you can tell, these are very different!
Now, there is more of a difference than just the size of the outputs, each neuron holds a pooling of more information. Let's do it out:

Each output neuron of $F_1 \circ I$ has information from a $(3,3)$ receptive field.
Each output neuron then of $F_2 \circ F_1 \circ I$ has information from a $(3,3)$ receptive field of $F_1 \circ I$, which, if we eliminate reused nodes, is a $(5,5)$ receptive field from the initial $I$.
Each output neuron then of $M \circ F_1 \circ I$ has information from a $(2,2)$ receptive field of $F_1 \circ I$, which, if we eliminate reused nodes, is a $(4,4)$ receptive field from the initial $I$.
Each output neuron then of $F_2 \circ M \circ F_1 \circ I$ has information from a $(4,4)$ receptive field of $M \circ F_1 \circ I$, which, if we eliminate reused nodes, is a $(8,8)$ receptive field from the initial $I$.

So, let us discuss these: Using max-pooling reduces the feature space heavily by throwing out a lot of nodes whose features aren't as indicative (makes training models more tractable) along with it does extend the receptive field with no additional parameters.

@mshlis thank you for your answer. Do you mind elaborating on points 2,3, and 4? Specifically, how did you get the numbers (4,4) (5,5) and (6,6)?

@user10796158 the convolution in point two's case is a 3x3 grid of nodes that touches local 3x3 grids of the layer even before that. To convince yourself draw it out and you get a grid thats 5x5 of the original. For the third point it works the same way just with a 2x2 and for the fourth point i forgot to include the stride of the maxpool, so its actually 8x8


text:
What is the difference between image processing and computer vision?
What is the difference between image processing and computer vision? They are apparently both used in artificial intelligence.

The Wikipedia article related to computer vision gives, in my opinion, a good description of the field and its relation to image processing. Below, I will only cite the most relevant parts of the article.

Computer vision is an interdisciplinary scientific field that deals with how computers can be made to gain high-level understanding from digital images or videos. From the perspective of engineering, it seeks to automate tasks that the human visual system can do.
The image data can take many forms, such as video sequences, views from multiple cameras, or multi-dimensional data from a medical scanner.
Sub-domains of computer vision include scene reconstruction, event detection, video tracking, object recognition, 3D pose estimation, learning, indexing, motion estimation, and image restoration.
The fields most closely related to computer vision are image processing, image analysis and machine vision. There is a significant overlap in the range of techniques and applications that these cover. This implies that the basic techniques that are used and developed in these fields are similar, something which can be interpreted as there is only one field with different names. On the other hand, it appears to be necessary for research groups, scientific journals, conferences and companies to present or market themselves as belonging specifically to one of these fields and, hence, various characterizations which distinguish each of the fields from the others have been presented.
Image processing and image analysis tend to focus on 2D images, how to transform one image to another, e.g., by pixel-wise operations such as contrast enhancement, local operations such as edge extraction or noise removal, or geometrical transformations such as rotating the image. This characterization implies that image processing/analysis neither require assumptions nor produce interpretations about the image content.

What is the difference between computer vision and image processing?
Computer vision is about gaining high-level understanding from images or videos. For example, object recognition, which is the task of identifying the type of objects (e.g. apples or humans) in an image, is a computer vision problem. Of course, this task requires a high-level understanding of the image, that is, an understanding of the image similar to the way humans understand visual inputs, given that an apple is a high-level object that is composed of atoms, can be green, etc. For example, a neural network that attempts to classify the type of object in an image (assuming, for simplicity, there is just one type of object) would be a computer vision technique. In computer vision, you receive an image as input and you can produce an image as output or some other type of information (e.g. the type of objects in the image).
On the other hand, image processing does not necessarily imply a high-level understanding of the image. Image processing is a subfield of signal processing but applied to images, which are $2$d signals (or functions of a fixed domain). So, for example, if you have a blurred or noisy image, the task of deblurring or denoising it is part of image processing. The typical tasks in image processing are filtering (e.g. using the Gaussian filter or the mean filter), noise removal, edge detection and color processing. In image processing, you receive an image as input and you produce another image as output.
However, note that, in many cases, to gain a high-level understanding of the images, you first need to e.g. denoise them, so you could use an image processing technique to partially solve a computer vision task. In this sense, computer vision is an interdisciplinary field.
To conclude, computer vision is not a subfield of image processing, given that image processing does not necessarily involve a high-level understanding of images. On the other hand, computer vision can use image processing techniques to gain a high-level understanding of images.


text:
How to use pretrained checkpoints of BERT model on semantic text similarity task?
I am unaware to use the derived checkpoints from pre-trained BERT model for the task of semantic text similarity.
!python create_pretraining_data.py \
          --input_file=/input_path/input_file.txt \
          --output_file=/tf_path/tf_examples.tfrecord \
          --vocab_file=/vocab_path/uncased_L-12_H-768_A-12/vocab.txt \
          --do_lower_case=True \
          --max_seq_length=128 \
          --max_predictions_per_seq=20 \
          --masked_lm_prob=0.15 \
          --random_seed=12345 \
          --dupe_factor=5

!python run_pretraining.py \
      --input_file=/tf_path/tf_examples.tfrecord \
      --output_dir=pretraining_output \
      --do_train=True \
      --do_eval=True \
      --bert_config_file=/bert_path/uncased_L-12_H-768_A-12/bert_config.json \
      --init_checkpoint=/bert_path/uncased_L-12_H-768_A-12/bert_model.ckpt\
      --train_batch_size=32 \
      --max_seq_length=128 \
      --max_predictions_per_seq=20 \
      --num_train_steps=20 \
      --num_warmup_steps=10 \
      --learning_rate=2e-5

I have run a pre-trained BERT model with some domain of corpora from scratch. I have got the checkpoints and graph.pbtxt file from the code above. But I am unaware on how to use those files for evaluating semantic text similarity test file.

Have a look at https://medium.com/the-artificial-impostor/news-topic-similarity-measure-using-pretrained-bert-model-1dbfe6a66f1d
You can have the two sentences as first and second use the next sentence score as a similarity measure. You can further fine-tune your model on some semantic similarity tasks like Sent-Eval or your own dataset if you have one


text:
Is tabular Q-learning considered interpretable?
I am working on a research project in a domain where other related works have always resorted to deep Q-learning. The motivation of my research stems from the fact that the domain has an inherent structure to it, and should not require resorting to deep Q-learning. Based on my hypothesis, I managed to create a tabular Q-learning based algorithm which uses limited domain knowledge to perform on-par/outperform the deep Q-learning based approaches.
Given that model interpretability is a subjective and sometimes vague topic, I was wondering if my algorithm should be considered interpretable. The way I understand it, the lack of interpretability in deep-learning-based models stems from the stochastic gradient descent step. However, in case of tabular Q-learning, every chosen action can always be traced back to a finite set of action-value pairs, which in turn are a deterministic function of inputs of the algorithm, although over multiple training episodes.
I believe in using deep-learning-based approaches conservatively only when absolutely required. However, I am not sure how to justify this in my paper without wading into the debated topic of model interpretability. I would greatly appreciate any suggestions/opinions regarding this.

There is not a widely accepted definition of explainable AI (XAI). However, as a rule of thumb (my rule of thumb), if you can't explain it easily to a layperson (or even an expert), then the model or algorithm is not (very) interpretable. There are other concepts related to XAI, such as accountability (who is responsible for what?), transparency and fairness.
For example, the final decision of (trained) decision tree can easily be explained to (almost) any person, so a (trained) decision tree is a relatively interpretable model. See the chapter 4.4. Decision Tree of the book Interpretable Machine Learning: A Guide for Making Black Box Models Explainable.
An artificial neural network (ANN) is usually considered not very interpretable because, unless you attempt to understand which parts of the network contribute to the output of the ANN (for example, with the technique layer-wise relevance propagation), then you cannot immediately or easily understand the output or decision of the ANN, given that an ANN involves many non-linear functions, which produce unintuitive outcomes. In other words, it is more difficult to attribute the contributions of each unit of an ANN to the output of the same ANN than to explain e.g. the decision of a decision tree.
In the context of deep reinforcement learning (DRL), the ANN is used to approximate the value or policy functions. This approximation is, in the first place, the main reason behind the low interpretability of deep RL models.
Q-learning is an algorithm, so it is not a model, like an ANN. Q-learning is used to learn a state-action value function, denoted with $Q: S \times A \rightarrow \mathbb{R}$, which can then be used to derive another function, the policy, which can then be used to take actions. In a way, Q-learning is similar to gradient descent, because both are machine learning (or optimization) algorithms. The $Q$ function is a model of the environment, given that, for each state, it represents the expected amount of reward that can be obtained, so, in a certain way, the learned $Q$ function represents a prediction of reward.
Is the learned tabular $Q$ function interpretable? Yes, it is relatively interpretable, but how much? What kind of interpretation do you really need? It depends on the context and people that need the interpretation or explanation. A reinforcement learning researcher will usually be satisfied with the usual explanation of the inner workings of $Q$-learning, Markov decision processes, etc., because the usual RL researcher is not concerned with the really important problems that involve the life of people and other beings. However, for example, in the context of healthcare, doctors might not just be interested in the explanation "expected maximum future reward", but they might also be interested in the environment, the credit assignment problem, the meaning and effectiveness of the reward function with respect to the actual problem that needs to be solved, in a probabilistic interpretation of the results (rather than just a mere action that needs to be taken), possible alternative good actions, etc.
Recently, there have been some attempts to make RL and, in particular, deep RL more interpretable and explainable. In the paper Programmatically Interpretable Reinforcement Learning (2019), Verma et al. propose a more interpretable (than deep RL) RL framework that is based on the idea of learning policies that are represented in a human-readable language. In the paper InfoRL: Interpretable Reinforcement Learning using Information Maximization (2019), the authors focus on learning multiple ways of solving the same task and they claim that their approach provides more interpretability. In the paper Toward Interpretable Deep Reinforcement Learning with Linear Model U-Trees (2018), the authors also claim that their approach facilitates understanding the network's learned knowledge by analyzing feature influence, extracting rules, and highlighting the super-pixels in image inputs.
To conclude, deep RL should not necessarily be avoided: it depends on the context (e.g., it is usually perfectly fine to use deep RL to solve video games). However, in cases where liability is an issue, then deep RL should also be explainable or more explainable alternatives should also be taken into account.


text:
Is unsupervised disentanglement really impossible?
In Locatello et al's Challenging Common Assumptions in the Unsupervised Learning of Disentangled Representations he claims to prove unsupervised disentanglement is impossible.
His entire claim is founded on a theorem (proven in the appendix) that states in my own words:
Theorem: for any distribution $p(z)$ where each variable $z_i$ are  independent of each other there exists an infinite number of transformations $\hat z = f(z)$ from $\Omega_z \rightarrow \Omega_z$ with distribution $q(\hat z$) such that all variables $\hat z_i$ are entangled/correlated and the distributions are equal ($q(\hat z) = p(z)$)
Here is the exact wording from the paper:

(I provide both because my misunderstanding may be stemmed from my perception of the theorem)
From here the authors explain the straightforward jump from this to that for any unsupervised learned disentangled latent space there will exist infinitely many entangled latent space with the exact same distribution.
I do not understand why this means its no longer disentangled? Just because an entangled representation exists, does not mean the disentangled is any less valid. We can still conduct inference of the variables independently because they still follow that $p(z) = \prod_i p(z_i)$, so where does the impossibility come in?

This may be better posted in mathematics stack, however it look like Neil is on the right track

The impossibility is referring how to learn the disentangled representations from the observed distribution or to know whether you have a disentangled representation in the first place.
Basically, an unsupervised learning agent tasked with learning a disentangled transformation of some features $\mathbf{z}$ needs to infer a set of features from the data which are not entangled, but the supplied data will always have many equally valid entangled solutions - valid from the point of view of describing the distribution of $\mathbf{z}$ accurately.
An analogy would be "I have observed the value 50, and know it is the sum of 3 numbers. What are those numbers?". Whilst the correct answer exists, and it is possible to guess it, it cannot be inferred from the supplied information.
The part of the proof you quote shows that the multiple equivalent entangled feature sets exist, and theoretically cannot be separated from a "true" disentangled feature set on the basis of knowing the distribution. Once you accept this, it is indeed just a short hop in logic to say that the disentangled features are not learnable - there is no way for a learning system to differentiate between the entangled and disentangled features that explain the distribution, and a large (infinite) set of valid entangled features are guaranteed to exist, which will confound attempts to find a perfect solution.
It is worth noting that the impossibility refers to learning perfect solutions, and that the proof does not rule out useful or practical approximate solutions, or solutions that augment unsupervised learning by applying some additional rules or a semi-supervised approach.

I understand what you say about the models inability to differentiate the disentangled from the multitude of entangled, but why should that matter if the distribution follows $\prod_i p(z_i)$? It will still hold all the properties of independent variables even if there exists infinite other interpretations

@mshlis: What do you mean by "matter"? Yes it should be possible to use even heavily entangled features for other tasks, such as inference. But the stated goal is to have disentangled features. One thing you cannot easily use entangled features for is explanatory models (because your explanation becomes more complex). Another thing is control or intervention, assuming you can influence at least one of the disentangled features that you extract.

my point of "matter" means: even if there exists an entangled representation, there also exists a disentangled representation. So im not talking about learning the interpretation of such a disentanglement, but more that it is provably interchangeable

@mshlis: It is interchangeable for some purposes, not others. This isn't your main question though. Your question is "Is unsupervised disentanglement really impossible?" The answer is yes. If you want to ask "What is disentanglement useful for?" or "Do I need to care about whether my features are entangled?" that would be a new and different question IMO (and for the latter question you need to give your goals with the data)

If i take the embeddings of 2 inputs: $x_1 \rightarrow v_1, x_2 \rightarrow v_2$ and i can make a new vector $v_3$ such that it just is partially $v_1$ and $v_2$, and $v_3 \in \Omega_v$ wouldnt that mean its disentangled

given my above comment, wouldnt it be fair they didnt prove disentanglement was impossible, just impossible to interpret

@mshlis: They haven't shown that disentanglement is impossible. They have shown that there is no way to create a learning process based purely on the data that guarantees that you will find the disentangled features.

sorry didn’t mean to make it an answer clicked wrong thing on phone

@mshlis: I am not sure I can do the maths well enough to explain in the way you need. I am just accepting the proof and trying to explain what it means intuitively . . .

Let us continue this discussion in chat.