Skip to content
Snippets Groups Projects

Neural net TTVA tool

Merged Matthew Joseph Basso requested to merge mbasso/athena:nn-ttva-tool into master

Adds TrackVertexAssociationTool/MVATrackVertexAssociationTool, which evaluates neural nets using lwtnn and inherits from ITrackVertexAssociationTool. Adds TrackVertexAssociationTool/MVAInputEvaluator for evaluation of inputs. No recommendations have been provided at this time.

Not sure how slow the tool is compared to the nominal tool or how to check this, but maybe some improvements might be apparent from reviewing the code. The evaluation of the value of the MVA as achieved using lwtnn in Athena vs. Keras in python is detailed here. The difference is small but nonzero with a slight asymmetry. Not sure why, recommendations were to look at the same histogram in particular areas of phase space or to plot the MVA score versus the difference in score as a scatter plot to see if these points fall on the cut threshold for TTVA

@vcairo @kostyuk @keli @npetters @goblirsc

Edit: everything seems to working now imo

Edited by Atlas Nightlybuild

Merge request reports

Pipeline #1957001 passed

Pipeline passed for 437986c7 on mbasso:nn-ttva-tool

Approval is optional

Merged by Edward MoyseEdward Moyse 4 years ago (Sep 24, 2020 3:47pm UTC)

Merge details

  • Changes merged into master with 8103c7a3.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Matthew Joseph Basso changed the description

    changed the description

  • added 1 commit

    • aaad5302 - Revert "Update test alg in anticipation of MVA tool testing"

    Compare with previous version

  • This merge request affects 1 package:

    • InnerDetector/InDetRecTools/TrackVertexAssociationTool

    Adding @goetz ,@sroe ,@amorley ,@dshope ,@jsandesa as watchers

  • Matthew Joseph Basso resolved all threads

    resolved all threads

  • Matthew Joseph Basso marked as a Work In Progress

    marked as a Work In Progress

  • :negative_squared_cross_mark: CI Result FAILURE (hash a78804f5)

    Athena AthSimulation AthGeneration AnalysisBase
    externals :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    cmake :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    make :white_check_mark: :white_check_mark: :white_check_mark: :o:
    required tests :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    optional tests :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:

    Full details available on this CI monitor view
    :white_check_mark: Athena: number of compilation errors 0, warnings 0
    :white_check_mark: AthSimulation: number of compilation errors 0, warnings 0
    :white_check_mark: AthGeneration: number of compilation errors 0, warnings 0
    :o: AnalysisBase: number of compilation errors 1, warnings 10
    :pencil: For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 20623]

  • :negative_squared_cross_mark: CI Result FAILURE (hash aaad5302)

    Athena AthSimulation AthGeneration AnalysisBase
    externals :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    cmake :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    make :white_check_mark: :white_check_mark: :white_check_mark: :o:
    required tests :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    optional tests :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:

    Full details available on this CI monitor view
    :white_check_mark: Athena: number of compilation errors 0, warnings 0
    :white_check_mark: AthSimulation: number of compilation errors 0, warnings 0
    :white_check_mark: AthGeneration: number of compilation errors 0, warnings 0
    :o: AnalysisBase: number of compilation errors 1, warnings 11
    :pencil: For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 20625]

  • Removing review label as this MR is a WIP. Please switch back when ready.

    Xiaozhong (L1)

  • Matthew Joseph Basso changed the description

    changed the description

  • added 2 commits

    Compare with previous version

  • Matthew Joseph Basso unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Hi all, so there was indeed a mistake in my validation yesterday. One was a bug in the input evaluator (I didn't apply the sqrt to the uncertainty in dz*sinTheta, so the MVA was instead using the uncertainty^2) and the other was a mistake in my validation (as Max already asked about, I was using inputs calculated in different contexts when evaluating the MVA score for a given track in my ntuple alg). This has been fixed and I now think that the network in lwtnn sees are the same as those seen in keras (in as much as I can see that the inputs in cpp are the same, so the assumption is that my ntuple alg then correctly dumps these inputs and that my python framework correctly reads them in as referenced to the best HS vertex determined using the truth validation package).

    I've attached some plots of the lwtnn and keras output discriminant shapes. They look very similar. Additionally, I've attached a plot of the difference (the spread end up being relatively significant? ~0.05? but this distribution is symmetric so this is more consistent with numerical/precision differences). The 2D plot shows that this difference mostly exists at lwtnn score <0.1, so this should not be a problem around our TTVA threshold cut (which should always be >0.5). So I would now call things validated, but let me know if you disagree.

    mva-tool-valid.pdf

  • This merge request affects 1 package:

    • InnerDetector/InDetRecTools/TrackVertexAssociationTool

    Adding @goetz ,@sroe ,@amorley ,@dshope ,@jsandesa as watchers

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading