1 / 59

Optimization with Neural Networks

Optimization with Neural Networks. Presented by: Nasim Zeynolabedini shoale Hashemi Zahra Rashti Instructor: Dr. S. Bagheri Sharif University of Technology Ordibehesht 1384. Introduction. Optimization Problem: A Problem with a cost function that is to be minimized or maximized

orli
Download Presentation

Optimization with Neural Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Optimization with Neural Networks Presented by:Nasim Zeynolabedinishoale HashemiZahra Rashti Instructor:Dr. S. Bagheri Sharif University of Technology Ordibehesht 1384

  2. Introduction Optimization Problem: • A Problem with a cost function that is to be minimized or maximized eg: TSP, Knapsack, Graph Partitioning, Graph Bisection, Graph Coloring, etc. • Many solutions to solve these problems such as: Linear optimization, Simulated Annealing, Mont Carlo, … ANDNeural Networks.

  3. Applications Applications in many fields like: • Routing in computer networks • VLSI circuit design • Planning in operational and logistic systems • Power distribution systems • Wireless and satellite communication systems

  4. Optimization Problems Types An optimization problem consists of two parts:Cost functionandConstraints • Constrained • The constraints are built in the cost function, so minimizing the cost function also satisfies the constraints • Unconstraint • There is no constraint for the problem! • Combinatorial • We separate the constraints and the cost function, minimize each of them and then add them together

  5. Why Neural Networks? • Drawbacks of conventional computing systems: • Perform poorly on complex problems • Lack the computational power • Don’t utilize the inherent parallelism of problems • Advantages of artificial neural networks: • Perform well even on complex problems • Very fast computational cycles if implemented in hardware • Can take the advantage of inherent parallelism of problems

  6. Some Efforts to Solve Optimization Problems • Many ANN algorithms with feedforward and recurrent architectures have been used to solve different optimization problems… • We’ve selected: • Hopfield NN • Self Organizing Map NN • Recurrent NN to solve TSP as the most common benchmark for optimization algorithms.

  7. Continuous Hopfield • Neuron function is continuous (Sigmoid function) • System behavior is described by a differential equation :

  8. An electronic implementation

  9. Basic idea • If : decision variables • Suppose is our objective function . • Constraints can be expressed as nonnegative penalty functions that only when represent a feasible solution • By combining the penalty functions with F , the original constrained problem may be reformulated as unconstrained problem in which the goal is to minimize the quantity :

  10. Basic idea (cont.) • > 0 is a sufficiently large scaling factor for the penalty terms . • Minimizing yields a minimal , feasible solution to the original problem • Furthermore if can be written in the form of energy function , there is a corresponding neural network whose equilibria represent solution to the problem

  11. Simplification of energy function • is a Lyapunov function so long as the the function is sigmoidal. • We modify slightly, but in such a way that it remains sigmoidal =>

  12. Simplification of energy function (cont.) • The inverse function can obviously be • If we use this in the middle term of energy function : • if we let become very large, this term will become negligible. The function is still a sigmoid, so L(v) is still a Lyapunov function, but in this situation (known as the high-gain limit) the middle term can be ignored.

  13. Traveling Salesman Problem • Checking out all possible routes : • routes • N = 30 => routes • route in a second => seconds => 31709791984 years • In many industrial problems : N >> 30 • A continuous Hopfield network can be constructed to quickly provide a good solution to the TSP

  14. The Hopfield network approach to the TSP involves arranging the network neurons in such a way that they represent the entries in the table • for an N-city problem we would require neurons • N of them will be turned ON with the remainder turned OFF

  15. Objective function and constraints • Constraints : • One neuron should be on in each row • One neuron should be on in each column • Objective function : • Length of the tour is Objective function that should be minimize • we must choose the network weights so that the Lyapunov function is minimized when constraints are met and objective function is minimum

  16. Setting up the function to be minimized • : state (0 or 1) of the neuron in position (i,a) in the table • : distance between city i and city j • Total length of tour :

  17. If we take into account both constraints and objective function : : for minimizing tour length : is non-zero if more than one neuron in on in each row : is non-zero if more than one neuron in on in each column : ensure that there is a total of N neurons ON

  18. Finding the network weights and input currents • We should select weights and currents so that two following equations become equal • First we make output voltages double subscripts :

  19. Note first that the multiply second-order terms and the multiply first order terms . • First order terms should be equal :

  20. we will need to treat the four sets of second-order terms in separately the second-order C terms are given by  = - C

  21. If then will add to lyapunov function but what we want is Kronecker delta : So we should have In the same way :

  22. D term contributes an amount to the Lyapunov function only when or when so : Bringing together all four components of the weights, we have, finally:

  23. Applying the method in practice • suitable values for the parameters A,B,C,D and must be determined • Tank and Hopfield used A=B=D=250 , C=1000 and =50 • Tank and Hopfield applied it to random 10-city maps and found that, overall, in about 50% of cases, the method found the optimum route from among the 181440 distinct paths

  24. The size of each black square indicates the value of the output of the corresponding neuron

  25. Self Organizing Map NN • In 1975 Teuvo Kohonen introduced new type of neural network that uses competitive, unsupervised learning

  26. Self Organizing Map NN Summary of the algorithm 1.Initialization: Choose random values for the initial weight vectors wj(0). 2.Sampling: Select an input example x from the training set for use as an input. 3.Identify winning neuron: Find the neuron whose weight vector is closest to the input x. 4.Updating:Adjust the weights for all neurons in the neighborhoods of the winning neuron, where the neighborhood is defined by those values of A( i, i*) that are not equal to zero. 5.Termination: Continue by returning to step 2 until there no further changes in the feature map. Practicalities 1.The learning rate parameter should begin with a value close to unity and decrease gradually as learning proceeds. 2. The neighborhoods should also decrease in size as learning proceeds.

  27. Self Organizing Map NN • One dimensional neighborhood of Kohonen SOM • Classical two dimensional neighborhood • Extended two dimensional neighborhood of Kohonen SOM

  28. Self Organizing Map NN • Self-organization of a network with two dimensional neighborhood. • Self-organization of a network with one dimensional neighborhood.

  29. TSP Solving • The Elastic Net Approach • Durbin and Willshaw first proposed the elastic net method in 1987 as a means of solving the TSP. • SOM Approach • Even before Durbin and Willshaws work on the elastic net method was published, Fort had been working on the idea of using a self organizing process to solve the TSP.

  30. The Elastic Net Approach

  31. SOM Approach

  32. Modifications of SOM • The work of Angeniol et al. is based on the distinctive feature that units in the ring are dynamically created and deleted. • Burke and Damany use the "conscience" mechanism to solve the problem related to the mapping of multiple cities to the same unit in the ring. • Matsuyama adds a new term, previously introduced in Durbin and Willshaw to the weight update equations.

  33. Elastic Net vs. SOM • The difference between the two approaches however is that Forts algorithm incorporates stochasticities into the weight adaptations whereas the elastic net method is completely deterministic in nature. • There is also no energy minimization involved with the method of Fort. • Fort’s results were not as good as those obtained using the elastic net method.

  34. Elastic Net vs. SOM(cont.) EN: Elastic Net GN Guilty Net HT Hopfield-Tank

  35. Advantages of a self organizing approach • The greater biological resemblance of the SOFM • the reduced number of neurons and synapses needed to perform optimization tasks • The Kohonen Self-Organizing Map is substantially superior to the Continuous Hopfield Net.

  36. Hopfield Approach Vs. SOM Approach Best route for 15 cities (using 80 runs) is 2127 km by Continuous Hopfield and 1311 km by Kohonen Self-Organizing Map. The Kohonen path seems optimal, but this has not been proven.

  37. Recurrent Neural Networks • A recurrent neural network (RNN) is an Artificial Neural Network, which has external inputs in the form of a vector X, a feedforward function ƒ(.) (any feedforward network including multi-layer perceptron is appropriate), outputs in the form of vector Y and afeedbackpath, which copies the outputs to inputs. • The network behavior is based on its history and so we must think of pattern presentation as it happens intime.

  38. Recurrent Neural Networks • Simple Recurrent Networks • Recurrent Multilayer Perceptron … and • Simultaneous Recurrent Networks External Inputs Output Hidden Layer(s) Output Layer Bank of Delays

  39. Simultaneous Recurrent Neural Networks • Simultaneous Recurrent Neural Network (SRN) is a feedforward network with simultaneous feedback from outputs of the network to its inputswithout any time delay. • Formal description of SRN: Outputs Y Inputs X Feedforward Mapping (.,W) Feedback Path

  40. Simultaneous Recurrent Neural Networks • Follows a trajectory in the state space to relax to a fixed point • The network is provided with the external inputs and initial outputs are typically assumed randomly • The output of previous iteration is fedback to the network along with the external inputs to compute the output of next iteration • The network iterates until it reaches a stable equilibrium point

  41. SRN Training • The standard procedure to train a recurrent network is to define an error measure, which is a function of network outputs and modify the weights using a derivative of the error with respect to the weights themselves. The generic weight update equation is given by:

  42. Training of SRN • The derivative values can be computed using a number of techniques: •  Backpropagation Through Time (BTT) which requires the • knowledge of desired outputs throughout the trajectory path •  Error critics (EC) has no quarantee of yielding exact results • in equilibrium •  Truncation did not provide satisfactory results and needs • to be further tested •  Recurrent Backpropagation requires only knowledge of • desired outputs at the end of trajectory path and hence • chosen to train SRN

  43. Solving TSP with SRN • Network topology for traveling salesman problem: Input Layer Hidden Layer(s) Output Layer Hidden Layers N N nodes Cost Matrix Path Specification N N nodes Output Array N N nodes

  44. Problem Constraints and Error Functions • These constraints enforce the row and column sums to be equal to a value of "1.0", to force the neuron outputs to limiting values of "0.0" and "1.0", to eliminate loops in the solution path, and to encourage minimum distance solutions to be identified

  45. Problem Constraints and Error Functions • Error Functions:

  46. Weight Adjustment • The formula used for weight adjustment based on the RBP algorithm is given by Pineda [1987]:

  47. Weight Adjustment

  48. Weight Parameters • The stability of the network during training greatly depends on these constraint weight parameters. Very large values of these parameters will force all the weights of the network to become negative, which tend to make the network unstable and all the outputs of the network to converge to 0.5. • It was also determined through exploratory experimentation with the algorithm that these parameter values needed to be changed during training subject to a simple schedule to effectively guide the learning process

  49. Traveling Salesman Problem

More Related