Questions tagged [constrained-optimization]

For questions that involve constrained optimization problems (in the context of artificial intelligence).

17 questions
9
votes
1 answer

Given a list of integers $\{c_1, \dots, c_N \}$, how do I find an integer $D$ that minimizes the sum of remainders $\sum_i c_i \text{ mod } D$?

I have a set of fixed integers $S = \{c_1, \dots, c_N \}$. I want to find a single integer $D$, greater than a certain threshold $T$, i.e. $D > T \geq 0$, that divides each $c_i$ and leaves remainder $r_i \geq 0$, i.e. $r_i$ can be written as $r_i =…
4
votes
2 answers

How do we design a neural network such that the $L_1$ norm of the outputs is less than or equal to 1?

What are some ways to design a neural network with the restriction that the $L_1$ norm of the output values must be less than or equal to 1? In particular, how would I go about performing back-propagation for this net? I was thinking there must be…
4
votes
2 answers

How to use a VAE to reconstruct an image starting from an initial image instead of starting from a random vector?

Is it possible to use a VAE to reconstruct an image starting from an initial image instead of using K.random_normal, as shown in the “sampling” function of this example? I have used a sample image with the VAE encoder to get z_mean and z_logvar. I…
4
votes
2 answers

Which neural network can I use to solve this constrained optimisation problem?

Let $\mathcal{S}$ be the training data set, where each input $u^i \in \mathcal{S}$ has $d$ features. I want to design an ANN so that the cost function below is minimized (the sum of the square of pairwise differences between model outputs) and the…
3
votes
1 answer

Intuition behind $1-\gamma$ and $\frac{1}{1-\gamma}$ for calculating discounted future state distribution and discounted reward

In the appendix of the Constrained Policy Optimization (CPO) paper (Arxiv), the authors denote the discounted future state distribution $d^\pi$ as: $$d^\pi(s) = (1-\gamma) \sum_{t=0}^\infty{\gamma^t P(s_t = s \vert \pi)}\tag1$$ and the discounted…
3
votes
1 answer

How to use DQN when the action space can be different at different time steps?

I would like to employ DQN to solve a constrained MDP problem. The problem has constraints on action space. At different time steps till the end, the available actions are different. It has different possibilities as below. 0, 1, 2, 3, 4 0, 2, 3,…
3
votes
2 answers

How does one make a neural network learn the training data while also forcing it to represent some known structure?

In general, how does one make a neural network learn the training data while also forcing it to represent some known structure (e.g., representing a family of functions)? The neural network might find the optimal weights, but those weights might no…
2
votes
0 answers

How to create a loss function that penalizes duplicate indices in the output tensor?

We're working on a sequence-to-sequence problem using pytorch, and are using cross-entropy to calculate the loss when comparing the output sequence to the target sequence. This works fine and penalizes the model correctly. However, we also have the…
2
votes
2 answers

How can we design the mutation and crossover operations when the order of the genes in the chromosomes matters?

Consider an optimization problem that involves a set of tasks $T = \{1,2,3,4,5\}$, where the goal is to find a certain order of these tasks. I would like to solve this problem with a genetic algorithm, where each chromosome $C = [i, j, k, l, m]$…
2
votes
0 answers

Wasserstein GAN with non-negative weights in the critic

I want to train a WGAN where the convolution layers in the critic are only allowed to have non-negative weights (for a technical reason). The biases, nonetheless, can take both +/- values. There is no constraint on the generator weights. I did a toy…
2
votes
1 answer

How to handle infeasibility caused due to crossover and mutation in genetic algorithm for optimization?

I have chromosomes with floating-point representation with values between $0$ and $1$. For example Let $p_1 = [0.1, 0.2, 0.3]$ and $p_2 = [0.5, 0.6, 0.7]$ be two parents. Both comply with the set of constraints. In my case, the major constraint is…
1
vote
0 answers

Is this a bandit problem or a MDP?

I am trying to understand if this problem can be casted both as a bandit problem as well as an MDP. Lets assume that we are trying to optimize sales $y_t$ based on investments $x_{1, t}, x_{2, t}$ over some horizon $H$. To model sales for timestep…
1
vote
0 answers

What would be a good optimization technique for this kind of problem?

Problem Description: Since I am not sure if there is a scientific term that categorizes this problem, I will do my best to describe it thoroughly. Suppose there is a chamber that's being filled with poisonous gas. The amount of poisonous gas being…
0
votes
0 answers

How to train a neural network with a non-differentiable linear program in the loss?

I am currently trying to train a neural network to predict certain input parameters for a linear program based on an input dataset of system measurements related to these parameters. The workflow is something like this: System measurements -->…
0
votes
0 answers

Is there a neural network architecture that enforces context-specific constraints on the output?

I am working on a prediction problem where each outcome vector in my training data $y_i$ was generated to satisfy a set of linear constraints $A_i y_i = b_i$. I know each $A_i$ and $b_i$ exactly. I want to be able to train the model on inputs $u_i$,…
1
2