yakov_a_jerkov: (Default)
[personal profile] yakov_a_jerkov
На совсем другую тему. У меня есть вопрос об описании одного алгоритма. Я положу это все под кат.



Я читаю статью "Towards Open Set Deep Networks" с целью применить содержащуюся в этой статье идею для отбрасывание картинок, не принадлежащих ни к одному из классифицируемых классов.

Возможно, то, что это все для классификации, networks эти -- возможно, этого всего даже не нужно знать, чтобы ответить на мой вопрос.

Вроде бы, статья весьма просто написана, и идея, вроде, мне понятна -- по крайней мере, я думаю, что понятна. Но я не могу понять описанные в этой статье алгоритмы. Мне кажется, что дело в том, что я не понимаю notation, но может я и чего-то более фундаментального не понимаю. В общем, если кому-то написанное понятно, то я был бы благодарен за помощь.

Я вставлю сюда первый алгоритм, как картинку.



Я плохо понимаю значение i. x_i_j -- это что, все inputs, которые сеть классифицирует, как класс j? И, соответственно, S_i_j -- это что? Согласно определения, получается, что j-координата activation of x_i_j.

Дальше, mu_j -- это вектор или число? По идее, как я ее понимаю, должен быть вектор, но по определению вроде как число, или нет?

Что такое S_hat? Я нигде не вижу определения, вообще.

Идею я понимал так. Для каждого класса берем activation vectors всех inputs, которые сеть классифицирует как данный класс. По каждой координате отдельно вычисляем mean, и таким образом получаем mean activation vector для этого класса. А потом уже смотрим на distribution расстояний этих верно классифицированных inputs до mean activation vector.

Но сейчас я уже сомневаюсь, что правильно понял.

Date: 2018-05-09 10:42 pm (UTC)
From: [identity profile] angerona.livejournal.com
насколько я вижу, x_i_j -- это пример x_i классифицированный в класс j. То есть картинка, которую классифицировали в j.

но за правильность этой интерпретации не ручаюсь.

мю -- похоже вектор, потому что оперирует на векторах.

S_hat -- возможно указывает, что S -- это вектор.
Edited Date: 2018-05-09 10:45 pm (UTC)

Date: 2018-05-09 11:17 pm (UTC)
From: [identity profile] yakov-a-jerkov.livejournal.com
насколько я вижу, x_i_j -- это пример x_i классифицированный в класс j. То есть картинка, которую классифицировали в j.

Ну, да, но тогда S_i_j -- это значение j-координаты activation vector of x_i_j. Это, само по себе, не очень makes sense to me. Но дальше получается, если j фиксировано, то mu_j -- это mean всех значений этой j-координаты векторов x_i_j, то есть число, а не вектор.

S_hat -- возможно указывает, что S -- это вектор.

О, это может быть! Но какие у него координаты?

Date: 2018-05-10 01:57 am (UTC)
From: [identity profile] angerona.livejournal.com
ok, я почитала. Я правда засыпаю, и даже в несонном состоянии не очень много во всем этом разбираюсь, но тут как раз, кажется, все не так запутанно. Ну или это я во сне так думаю :).

Here's how I see it: for each image you have a list of values (let's call them "weights" because that's how I think of them) in the penultimate layer of the network (so not the layer that says which class the image falls into, but the one before that).

For each class j, you take all the images that were correctly characterized to be in that class, and you take all of their activation vectors and you call that collection of vectors "S".

Then you compute a mean for each "weight" in S. So for the 1st weight, you take all of the values this weight takes on for each of the correctly classified image and you compute a mean, and then so on and so on. That's your mean "Activation Vector."

And now you compute p_j, which is essentially a value -- a probability based on a Weibull distribution. A quick googling tells me that this Weibull distribution is based on 3 parameters: scale parameter, shape parameter and location parameter. I'm having a hard time here, because I don't understand the weibull distribution (but I'm sure you will), but basically tau_i is a list of "largest distances" for all weights. So for each weight it's an absolute value of a difference between the "furthest outlying" value and the mean value. That's what S_hat means in this case, I think: the most "extreme" value of all available for that weight, and we are finding the difference between that and the mean.

Does this help any?

Again, I have no idea whether I'm even in the right ballpark :).

Date: 2018-05-10 02:44 am (UTC)
From: [identity profile] yakov-a-jerkov.livejournal.com
the penultimate layer of the network (so not the layer that says which class the image falls into, but the one before that

Yeah, it is sort of the same thing though. The last layer, softmax, just normalizes the scores, so they could be treated as probabilities. So, the highest score in the penultimate layer gives you the class too. The authors say that normalization screws up their approach, so that is why they are working with the penultimate layer.

For each class j, you take all the images that were correctly characterized to be in that class, and you take all of their activation vectors and you call that collection of vectors "S".

Yes, up to this point it is clear.

Then you compute a mean for each "weight" in S. So for the 1st weight, you take all of the values this weight takes on for each of the correctly classified image and you compute a mean, and then so on and so on. That's your mean "Activation Vector."

OK, that is what I thought too -- mu_j is the mean activation vector for class j -- and that is what I wrote in my post (my understanding of the general idea). But looking at the notation in the algorithm description, I am not sure it is coordinatewise mean. (I think coordinatewise is what you mean by "mean for each weight".) I find the notation very confusing.

Anyway, it is good to know that you think it is coordinatewise mean too.

So for each weight it's an absolute value of a difference between the "furthest outlying" value and the mean value. That's what S_hat means in this case, I think: the most "extreme" value of all available for that weight, and we are finding the difference between that and the mean.

I don't think this is right, but I may be missing something. That FitHigh function should return the three parameters of Weibull distribution. So, I thought it looked at the distribution of the norms/distances from the activations of correctly identified inputs to the mean per each class and returned the parameters that fit that distribution.

Does this help any?

Sure it does. Thanks a lot for taking the time.

Date: 2018-05-09 11:44 pm (UTC)
From: [identity profile] yaceya.livejournal.com
Скорее на то что это S является эмпирическим приближением построенном на имеющихся наблюдениях некой настоящей S существующей для всех возможных наблюдений. Но чисто из статьи это надёжно утверждать нельзя - надо смотреть ссылки. ну или прямо спросить автора раз он так талантливо забыл аннотировать то что пишет
Edited Date: 2018-05-09 11:44 pm (UTC)

Date: 2018-05-10 12:10 am (UTC)
From: [identity profile] yakov-a-jerkov.livejournal.com
Ну, по крайней мере, вы тоже считаете, что написано не очень ясно!

Date: 2018-05-10 12:20 am (UTC)
From: [identity profile] yaceya.livejournal.com
Я вижу что написано не ясно. Но не исключаю что в их узкой тусовке это стандарт типа F - кумулятивная функция, а F-hat - ее эмпирическое приближение. Это могло бы объяснить отсутсвие определения. Но тогда эту S вы должны были бы увидеть в любом введении в предмет.

Date: 2018-05-10 12:27 am (UTC)
From: [identity profile] yakov-a-jerkov.livejournal.com
Yeah, может быть, что и стандарт. Я потому и спросил, что может кто-то сразу узнает.

Мне, собственно, и до S_hat непонятно. Как я понимаю общую идею, я написал. Но, возможно, я ее не совсем правильно понимаю.

Date: 2018-05-10 12:43 am (UTC)
From: [identity profile] yaceya.livejournal.com
Упоминание extreme value fit наводит меня на мысль что речь может и вовсе идёт функциях. Т.е Может v_j(.) на выходе для каждого x_ij выдаёт функцию? Тогда и mu_j - это усреднённая функция. В общем, закругляюсь от бесполезности предположений не привязанных к контексту. Может кто-то непосредственно этим занимается или хотя бы почитывает

Date: 2018-05-10 12:54 am (UTC)
From: [identity profile] yakov-a-jerkov.livejournal.com
Нет, activation, v(x) -- это вектор с количеством координат равным количеству классов, которые сеть классифицирует. v(x) -- это то, что на выходе, на последнем шаге, грубо говоря, сеть смотрит какая координата имеет самое большое значение, и, если это координата j, то говорит, что картинка принадлежит к классу j.

Я изначально думал, что mu_j -- это среднее значение (покоординатно) всех activation vectors для класса j (правильно классифицированных inputs). Но сейчас уже не уверен.

Date: 2018-05-10 12:15 am (UTC)
From: [identity profile] yaceya.livejournal.com
FitHigh function to do Weibull fitting on the largest of the distances between all correct positive training instances and the associated μi.
Следовательно, я чуть более обоснованно могу предположить что функция принимает все значения в классе j и выдаёт максимальное. Если это так, то S-hat должно быть эмпирической функцией (построенной на значениях v_j(x_ij) ) от которых вычисляется расстояние до того самого muj. Но я бы задал прямой вопрос автору. Тем более я не знаком с этой малиной и их закидонами

Date: 2018-05-10 01:59 am (UTC)
From: [identity profile] angerona.livejournal.com
unlikely. S is a collection of vectors.

There is no "real S" (I think you are thinking of supervised learning, which I'm not sure this method falls into.)

Date: 2018-05-10 02:27 am (UTC)
From: [identity profile] yakov-a-jerkov.livejournal.com
It is definitely supervised. You have a labeled training set. That is how you know if an image is classified correctly.

Profile

yakov_a_jerkov: (Default)
yakov_a_jerkov

May 2025

S M T W T F S
     12 3
4567 8 910
11 121314 15 16 17
18 1920 21 222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 23rd, 2025 10:03 pm
Powered by Dreamwidth Studios